Package org.apache.geronimo.kernel

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


            final ObjectName name = new ObjectName("test:name=MyMockGBean");

            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");
View Full Code Here


            // build a basic kernel without a configuration-store, our configuration store is
            final Kernel kernel = new Kernel("geronimo.kernel", "geronimo");

            // boot the kernel
            try {
                kernel.boot();
            } catch (Exception e) {
                e.printStackTrace();
                System.exit(2);
            }
View Full Code Here

            // the interesting entries from the manifest
            CommandLineManifest manifest = CommandLineManifest.getManifestEntries();

            // boot the kernel
            Kernel kernel = new Kernel("geronimo.kernel", "geronimo");
            kernel.boot();

            // load and start the configuration in this jar
            ConfigurationManager configurationManager = kernel.getConfigurationManager();
            GBeanMBean config = new GBeanMBean(Configuration.GBEAN_INFO);
            ClassLoader classLoader = CommandLine.class.getClassLoader();
View Full Code Here

        InputStream geronimoInputStream = geronimoDD.openStream();
        GerConnectorDocument geronimoConnectorDocument = GerConnectorDocument.Factory.parse(geronimoInputStream);
        File configStore = new File(System.getProperty("java.io.tmpdir"), "config-store");
        configStore.mkdir();
        Kernel kernel = new Kernel("test.kernel", "test");
        kernel.boot();
        try {
            RAR_1_0ConfigBuilder configBuilder = new RAR_1_0ConfigBuilder(kernel, null, new ObjectName("geronimo.server:type=ConnectionTracker"));
            DeploymentContext context =  new MockDeploymentContext(kernel);
            configBuilder.addConnectorGBeans(context, connectorDocument, geronimoConnectorDocument.getConnector(), this.getClass().getClassLoader());
            for (Iterator iterator = gbeans.entrySet().iterator(); iterator.hasNext();) {
View Full Code Here

        GerConnectorDocument geronimoConnectorDocument = GerConnectorDocument.Factory.parse(geronimoInputStream);
        File configStore = new File(System.getProperty("java.io.tmpdir"), "config-store");
        configStore.mkdir();
        File outfile = new File(System.getProperty("java.io.tmpdir"), "rar10outfile");
        Kernel kernel = new Kernel("test.kernel", "test");
        kernel.boot();
        try {
            RAR_1_0ConfigBuilder configBuilder = new RAR_1_0ConfigBuilder(kernel, null, new ObjectName("geronimo.connector:service=ConnectionTracker"));
            configBuilder.buildConfiguration(outfile, null, getRARInputStream(), geronimoConnectorDocument);
        } finally {
            kernel.shutdown();
View Full Code Here

            GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(dynamicGmbean, dynamicAttributeInfo, null);
            final ObjectName name = new ObjectName("test:name=MyMockDynamicGBean");

            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());
View Full Code Here

            final GBeanMBeanAttribute immutableAttribute = new GBeanMBeanAttribute(gmbean, attributeName, String.class,
                    getInvoker, null);

            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");
View Full Code Here

            final GBeanMBeanAttribute mutablePersistentAttribute = new GBeanMBeanAttribute(gmbean,
                    persistentPrimitiveAttributeInfo, null);

            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");
View Full Code Here

            final GBeanMBeanAttribute mutablePersistentAttribute = new GBeanMBeanAttribute(gmbean,
                    persistentPrimitiveAttributeInfo, null);

            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
View Full Code Here

            final GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, attributeName, int.class, null,
                    setInvoker);

            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");
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.