Package mx4j.log

Examples of mx4j.log.Logger.debug()


         oldValue = getAttribute(attrName);
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Previous value of attribute " + attrName + ": " + oldValue);
      }
      catch (Exception x)
      {
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Cannot get previous value of attribute " + attrName, x);
      }

      // Check if setMethod is present
      String method = (String)attributeDescriptor.getFieldValue("setMethod");
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("setMethod field is: " + method);
View Full Code Here


         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Cannot get previous value of attribute " + attrName, x);
      }

      // Check if setMethod is present
      String method = (String)attributeDescriptor.getFieldValue("setMethod");
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("setMethod field is: " + method);
      if (method != null)
      {
         Class declared = loadClassWithContextClassLoader(attrInfo.getType());
         if (attrValue != null)
         {
View Full Code Here

      Logger logger = getLogger();

      // Find operation descriptor
      ModelMBeanInfo info = getModelMBeanInfo();
      if (info == null) throw new MBeanException(new ServiceNotFoundException("ModelMBeanInfo is null"));
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("ModelMBeanInfo is: " + info);

      // This is a clone, we use it read only
      ModelMBeanOperationInfo operInfo = info.getOperation(method);
      if (operInfo == null)
      {
View Full Code Here

         catch (Exception e)
         {
            throw new MBeanException(new ServiceNotFoundException("Cannot find ModelMBeanOperationInfo for operation " + method));
         }
      }
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Operation info is: " + operInfo);

      // This descriptor is a clone
      Descriptor operationDescriptor = operInfo.getDescriptor();
      if (operationDescriptor == null) throw new MBeanException(new ServiceNotFoundException("Operation descriptor for operation " + method + " cannot be null"));
      String role = (String)operationDescriptor.getFieldValue("role");
View Full Code Here

      // This descriptor is a clone
      Descriptor operationDescriptor = operInfo.getDescriptor();
      if (operationDescriptor == null) throw new MBeanException(new ServiceNotFoundException("Operation descriptor for operation " + method + " cannot be null"));
      String role = (String)operationDescriptor.getFieldValue("role");
      if (role == null || !role.equals("operation")) throw new MBeanException(new ServiceNotFoundException("Operation descriptor field 'role' must be 'operation', not " + role));
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Operation descriptor is: " + operationDescriptor);

      // This returns a clone of the mbean descriptor, we use it read only
      Descriptor mbeanDescriptor = info.getMBeanDescriptor();
      if (mbeanDescriptor == null) throw new MBeanException(new ServiceNotFoundException("MBean descriptor cannot be null"));
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("MBean descriptor is: " + mbeanDescriptor);
View Full Code Here

      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Operation descriptor is: " + operationDescriptor);

      // This returns a clone of the mbean descriptor, we use it read only
      Descriptor mbeanDescriptor = info.getMBeanDescriptor();
      if (mbeanDescriptor == null) throw new MBeanException(new ServiceNotFoundException("MBean descriptor cannot be null"));
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("MBean descriptor is: " + mbeanDescriptor);

      Object returnValue = null;

      String lastUpdateField = "lastReturnedTimeStamp";
View Full Code Here

         // Find target object
         Object target = resolveTargetObject(operationDescriptor);
         returnValue = invokeMethod(target, method, parameters, arguments);

         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Returned value is: " + returnValue);

         if (returnValue != null)
         {
            Class parameter = returnValue.getClass();
            Class declared = loadClassWithContextClassLoader(operInfo.getReturnType());
View Full Code Here

            // And now replace the descriptor with the updated clone
            info.setDescriptor(operationDescriptor, "operation");
         }

         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("invoke for operation " + method + " returns invoked value: " + returnValue);
      }
      else
      {
         // Return cached value
         returnValue = operationDescriptor.getFieldValue("lastReturnedValue");
View Full Code Here

            Class declared = loadClassWithContextClassLoader(operInfo.getReturnType());

            checkAssignability(parameter, declared);
         }

         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("invoke for operation " + method + " returns cached value: " + returnValue);
      }

      // As an extension, persist this model mbean also after operation invocation, but using only
      // settings provided in the operation descriptor, without falling back to defaults set in
      // the MBean descriptor
View Full Code Here

         {
            Long timestamp = (Long)attribute.getFieldValue(lastUpdateField);
            long luts = 0;

            if (timestamp != null) luts = timestamp.longValue();
            if (logger.isEnabledFor(Logger.DEBUG)) logger.debug(lastUpdateField + " is: " + luts);

            long now = System.currentTimeMillis();
            if (now < luts + ctl)
            {
               // Seems to be not stale, but has been set at least once ?
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.