geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r579837 - in /geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment: EjbModuleBuilder.java XmlUtil.java
Date Wed, 26 Sep 2007 22:29:07 GMT
Author: djencks
Date: Wed Sep 26 15:29:05 2007
New Revision: 579837

URL: http://svn.apache.org/viewvc?rev=579837&view=rev
Log:
GERONIMO-3481 for unclear reasons jaxb is insisting on having the TCCL set to something that
contains jaxb classes.. No idea why this is working anywhere else w/o this fix

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

Modified: geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=579837&r1=579836&r2=579837&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Wed Sep 26 15:29:05 2007
@@ -265,7 +265,14 @@
         // Read in the deploument desiptor files
         ReadDescriptors readDescriptors = new ReadDescriptors();
         try {
-            readDescriptors.deploy(appModule);
+            Thread currentThread = Thread.currentThread();
+            ClassLoader cl = currentThread.getContextClassLoader();
+            currentThread.setContextClassLoader(getClass().getClassLoader());
+            try {
+                readDescriptors.deploy(appModule);
+            } finally {
+                currentThread.setContextClassLoader(cl);
+            }
         } catch (OpenEJBException e) {
             throw new DeploymentException("Failed parsing descriptors for module: " + moduleFile.getName(),
e);
         }

Modified: geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java?rev=579837&r1=579836&r2=579837&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/XmlUtil.java
Wed Sep 26 15:29:05 2007
@@ -71,7 +71,15 @@
                 type = element.getValue().getClass();
             }
 
-            JAXBContext ctx = JAXBContext.newInstance(type);
+            JAXBContext ctx;
+            Thread currentThread = Thread.currentThread();
+            ClassLoader cl = currentThread.getContextClassLoader();
+            currentThread.setContextClassLoader(type.getClassLoader());
+            try {
+                ctx = JAXBContext.newInstance(type);
+            } finally {
+                currentThread.setContextClassLoader(cl);
+            }
             Marshaller marshaller = ctx.createMarshaller();
 
             ByteArrayOutputStream baos = new ByteArrayOutputStream();



Mime
View raw message