[jboss-cvs] JBossAS SVN: r100558 - in branches/jaxrpc-cxf/webservices/src: resources/jbossws-jboss.deployer/META-INF and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 5 12:44:35 EST 2010


Author: alessio.soldano at jboss.com
Date: 2010-02-05 12:44:35 -0500 (Fri, 05 Feb 2010)
New Revision: 100558

Modified:
   branches/jaxrpc-cxf/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
   branches/jaxrpc-cxf/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-2916] provide the list of integration libs through the deployer beans


Modified: branches/jaxrpc-cxf/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java
===================================================================
--- branches/jaxrpc-cxf/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java	2010-02-05 17:36:06 UTC (rev 100557)
+++ branches/jaxrpc-cxf/webservices/src/main/java/org/jboss/webservices/integration/deployers/JAXRPCIntegrationClassPathDeployer.java	2010-02-05 17:44:35 UTC (rev 100558)
@@ -42,12 +42,13 @@
  */
 public abstract class JAXRPCIntegrationClassPathDeployer<T> extends UrlIntegrationDeployer<T>
 {
-   private boolean integrationLibFound = false;
+   private Set<String> libs;
    
+   private boolean integrationLibsFound = false;
+   
    public JAXRPCIntegrationClassPathDeployer(Class<T> input)
    {
       super(input);
-      setIntegrationURLs(getJBossWSIntegrationUrls());
    }
    
    protected abstract boolean isClassPathChangeRequired(VFSDeploymentUnit unit);
@@ -55,7 +56,7 @@
    @Override
    protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
    {
-      return integrationLibFound && isClassPathChangeRequired(unit);
+      return integrationLibsFound && isClassPathChangeRequired(unit);
    }
    
    @Override
@@ -66,27 +67,31 @@
    
    protected Set<URL> getJBossWSIntegrationUrls()
    {
+      Set<URL> result = new HashSet<URL>();
       try
       {
-         String url = getServerHome() + getServicesConfigLibInJAXRPCDeployer();
-         url = StringPropertyReplacer.replaceProperties(url);
-         VirtualFile integrationLib = VFS.getRoot(new URL(url));
-         Set<URL> result = new HashSet<URL>();
-         if (integrationLib != null && integrationLib.exists())
+         for (String file : libs)
          {
-            integrationLibFound = true;
-            result.add(integrationLib.toURL());
+            String url = getServerHome() + file;
+            url = StringPropertyReplacer.replaceProperties(url);
+            VirtualFile integrationLib = VFS.getRoot(new URL(url));
+
+            if (integrationLib != null && integrationLib.exists())
+            {
+               integrationLibsFound = true;
+               result.add(integrationLib.toURL());
+            }
+            else
+            {
+               log.debug("Could not find JAX-RPC integration lib: " + url);
+            }
          }
-         else
-         {
-            log.debug("Could not find JAX-RPC integration lib: " + url);
-         }
-         return result;
       }
       catch (Exception e)
       {
          throw new IllegalArgumentException("Unexpected error: " + e);
       }
+      return result;
    }
    
    /**
@@ -99,14 +104,15 @@
       return "${jboss.server.home.url}";
    }
 
-   /**
-    * Get the integration dir path
-    * 
-    * @return the integration path
-   */
-   protected String getServicesConfigLibInJAXRPCDeployer()
+   public Set<String> getLibs()
    {
-      return "deployers/jbossws-jaxrpc.deployer/jbossws-native-services.jar";
+      return libs;
    }
 
+   public void setLibs(Set<String> libs)
+   {
+      this.libs = libs;
+      setIntegrationURLs(getJBossWSIntegrationUrls());
+   }
+
 }

Modified: branches/jaxrpc-cxf/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- branches/jaxrpc-cxf/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml	2010-02-05 17:36:06 UTC (rev 100557)
+++ branches/jaxrpc-cxf/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml	2010-02-05 17:44:35 UTC (rev 100558)
@@ -139,12 +139,40 @@
     <property name="provides">WebMetaData</property>
   </bean>
 
-  <bean name="JAXRPCAppClientClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCAppClientClassPathDeployer" />  
+  <bean name="JAXRPCAppClientClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCAppClientClassPathDeployer">  
+    <property name="libs">
+       <set class="java.util.HashSet" elementClass="java.lang.String">
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-factories.jar</value>
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-services.jar</value>
+       </set>
+    </property>
+  </bean>
 
-  <bean name="JAXRPCEjbClientClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCEjbClientClassPathDeployer" />  
+  <bean name="JAXRPCEjbClientClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCEjbClientClassPathDeployer">  
+    <property name="libs">
+       <set class="java.util.HashSet" elementClass="java.lang.String">
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-factories.jar</value>
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-services.jar</value>
+       </set>
+    </property>
+  </bean>
 
-  <bean name="JAXRPCServletClientClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCServletClientClassPathDeployer" />  
+  <bean name="JAXRPCServletClientClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCServletClientClassPathDeployer">  
+    <property name="libs">
+       <set class="java.util.HashSet" elementClass="java.lang.String">
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-factories.jar</value>
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-services.jar</value>
+       </set>
+    </property>
+  </bean>
 
-  <bean name="JAXRPCServerClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCServerClassPathDeployer" />  
+  <bean name="JAXRPCServerClassPathDeployer" class="org.jboss.webservices.integration.deployers.JAXRPCServerClassPathDeployer">  
+    <property name="libs">
+       <set class="java.util.HashSet" elementClass="java.lang.String">
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-factories.jar</value>
+         <value>deployers/jbossws-jaxrpc.deployer/jbossws-native-services.jar</value>
+       </set>
+    </property>
+  </bean>
 
 </deployment>




More information about the jboss-cvs-commits mailing list