geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r929762 - in /geronimo/server/trunk/plugins/openejb: geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ openejb/
Date Thu, 01 Apr 2010 00:48:21 GMT
Author: djencks
Date: Thu Apr  1 00:48:21 2010
New Revision: 929762

URL: http://svn.apache.org/viewvc?rev=929762&view=rev
Log:
GERONIMO-5210 fix some deployment and naming glitches in openejb integration

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/DeepBindableContext.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
    geronimo/server/trunk/plugins/openejb/openejb/pom.xml

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=929762&r1=929761&r2=929762&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Thu Apr  1 00:48:21 2010
@@ -405,30 +405,30 @@ public class EjbModuleBuilder implements
     public void installModule(JarFile earFile, EARContext earContext, Module module, Collection
configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws
DeploymentException {
         installModule(module, earContext);
         EARContext moduleContext;
-        if (module.isStandAlone()) {
+//        if (module.isStandAlone()) {
             moduleContext = earContext;
-        } else {
-            Environment environment = earContext.getConfiguration().getEnvironment();
-            File configurationDir = new File(earContext.getBaseDir(), module.getTargetPath());
-//            configurationDir.mkdirs();
-
-            // construct the ejb app deployment context... this is the same class used by
the ear context
-            try {
-                File inPlaceConfigurationDir = null;
-                if (null != earContext.getInPlaceConfigurationDir()) {
-                    inPlaceConfigurationDir = new File(earContext.getInPlaceConfigurationDir(),
module.getTargetPath());
-                }
-                moduleContext = new EARContext(configurationDir,
-                        inPlaceConfigurationDir,
-                        environment,
-                        ConfigurationModuleType.EJB,
-                        module.getModuleName(),
-                        earContext);
-            } catch (DeploymentException e) {
-                cleanupConfigurationDir(configurationDir);
-                throw e;
-            }
-        }
+//        } else {
+//            Environment environment = earContext.getConfiguration().getEnvironment();
+//            File configurationDir = new File(earContext.getBaseDir(), module.getTargetPath());
+////            configurationDir.mkdirs();
+//
+//            // construct the ejb app deployment context... this is the same class used
by the ear context
+//            try {
+//                File inPlaceConfigurationDir = null;
+//                if (null != earContext.getInPlaceConfigurationDir()) {
+//                    inPlaceConfigurationDir = new File(earContext.getInPlaceConfigurationDir(),
module.getTargetPath());
+//                }
+//                moduleContext = new EARContext(configurationDir,
+//                        inPlaceConfigurationDir,
+//                        environment,
+//                        ConfigurationModuleType.EJB,
+//                        module.getModuleName(),
+//                        earContext);
+//            } catch (DeploymentException e) {
+//                cleanupConfigurationDir(configurationDir);
+//                throw e;
+//            }
+//        }
         module.setEarContext(moduleContext);
         module.setRootEarContext(earContext);
         if (((EjbModule) module).getEjbJar().getAssemblyDescriptor() != null) {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java?rev=929762&r1=929761&r2=929762&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Thu Apr  1 00:48:21 2010
@@ -17,6 +17,7 @@
 
 package org.apache.geronimo.openejb.deployment;
 
+import java.io.Serializable;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Collection;
@@ -174,7 +175,9 @@ public class EjbRefBuilder extends Abstr
                 if (uri != null) {
                     value = createClientRef(value);
                 }
-                put(name, value, getJndiContextMap(componentContext));
+                if (value instanceof Serializable) {
+                    put(name, value, getJndiContextMap(componentContext));
+                }
             }
         }
     }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/DeepBindableContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/DeepBindableContext.java?rev=929762&r1=929761&r2=929762&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/DeepBindableContext.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/DeepBindableContext.java
Thu Apr  1 00:48:21 2010
@@ -26,6 +26,7 @@ import org.apache.openejb.SystemExceptio
 import org.apache.openejb.core.JndiFactory;
 import org.apache.xbean.naming.context.ContextAccess;
 import org.apache.xbean.naming.context.WritableContext;
+import org.apache.xbean.naming.global.GlobalContextManager;
 
 import javax.naming.Binding;
 import javax.naming.CompositeName;
@@ -70,7 +71,7 @@ public class DeepBindableContext extends
         private final Context rootContext;
 
         XBeanJndiFactory() throws NamingException {
-            rootContext = new ContextWrapper((Context) new InitialContext().lookup(""));
+            rootContext = new ContextWrapper(DeepBindableContext.this);
         }
 
         public Context createComponentContext(Map<String, Object> bindings) throws
SystemException {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java?rev=929762&r1=929761&r2=929762&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Thu Apr  1 00:48:21 2010
@@ -65,7 +65,7 @@ public class EjbDeployment implements EJ
 
     protected CoreDeploymentInfo deploymentInfo;
 
-    private Context javaCompSubContext;
+//    private Context javaCompSubContext;
 
     public EjbDeployment() throws LoginException {
         this(null, null, null, null, null, null, null, null, null, null,
@@ -167,7 +167,7 @@ public class EjbDeployment implements EJ
     }
 
     public Context getComponentContext() {
-        return javaCompSubContext;
+        return componentContext;
     }
 
     public Set<String> getUnshareableResources() {
@@ -276,10 +276,10 @@ public class EjbDeployment implements EJ
             throw new IllegalStateException("Ejb does not exist " + deploymentId);
         }
 
-        javaCompSubContext = (Context) deploymentInfo.getJndiEnc().lookup("java:comp");
-        if (componentContext != null) {
-            javaCompSubContext.bind("geronimo", componentContext);
-        }
+//        javaCompSubContext = (Context) deploymentInfo.getJndiEnc().lookup("java:comp");
+//        if (componentContext != null) {
+//            javaCompSubContext.bind("geronimo", componentContext);
+//        }
         synchronized(deploymentInfo){
             deploymentInfo.set(EjbDeployment.class, this);
        	    deploymentInfo.notifyAll();

Modified: geronimo/server/trunk/plugins/openejb/openejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb/pom.xml?rev=929762&r1=929761&r2=929762&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb/pom.xml (original)
+++ geronimo/server/trunk/plugins/openejb/openejb/pom.xml Thu Apr  1 00:48:21 2010
@@ -176,7 +176,7 @@
                             <config-substitution key="MulticastDiscoveryAddress">239.255.3.2</config-substitution>
                             <config-substitution key="MulticastDiscoveryPort">6142</config-substitution>
                             <config-substitution key="ClusterName">cluster1</config-substitution>
-                            <copy-file relative-to="geronimo" dest-dir="">schema</copy-file>
+                            <copy-file relative-to="geronimo" dest-dir="schema">schema/</copy-file>
                         </plugin-artifact>
                     </instance>
                 </configuration>



Mime
View raw message