geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r499398 - /geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
Date Wed, 24 Jan 2007 13:31:49 GMT
Author: dain
Date: Wed Jan 24 05:31:48 2007
New Revision: 499398

URL: http://svn.apache.org/viewvc?view=rev&rev=499398
Log:
the geronimo xml beans tree is totally broken... doesn't unmarshal correct ejb-jar.xml files

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

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java?view=diff&rev=499398&r1=499397&r2=499398
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
Wed Jan 24 05:31:48 2007
@@ -19,6 +19,7 @@
 
 import java.net.URL;
 import java.util.jar.JarFile;
+import java.util.Iterator;
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
@@ -32,6 +33,8 @@
 import javax.xml.parsers.SAXParserFactory;
 import javax.xml.parsers.SAXParser;
 import javax.xml.transform.sax.SAXSource;
+import javax.ejb.SessionContext;
+import javax.ejb.EntityContext;
 
 import org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbEjbJarDocument;
 import org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType;
@@ -48,6 +51,14 @@
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlDocumentProperties;
 import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.EnterpriseBean;
+import org.apache.openejb.jee.MessageDestinationRef;
+import org.apache.openejb.jee.PersistenceContextRef;
+import org.apache.openejb.jee.PersistenceUnitRef;
+import org.apache.openejb.jee.ResourceRef;
+import org.apache.openejb.jee.ResourceEnvRef;
+import org.apache.openejb.jee.ServiceRef;
+import org.apache.openejb.jee.PersistenceContextType;
 import org.xml.sax.helpers.XMLFilterImpl;
 import org.xml.sax.XMLReader;
 import org.xml.sax.Attributes;
@@ -175,6 +186,15 @@
         // it would be nice if Jaxb had a way to convert the object to a
         // sax reader that could be fed directly into xmlbeans
         //
+
+        // the geronimo xml beans tree is totally broken... fix some obvious stuff here
+        for (EnterpriseBean enterpriseBean : ejbJar.getEnterpriseBeans()) {
+            for (PersistenceContextRef ref : enterpriseBean.getPersistenceContextRef()) {
+                if (ref.getPersistenceContextType() == PersistenceContextType.TRANSACTION)
{
+                    ref.setPersistenceContextType(null);
+                }
+            }
+        }
 
         // marshal to xml
         String xml = marshal(ejbJar);



Mime
View raw message