geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1301327 - /geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Date Fri, 16 Mar 2012 04:14:08 GMT
Author: djencks
Date: Fri Mar 16 04:14:08 2012
New Revision: 1301327

URL: http://svn.apache.org/viewvc?rev=1301327&view=rev
Log:
GERONIMO-6302 fix ejb ref processing

Modified:
    geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java

Modified: geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java?rev=1301327&r1=1301326&r2=1301327&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Fri Mar 16 04:14:08 2012
@@ -310,7 +310,7 @@ public class EjbRefBuilder extends Abstr
 
         for (EjbRef spec_ejbRef : jndiConsumer.getEjbRef()) {
 
-            String refName = getStringValue(spec_ejbRef.getEjbRefName());
+            String refName = spec_ejbRef.getEjbRefName();
 
             // skip corba refs
             GerEjbRefType ejbRefType = refMap.get(refName);
@@ -322,31 +322,6 @@ public class EjbRefBuilder extends Abstr
                    continue;
                 }
 
-                // ejb-ref-name
-                spec_ejbRef.setEjbRefName(refName);
-
-                // ejb-ref-type
-                String refType = getStringValue(spec_ejbRef.getEjbRefType()==null?null:spec_ejbRef.getEjbRefType().name());
-                if ("SESSION".equalsIgnoreCase(refType)) {
-                    spec_ejbRef.setEjbRefType(org.apache.openejb.jee.EjbRefType.SESSION);
-                } else if ("ENTITY".equalsIgnoreCase(refType)) {
-                    spec_ejbRef.setEjbRefType(org.apache.openejb.jee.EjbRefType.ENTITY);
-                } else {
-                    spec_ejbRef.setRefType(EjbRef.Type.UNKNOWN);
-                }
-
-                // home
-                spec_ejbRef.setHome(getStringValue(spec_ejbRef.getHome()));
-
-                // remote
-                spec_ejbRef.setRemote(getStringValue(spec_ejbRef.getRemote()));
-
-                // ejb-link
-                spec_ejbRef.setEjbLink(getStringValue(spec_ejbRef.getEjbLink()));
-
-                // mapped-name
-                spec_ejbRef.setMappedName(getStringValue(spec_ejbRef.getMappedName()));
-
                 // handle external refs
 
                 if (ejbRefType.getPattern() != null) {
@@ -366,23 +341,6 @@ public class EjbRefBuilder extends Abstr
                     spec_ejbRef.setEjbLink(getStringValue(ejbRefType.getEjbLink()));
                 }
 
-
-
-                // openejb handling of injection-targets
-                if (spec_ejbRef.getInjectionTarget() != null) {
-
-                    List<InjectionTarget> injectionTargetsToAdd=new ArrayList<InjectionTarget>();
-                    for (InjectionTarget injectionTargetType : spec_ejbRef.getInjectionTarget())
{
-                        InjectionTarget newInjectionTarget = new InjectionTarget();
-                        newInjectionTarget.setInjectionTargetClass(getStringValue(injectionTargetType
-                                .getInjectionTargetClass()));
-                        newInjectionTarget.setInjectionTargetName(getStringValue(injectionTargetType
-                                .getInjectionTargetName()));
-                        injectionTargetsToAdd.add(newInjectionTarget);
-                    }
-                    spec_ejbRef.getInjectionTarget().addAll(injectionTargetsToAdd);
-                }
-
                 // TODO: geronimo's handling of injection-target
                 // addInjections(refName, spec_ejbRef.getInjectionTarget(), NamingBuilder.INJECTION_KEY.get(sharedContext));
 
@@ -392,7 +350,7 @@ public class EjbRefBuilder extends Abstr
 
         for (EjbLocalRef localRefFromSpecDD : jndiConsumer.getEjbLocalRef()) {
 
-            String refName = getStringValue(localRefFromSpecDD.getEjbRefName());
+            String refName = localRefFromSpecDD.getEjbRefName();
 
             // skip corba refs
             GerEjbLocalRefType ejbLocalRefType = localRefMap.get(refName);
@@ -400,29 +358,6 @@ public class EjbRefBuilder extends Abstr
             // merge info in alt-DD to spec DD.
             if (ejbLocalRefType != null) {
 
-                // ejb-ref-name
-                localRefFromSpecDD.setEjbRefName(refName);
-
-                // ejb-ref-type
-                String refType = getStringValue(localRefFromSpecDD.getType());
-                if ("SESSION".equalsIgnoreCase(refType)) {
-                    localRefFromSpecDD.setEjbRefType(org.apache.openejb.jee.EjbRefType.SESSION);
-                } else if ("ENTITY".equalsIgnoreCase(refType)) {
-                    localRefFromSpecDD.setEjbRefType(org.apache.openejb.jee.EjbRefType.ENTITY);
-                }
-
-                // home
-                localRefFromSpecDD.setLocalHome(getStringValue(localRefFromSpecDD.getLocalHome()));
-
-                // remote
-                localRefFromSpecDD.setLocal(getStringValue(localRefFromSpecDD.getLocal()));
-
-                // ejb-link
-                localRefFromSpecDD.setEjbLink(getStringValue(localRefFromSpecDD.getEjbLink()));
-
-                // mapped-name
-                localRefFromSpecDD.setMappedName(getStringValue(localRefFromSpecDD.getMappedName()));
-
                 // handle external refs
                 if (ejbLocalRefType.getPattern() != null) {
                     // external ear ref
@@ -437,21 +372,10 @@ public class EjbRefBuilder extends Abstr
                     localRefFromSpecDD.setMappedName(deploymentId.trim());
                 }
 
-                // openejb handling of injection-targets
-                if (localRefFromSpecDD.getInjectionTarget() != null) {
-                    List<InjectionTarget> injectionTargetsToAdd=new ArrayList<InjectionTarget>();
-
-                    for (InjectionTarget injectionTargetType : localRefFromSpecDD.getInjectionTarget())
{
-                        InjectionTarget injectionTarget = new InjectionTarget();
-                        injectionTarget.setInjectionTargetClass(getStringValue(injectionTargetType
-                                .getInjectionTargetClass()));
-                        injectionTarget.setInjectionTargetName(getStringValue(injectionTargetType
-                                .getInjectionTargetName()));
-                        injectionTargetsToAdd.add(injectionTarget);
-                    }
-
-                    localRefFromSpecDD.getInjectionTarget().addAll(injectionTargetsToAdd);
+                if (ejbLocalRefType.getEjbLink() != null) {
+                    localRefFromSpecDD.setEjbLink(getStringValue(ejbLocalRefType.getEjbLink()));
                 }
+
                 // TODO: geronimo's handling of injection-target
                 // addInjections(refName, localRefFromSpecDD.getInjectionTarget(), NamingBuilder.INJECTION_KEY.get(sharedContext));
             }



Mime
View raw message