tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r594427 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WlsConversion.java
Date Tue, 13 Nov 2007 04:33:52 GMT
Author: dblevins
Date: Mon Nov 12 20:33:51 2007
New Revision: 594427

URL: http://svn.apache.org/viewvc?rev=594427&view=rev
Log:
the JaxbWls class seems to return JAXBElement, need to unwrap it

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WlsConversion.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WlsConversion.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WlsConversion.java?rev=594427&r1=594426&r2=594427&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WlsConversion.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WlsConversion.java
Mon Nov 12 20:33:51 2007
@@ -72,6 +72,7 @@
 import org.apache.openejb.jee.jpa.Basic;
 import org.apache.openejb.jee.jpa.AttributeOverride;
 
+import javax.xml.bind.JAXBElement;
 import java.io.ByteArrayInputStream;
 import java.net.URL;
 import java.util.Map;
@@ -110,10 +111,12 @@
                 // todo warn about not being able to parse sun descriptor
             }
         }
-        if (altDD != null && type.isAssignableFrom(altDD.getClass())) {
-            return (T) altDD;
+        if (altDD == null) return null;
+        if (altDD instanceof JAXBElement) {
+            JAXBElement jaxbElement = (JAXBElement) altDD;
+            altDD = jaxbElement.getValue();
         }
-        return null;
+        return (T) altDD;
     }
 
     public void convertModule(EjbModule ejbModule, EntityMappings entityMappings) {



Mime
View raw message