geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r523000 - /geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Date Tue, 27 Mar 2007 17:09:12 GMT
Author: dain
Date: Tue Mar 27 10:09:11 2007
New Revision: 523000

URL: http://svn.apache.org/viewvc?view=rev&rev=523000
Log:
If the reference value is not an IntraVmJndiReference, don't attempt to process it.

Modified:
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java?view=diff&rev=523000&r1=522999&r2=523000
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Tue Mar 27 10:09:11 2007
@@ -162,13 +162,16 @@
     }
 
     private Object createClientRef(Object value) {
-        IntraVmJndiReference intraVmJndiReference = (IntraVmJndiReference) value;
-        String deploymentId = intraVmJndiReference.getJndiName();
-        if (deploymentId.startsWith("java:openejb/ejb/")) {
-            deploymentId = deploymentId.substring("java:openejb/ejb/".length());
+        if (value instanceof IntraVmJndiReference) {
+            IntraVmJndiReference intraVmJndiReference = (IntraVmJndiReference) value;
+            String deploymentId = intraVmJndiReference.getJndiName();
+            if (deploymentId.startsWith("java:openejb/ejb/")) {
+                deploymentId = deploymentId.substring("java:openejb/ejb/".length());
+            }
+            ClientEjbReference clientRef = new ClientEjbReference(uri.toString(), deploymentId);
+            return clientRef;
         }
-        ClientEjbReference clientRef = new ClientEjbReference(uri.toString(), deploymentId);
-        return clientRef;
+        return value;
     }
 
     private void addRefs(JndiConsumer jndiConsumer, List<EjbRefType> ejbRefs, Map<String,
GerEjbRefType> refMap, List<EjbLocalRefType> ejbLocalRefs, Map<String, GerEjbLocalRefType>
localRefMap, Map componentContext) {



Mime
View raw message