Package org.apache.geronimo.kernel

Examples of org.apache.geronimo.kernel.Kernel.loadGBean()


            GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO);
            j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName));
            ObjectName j2eeServerObjectName = NameFactory.getServerName(null, null, j2eeContext);
//                    ObjectName.getInstance(j2eeDomainName + ":j2eeType=J2EEServer,name=" + j2eeServerName);
            kernel.loadGBean(j2eeServerObjectName, j2eeServerGBean);
            kernel.startGBean(j2eeServerObjectName);
            assertRunning(kernel, j2eeServerObjectName);

            // load the configuration
            ObjectName objectName = ObjectName.getInstance("test:configuration=test-ejb-jar");
View Full Code Here


            kernel.startGBean(j2eeServerObjectName);
            assertRunning(kernel, j2eeServerObjectName);

            // load the configuration
            ObjectName objectName = ObjectName.getInstance("test:configuration=test-ejb-jar");
            kernel.loadGBean(objectName, config);
            config.setAttribute("baseURL", unpackedDir.toURL());

            //start configuration to load but not start gbeans.
            kernel.startGBean(objectName);
            //verify that activationSpecInfoMap is accessible and correct while ResourceAdapterGBean is stopped.
View Full Code Here

            kernel.boot();

            GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO);
            serverInfoGBean.setAttribute("baseDirectory", ".");
            ObjectName serverInfoObjectName = ObjectName.getInstance(j2eeContext.getJ2eeDomainName() + ":type=ServerInfo");
            kernel.loadGBean(serverInfoObjectName, serverInfoGBean);
            kernel.startGBean(serverInfoObjectName);
            assertRunning(kernel, serverInfoObjectName);

            GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO);
            j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName));
View Full Code Here

            assertRunning(kernel, serverInfoObjectName);

            GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO);
            j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName));
            ObjectName j2eeServerObjectName = NameFactory.getServerName(null, null, j2eeContext);
            kernel.loadGBean(j2eeServerObjectName, j2eeServerGBean);
            kernel.startGBean(j2eeServerObjectName);
            assertRunning(kernel, j2eeServerObjectName);

            // load the configuration
            ObjectName objectName = ObjectName.getInstance("test:configuration=test-ejb-jar");
View Full Code Here

            kernel.startGBean(j2eeServerObjectName);
            assertRunning(kernel, j2eeServerObjectName);

            // load the configuration
            ObjectName objectName = ObjectName.getInstance("test:configuration=test-ejb-jar");
            kernel.loadGBean(objectName, config);
            config.setAttribute("baseURL", unpackedDir.toURL());

            // start the configuration
            kernel.startRecursiveGBean(objectName);
            assertRunning(kernel, objectName);
View Full Code Here

        kernel.boot();
        GBeanMBean mockGBean = new GBeanMBean(MockGBean.getGBeanInfo(), Speed.class.getClassLoader());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        ObjectName objectName = new ObjectName("speed:type=MockGBean");
        kernel.loadGBean(objectName, mockGBean);
        kernel.startGBean(objectName);

        // reflect proxy
        ProxyFactory vmProxyFactory = new VMProxyFactory(MyInterface.class);
        ProxyMethodInterceptor vmMethodInterceptor = vmProxyFactory.getMethodInterceptor();
View Full Code Here

        kernel.boot();
        GBeanMBean mockGBean = new GBeanMBean(MockGBean.getGBeanInfo(), Speed.class.getClassLoader());
        mockGBean.setAttribute("Name", "bar");
        mockGBean.setAttribute("FinalInt", new Integer(57));
        ObjectName objectName = new ObjectName("speed:type=MockGBean");
        kernel.loadGBean(objectName, mockGBean);
        kernel.startGBean(objectName);

        // reflect proxy
        ProxyFactory vmProxyFactory = new VMProxyFactory(MyInterface.class);
        ProxyMethodInterceptor vmMethodInterceptor = vmProxyFactory.getMethodInterceptor();
View Full Code Here

        try {
            assertEquals(kernel, Kernel.getKernel("test.kernel"));
            ObjectName proxyFactoryName = null;//referenceFactory.createAdminObjectObjectName("testAdminObject");
            GBeanMBean gbean = new GBeanMBean(getGbeanInfo());
            gbean.setAttribute("Content", proxy);
            kernel.loadGBean(proxyFactoryName, gbean);
            kernel.startGBean(proxyFactoryName);
            Object o = roc.lookup("env/resourceenvref");
            assertEquals(proxy, o);
        } finally {
            kernel.shutdown();
View Full Code Here

    public void testAppClientGBean() throws Exception {
        Kernel kernel = new Kernel("testDomain");
        kernel.boot();
        GBeanMBean gbean = new GBeanMBean(AppClientModuleBuilder.class.getName(), AppClientModuleBuilder.class.getClassLoader());
        kernel.loadGBean(new ObjectName("testDomain:test=test"), gbean);

    }
}
View Full Code Here

            attribute.setValue(valueThatCausesException);

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                attribute.online();
                fail("Setter upon call with " + valueThatCausesException + " should have thrown exception");
            } catch (/* IllegalArgument */Exception expected) {
            } finally {
                // @todo possible BUG: gmbean holds information on being online
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.