Package org.apache.openejb.config.sys

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


    }

    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.StatelessContainerFactory", myStatelessContainer.className);
    }
View Full Code Here

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

        URI uri = new URI("new://Container?type=STATELESS&provider=org.acme%23CheddarContainer");

        Container container = (Container) factory.toConfigDeclaration("MyContainer", uri);

        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 testConfigureServiceAddedPropertyViaURI2() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        URI uri = new URI("new://Container?type=STATELESS&provider=org.acme%23CheddarContainer&myProperty=Queso");

        Container container = (Container) factory.toConfigDeclaration("MyContainer", uri);

        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 testConfigureServiceAddedPropertyViaURI_Unencoded() throws Exception {
        ConfigurationFactory factory = new ConfigurationFactory();

        Container container = (Container) factory.toConfigDeclaration("MyContainer", "new://Container?type=STATELESS&provider=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

            final InboundResourceadapter inbound = resourceAdapter.getInboundResourceAdapter();
            if (inbound != null) {
                for (final MessageListener messageListener : inbound.getMessageAdapter().getMessageListener()) {
                    final String id = this.getId(messageListener, inbound, connectorModule);

                    final Container container = new Container(id, "MESSAGE", null);

                    final Properties properties = container.getProperties();
                    properties.setProperty("ResourceAdapter", connectorInfo.resourceAdapter.id);
                    properties.setProperty("MessageListenerInterface", messageListener.getMessageListenerType());
                    properties.setProperty("ActivationSpecClass", messageListener.getActivationSpec().getActivationSpecClass());

                    final MdbContainerInfo mdbContainerInfo = this.configFactory.configureService(container, MdbContainerInfo.class);
View Full Code Here

            final InboundResourceadapter inbound = resourceAdapter.getInboundResourceAdapter();
            if (inbound != null) {
                for (final MessageListener messageListener : inbound.getMessageAdapter().getMessageListener()) {
                    final String id = this.getId(messageListener, inbound, connectorModule);

                    final Container container = new Container(id, "MESSAGE", null);

                    final Properties properties = container.getProperties();
                    properties.setProperty("ResourceAdapter", connectorInfo.resourceAdapter.id);
                    properties.setProperty("MessageListenerInterface", messageListener.getMessageListenerType());
                    properties.setProperty("ActivationSpecClass", messageListener.getActivationSpec().getActivationSpecClass());

                    final MdbContainerInfo mdbContainerInfo = this.configFactory.configureService(container, MdbContainerInfo.class);
View Full Code Here

            final InboundResourceadapter inbound = resourceAdapter.getInboundResourceAdapter();
            if (inbound != null) {
                for (final MessageListener messageListener : inbound.getMessageAdapter().getMessageListener()) {
                    final String id = this.getId(messageListener, inbound, connectorModule);

                    final Container container = new Container(id, "MESSAGE", null);

                    final Properties properties = container.getProperties();
                    properties.setProperty("ResourceAdapter", connectorInfo.resourceAdapter.id);
                    properties.setProperty("MessageListenerInterface", messageListener.getMessageListenerType());
                    properties.setProperty("ActivationSpecClass", messageListener.getActivationSpec().getActivationSpecClass());

                    final MdbContainerInfo mdbContainerInfo = this.configFactory.configureService(container, MdbContainerInfo.class);
View Full Code Here

            InboundResourceadapter inbound = resourceAdapter.getInboundResourceAdapter();
            if (inbound != null) {
                for (MessageListener messageListener : inbound.getMessageAdapter().getMessageListener()) {
                    String id = getId(messageListener, inbound, connectorModule);

                    Container container = new Container(id, "MESSAGE", null);

                    Properties properties = container.getProperties();
                    properties.setProperty("ResourceAdapter", connectorInfo.resourceAdapter.id);
                    properties.setProperty("MessageListenerInterface", messageListener.getMessageListenerType());
                    properties.setProperty("ActivationSpecClass", messageListener.getActivationSpec().getActivationSpecClass());

                    MdbContainerInfo mdbContainerInfo = configFactory.configureService(container, MdbContainerInfo.class);
View Full Code Here

            InboundResourceadapter inbound = resourceAdapter.getInboundResourceAdapter();
            if (inbound != null) {
                for (MessageListener messageListener : inbound.getMessageAdapter().getMessageListener()) {
                    String id = getId(messageListener, inbound, connectorModule);

                    Container container = new Container(id, "MESSAGE", null);

                    Properties properties = container.getProperties();
                    properties.setProperty("ResourceAdapter", connectorInfo.resourceAdapter.id);
                    properties.setProperty("MessageListenerInterface", messageListener.getMessageListenerType());
                    properties.setProperty("ActivationSpecClass", messageListener.getActivationSpec().getActivationSpecClass());

                    MdbContainerInfo mdbContainerInfo = configFactory.configureService(container, MdbContainerInfo.class);
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.