geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r956793 - /geronimo/server/branches/2.2/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
Date Tue, 22 Jun 2010 07:01:31 GMT
Author: delos
Date: Tue Jun 22 07:01:31 2010
New Revision: 956793

URL: http://svn.apache.org/viewvc?rev=956793&view=rev
Log:
GERONIMO-5377 avoid initContext in AxisModuleBuilderExtension for JAX-WS

Modified:
    geronimo/server/branches/2.2/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java

Modified: geronimo/server/branches/2.2/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java?rev=956793&r1=956792&r2=956793&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
(original)
+++ geronimo/server/branches/2.2/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
Tue Jun 22 07:01:31 2010
@@ -27,8 +27,10 @@ import java.util.Collections;
 import java.util.Properties;
 import java.util.jar.JarFile;
 
+import javax.jws.WebService;
 import javax.security.jacc.WebResourcePermission;
 import javax.security.jacc.WebUserDataPermission;
+import javax.xml.ws.WebServiceProvider;
 
 import org.apache.geronimo.axis.server.EjbWebServiceGBean;
 import org.apache.geronimo.common.DeploymentException;
@@ -126,6 +128,12 @@ public class AxisModuleBuilderExtension 
             if (bean.type != EnterpriseBeanInfo.STATELESS) {
                 continue;
             }
+            
+            //JAX-WS will be handled in JAXWSEJBModuleBuilderExtension 
+            if (isJAXWSWebService(bean,cl)){
+            	continue;
+            }           
+
 
             String ejbName = bean.ejbName;
 
@@ -169,7 +177,17 @@ public class AxisModuleBuilderExtension 
         }
     }
 
-    public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Collection
repository) throws DeploymentException {
+    private boolean isJAXWSWebService(EnterpriseBeanInfo bean, ClassLoader cl) throws DeploymentException
{
+    	try {
+            Class clazz =  cl.loadClass(bean.ejbClass);
+            return (clazz.isAnnotationPresent(WebService.class) || 
+                    clazz.isAnnotationPresent(WebServiceProvider.class));
+        } catch (ClassNotFoundException ex) {
+            throw new DeploymentException("Unable to load Web Service class: " + bean.ejbClass);
+        }
+    }
+
+	public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Collection repository)
throws DeploymentException {
         if (module.getType() != ConfigurationModuleType.EJB) {
             return;
         }



Mime
View raw message