Package org.apache.openejb.assembler.classic

Examples of org.apache.openejb.assembler.classic.ContainerInfo


        ClassLoader newcl = null;
        Container container = null;
        ContainerSystemInfo systemInfo = configuration.containerSystem;
        Map<ContainerType, TreeEntry> containerMap = new TreeMap<ContainerType, TreeEntry>();
        List<ContainerInfo> containerInfos = systemInfo.containers;
        ContainerInfo containerInfo = null;
        TreeEntry containerTypesEntry, containersEntry, deploymentsEntry = null;
        Tree tree = new Tree("name", "name");
        List<TreeEntry> entries = new ArrayList<TreeEntry>();
        for (int i = 0; i < containerInfos.size(); i++) {
View Full Code Here


                // only process RA if not previously processed
                String containerName = getResourceAdapterId(resourceAdapterWrapper) + "-" + messageListenerInterface;
                if (processedResourceAdapterWrappers.putIfAbsent(containerName,  resourceAdapterWrapper) == null) {
                    try {
                        // get default mdb config
                        ContainerInfo containerInfo = configurationFactory.configureService(MdbContainerInfo.class, containerName, null, null, "Container");
                        containerInfo.id = containerName;
                        containerInfo.displayName = containerName;
                        properties = (properties == null)?new Properties():properties;                       
                        String instanceLimit = (String)properties.get(containerName + "." + "InstanceLimit");                                               
                        if(instanceLimit != null){
View Full Code Here

    public ContainerSystem getContainerSystem() {
        return assembler.getContainerSystem();
    }

    public Container createContainer(Class<? extends ContainerInfo> type, String serviceId, Properties declaredProperties, String providerId) throws OpenEJBException {
        ContainerInfo containerInfo = configurationFactory.configureService(type, serviceId, declaredProperties, providerId, "Container");
        assembler.createContainer(containerInfo);
        Container container = assembler.getContainerSystem().getContainer(serviceId);
        return container;
    }
View Full Code Here

                // only process RA if not previously processed
                String containerName = getResourceAdapterId(resourceAdapterWrapper) + "-" + messageListenerInterface;
                if (processedResourceAdapterWrappers.putIfAbsent(containerName,  resourceAdapterWrapper) == null) {
                    try {
                        // get default mdb config
                        ContainerInfo containerInfo = configurationFactory.configureService(MdbContainerInfo.class, containerName, null, null, "Container");
                        containerInfo.id = containerName;
                        containerInfo.displayName = containerName;
                        properties = (properties == null)?new Properties():properties;                       
                        String instanceLimit = (String)properties.get(containerName + "." + "InstanceLimit");                                               
                        if(instanceLimit != null){
View Full Code Here

    public Container createContainer(Class<? extends ContainerInfo> type, String serviceId, Properties declaredProperties, String providerId) throws OpenEJBException {
        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(classLoader);
        try {
            ContainerInfo containerInfo = configurationFactory.configureService(type, serviceId, declaredProperties, providerId, "Container");
            assembler.createContainer(containerInfo);
            Container container = assembler.getContainerSystem().getContainer(serviceId);
            return container;
        } finally {
            Thread.currentThread().setContextClassLoader(oldClassLoader);
View Full Code Here

            Properties declaredProperties = new Properties();

            String providerId = null;

            ContainerInfo containerInfo = configurationFactory.configureService(infoClass, id, declaredProperties, providerId, "Container");
            containerSystem.containers.add(containerInfo);
        }
    }
View Full Code Here

                String activationSpecClass = entry.getValue();

                // only process RA if not previously processed
                String containerName = resourceAdapterId + "-" + messageListenerInterface;
                // get default mdb config
                ContainerInfo containerInfo = configurationFactory.configureService(MdbContainerInfo.class);
                containerInfo.id = containerName;
                containerInfo.displayName = containerName;

                // set ra specific properties
View Full Code Here

        ClassLoader newcl = null;
        Container container = null;
        ContainerSystemInfo systemInfo = configuration.containerSystem;
        Map<ContainerType, TreeEntry> containerMap = new TreeMap<ContainerType, TreeEntry>();
        List<ContainerInfo> containerInfos = systemInfo.containers;
        ContainerInfo containerInfo = null;
        TreeEntry containerTypesEntry, containersEntry, deploymentsEntry = null;
        Tree tree = new Tree("name", "name");
        List<TreeEntry> entries = new ArrayList<TreeEntry>();
        for (int i = 0; i < containerInfos.size(); i++) {
View Full Code Here

        if (!autoCreateContainers) {
            throw new OpenEJBException("A container of type " + getType(bean) + " must be declared in the configuration file for bean: " + bean.getEjbName());
        }

        // get the container info (data used to build the container)
        ContainerInfo containerInfo = configFactory.configureService(containerInfoType);
        logger.info("Auto-creating a container for bean " + ejbDeployment.getDeploymentId() + ": Container(type=" + getType(bean) + ", id=" + containerInfo.id + ")");

        // if the is an MDB container we need to resolve the resource adapter
        String resourceAdapterId = containerInfo.properties.getProperty("ResourceAdapter");
        if (resourceAdapterId != null) {
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

TOP

Related Classes of org.apache.openejb.assembler.classic.ContainerInfo

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.