Examples of ManagementContextImpl


Examples of org.exoplatform.container.jmx.ManagementContextImpl

    */
   private final Queue<WebAppInitContext> portalContexts = new ConcurrentLinkedQueue<WebAppInitContext>();

   public RootContainer()
   {
      super(new ManagementContextImpl(findMBeanServer(), new HashMap<String, String>()));
      Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
      this.registerComponentInstance(J2EEServerInfo.class, serverenv_);
   }
View Full Code Here

Examples of org.exoplatform.container.jmx.ManagementContextImpl

   protected PicoContainer parent;

   public ExoContainer()
   {
      super(new ManagementContextImpl());

      //

   }
View Full Code Here

Examples of org.exoplatform.container.jmx.ManagementContextImpl

   }

   public ExoContainer(MBeanServer mbeanServer)
   {
      super(new ManagementContextImpl(mbeanServer));
      context = new ExoContainerContext(this);
      context.setName(this.getClass().getName());
      registerComponentInstance(context);
      this.parent = null;
   }
View Full Code Here

Examples of org.exoplatform.container.jmx.ManagementContextImpl

    */
   private final Queue<WebAppInitContext> portalContexts = new ConcurrentLinkedQueue<WebAppInitContext>();

   public RootContainer()
   {
      super(new ManagementContextImpl(findMBeanServer(), new HashMap<String, String>()));
      Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
      this.registerComponentInstance(J2EEServerInfo.class, serverenv_);
   }
View Full Code Here

Examples of org.exoplatform.container.jmx.ManagementContextImpl

   private final J2EEServerInfo serverenv_ = new J2EEServerInfo();

   public RootContainer()
   {
      super(new ManagementContextImpl(findMBeanServer(), new HashMap<String, String>()));
      Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
      this.registerComponentInstance(J2EEServerInfo.class, serverenv_);
   }
View Full Code Here

Examples of org.exoplatform.container.management.ManagementContextImpl

      URL rootURL = TestPortalContainerManagedIntegration.class.getResource("root-configuration.xml");
      URL portalURL = TestPortalContainerManagedIntegration.class.getResource("portal-configuration.xml");

      //
      RootContainer root = new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();
      ManagementContextImpl rootManagementContext = (ManagementContextImpl)root.getManagementContext();

      //
      PortalContainer portal = PortalContainer.getInstance();
      ManagementContextImpl portalManagementContext = (ManagementContextImpl)portal.getManagementContext();
      assertSame(root.getManagementContext(), portalManagementContext.getParent());
      assertNotNull(portalManagementContext.findContainer());

      //
      SimpleManagementAware rootManagementAware = (SimpleManagementAware)root.getComponentInstance("RootManagementAware");
      ManagementContextImpl rootManagementAwareContext = (ManagementContextImpl)rootManagementAware.context;
      assertSame(rootManagementContext, rootManagementAwareContext.getParent());

      //
      SimpleManagementAware portalManagementAware = (SimpleManagementAware)portal.getComponentInstance("PortalManagementAware");
      ManagementContextImpl portalManagementAwareContext = (ManagementContextImpl)portalManagementAware.context;
      assertSame(portalManagementContext, portalManagementAwareContext.getParent());
   }
View Full Code Here

Examples of org.exoplatform.container.management.ManagementContextImpl

      URL rootURL = TestPortalContainerManagedIntegration.class.getResource("root-configuration.xml");
      URL portalURL = TestPortalContainerManagedIntegration.class.getResource("portal-configuration.xml");

      //
      RootContainer root = new ContainerBuilder().withRoot(rootURL).withPortal(portalURL).build();
      ManagementContextImpl rootManagementContext = (ManagementContextImpl)root.getManagementContext();

      //
      PortalContainer portal = PortalContainer.getInstance();
      ManagementContextImpl portalManagementContext = (ManagementContextImpl)portal.getManagementContext();
      assertSame(root.getManagementContext(), portalManagementContext.getParent());
      assertSame(portal, portalManagementContext.findContainer());

      //
      SimpleManagementAware rootManagementAware = (SimpleManagementAware)root.getComponentInstance("RootManagementAware");
      ManagementContextImpl rootManagementAwareContext = (ManagementContextImpl)rootManagementAware.context;
      assertSame(rootManagementContext, rootManagementAwareContext.getParent());

      //
      SimpleManagementAware portalManagementAware = (SimpleManagementAware)portal.getComponentInstance("PortalManagementAware");
      ManagementContextImpl portalManagementAwareContext = (ManagementContextImpl)portalManagementAware.context;
      assertSame(portalManagementContext, portalManagementAwareContext.getParent());
   }
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.