geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r398050 - in /geronimo/branches/1.1: configs/j2ee-server/src/plan/ configs/uddi-jetty/ configs/uddi-jetty/src/plan/ configs/uddi-tomcat/ configs/uddi-tomcat/src/plan/ modules/webservices/ modules/webservices/src/java/org/apache/geronimo/web...
Date Sat, 29 Apr 2006 01:10:58 GMT
Author: djencks
Date: Fri Apr 28 18:10:56 2006
New Revision: 398050

URL: http://svn.apache.org/viewcvs?rev=398050&view=rev
Log:
GERONIMO-1941 fix jaxr classloader problems, improve JAXRGbean, move it to uddi-* plans

Modified:
    geronimo/branches/1.1/configs/j2ee-server/src/plan/plan.xml
    geronimo/branches/1.1/configs/uddi-jetty/project.xml
    geronimo/branches/1.1/configs/uddi-jetty/src/plan/plan.xml
    geronimo/branches/1.1/configs/uddi-tomcat/project.xml
    geronimo/branches/1.1/configs/uddi-tomcat/src/plan/plan.xml
    geronimo/branches/1.1/modules/webservices/project.xml
    geronimo/branches/1.1/modules/webservices/src/java/org/apache/geronimo/webservices/jaxr/JAXRGBean.java

Modified: geronimo/branches/1.1/configs/j2ee-server/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/j2ee-server/src/plan/plan.xml?rev=398050&r1=398049&r2=398050&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/j2ee-server/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/j2ee-server/src/plan/plan.xml Fri Apr 28 18:10:56 2006
@@ -169,6 +169,6 @@
         </reference>
     </gbean>
 
-    <gbean name="eis/JAXR" class="org.apache.geronimo.webservices.jaxr.JAXRGBean"/>
+    <!--<gbean name="eis/JAXR" class="org.apache.geronimo.webservices.jaxr.JAXRGBean"/>-->
 
 </configuration>

Modified: geronimo/branches/1.1/configs/uddi-jetty/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/uddi-jetty/project.xml?rev=398050&r1=398049&r2=398050&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/uddi-jetty/project.xml (original)
+++ geronimo/branches/1.1/configs/uddi-jetty/project.xml Fri Apr 28 18:10:56 2006
@@ -97,6 +97,15 @@
                  <geronimo.import>true</geronimo.import>
              </properties>
         </dependency>
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>axis</artifactId>
+            <version>${geronimo_version}</version>
+            <type>car</type>
+            <properties>
+                 <geronimo.import>true</geronimo.import>
+             </properties>
+        </dependency>
 
         <dependency>
             <groupId>juddi</groupId>
