Package org.exoplatform.container.management

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


      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

Related Classes of org.exoplatform.container.management.ManagementContextImpl

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.