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

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


      MetaDataContextInterceptor.classAnnotation = null;
      server.invoke(bean, "someMethod", new Object[0], new String[0]);
     
      assertNotNull(MetaDataContextInterceptor.classAnnotation);
      assertTrue(MetaDataContextInterceptor.classAnnotation instanceof JMX);
      JMX jmx = (JMX)MetaDataContextInterceptor.classAnnotation;
      assertTrue(jmx.exposedInterface().equals(SimpleBean.class));
      assertTrue(jmx.name() == null || jmx.name().length() == 0);
     
      MetaDataContextInterceptor.classAnnotation = null;     
      server.invoke(notbean, "someOtherMethod", new Object[0], new String[0]);
     
      assertNotNull(MetaDataContextInterceptor.classAnnotation);
      assertTrue(MetaDataContextInterceptor.classAnnotation instanceof JMX);
      JMX jmx2 = (JMX)MetaDataContextInterceptor.classAnnotation;
      assertTrue(jmx2.exposedInterface().equals(SimpleBeanImplMBean.class));
      assertEquals(jmx2.name(), "test:name=NotBean1");
     
      MetaDataContextInterceptor.classAnnotation = null;     
      server.invoke(bean, "someMethod", new Object[0], new String[0]);
      assertNotNull(MetaDataContextInterceptor.classAnnotation);
      assertEquals(jmx, MetaDataContextInterceptor.classAnnotation);
View Full Code Here


   /** 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

         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

/*  72 */       throw new IllegalStateException("No service controller configured");
/*     */   }
/*     */
/*     */   public void install(ControllerContext context) throws Exception
/*     */   {
/*  77 */     JMX jmx = readJmxAnnotation(context);
/*  78 */     ObjectName objectName = createObjectName(context, jmx);
/*     */
/*  80 */     Class intfClass = null;
/*  81 */     boolean registerDirectly = false;
/*  82 */     if (jmx != null)
/*     */     {
/*  84 */       intfClass = jmx.exposedInterface();
/*  85 */       registerDirectly = jmx.registerDirectly();
/*     */     }
/*  87 */     Object mbean = registerDirectly ? context.getTarget() : new StandardMBean(context.getTarget(), intfClass);
/*     */
/*  89 */     MBeanServer server = this.serviceController.getMBeanServer();
/*  90 */     server.registerMBean(mbean, objectName);
View Full Code Here

/* 107 */     log.debug("Registered MBean " + objectName);
/*     */   }
/*     */
/*     */   public void uninstall(ControllerContext context) throws Exception
/*     */   {
/* 112 */     JMX jmx = readJmxAnnotation(context);
/* 113 */     ObjectName objectName = createObjectName(context, jmx);
/*     */
/* 115 */     log.debug("Unregistering MBean " + objectName);
/* 116 */     this.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.