Package org.apache.openejb.assembler.classic

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


        for (final ServletInfo servlet : webApp.servlets) {
            if (servlet.servletName == null) {
                continue;
            }

            final PortInfo portInfo = ports.get(servlet.servletName);
            if (portInfo == null) {
                continue;
            }

            final ClassLoader old = Thread.currentThread().getContextClassLoader();
View Full Code Here


                }

                for (final EnterpriseBeanInfo enterpriseBean : ejbJar.enterpriseBeans) {
                    if (enterpriseBean instanceof StatelessBeanInfo || enterpriseBean instanceof SingletonBeanInfo) {

                        final PortInfo portInfo = ports.get(enterpriseBean.ejbName);
                        if (portInfo == null) {
                            continue;
                        }

                        final BeanContext beanContext = containerSystem.getBeanContext(enterpriseBean.ejbDeploymentId);
                        if (beanContext == null) {
                            continue;
                        }

                        // remove wsdl addresses from global registry
                        final String address = ejbAddresses.remove(enterpriseBean.ejbDeploymentId);
                        addressesForApp(appInfo.appId).remove(new EndpointInfo(address, portInfo.wsdlPort, beanContext.getBeanClass().getName()));

                        if (address != null) {
                            portAddressRegistry.removePort(portInfo.serviceId, portInfo.wsdlService, portInfo.portId, portInfo.seiInterfaceName);
                        }

                        // remove container from web server
                        final String location = ejbLocations.get(enterpriseBean.ejbDeploymentId);
                        if (this.wsRegistry != null && location != null) {
                            this.wsRegistry.removeWsContainer(location);
                        }

                        // destroy webservice container
                        destroyEjbWsContainer(enterpriseBean.ejbDeploymentId);
                        ejbLocations.remove(enterpriseBean.ejbDeploymentId);
                    }
                }
            }
            for (final WebAppInfo webApp : appInfo.webApps) {
                deployedWebApps.remove(webApp);

                final Map<String, PortInfo> ports = new TreeMap<String, PortInfo>();
                for (final PortInfo port : webApp.portInfos) {
                    ports.put(port.serviceLink, port);
                }

                for (final ServletInfo servlet : webApp.servlets) {
                    if (servlet.servletClass == null) {
                        continue;
                    }

                    PortInfo portInfo = ports.remove(servlet.servletClass);
                    if (portInfo == null) {
                        portInfo = ports.remove(servlet.servletName);
                        if (portInfo == null) {
                            continue;
                        }
View Full Code Here

                    final BeanContext beanContext = containerSystem.getBeanContext(bean.ejbDeploymentId);
                    if (beanContext == null || (ejbs != null && !ejbs.contains(beanContext))) {
                        continue;
                    }

                    final PortInfo portInfo = ports.get(bean.ejbName);
                    if (portInfo == null)
                        continue;

                    final ClassLoader old = Thread.currentThread().getContextClassLoader();
                    Thread.currentThread().setContextClassLoader(beanContext.getClassLoader());
View Full Code Here

                        StatelessBeanInfo statelessBeanInfo = (StatelessBeanInfo) bean;

                        DeploymentInfo deploymentInfo = containerSystem.getDeploymentInfo(statelessBeanInfo.ejbDeploymentId);
                        if (deploymentInfo == null) continue;

                        PortInfo portInfo = ports.get(statelessBeanInfo.ejbName);
                        if (portInfo == null) continue;

                        try {
                            PortData port = WsBuilder.toPortData(portInfo, deploymentInfo.getInjections(), moduleBaseUrl, deploymentInfo.getClassLoader());

                            HttpListener container = createEjbWsContainer(moduleBaseUrl, port, deploymentInfo);

                            // generate a location if one was not assigned
                            String location = port.getLocation();
                            if (location == null) {
                                location = autoAssignWsLocation(bean, port, contextData, deploymentIdTemplate);
                            }
                            if (!location.startsWith("/")) location = "/" + location;
                            ejbLocations.put(statelessBeanInfo.ejbDeploymentId, location);

                            ClassLoader classLoader = deploymentInfo.getClassLoader();
                            if (wsRegistry != null) {
                                // add servlet to web container
                                List<String> addresses = wsRegistry.addWsContainer(location, container, virtualHost, realmName, transportGuarantee, authMethod, classLoader);

                                // one of the registered addresses to be the connonical address
                                String address = selectSingleAddress(addresses);

                                // register wsdl location
                                portAddressRegistry.addPort(portInfo.serviceId, portInfo.wsdlService, portInfo.portId, portInfo.wsdlPort, portInfo.seiInterfaceName, address);
                                logger.info("Webservice(wsdl=" + address + ", qname=" + port.getWsdlService() + ") --> Ejb(id=" + portInfo.portId + ")");
                                ejbAddresses.put(bean.ejbDeploymentId, address);
                            }
                        } catch (Throwable e) {
                            logger.error("Error deploying CXF webservice for ejb " + deploymentInfo.getDeploymentID(), e);
                        }
                    }
                }
            }
            for (WebAppInfo webApp : appInfo.webApps) {
                WebDeploymentInfo deploymentInfo = containerSystem.getWebDeploymentInfo(webApp.moduleId);
                if (deploymentInfo == null) continue;

                Map<String,PortInfo> ports = new TreeMap<String,PortInfo>();
                for (PortInfo port : webApp.portInfos) {
                    ports.put(port.serviceLink, port);
                }

                URL moduleBaseUrl = null;
                try {
                    moduleBaseUrl = new File(webApp.codebase).toURL();
                } catch (MalformedURLException e) {
                    logger.error("Invalid ejb jar location " + webApp.codebase, e);
                }

                for (ServletInfo servlet : webApp.servlets) {
                    PortInfo portInfo = ports.get(servlet.servletName);
                    if (portInfo == null) continue;

                    try {
                        ClassLoader classLoader = deploymentInfo.getClassLoader();
                        Collection<Injection> injections = deploymentInfo.getInjections();
View Full Code Here

                for (EnterpriseBeanInfo enterpriseBean : ejbJar.enterpriseBeans) {
                    if (enterpriseBean instanceof StatelessBeanInfo) {
                        StatelessBeanInfo statelessBeanInfo = (StatelessBeanInfo) enterpriseBean;

                        PortInfo portInfo = ports.get(statelessBeanInfo.ejbName);
                        if (portInfo == null) continue;

                        // remove wsdl addresses from global registry
                        String address = ejbAddresses.remove(enterpriseBean.ejbDeploymentId);
                        if (address != null) {
                            portAddressRegistry.removePort(portInfo.serviceId, portInfo.wsdlService, portInfo.portId);
                        }

                        // remove container from web server
                        String location = ejbLocations.get(statelessBeanInfo.ejbDeploymentId);
                        if (this.wsRegistry != null && location != null) {
                            this.wsRegistry.removeWsContainer(location);
                        }

                        // destroy webservice container
                        destroyEjbWsContainer(statelessBeanInfo.ejbDeploymentId);
                    }
                }
            }
            for (WebAppInfo webApp : appInfo.webApps) {
                Map<String,PortInfo> ports = new TreeMap<String,PortInfo>();
                for (PortInfo port : webApp.portInfos) {
                    ports.put(port.serviceLink, port);
                }

                for (ServletInfo servlet : webApp.servlets) {
                    PortInfo portInfo = ports.get(servlet.servletClass);
                    if (portInfo == null) continue;

                    // remove wsdl addresses from global registry
                    String address = servletAddresses.remove(webApp.moduleId + "." + servlet.servletName);
                    if (address != null) {
View Full Code Here

        for (WebserviceDescription desc : webservices.getWebserviceDescription()) {
            String wsdlFile = desc.getWsdlFile();
            String serviceName = desc.getWebserviceDescriptionName();

            for (PortComponent port : desc.getPortComponent()) {
                PortInfo portInfo = new PortInfo();

                ServiceImplBean serviceImplBean = port.getServiceImplBean();
                portInfo.serviceId = desc.getId();
                portInfo.portId = port.getId();
                portInfo.serviceLink = serviceImplBean.getEjbLink();
View Full Code Here

        for (final WebserviceDescription desc : webservices.getWebserviceDescription()) {
            final String wsdlFile = desc.getWsdlFile();
            final String serviceName = desc.getWebserviceDescriptionName();

            for (final PortComponent port : desc.getPortComponent()) {
                final PortInfo portInfo = new PortInfo();

                final ServiceImplBean serviceImplBean = port.getServiceImplBean();
                portInfo.serviceId = desc.getId();
                portInfo.portId = port.getId();
                portInfo.serviceLink = serviceImplBean.getEjbLink();
View Full Code Here

                    if (bean instanceof StatelessBeanInfo || bean instanceof SingletonBeanInfo) {

                        DeploymentInfo deploymentInfo = containerSystem.getDeploymentInfo(bean.ejbDeploymentId);
                        if (deploymentInfo == null) continue;

                        PortInfo portInfo = ports.get(bean.ejbName);
                        if (portInfo == null) continue;

                        try {
                            PortData port = WsBuilder.toPortData(portInfo, deploymentInfo.getInjections(), moduleBaseUrl, deploymentInfo.getClassLoader());
View Full Code Here

        } catch (MalformedURLException e) {
            logger.error("Invalid ejb jar location " + webApp.codebase, e);
        }

        for (ServletInfo servlet : webApp.servlets) {
            PortInfo portInfo = ports.get(servlet.servletName);
            if (portInfo == null) continue;

            try {
                ClassLoader classLoader = deploymentInfo.getClassLoader();
                Collection<Injection> injections = deploymentInfo.getInjections();
View Full Code Here

                }

                for (EnterpriseBeanInfo enterpriseBean : ejbJar.enterpriseBeans) {
                    if (enterpriseBean instanceof StatelessBeanInfo || enterpriseBean instanceof SingletonBeanInfo) {

                        PortInfo portInfo = ports.get(enterpriseBean.ejbName);
                        if (portInfo == null) continue;

                        // remove wsdl addresses from global registry
                        String address = ejbAddresses.remove(enterpriseBean.ejbDeploymentId);
                        if (address != null) {
                            portAddressRegistry.removePort(portInfo.serviceId, portInfo.wsdlService, portInfo.portId);
                        }

                        // remove container from web server
                        String location = ejbLocations.get(enterpriseBean.ejbDeploymentId);
                        if (this.wsRegistry != null && location != null) {
                            this.wsRegistry.removeWsContainer(location);
                        }

                        // destroy webservice container
                        destroyEjbWsContainer(enterpriseBean.ejbDeploymentId);
                    }
                }
            }
            for (WebAppInfo webApp : appInfo.webApps) {
                deployedWebApps.remove(webApp);

                Map<String,PortInfo> ports = new TreeMap<String,PortInfo>();
                for (PortInfo port : webApp.portInfos) {
                    ports.put(port.serviceLink, port);
                }

                for (ServletInfo servlet : webApp.servlets) {
                    PortInfo portInfo = ports.get(servlet.servletClass);
                    if (portInfo == null) continue;

                    // remove wsdl addresses from global registry
                    String address = servletAddresses.remove(webApp.moduleId + "." + servlet.servletName);
                    if (address != null) {
View Full Code Here

TOP

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

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.