Package org.jboss.aop.microcontainer.aspects.jmx

Examples of org.jboss.aop.microcontainer.aspects.jmx.JMX


   /** The log */
   private static final Logger log = Logger.getLogger(ServiceControllerRegistrationLifecycleCallback.class);
  
   public void install(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      ObjectName objectName = createObjectName(context, jmx);

      Class<?> intfClass = null;
      boolean registerDirectly = false;
      if (jmx != null)
      {
         intfClass = jmx.exposedInterface();
         registerDirectly = jmx.registerDirectly();
      }
      // NOTE: The cast to Class is necessary for compilation under JDK6
      Object mbean = (registerDirectly ? context.getTarget()
                                       : new StandardMBean(context.getTarget(), (Class) intfClass));
      MBeanServer server = getServiceController().getMBeanServer();
View Full Code Here


      return null;
   }

   public void addControllerContext(ControllerContext context) throws Throwable
   {
      JMX jmx = readJmxAnnotation(context);
      if (jmx != null)
      {
         DependencyInfo info = context.getDependencyInfo();
         info.addLifecycleCallback(new ServiceLifecycleCallback());
      }
View Full Code Here

         throw new IllegalStateException("No service controller configured");
   }
  
   public void install(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      ObjectName objectName = createObjectName(context, jmx);

      Class<?> intfClass = null;
      boolean registerDirectly = false;
      if (jmx != null)
      {
         intfClass = jmx.exposedInterface();
         registerDirectly = jmx.registerDirectly();
      }
      // NOTE: The cast to Class is necessary for compilation under JDK6
      Object mbean = (registerDirectly ? context.getTarget()
                                       : new StandardMBean(context.getTarget(), (Class) intfClass));
      MBeanServer server = serviceController.getMBeanServer();
View Full Code Here

      log.debug("Registered MBean " + objectName);
   }
  
   public void uninstall(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      ObjectName objectName = createObjectName(context, jmx);

      try
      {
         log.debug("Unregistering MBean " + objectName);
View Full Code Here

      return objectName;
   }
  
   protected ObjectName determineObjectName(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      return createObjectName(context, jmx);
   }
View Full Code Here

         throw new IllegalStateException("No service controller configured");
   }

   public void install(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      ObjectName objectName = createObjectName(context, jmx);

      @SuppressWarnings("unchecked")
      Class intfClass = null;
      boolean registerDirectly = false;
      if (jmx != null)
      {
         intfClass = jmx.exposedInterface();
         registerDirectly = jmx.registerDirectly();
      }
      @SuppressWarnings("unchecked")
      Object mbean = (registerDirectly ? context.getTarget() : new StandardMBean(context.getTarget(), intfClass));
      mbeanServer.registerMBean(mbean, objectName);
      try
View Full Code Here

      log.debug("Registered MBean " + objectName);
   }

   public void uninstall(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      ObjectName objectName = createObjectName(context, jmx);

      log.debug("Unregistering MBean " + objectName);
      serviceController.destroy(objectName);
   }
View Full Code Here

                executorBuilder.addConstructorParameter(TimeUnit.class.getName(), unit);
                executorBuilder.addConstructorParameter(BlockingQueue.class.getName(), executorBuilder.createValue(queue));
                executorBuilder.addConstructorParameter(ThreadFactory.class.getName(), executorBuilder.createInject(threadFactory));
                executorBuilder.addConstructorParameter(RejectedExecutionHandler.class.getName(), policyValue);
            }
            executorBuilder.addAnnotation(new JMX() {
                public Class<?> exposedInterface() {
                    return ThreadPoolExecutorMBean.class;
                }

                public String name() {
View Full Code Here

         throw new IllegalStateException("No service controller configured");
   }

   public void install(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      ObjectName objectName = createObjectName(context, jmx);

      Class<?> intfClass = null;
      boolean registerDirectly = false;
      if (jmx != null)
      {
         intfClass = jmx.exposedInterface();
         registerDirectly = jmx.registerDirectly();
      }
      Object mbean = (registerDirectly ? context.getTarget() : new StandardMBean(context.getTarget(), intfClass));
      mbeanServer.registerMBean(mbean, objectName);
      try
      {
View Full Code Here

      log.debug("Registered MBean " + objectName);
   }

   public void uninstall(ControllerContext context) throws Exception
   {
      JMX jmx = readJmxAnnotation(context);
      ObjectName objectName = createObjectName(context, jmx);

      log.debug("Unregistering MBean " + objectName);
      serviceController.destroy(objectName);
   }
View Full Code Here

TOP

Related Classes of org.jboss.aop.microcontainer.aspects.jmx.JMX

Copyright © 2018 www.massapicom. 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.