Package org.apache.openejb.config.sys

Examples of org.apache.openejb.config.sys.Container


        assertNotNull(defaultStatelessContainer.className);
        assertNotNull(defaultStatelessContainer.constructorArgs);
        assertNotNull(defaultStatelessContainer.properties);

        // We should be able to create one of these with a different name
        Container container = new Container("My Stateless Container");
        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container, StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("My Stateless Container", myStatelessContainer.id);
        assertEquals(defaultStatelessContainer.className, myStatelessContainer.className);
View Full Code Here


    public void testConfigureService2() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        // We should be able to create one of these with a different name

        Container container = new Container("MyContainer", "org.acme#CheddarContainer", "STATELESS");
        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container, StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("MyContainer", myStatelessContainer.id);
        assertEquals("org.acme.SuperContainer", myStatelessContainer.className);
View Full Code Here

    }

    public void testConfigureServiceOverriddenProperty() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        Container container = new Container("MyContainer", "org.acme#CheddarContainer", "STATELESS");
        container.getProperties().setProperty("myProperty", "Cheese is good");

        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container, StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("MyContainer", myStatelessContainer.id);
View Full Code Here

    }

    public void testConfigureServiceAddedProperty() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        Container container = new Container("MyContainer", "org.acme#CheddarContainer", "STATELESS");
        container.getProperties().setProperty("anotherProperty", "Cheese is good");
        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container,  StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("MyContainer", myStatelessContainer.id);
        assertEquals("org.acme.SuperContainer", myStatelessContainer.className);
View Full Code Here

    }

    public void testConfigureByType() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        Container container = new Container("MyContainer", null, "STATELESS");
        container.getProperties().setProperty("anotherProperty", "Cheese is good");
        ContainerInfo myStatelessContainer = factory.configureService(container,  ContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("org.apache.openejb.core.stateless.StatelessContainer", myStatelessContainer.className);
    }
View Full Code Here

        assertNotNull(defaultStatelessContainer.className);
        assertNotNull(defaultStatelessContainer.constructorArgs);
        assertNotNull(defaultStatelessContainer.properties);

        // We should be able to create one of these with a different name
        Container container = new Container("My Stateless Container");
        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container, StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("My Stateless Container", myStatelessContainer.id);
        assertEquals(defaultStatelessContainer.className, myStatelessContainer.className);
View Full Code Here

    public void testConfigureService2() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        // We should be able to create one of these with a different name

        Container container = new Container("MyContainer", "STATELESS", "org.acme#CheddarContainer");
        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container, StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("MyContainer", myStatelessContainer.id);
        assertEquals("org.acme.SuperContainer", myStatelessContainer.className);
View Full Code Here

    }

    public void testConfigureServiceOverriddenProperty() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        Container container = new Container("MyContainer", "STATELESS", "org.acme#CheddarContainer");
        container.getProperties().setProperty("myProperty", "Cheese is good");

        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container, StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("MyContainer", myStatelessContainer.id);
View Full Code Here

    }

    public void testConfigureServiceAddedProperty() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        Container container = new Container("MyContainer", "STATELESS", "org.acme#CheddarContainer");
        container.getProperties().setProperty("anotherProperty", "Cheese is good");
        StatelessSessionContainerInfo myStatelessContainer = factory.configureService(container,  StatelessSessionContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("MyContainer", myStatelessContainer.id);
        assertEquals("org.acme.SuperContainer", myStatelessContainer.className);
View Full Code Here

    }

    public void testConfigureByType() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        Container container = new Container("MyContainer", "STATELESS", null);
        container.getProperties().setProperty("anotherProperty", "Cheese is good");
        ContainerInfo myStatelessContainer = factory.configureService(container,  ContainerInfo.class);

        assertNotNull(myStatelessContainer);
        assertEquals("org.apache.openejb.core.stateless.StatelessContainer", myStatelessContainer.className);
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.config.sys.Container

Copyright © 2018 www.massapicom. 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.