geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r570242 - in /geronimo/server/trunk/modules: geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ geronimo-openejb/src/main/java/org/apache/geronimo/openejb/
Date Mon, 27 Aug 2007 21:02:10 GMT
Author: dblevins
Date: Mon Aug 27 14:02:09 2007
New Revision: 570242

URL: http://svn.apache.org/viewvc?rev=570242&view=rev
Log:
A fix for app client refs to ejbs

Modified:
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ClientEjbReference.java
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.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?rev=570242&r1=570241&r2=570242&view=diff
==============================================================================
--- 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
Mon Aug 27 14:02:09 2007
@@ -176,6 +176,8 @@
         if (value instanceof IntraVmJndiReference) {
             IntraVmJndiReference intraVmJndiReference = (IntraVmJndiReference) value;
             String deploymentId = intraVmJndiReference.getJndiName();
+            // Temporary debug statement
+            log.error("EjbRefBuilder: deploymentId: "+deploymentId);
             if (deploymentId.startsWith("java:openejb/ejb/")) {
                 deploymentId = deploymentId.substring("java:openejb/ejb/".length());
             }

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ClientEjbReference.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ClientEjbReference.java?rev=570242&r1=570241&r2=570242&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ClientEjbReference.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ClientEjbReference.java
Mon Aug 27 14:02:09 2007
@@ -37,6 +37,7 @@
         Properties p = new Properties();
         p.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory");
         p.put("java.naming.provider.url", url);
+        p.put("openejb.client.moduleId", "openejb/Deployment");
 
         try {
             InitialContext ctx = new InitialContext(p);

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java?rev=570242&r1=570241&r2=570242&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Mon Aug 27 14:02:09 2007
@@ -104,15 +104,10 @@
         }
         System.setProperty("duct tape","");
         System.setProperty("admin.disabled", "true");
-        SystemInstance systemInstance = SystemInstance.get();
 
-        String format = systemInstance.getProperty("openejb.deploymentId.format");
-        if (format == null){
-            systemInstance.setProperty("openejb.deploymentId.format", "{moduleId}/{ejbName}");
-        }
-
-        systemInstance.setProperty("openejb.jndiname.strategy.class", "org.apache.openejb.assembler.classic.JndiBuilder$TemplatedStrategy");
-        systemInstance.setProperty("openejb.jndiname.format", "{deploymentId}/{interfaceClass}");
+        setDefaultProperty("openejb.deploymentId.format", "{moduleId}/{ejbName}");
+        setDefaultProperty("openejb.jndiname.strategy.class", "org.apache.openejb.assembler.classic.JndiBuilder$TemplatedStrategy");
+        setDefaultProperty("openejb.jndiname.format", "{deploymentId}/{interfaceClass}");
 
         System.setProperty("openejb.naming", "xbean");
         if (transactionManager == null) {
@@ -156,6 +151,16 @@
 
         // process all resource adapters
         processResourceAdapterWrappers(resourceAdapters);
+    }
+
+    private void setDefaultProperty(String key, String value) {
+        SystemInstance systemInstance = SystemInstance.get();
+
+
+        String format = systemInstance.getProperty(key);
+        if (format == null){
+            systemInstance.setProperty(key, value);
+        }
     }
 
     @SuppressWarnings({"unchecked"})



Mime
View raw message