Examples of EjbModule


Examples of com.sun.enterprise.config.serverbeans.EjbModule

     * @param moduleId The module id of the EJB module
     * @return A comma separated list representing the libraries
     * specified by the deployer.
     */
    public static String getLibrariesForEJBJars(String moduleId) {
        EjbModule app = null;
        try {
            app = getApplications().getEjbModuleByName(moduleId);
            if(app == null) return null;
        } catch(ConfigException malEx) {
            _logger.log(Level.WARNING, "loader.cannot_convert_classpath_into_url",
                                                                                           moduleId);
            _logger.log(Level.WARNING,"loader.exception", malEx);           
        }
        return app.getLibraries();
    }
View Full Code Here

Examples of org.apache.geronimo.j2ee.deployment.EJBModule

        AbstractName moduleName = naming.createRootName(configID, "testejb", NameFactory.EJB_MODULE);
        context = new DeploymentContext(tmpbasedir, null, environment, moduleName, ConfigurationModuleType.CAR, naming, configurationManager, Collections.EMPTY_SET);

        File moduleLocation = new File(tmpbasedir, "ejb");
        moduleLocation.mkdirs();
        module = new EJBModule(true, moduleName, environment, new UnpackedJarFile(moduleLocation), "ejb", null, null, null, null);

        runExternalWSTest = System.getProperty("geronimo.run.external.webservicetest", "false").equals("true");
    }
View Full Code Here

Examples of org.apache.geronimo.j2ee.deployment.EJBModule

        tmpbasedir.mkdirs();
        context = new DeploymentContext(tmpbasedir, configID, ConfigurationModuleType.CAR, null, "foo", "geronimo", null);

        File moduleLocation = new File(tmpbasedir, "ejb");
        moduleLocation.mkdirs();
        module = new EJBModule(true, configID, null, new UnpackedJarFile(moduleLocation), "ejb", null, null, null);

        runExternalWSTest = System.getProperty("geronimo.run.external.webservicetest", "false").equals("true");
    }
View Full Code Here

Examples of org.apache.geronimo.j2ee.deployment.EJBModule

        context = new DeploymentContext(tmpbasedir, null, environment, ConfigurationModuleType.CAR, naming, configurationManager, Collections.EMPTY_SET);

        File moduleLocation = new File(tmpbasedir, "ejb");
        moduleLocation.mkdirs();
        AbstractName moduleName = naming.createRootName(configID, "testejb", NameFactory.EJB_MODULE);
        module = new EJBModule(true, moduleName, environment, new UnpackedJarFile(moduleLocation), "ejb", null, null, null);

        runExternalWSTest = System.getProperty("geronimo.run.external.webservicetest", "false").equals("true");
    }
View Full Code Here

Examples of org.apache.geronimo.j2ee.deployment.EJBModule

        AbstractName moduleName = naming.createRootName(configID, "testejb", NameFactory.EJB_MODULE);
        context = new DeploymentContext(tmpbasedir, null, environment, moduleName, ConfigurationModuleType.CAR, naming, configurationManager, bundleContext);

        File moduleLocation = new File(tmpbasedir, "ejb");
        moduleLocation.mkdirs();
        module = new EJBModule(true, moduleName, null, environment, new UnpackedJarFile(moduleLocation), "ejb", null, null, null, null, null);

        runExternalWSTest = System.getProperty("geronimo.run.external.webservicetest", "false").equals("true");
    }
View Full Code Here

Examples of org.apache.geronimo.openejb.deployment.EjbModule

    public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
        if (module.getType() != ConfigurationModuleType.EJB) {
            return;
        }
      
        EjbModule ejbModule = (EjbModule) module;
        Environment environment = module.getEnvironment();
               
        //overridden web service locations      
        Map correctedPortLocations = new HashMap();        
        GeronimoEjbJarType geronimoEjbJarType =
            (GeronimoEjbJarType) ejbModule.getEjbModule().getAltDDs().get("geronimo-openejb.xml");
        if (geronimoEjbJarType != null) {
           for (WebServiceBindingType bt : geronimoEjbJarType.getWebServiceBinding()) {
               String location = bt.getWebServiceAddress();
               if (location != null) {
                   location = location.trim();
                   if (!location.startsWith("/")) {
                       location = "/" + location;
                   }
                   correctedPortLocations.put(bt.getEjbName(), location);
               }
           }
        }     
       
        jaxwsBuilder.findWebServices(module, true, correctedPortLocations, environment, ejbModule.getSharedContext());
    }
View Full Code Here

