Examples of SunApplication


Examples of org.apache.openejb.jee.sun.SunApplication

//   https://glassfish.dev.java.net/javaee5/docs/DG/beajj.html
//

public class SunConversion implements DynamicDeployer {
    public AppModule deploy(AppModule appModule) {
        SunApplication sunApplication = getSunApplication(appModule);
        if (sunApplication != null) {
            for (Web web : sunApplication.getWeb()) {
                String webUri = web.getWebUri();
                for (WebModule webModule : appModule.getWebModules()) {
                    if (webUri.equals(webModule.getModuleId()))  {
                        webModule.setContextRoot(web.getContextRoot());
                        break;
                    }
                }
            }

            for (ClientModule clientModule : appModule.getClientModules()) {
                ApplicationClient applicationClient = clientModule.getApplicationClient();
                if (applicationClient == null) {
                    continue;
                }

                // map ejb-refs
                Map<String,org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap();

                // map ejb-ref jndi name declaration to deploymentId
                for (EjbRef ref : sunApplication.getEjbRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getEjbRefName();
                        refName = normalize(refName);
                        org.apache.openejb.jee.EjbRef ejbRef = refMap.get(refName);

                        // try to match from lookup name
                        for (Map.Entry<String, org.apache.openejb.jee.EjbRef> aRef : refMap.entrySet()) {
                            if (refName.equals(aRef.getValue().getLookupName())) {
                                ejbRef = aRef.getValue();
                                break;
                            }
                        }

                        if (ejbRef == null) {
                            ejbRef = new org.apache.openejb.jee.EjbRef();
                            ejbRef.setEjbRefName(refName);
                            refMap.put(refName, ejbRef);
                            applicationClient.getEjbRef().add(ejbRef);
                        }
                        ejbRef.setMappedName(ref.getJndiName());
                    }
                }

                // map resource-env-refs and message-destination-refs
                Map<String,JndiReference> resEnvMap = new TreeMap<String,JndiReference>();
                resEnvMap.putAll(applicationClient.getResourceEnvRefMap());
                resEnvMap.putAll(applicationClient.getMessageDestinationRefMap());

                for (ResourceRef ref : sunApplication.getResourceRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getResRefName();
                        refName = normalize(refName);
                        JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (ResourceEnvRef ref : sunApplication.getResourceEnvRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getResourceEnvRefName();
                        refName = normalize(refName);
                        JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (MessageDestinationRef ref : sunApplication.getMessageDestinationRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getMessageDestinationRefName();
                        refName = normalize(refName);
                        JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (MessageDestination destination : sunApplication.getMessageDestination()) {
                    if (destination.getJndiName() != null) {
                        String name = destination.getMessageDestinationName();
                        name = normalize(name);
                        JndiReference ref = resEnvMap.get(name);
                        if (ref != null) {
                            ref.setMappedName(destination.getJndiName());
                        }
                    }
                }

                Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap();
                for (org.apache.openejb.jee.sun.ServiceRef ref : sunApplication.getServiceRef()) {
                    String refName = ref.getServiceRefName();
                    refName = normalize(refName);
                    ServiceRef serviceRef = serviceRefMap.get(refName);
                    if (serviceRef != null) {
                        Map<String,PortComponentRef> ports = new TreeMap<String,PortComponentRef>();
View Full Code Here

Examples of org.apache.openejb.jee.sun.SunApplication

//   https://glassfish.dev.java.net/javaee5/docs/DG/beajj.html
//

public class SunConversion implements DynamicDeployer {
    public AppModule deploy(AppModule appModule) {
        SunApplication sunApplication = getSunApplication(appModule);
        if (sunApplication != null) {
            for (Web web : sunApplication.getWeb()) {
                String webUri = web.getWebUri();
                for (WebModule webModule : appModule.getWebModules()) {
                    if (webUri.equals(webModule.getModuleId()))  {
                        webModule.setContextRoot(web.getContextRoot());
                        break;
View Full Code Here

Examples of org.apache.openejb.jee.sun.SunApplication

//   https://glassfish.dev.java.net/javaee5/docs/DG/beajj.html
//

public class SunConversion implements DynamicDeployer {
    public AppModule deploy(final AppModule appModule) {
        final SunApplication sunApplication = getSunApplication(appModule);
        if (sunApplication != null) {
            for (final Web web : sunApplication.getWeb()) {
                final String webUri = web.getWebUri();
                for (final WebModule webModule : appModule.getWebModules()) {
                    if (webUri.equals(webModule.getModuleId())) {
                        webModule.setContextRoot(web.getContextRoot());
                        break;
                    }
                }
            }

            for (final ClientModule clientModule : appModule.getClientModules()) {
                final ApplicationClient applicationClient = clientModule.getApplicationClient();
                if (applicationClient == null) {
                    continue;
                }

                // map ejb-refs
                final Map<String, org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap();

                // map ejb-ref jndi name declaration to deploymentId
                for (final EjbRef ref : sunApplication.getEjbRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getEjbRefName();
                        refName = normalize(refName);
                        org.apache.openejb.jee.EjbRef ejbRef = refMap.get(refName);

                        // try to match from lookup name
                        for (final Map.Entry<String, org.apache.openejb.jee.EjbRef> aRef : refMap.entrySet()) {
                            if (refName.equals(aRef.getValue().getLookupName())) {
                                ejbRef = aRef.getValue();
                                break;
                            }
                        }

                        if (ejbRef == null) {
                            ejbRef = new org.apache.openejb.jee.EjbRef();
                            ejbRef.setEjbRefName(refName);
                            refMap.put(refName, ejbRef);
                            applicationClient.getEjbRef().add(ejbRef);
                        }
                        ejbRef.setMappedName(ref.getJndiName());
                    }
                }

                // map resource-env-refs and message-destination-refs
                final Map<String, JndiReference> resEnvMap = new TreeMap<String, JndiReference>();
                resEnvMap.putAll(applicationClient.getResourceEnvRefMap());
                resEnvMap.putAll(applicationClient.getMessageDestinationRefMap());

                for (final ResourceRef ref : sunApplication.getResourceRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getResRefName();
                        refName = normalize(refName);
                        final JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (final ResourceEnvRef ref : sunApplication.getResourceEnvRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getResourceEnvRefName();
                        refName = normalize(refName);
                        final JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (final MessageDestinationRef ref : sunApplication.getMessageDestinationRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getMessageDestinationRefName();
                        refName = normalize(refName);
                        final JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (final MessageDestination destination : sunApplication.getMessageDestination()) {
                    if (destination.getJndiName() != null) {
                        String name = destination.getMessageDestinationName();
                        name = normalize(name);
                        final JndiReference ref = resEnvMap.get(name);
                        if (ref != null) {
                            ref.setMappedName(destination.getJndiName());
                        }
                    }
                }

                final Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap();
                for (final org.apache.openejb.jee.sun.ServiceRef ref : sunApplication.getServiceRef()) {
                    String refName = ref.getServiceRefName();
                    refName = normalize(refName);
                    final ServiceRef serviceRef = serviceRefMap.get(refName);
                    if (serviceRef != null) {
                        final Map<String, PortComponentRef> ports = new TreeMap<String, PortComponentRef>();
View Full Code Here

Examples of org.apache.openejb.jee.sun.SunApplication

//   https://glassfish.dev.java.net/javaee5/docs/DG/beajj.html
//

public class SunConversion implements DynamicDeployer {
    public AppModule deploy(AppModule appModule) {
        SunApplication sunApplication = getSunApplication(appModule);
        if (sunApplication != null) {
            for (Web web : sunApplication.getWeb()) {
                String webUri = web.getWebUri();
                for (WebModule webModule : appModule.getWebModules()) {
                    if (webUri.equals(webModule.getModuleId()))  {
                        webModule.setContextRoot(web.getContextRoot());
                        break;
View Full Code Here

Examples of org.apache.openejb.jee.sun.SunApplication

//   https://glassfish.dev.java.net/javaee5/docs/DG/beajj.html
//

public class SunConversion implements DynamicDeployer {
    public AppModule deploy(AppModule appModule) {
        SunApplication sunApplication = getSunApplication(appModule);
        if (sunApplication != null) {
            for (Web web : sunApplication.getWeb()) {
                String webUri = web.getWebUri();
                for (WebModule webModule : appModule.getWebModules()) {
                    if (webUri.equals(webModule.getModuleId()))  {
                        webModule.setContextRoot(web.getContextRoot());
                        break;
                    }
                }
            }

            for (ClientModule clientModule : appModule.getClientModules()) {
                ApplicationClient applicationClient = clientModule.getApplicationClient();
                if (applicationClient == null) {
                    continue;
                }

                // map ejb-refs
                Map<String,org.apache.openejb.jee.EjbRef> refMap = applicationClient.getEjbRefMap();

                // map ejb-ref jndi name declaration to deploymentId
                for (EjbRef ref : sunApplication.getEjbRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getEjbRefName();
                        refName = normalize(refName);
                        org.apache.openejb.jee.EjbRef ejbRef = refMap.get(refName);

                        // try to match from lookup name
                        for (Map.Entry<String, org.apache.openejb.jee.EjbRef> aRef : refMap.entrySet()) {
                            if (refName.equals(aRef.getValue().getLookupName())) {
                                ejbRef = aRef.getValue();
                                break;
                            }
                        }

                        if (ejbRef == null) {
                            ejbRef = new org.apache.openejb.jee.EjbRef();
                            ejbRef.setEjbRefName(refName);
                            refMap.put(refName, ejbRef);
                            applicationClient.getEjbRef().add(ejbRef);
                        }
                        ejbRef.setMappedName(ref.getJndiName());
                    }
                }

                // map resource-env-refs and message-destination-refs
                Map<String,JndiReference> resEnvMap = new TreeMap<String,JndiReference>();
                resEnvMap.putAll(applicationClient.getResourceEnvRefMap());
                resEnvMap.putAll(applicationClient.getMessageDestinationRefMap());

                for (ResourceRef ref : sunApplication.getResourceRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getResRefName();
                        refName = normalize(refName);
                        JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (ResourceEnvRef ref : sunApplication.getResourceEnvRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getResourceEnvRefName();
                        refName = normalize(refName);
                        JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (MessageDestinationRef ref : sunApplication.getMessageDestinationRef()) {
                    if (ref.getJndiName() != null) {
                        String refName = ref.getMessageDestinationRefName();
                        refName = normalize(refName);
                        JndiReference resEnvRef = resEnvMap.get(refName);
                        if (resEnvRef != null) {
                            resEnvRef.setMappedName(ref.getJndiName());
                        }
                    }
                }
                for (MessageDestination destination : sunApplication.getMessageDestination()) {
                    if (destination.getJndiName() != null) {
                        String name = destination.getMessageDestinationName();
                        name = normalize(name);
                        JndiReference ref = resEnvMap.get(name);
                        if (ref != null) {
                            ref.setMappedName(destination.getJndiName());
                        }
                    }
                }

                Map<String, ServiceRef> serviceRefMap = applicationClient.getServiceRefMap();
                for (org.apache.openejb.jee.sun.ServiceRef ref : sunApplication.getServiceRef()) {
                    String refName = ref.getServiceRefName();
                    refName = normalize(refName);
                    ServiceRef serviceRef = serviceRefMap.get(refName);
                    if (serviceRef != null) {
                        Map<String,PortComponentRef> ports = new TreeMap<String,PortComponentRef>();
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.