geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1292668 - /geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
Date Thu, 23 Feb 2012 06:55:42 GMT
Author: xuhaihong
Date: Thu Feb 23 06:55:41 2012
New Revision: 1292668

URL: http://svn.apache.org/viewvc?rev=1292668&view=rev
Log:
GERONIMO-6283 Ignore JAX-WS webservices handlering in Axis module

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

Modified: geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java?rev=1292668&r1=1292667&r2=1292668&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
Thu Feb 23 06:55:41 2012
@@ -20,15 +20,17 @@ import java.net.URL;
 import java.security.PermissionCollection;
 import java.security.Permissions;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-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;
@@ -131,6 +133,11 @@ public class AxisModuleBuilderExtension 
 
         for (EnterpriseBeanInfo bean : ejbModule.getEjbJarInfo().enterpriseBeans) {
 
+            //JAX-WS will be handled in JAXWSEJBModuleBuilderExtension
+            if (isJAXWSWebService(bean, bundle)) {
+                continue;
+            }
+
             String j2eeType = null;
             if (bean.type == EnterpriseBeanInfo.STATELESS) {
                 j2eeType = NameFactory.STATELESS_SESSION_BEAN;
@@ -194,6 +201,11 @@ public class AxisModuleBuilderExtension 
 
         for (EnterpriseBeanInfo bean : ejbModule.getEjbJarInfo().enterpriseBeans) {
 
+            //JAX-WS will be handled in JAXWSEJBModuleBuilderExtension
+            if (isJAXWSWebService(bean, bundle)) {
+                continue;
+            }
+
             String j2eeType = null;
             if (bean.type == EnterpriseBeanInfo.STATELESS) {
                 j2eeType = NameFactory.STATELESS_SESSION_BEAN;
@@ -292,6 +304,15 @@ public class AxisModuleBuilderExtension 
         return wsBindingMap;
     }
 
+    private boolean isJAXWSWebService(EnterpriseBeanInfo bean, Bundle bundle) throws DeploymentException
{
+        try {
+            Class<?> clazz = bundle.loadClass(bean.ejbClass);
+            return (clazz.isAnnotationPresent(WebService.class) || clazz.isAnnotationPresent(WebServiceProvider.class));
+        } catch (ClassNotFoundException ex) {
+            throw new DeploymentException("Unable to load EJB Bean class : " + bean.ejbClass,
ex);
+        }
+    }
+
     private static class WebServiceBinding {
 
         private String address;



Mime
View raw message