Examples of org.apache.geronimo.openejb.deployment.EjbModule

    public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Collection repository) throws DeploymentException {
        if (module.getType() != ConfigurationModuleType.EJB) {
            return;
        }

        EjbModule ejbModule = (EjbModule) module;

        Map<String, WebServiceBindingType> wsBindingMap =
            createWebServiceBindingMap(ejbModule);
       
        for (EnterpriseBeanInfo bean : ejbModule.getEjbJarInfo().enterpriseBeans) {
            if (bean.type != EnterpriseBeanInfo.STATELESS) {
                continue;
            }
           
            String ejbName = bean.ejbName;

            AbstractName sessionName = earContext.getNaming().createChildName(module.getModuleName(), ejbName, NameFactory.STATELESS_SESSION_BEAN);

            assert sessionName != null: "StatelesSessionBean object name is null";

            AbstractName ejbWebServiceName = earContext.getNaming().createChildName(sessionName, ejbName, NameFactory.WEB_SERVICE_LINK);
           
            GBeanData ejbWebServiceGBean = new GBeanData(ejbWebServiceName, this.wsGBeanInfo);

            ejbWebServiceGBean.setAttribute("ejbName", ejbName);
            ejbWebServiceGBean.setAttribute("ejbClass", bean.ejbClass);
           
            WebServiceBindingType wsBinding = wsBindingMap.get(ejbName);
            if (wsBinding != null) {
                List<String> ddVirtualHosts = wsBinding.getWebServiceVirtualHost();
                if (ddVirtualHosts != null) {                   
                    String[] virtualHosts = new String[ddVirtualHosts.size()];
                    for (int i=0; i<ddVirtualHosts.size(); i++) {                   
                        virtualHosts[i] = ddVirtualHosts.get(i).trim();
                    }
                    ejbWebServiceGBean.setAttribute("virtualHosts", virtualHosts);
                }
               
                WebServiceSecurityType wsSecurity = wsBinding.getWebServiceSecurity();
                if (wsSecurity != null) {
                    ejbWebServiceGBean.setAttribute("securityRealmName", wsSecurity.getSecurityRealmName().trim());
                    ejbWebServiceGBean.setAttribute("transportGuarantee", wsSecurity.getTransportGuarantee().toString());
                    ejbWebServiceGBean.setAttribute("authMethod", wsSecurity.getAuthMethod().value());
                    if (wsSecurity.getRealmName() != null) {
                        ejbWebServiceGBean.setAttribute("realmName", wsSecurity.getRealmName().trim());                   
                    }
                }
            }
           
            if (jaxwsBuilder.configureEJB(ejbWebServiceGBean, bean.ejbName, ejbModule,
                                          ejbModule.getSharedContext(), cl)) {

                try {
                    earContext.addGBean(ejbWebServiceGBean);
                } catch (GBeanAlreadyExistsException e) {
                    throw new DeploymentException(
View Full Code Here

Examples of org.apache.geronimo.openejb.deployment.EjbModule

       
        // if we have a default environment specified, we merge it in, but only if
        // this module has tss links.  The vendorDD isn't available yet, so we'll have to look at the 
        // jaxb version of this information now.
        if (this.defaultEnvironment != null) {
            EjbModule ejbModule = (EjbModule)module;
            GeronimoEjbJarType geronimoEjbJarType = (GeronimoEjbJarType) ejbModule.getEjbModule().getAltDDs().get("geronimo-openejb.xml");
           
            if (geronimoEjbJarType != null) {
                List<TssLinkType> links = geronimoEjbJarType.getTssLink();
                if (links != null && links.size() > 0) {
                    EnvironmentBuilder.mergeEnvironments(environment, this.defaultEnvironment);
View Full Code Here

Examples of org.apache.geronimo.openejb.deployment.EjbModule

    public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Collection repository) throws DeploymentException {

        if (module.getType() != ConfigurationModuleType.EJB) {
            return;
        }
        EjbModule ejbModule = (EjbModule) module;
        OpenejbGeronimoEjbJarType jarInfo = ejbModule.getVendorDD();

        OpenejbTssLinkType[] links = jarInfo.getTssLinkArray();
        // if there are no links, then there's nothing to do.
        if (links == null || links.length == 0) {
            return;
View Full Code Here

Examples of org.apache.geronimo.openejb.deployment.EjbModule

    public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
        if (module.getType() != ConfigurationModuleType.EJB) {
            return;
        }

        EjbModule ejbModule = (EjbModule) module;
       
        //overridden web service locations
        Map correctedPortLocations = new HashMap();        
        GeronimoEjbJarType geronimoEjbJarType =
            (GeronimoEjbJarType) ejbModule.getEjbModule().getAltDDs().get("geronimo-openejb.xml");
        if (geronimoEjbJarType != null) {
           for (WebServiceBindingType bt : geronimoEjbJarType.getWebServiceBinding()) {
               String location = bt.getWebServiceAddress();
               if (location != null) {
                   correctedPortLocations.put(bt.getEjbName(), location.trim());
               }
           }
        }

        axisBuilder.findWebServices(module, true, correctedPortLocations, environment, ejbModule.getSharedContext());
       
        if (this.defaultEnvironment != null) {
            EnvironmentBuilder.mergeEnvironments(environment, this.defaultEnvironment);
        }
    }
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.