geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1073232 - /geronimo/server/branches/3.0-M2/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Date Tue, 22 Feb 2011 07:17:46 GMT
Author: xuhaihong
Date: Tue Feb 22 07:17:46 2011
New Revision: 1073232

URL: http://svn.apache.org/viewvc?rev=1073232&view=rev
Log:
GERONIMO-5816 Now in OpenEJB, it treats sessionContext and messageContext from callback methods
as normal resource-env injections, think we should not remove those reference types in unmap
method, or those injections will be lost

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

Modified: geronimo/server/branches/3.0-M2/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=1073232&r1=1073231&r2=1073232&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/branches/3.0-M2/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Tue Feb 22 07:17:46 2011
@@ -35,8 +35,6 @@ import java.util.TreeSet;
 import java.util.jar.JarFile;
 
 import javax.ejb.EntityContext;
-import javax.ejb.MessageDrivenContext;
-import javax.ejb.SessionContext;
 import javax.ejb.TimerService;
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebServiceContext;
@@ -481,11 +479,7 @@ public class EjbModuleBuilder implements
             }
             for (Iterator<ResourceEnvRef> iterator = enterpriseBean.getResourceEnvRef().iterator();
iterator.hasNext();) {
                 ResourceEnvRef ref = iterator.next();
-                if (ref.getType().equals(SessionContext.class.getName())) {
-                    iterator.remove();
-                } else if (ref.getType().equals(EntityContext.class.getName())) {
-                    iterator.remove();
-                } else if (ref.getType().equals(MessageDrivenContext.class.getName())) {
+                if (ref.getType().equals(EntityContext.class.getName())) {
                     iterator.remove();
                 } else if (ref.getType().equals(TimerService.class.getName())) {
                     iterator.remove();
@@ -633,15 +627,19 @@ public class EjbModuleBuilder implements
         ejbModule.setOriginalSpecDD(XmlUtil.marshal(ejbJar));
 
         // Get the geronimo-openejb plan
-//            GeronimoEjbJarType geronimoEjbJarType = (GeronimoEjbJarType) ejbModule.getEjbModule().getAltDDs().get("geronimo-openejb.xml");
+           GeronimoEjbJarType geronimoEjbJarType = (GeronimoEjbJarType) ejbModule.getEjbModule().getAltDDs().get("geronimo-openejb.xml");
 
         // We must set all mapped name references back to null or Geronimo will blow up
-//        unmapReferences(ejbJar, geronimoEjbJarType);
+        unmapReferences(ejbJar, geronimoEjbJarType);
 
         // create a xmlbeans version of the ejb-jar.xml file, because the jndi code is coupled
based on xmlbeans objects
+       /* EjbJarType ejbJarType = XmlUtil.convertToXmlbeans(ejbJar);
+        ejbModule.setSpecDD(ejbJarType);*/
 
         // convert the plan to xmlbeans since geronimo naming is coupled on xmlbeans objects
-//            ejbModule.setVendorDD(geronimoOpenejb);
+            OpenejbGeronimoEjbJarType geronimoOpenejb = XmlUtil.convertToXmlbeans(geronimoEjbJarType);
+
+           ejbModule.getVendorDD().set(geronimoOpenejb);
 
         // todo move namingBuilders.buildEnvironment() here when geronimo naming supports
it
 



Mime
View raw message