Package org.exoplatform.container

Examples of org.exoplatform.container.RootContainer.registerComponentInstance()


      ManagementProviderImpl provider = (ManagementProviderImpl)container.getComponentInstanceOfType(ManagementProviderImpl.class);
      assertNull(provider);
      Object foo = container.getComponentInstance("Foo");
      assertNotNull(foo);
      provider = new ManagementProviderImpl();
      container.registerComponentInstance(provider);
      assertEquals(2, provider.managedResources.size());
      ManagedResource fooMR = provider.managedResources.get(1);
      assertSame(foo, fooMR.resource);
      assertEquals(Collections.<ScopedData>emptyList(), fooMR.context.getScopingData(ScopedData.class));
      fooMR.register();
View Full Code Here


         ExoContainerContext.setCurrentContainer(oldContainer);
      }
     
      // Manual

      root.registerComponentInstance("Bar", new ManagedWithObjectNameTemplate("Bar"));

      Object instance2 = root.getComponentInstance("Bar");
      assertNotNull(instance2);

      Set set2 = server.queryMBeans(ObjectName.getInstance("exo:object=Bar"), null);
View Full Code Here

            // set TCCL to this module's CL
            Thread.currentThread().setContextClassLoader(module.getClassLoader());
            final RootContainer rootContainer = RootContainer.getInstance();

            // register WSRP plugins service so that it's available when the WSRP service starts
            rootContainer.registerComponentInstance(AS7Plugins.class, WSRPPostModuleDeploymentProcessor.plugins);
        } finally {
            if (Thread.currentThread().getContextClassLoader() != oldCl) {
                Thread.currentThread().setContextClassLoader(oldCl);
            }
        }
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.