Package org.apache.geronimo.kernel

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


                    }
                    kernel.shutdown();
                }
            });

            kernel.startGBean(configName);
            kernel.getMBeanServer().invoke(gbeanName, "main", new Object[]{args}, MAIN_ARGS);
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(2);
            throw new AssertionError();
View Full Code Here


            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                kernel.startGBean(name);

                attribute.getValue();
                fail("This attribute is not readable; exception expected");
            } catch (/* IllegalArgument */Exception expected) {
            } finally {
View Full Code Here

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, dynamicGmbean);
                kernel.startGBean(name);

                final Integer zero = new Integer(0);
                assertEquals(zero, attribute.getValue());

                final Integer one = new Integer(1);
View Full Code Here

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                kernel.startGBean(name);

                immutableAttribute.setValue(null);
                fail("This attribute is not writable; exception expected");
            } catch (/* IllegalArgument */Exception expected) {
            } finally {
View Full Code Here

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                kernel.startGBean(name);

                mutablePersistentAttribute.setValue(null);
                fail("Cannot assign null to a primitive attribute; exception expected");
            } catch (/* IllegalArgument */Exception expected) {
            } finally {
View Full Code Here

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                kernel.startGBean(name);

                mutablePersistentAttribute.setValue(new Integer(4));
                //fail("Cannot assign a value to a persistent attribute while
                // online; exception expected");
            } catch (/* IllegalState */Exception expected) {
View Full Code Here

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                kernel.startGBean(name);

                attribute.setValue(new Integer(4));
                fail("Exception expected upon setValue's call");
            } catch (/* IllegalState */Exception expected) {
            } finally {
View Full Code Here

            GBeanMBean serverInfoGBean = new GBeanMBean(ServerInfo.GBEAN_INFO);
            serverInfoGBean.setAttribute("baseDirectory", ".");
            ObjectName serverInfoObjectName = ObjectName.getInstance(j2eeDomainName + ":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));
            ObjectName j2eeServerObjectName = ObjectName.getInstance(j2eeDomainName + ":j2eeType=J2EEServer,name=" + j2eeServerName);
View Full Code Here

            GBeanMBean j2eeServerGBean = new GBeanMBean(J2EEServerImpl.GBEAN_INFO);
            j2eeServerGBean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfoObjectName));
            ObjectName j2eeServerObjectName = 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");
            kernel.loadGBean(objectName, config);
View Full Code Here

            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.
            ObjectName resourceAdapter = new ObjectName(j2eeDomainName +
                    ":j2eeType=ResourceAdapter" +
                    ",name=testRA" +
                    ",J2EEServer=" + j2eeServerName +
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.