Package org.apache.geronimo.kernel

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


    }
   
    public void testInvoke() throws Exception {
        String kernelName = "theName";
        Kernel kernel = new Kernel(kernelName, "geronimo.test");
        kernel.boot();
        MBeanServerEndPointImpl serverEndPoint =
        new MBeanServerEndPointImpl(new MockNode(), "", kernel);
        MBeanServer server = serverEndPoint.getMBeanServer();
        assertTrue(server instanceof Referenceable);
        assertEquals(kernelName, server.getAttribute(Kernel.KERNEL, "KernelName"));
View Full Code Here


*/
public class GenericConnectionManagerGBeanSerializationTest extends TestCase {

    public void testSerialization() throws Exception {
        Kernel kernel = new BasicKernel("test");
        kernel.boot();
        AbstractName abstractName = new AbstractName(URI.create("foo/bar/1/car?name=ConnectionManager"));
        GBeanData data = new GBeanData(abstractName, GenericConnectionManagerGBean.GBEAN_INFO);
        data.setAttribute("transactionSupport", NoTransactions.INSTANCE);
        data.setAttribute("pooling", new SinglePool(10, 0, 5000, 5, false, false, true));
        kernel.loadGBean(data, this.getClass().getClassLoader());
View Full Code Here

    }

    private DeploymentManager createManager(GBeanMBean server) throws DeploymentManagerCreationException {
        Kernel kernel = new Kernel("geronimo.deployment", "geronimo.deployment");
        try {
            kernel.boot();
        } catch (Exception e) {
            throw (DeploymentManagerCreationException) new DeploymentManagerCreationException("Unable to boot embedded kernel").initCause(e);
        }

        GBeanMBean manager;
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_5ConfigBuilder configBuilder = new RAR_1_5ConfigBuilder(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"), "rar15outfile");
        Kernel kernel = new Kernel("test.kernel", "test");
        kernel.boot();
        try {
            RAR_1_5ConfigBuilder configBuilder = new RAR_1_5ConfigBuilder(kernel, null, new ObjectName("geronimo.connector:service=ConnectionTracker"));
            configBuilder.buildConfiguration(outfile, null, getRARInputStream(), geronimoConnectorDocument);
        } finally {
            kernel.shutdown();
View Full Code Here

            throw new AssertionError();
        }

        final Kernel kernel = new Kernel("geronimo.kernel", "geronimo");
        try {
            kernel.boot();

            GBeanMBean config = new GBeanMBean(Configuration.GBEAN_INFO);
            ObjectInputStream ois = new ObjectInputStream(cl.getResourceAsStream("META-INF/config.ser"));
            try {
                Configuration.loadGMBeanState(config, ois);
View Full Code Here

            }

        });
        ReadOnlyContext roc = builder.getContext();
        Kernel kernel = new Kernel("test.kernel", "test.domain");
        kernel.boot();
        try {
            assertEquals(kernel, Kernel.getKernel("test.kernel"));
            ObjectName proxyFactoryName = ObjectName.getInstance(JMXReferenceFactory.BASE_ADMIN_OBJECT_NAME + "testAdminObject");
            GBeanMBean gbean = new GBeanMBean(getGbeanInfo());
            gbean.setAttribute("Content", proxy);
View Full Code Here

            final GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, throwingExceptionAttributeInfo, null);
            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 {
View Full Code Here

            final GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, throwingExceptionAttributeInfo, null);
            attribute.setValue(valueThatCausesError);

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                attribute.online();
                fail("Setter upon call with " + valueThatCausesError + " should have thrown error");
            } catch (Error expected) {
            } finally {
View Full Code Here

            final GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, throwingExceptionAttributeInfo, null);
            attribute.setValue(valueThatCausesThrowable);

            final Kernel kernel = new Kernel("test.kernel", "test");
            try {
                kernel.boot();
                kernel.loadGBean(name, gmbean);
                attribute.online();
                fail("Setter upon call with " + valueThatCausesThrowable + " should have thrown throwable");
            } catch (Throwable expected) {
            } finally {
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.