code: @Override
      public DevAttrHistory_4 read_attribute_history_4(final String attributeName, final int maxSize) throws DevFailed {
          MDC.setContextMap(contextMap);
          xlogger.entry();
          checkInitialization();
          deviceMonitoring.startRequest("read_attribute_history_4");
          DevAttrHistory_4 result = null;
          try {
              final AttributeImpl attr = AttributeGetterSetter.getAttribute(attributeName, attributeList);
              if (!attr.isPolled()) {
                  throw DevFailedUtils.newDevFailed(ExceptionMessages.ATTR_NOT_POLLED, attr.getName() + " is not polled");
              }
              result = attr.getHistory().getAttrHistory4(maxSize);
          } catch (final Exception e) {
              deviceMonitoring.addError();
              if (e instanceof DevFailed) {
                  throw (DevFailed) e;
              } else {
                  // with CORBA, the stack trace is not visible by the client if
                  // not inserted in DevFailed.
                  throw DevFailedUtils.newDevFailed(e);
              }
          }
          return result;
      }
docs: read an attribute history. IDL 4 version. The history is filled only be
  attribute polling
  
  @param attributeName The attribute to retrieve
  @param maxSize       The history maximum size returned
  @throws DevFailed