Package org.apache.openejb.jee.oejb2

Examples of org.apache.openejb.jee.oejb2.SessionBeanType


        EjbModule ejbModule = new EjbModule(new EjbJar(), null);
        ejbModule.getEjbJar().addEnterpriseBean(new StatelessBean(FooBean.class));

        OpenejbJarType v2 = new OpenejbJarType();
        SessionBeanType ejbDeployment = new SessionBeanType();
        ejbDeployment.setEjbName("FooBean");
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("thename", "Local"));
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("anothername", "Remote"));
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("loldstyle", "LocalHome"));
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("roldstyle", "RemoteHome"));
        v2.getEnterpriseBeans().add(ejbDeployment);
        ejbModule.getAltDDs().put("openejb-jar.xml", v2);

        assembler.createApplication(config.configureApplication(ejbModule));
View Full Code Here


                continue;
            }

            // Add WS Security
            if (enterpriseBean instanceof SessionBeanType) {
                final SessionBeanType sessionBean = (SessionBeanType) enterpriseBean;
                final WebServiceSecurityType webServiceSecurityType = sessionBean.getWebServiceSecurity();

                if (webServiceSecurityType != null) {

                    if (webServiceSecurityType.getRealmName() != null) {
                        deployment.addProperty("webservice.security.realm", webServiceSecurityType.getRealmName());
                    }

                    if (webServiceSecurityType.getSecurityRealmName() != null) {
                        deployment.addProperty("webservice.security.securityRealm", webServiceSecurityType.getSecurityRealmName());
                    }

                    if (webServiceSecurityType.getTransportGuarantee() != null) {
                        deployment.addProperty("webservice.security.transportGarantee", webServiceSecurityType.getTransportGuarantee().value());
                    } else {
                        deployment.addProperty("webservice.security.transportGarantee", "NONE");
                    }

                    if (webServiceSecurityType.getAuthMethod() != null) {
                        deployment.addProperty("webservice.security.authMethod", webServiceSecurityType.getAuthMethod().value());
                    } else {
                        deployment.addProperty("webservice.security.authMethod", "NONE");
                    }

                    deployment.getProperties().putAll(webServiceSecurityType.getProperties());
                }

                if (sessionBean.getWebServiceAddress() != null) {
                    deployment.getProperties().put("openejb.webservice.deployment.address", sessionBean.getWebServiceAddress());
                }
            }

            deployment.getProperties().putAll(enterpriseBean.getProperties());
View Full Code Here

                    g2.getTssLink().add(new TssLinkType(rpcBean.getEjbName(), rpcBean.getTssLink(), rpcBean.getJndiName()));
                }
            }

            if (bean instanceof SessionBeanType) {
                final SessionBeanType sb = (SessionBeanType) bean;
                final WebServiceBindingType b = new WebServiceBindingType();
                b.setEjbName(sb.getEjbName());
                b.setWebServiceAddress(sb.getWebServiceAddress());
                b.setWebServiceVirtualHost(sb.getWebServiceVirtualHost());
                b.setWebServiceSecurity(sb.getWebServiceSecurity());
                if (b.containsData()) {
                    g2.getWebServiceBinding().add(b);
                }
            }
        }
View Full Code Here

        Object openejbDD = ejbModule.getEjbModule().getAltDDs().get("openejb-jar.xml");
        if (openejbDD instanceof OpenejbJarType) {
            OpenejbJarType openejb = (OpenejbJarType) openejbDD;
            for (EnterpriseBean bean : openejb.getEnterpriseBeans()) {
                if (bean instanceof SessionBeanType) {
                    SessionBeanType sessioBean = (SessionBeanType) bean;
                    wsBindingMap.put(bean.getEjbName(), new WebServiceBinding(sessioBean));
                }               
            }
        } else {       
            GeronimoEjbJarType geronimoEjbJarType =
View Full Code Here

                    g2.getTssLink().add(new TssLinkType(rpcBean.getEjbName(), rpcBean.getTssLink(), rpcBean.getJndiName()));
                }
            }

            if (bean instanceof SessionBeanType) {
                SessionBeanType sb = (SessionBeanType) bean;
                WebServiceBindingType b = new WebServiceBindingType();
                b.setEjbName(sb.getEjbName());
                b.setWebServiceAddress(sb.getWebServiceAddress());
                b.setWebServiceVirtualHost(sb.getWebServiceVirtualHost());
                b.setWebServiceSecurity(sb.getWebServiceSecurity());
                if (b.containsData()){
                    g2.getWebServiceBinding().add(b);
                }
            }
        }