@@ -110,6 +119,15 @@
             <groupId>geronimo</groupId>
             <artifactId>geronimo-uddi-db</artifactId>
             <version>${geronimo_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>scout</groupId>
+            <artifactId>scout</artifactId>
+            <version>${scout_version}</version>
             <properties>
                  <geronimo.dependency>true</geronimo.dependency>
              </properties>

Modified: geronimo/branches/1.1/configs/uddi-jetty/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/uddi-jetty/src/plan/plan.xml?rev=398050&r1=398049&r2=398050&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/uddi-jetty/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/uddi-jetty/src/plan/plan.xml Fri Apr 28 18:10:56 2006
@@ -69,4 +69,5 @@
         </connector>
     </ext-module>
 
+    <gbean name="eis/JAXR" class="org.apache.geronimo.webservices.jaxr.JAXRGBean"/>
 </application>

Modified: geronimo/branches/1.1/configs/uddi-tomcat/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/uddi-tomcat/project.xml?rev=398050&r1=398049&r2=398050&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/uddi-tomcat/project.xml (original)
+++ geronimo/branches/1.1/configs/uddi-tomcat/project.xml Fri Apr 28 18:10:56 2006
@@ -97,6 +97,15 @@
                  <geronimo.import>true</geronimo.import>
              </properties>
         </dependency>
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>axis</artifactId>
+            <version>${geronimo_version}</version>
+            <type>car</type>
+            <properties>
+                 <geronimo.import>true</geronimo.import>
+             </properties>
+        </dependency>
 
         <dependency>
             <groupId>juddi</groupId>
@@ -110,6 +119,15 @@
             <groupId>geronimo</groupId>
             <artifactId>geronimo-uddi-db</artifactId>
             <version>${geronimo_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>scout</groupId>
+            <artifactId>scout</artifactId>
+            <version>${scout_version}</version>
             <properties>
                  <geronimo.dependency>true</geronimo.dependency>
              </properties>

Modified: geronimo/branches/1.1/configs/uddi-tomcat/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/uddi-tomcat/src/plan/plan.xml?rev=398050&r1=398049&r2=398050&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/uddi-tomcat/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/uddi-tomcat/src/plan/plan.xml Fri Apr 28 18:10:56 2006
@@ -69,4 +69,5 @@
         </connector>
     </ext-module>
 
+    <gbean name="eis/JAXR" class="org.apache.geronimo.webservices.jaxr.JAXRGBean"/>
 </application>

Modified: geronimo/branches/1.1/modules/webservices/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/webservices/project.xml?rev=398050&r1=398049&r2=398050&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/webservices/project.xml (original)
+++ geronimo/branches/1.1/modules/webservices/project.xml Fri Apr 28 18:10:56 2006
@@ -43,6 +43,12 @@
     <!-- ============ -->
 
     <dependencies>
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-dependency-plugin</artifactId>
+            <version>${geronimo_dependency_plugin_version}</version>
+            <type>plugin</type>
+        </dependency>
         <!-- Module Dependencies -->
 
         <dependency>
@@ -140,17 +146,26 @@
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jaxr_1.0_spec</artifactId>
             <version>${geronimo_spec_jaxr_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
         </dependency>
 
 
+<!--
         <dependency>
             <groupId>scout</groupId>
             <artifactId>scout</artifactId>
             <version>${scout_version}</version>
+            <properties>
+                 <geronimo.dependency>true</geronimo.dependency>
+             </properties>
         </dependency>
+-->
 
     </dependencies>
 
+<!--
     <build>
         <resources>
             <resource>
@@ -170,5 +185,6 @@
             </excludes>
         </unitTest>
     </build>
+-->
 
 </project>

Modified: geronimo/branches/1.1/modules/webservices/src/java/org/apache/geronimo/webservices/jaxr/JAXRGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/webservices/src/java/org/apache/geronimo/webservices/jaxr/JAXRGBean.java?rev=398050&r1=398049&r2=398050&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/webservices/src/java/org/apache/geronimo/webservices/jaxr/JAXRGBean.java
(original)
+++ geronimo/branches/1.1/modules/webservices/src/java/org/apache/geronimo/webservices/jaxr/JAXRGBean.java
Fri Apr 28 18:10:56 2006
@@ -29,20 +29,56 @@
  * Simple GBean to provide access to a JAXR ConnectionFactory
  *
  * @version $Rev$ $Date$
- *
  */
 public class JAXRGBean {
 
-   public static final GBeanInfo GBEAN_INFO;
-
     private final Log log = LogFactory.getLog(JAXRGBean.class);
+    private final ClassLoader cl;
+    private final String connectionFactoryClass;
+
+    public JAXRGBean(String connectionFactoryClass, ClassLoader cl) {
+        this.cl = cl;
+        this.connectionFactoryClass = connectionFactoryClass;
+    }
+
+    /**
+     * Returns a fresh, new implementation of javax.xml.registry.ConnectionFactory
+     *
+     * @return ConnectionFactory
+     */
+    public Object $getResource() {
+        if (connectionFactoryClass != null) {
+            System.setProperty("javax.xml.registry.ConnectionFactoryClass", connectionFactoryClass);
+            //TODO consider whether we should bypass the code below and just construct it
ourselves, like it does.
+        }
+        Thread currentThread = Thread.currentThread();
+        ClassLoader oldCl = currentThread.getContextClassLoader();
+        currentThread.setContextClassLoader(cl);
+        try {
+            return ConnectionFactory.newInstance();
+        } catch (JAXRException e) {
+            log.error("Error creating ConnectionFactory", e);
+        } finally {
+            currentThread.setContextClassLoader(oldCl);
+        }
+
+        return null;
+    }
+
+
+    public static final GBeanInfo GBEAN_INFO;
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(JAXRGBean.class,
                 NameFactory.JAXR_CONNECTION_FACTORY);
 
+        infoFactory.addAttribute("connectionFactoryClass", String.class, true, true);
+        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
+
         infoFactory.addOperation("$getResource");
 
+        infoFactory.setConstructor(new String[] {"connectionFactoryClass", "classLoader"});
+
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 
@@ -51,20 +87,4 @@
     }
 
 
-    /**
-     *  Returns a fresh, new implementation of javax.xml.registry.ConnectionFactory
-     *
-     * @return
-     */
-    public Object $getResource() {
-
-        try {
-            return ConnectionFactory.newInstance();
-        }
-        catch(JAXRException e) {
-            log.error("Error creating ConnectionFactory", e);
-        }
-
-        return null;
-    }
 }



Mime
View raw message