geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r673496 - in /geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder: JAXWSServiceBuilder.java WARWebServiceFinder.java WebServiceContextAnnotationHelper.java
Date Wed, 02 Jul 2008 21:01:00 GMT
Author: gawor
Date: Wed Jul  2 14:00:59 2008
New Revision: 673496

URL: http://svn.apache.org/viewvc?rev=673496&view=rev
Log:
handle in-place ear deployments and a fix for deployments with metadata-complete=true descriptor

Modified:
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceContextAnnotationHelper.java

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java?rev=673496&r1=673495&r2=673496&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
Wed Jul  2 14:00:59 2008
@@ -142,10 +142,10 @@
         AnnotationHolder serviceHolder = 
             (AnnotationHolder)sharedContext.get(WebServiceContextAnnotationHelper.class.getName());
         if (serviceHolder == null) {
-            serviceHolder = new AnnotationHolder(moduleHolder);
-            WebServiceContextAnnotationHelper.addWebServiceContextInjections(serviceHolder,
module.getClassFinder());
+            serviceHolder = new AnnotationHolder(moduleHolder);            
             sharedContext.put(WebServiceContextAnnotationHelper.class.getName(), serviceHolder);
         }
+        WebServiceContextAnnotationHelper.addWebServiceContextInjections(serviceHolder, servletClass);
         
         String location = portInfo.getLocation();
         LOG.info("Configuring JAX-WS Web Service: " + servletName + " at " + location);

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java?rev=673496&r1=673495&r2=673496&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WARWebServiceFinder.java
Wed Jul  2 14:00:59 2008
@@ -33,6 +33,7 @@
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.util.NestedJarFile;
 import org.apache.geronimo.deployment.util.UnpackedJarFile;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.jaxws.PortInfo;
@@ -93,8 +94,13 @@
             File baseDir = null;
             
             if (moduleFile instanceof UnpackedJarFile) {
+                // war directory is being deployed (--inPlace)
                 baseDir = ((UnpackedJarFile)moduleFile).getBaseDir();
+            } else if (moduleFile instanceof NestedJarFile && ((NestedJarFile)moduleFile).isUnpacked())
{
+                // ear directory is being deployed (--inPlace)
+                baseDir = new File(moduleFile.getName());                
             } else {
+                // war file or ear file is being deployed                
                 /*
                  * Can't get ClassLoader to load nested Jar files, so
                  * unpack the module Jar file and discover all nested Jar files

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceContextAnnotationHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceContextAnnotationHelper.java?rev=673496&r1=673495&r2=673496&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceContextAnnotationHelper.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceContextAnnotationHelper.java
Wed Jul  2 14:00:59 2008
@@ -18,6 +18,7 @@
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.util.ArrayList;
 import java.util.List;
 
 import javax.annotation.Resource;
@@ -32,6 +33,15 @@
     public static final String RELATIVE_JNDI_NAME = "env/WebServiceContext";
     public static final String ABSOLUTE_JNDI_NAME = "java:comp/" + RELATIVE_JNDI_NAME;
     
+    public static void addWebServiceContextInjections(Holder holder, Class clazz) {
+        List<Class> classes = new ArrayList<Class>();
+        while (clazz != Object.class) {
+            classes.add(clazz);
+            clazz = clazz.getSuperclass();
+        }
+        addWebServiceContextInjections(holder, new ClassFinder(classes));
+    }
+    
     public static void addWebServiceContextInjections(Holder holder, ClassFinder finder)
{        
         List<Field> fields = finder.findAnnotatedFields(Resource.class);
         for (Field field : fields) {



Mime
View raw message