View Full Code Here

                continue;
            }
           
            // Add WS Security
            if (enterpriseBean instanceof SessionBeanType) {
                SessionBeanType sessionBean = (SessionBeanType) enterpriseBean;
                WebServiceSecurityType webServiceSecurityType = sessionBean.getWebServiceSecurity();

                if (webServiceSecurityType != null) {

                    if (webServiceSecurityType.getRealmName() != null) {
                        deployment.addProperty("webservice.security.realm", webServiceSecurityType.getRealmName());
                    }

                    if (webServiceSecurityType.getSecurityRealmName() != null) {
                        deployment.addProperty("webservice.security.securityRealm", webServiceSecurityType.getSecurityRealmName());
                    }

                    if (webServiceSecurityType.getTransportGuarantee() != null) {
                        deployment.addProperty("webservice.security.transportGarantee", webServiceSecurityType.getTransportGuarantee().value());
                    } else {
                        deployment.addProperty("webservice.security.transportGarantee", "NONE");
                    }

                    if (webServiceSecurityType.getAuthMethod() != null) {
                        deployment.addProperty("webservice.security.authMethod", webServiceSecurityType.getAuthMethod().value());
                    } else {
                        deployment.addProperty("webservice.security.authMethod", "NONE");
                    }

                    deployment.getProperties().putAll(webServiceSecurityType.getProperties());
                }

                if (sessionBean.getWebServiceAddress() != null) {
                    deployment.getProperties().put("openejb.webservice.deployment.address", sessionBean.getWebServiceAddress());
                }
            }

            deployment.getProperties().putAll(enterpriseBean.getProperties());
           
View Full Code Here

        EjbModule ejbModule = new EjbModule(new EjbJar(), null);
        ejbModule.getEjbJar().addEnterpriseBean(new StatelessBean(FooBean.class));

        OpenejbJarType v2 = new OpenejbJarType();
        SessionBeanType ejbDeployment = new SessionBeanType();
        ejbDeployment.setEjbName("FooBean");
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("thename", "Local"));
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("anothername", "Remote"));
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("loldstyle", "LocalHome"));
        ejbDeployment.getJndi().add(new org.apache.openejb.jee.oejb2.Jndi("roldstyle", "RemoteHome"));
        v2.getEnterpriseBeans().add(ejbDeployment);
        ejbModule.getAltDDs().put("openejb-jar.xml", v2);

        assembler.createApplication(config.configureApplication(ejbModule));
View Full Code Here

                        g2.getServiceRef().addAll(bean.getServiceRef());

                        if (bean instanceof RpcBean) {
                            RpcBean rpcBean = (RpcBean) bean;
                            if (rpcBean.getTssLink() != null){
                                g2.getTssLink().add(new TssLinkType(rpcBean.getEjbName(), rpcBean.getTssLink(), rpcBean.getJndiName()));
                            }
                        }

                        if (bean instanceof SessionBeanType) {
                            SessionBeanType sb = (SessionBeanType) bean;
View Full Code Here

            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) {
View Full Code Here

                            }
                        }

                        if (bean instanceof SessionBeanType) {
                            SessionBeanType sb = (SessionBeanType) bean;
                            WebServiceBindingType b = new WebServiceBindingType();
                            b.setEjbName(sb.getEjbName());
                            b.setWebServiceAddress(sb.getWebServiceAddress());
                            b.setWebServiceVirtualHost(sb.getWebServiceVirtualHost());
                            b.setWebServiceSecurity(sb.getWebServiceSecurity());
                            if (b.containsData()){
                                g2.getWebServiceBinding().add(b);
                            }
                        }
                    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.jee.oejb2.SessionBeanType

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.