geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1091981 - in /geronimo/server/trunk/plugins/jaxws: geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/ geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/ geronimo-jaxws/src/main/java/org/apa...
Date Thu, 14 Apr 2011 01:10:21 GMT
Author: xuhaihong
Date: Thu Apr 14 01:10:20 2011
New Revision: 1091981

URL: http://svn.apache.org/viewvc?rev=1091981&view=rev
Log:
GERONIMO-5902 Refract the codes, remove the isEJB parameter from the interface

Modified:
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/AdvancedWARWebServiceFinder.java
    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/SimpleWARWebServiceFinder.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/WebServiceFinder.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/EJBWebServiceFinder.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/AdvancedWARWebServiceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/AdvancedWARWebServiceFinder.java?rev=1091981&r1=1091980&r2=1091981&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/AdvancedWARWebServiceFinder.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/AdvancedWARWebServiceFinder.java
Thu Apr 14 01:10:20 2011
@@ -39,9 +39,7 @@ public class AdvancedWARWebServiceFinder
     private static final Logger LOG = LoggerFactory.getLogger(AdvancedWARWebServiceFinder.class);
 
     @Override
-    public Map<String, PortInfo> discoverWebServices(Module module,
-                                                     boolean isEJB,
-                                                     Map<String, String> correctedPortLocations)
+    public Map<String, PortInfo> discoverWebServices(Module module, Map<String,
String> correctedPortLocations)
             throws DeploymentException {
         Map<String, PortInfo> servletNamePortInfoMap = new HashMap<String, PortInfo>();
         discoverPOJOWebServices(module, correctedPortLocations, servletNamePortInfoMap);

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=1091981&r1=1091980&r2=1091981&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
Thu Apr 14 01:10:20 2011
@@ -105,7 +105,7 @@ public abstract class JAXWSServiceBuilde
         if (webServiceFinder == null) {
             throw new DeploymentException("WebServiceFinder not configured");
         }
-        return webServiceFinder.discoverWebServices(module, isEJB, correctedPortLocations);
+        return webServiceFinder.discoverWebServices(module, correctedPortLocations);
     }
 
     protected abstract Map<String, PortInfo> parseWebServiceDescriptor(InputStream
in,
@@ -200,12 +200,12 @@ public abstract class JAXWSServiceBuilde
                                 Map sharedContext,
                                 Bundle bundle)
             throws DeploymentException {
-        Map portInfoMap = (Map) sharedContext.get(getKey());
+        Map<String, PortInfo> portInfoMap = (Map<String, PortInfo>) sharedContext.get(getKey());
         if (portInfoMap == null) {
             // not ours
             return false;
         }
-        PortInfo portInfo = (PortInfo) portInfoMap.get(ejbName);
+        PortInfo portInfo = portInfoMap.get(ejbName);
         if (portInfo == null) {
             // not ours
             return false;
@@ -213,7 +213,7 @@ public abstract class JAXWSServiceBuilde
 
         String beanClassName = (String)targetGBean.getAttribute("ejbClass");
         // verify that the class is loadable and is a JAX-WS web service
-        Class beanClass = loadClass(beanClassName, bundle);
+        Class<?> beanClass = loadClass(beanClassName, bundle);
         if (!JAXWSUtils.isWebService(beanClass)) {
             return false;
         }
@@ -223,7 +223,9 @@ public abstract class JAXWSServiceBuilde
             throw new DeploymentException("Endpoint URI for EJB WebService is missing");
         }
 
-        LOG.info("Configuring EJB JAX-WS Web Service: " + ejbName + " at " + location);
+        if (LOG.isDebugEnabled()) {
+            LOG.info("Configuring EJB JAX-WS Web Service: " + ejbName + " at " + location);
+        }
 
         targetGBean.setAttribute("portInfo", portInfo);
 

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/SimpleWARWebServiceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/SimpleWARWebServiceFinder.java?rev=1091981&r1=1091980&r2=1091981&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/SimpleWARWebServiceFinder.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/SimpleWARWebServiceFinder.java
Thu Apr 14 01:10:20 2011
@@ -37,10 +37,8 @@ public class SimpleWARWebServiceFinder e
 
     private static final Logger LOG = LoggerFactory.getLogger(SimpleWARWebServiceFinder.class);
 
-    public Map<String, PortInfo> discoverWebServices(Module module,
-                                                     boolean isEJB,
-                                                     Map<String, String> correctedPortLocations)
-            throws DeploymentException {
+    @Override
+    public Map<String, PortInfo> discoverWebServices(Module module, Map<String,
String> correctedPortLocations) throws DeploymentException {
 
         Map<String, PortInfo> servletNamePortInfoMap = new HashMap<String, PortInfo>();
 

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=1091981&r1=1091980&r2=1091981&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
Thu Apr 14 01:10:20 2011
@@ -46,10 +46,7 @@ public class WARWebServiceFinder impleme
     }
 
     @Override
-    public Map<String, PortInfo> discoverWebServices(Module module,
-                                                     boolean isEJB,
-                                                     Map<String, String> correctedPortLocations)
-            throws DeploymentException {
-        return webServiceFinder.discoverWebServices(module, isEJB, correctedPortLocations);
+    public Map<String, PortInfo> discoverWebServices(Module module, Map<String,
String> correctedPortLocations) throws DeploymentException {
+        return webServiceFinder.discoverWebServices(module, correctedPortLocations);
     }
 }

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceFinder.java?rev=1091981&r1=1091980&r2=1091981&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceFinder.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/WebServiceFinder.java
Thu Apr 14 01:10:20 2011
@@ -25,9 +25,6 @@ import org.apache.geronimo.jaxws.PortInf
 
 public interface WebServiceFinder {
 
-    Map<String, PortInfo> discoverWebServices(Module module,
-                                              boolean isEJB,
-                                              Map<String, String> correctedPortLocations)
-         throws DeploymentException;
+    Map<String, PortInfo> discoverWebServices(Module module, Map<String, String>
correctedPortLocations) throws DeploymentException;
 
 }

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/EJBWebServiceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/EJBWebServiceFinder.java?rev=1091981&r1=1091980&r2=1091981&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/EJBWebServiceFinder.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/EJBWebServiceFinder.java
Thu Apr 14 01:10:20 2011
@@ -35,10 +35,7 @@ public class EJBWebServiceFinder impleme
 
     private static final Logger LOG = LoggerFactory.getLogger(EJBWebServiceFinder.class);
 
-    public Map<String, PortInfo> discoverWebServices(Module module,
-                                                     boolean isEJB,
-                                                     Map<String, String> correctedPortLocations)
-            throws DeploymentException {
+    public Map<String, PortInfo> discoverWebServices(Module module, Map<String,
String> correctedPortLocations) throws DeploymentException {
         Map<String, PortInfo> map = new HashMap<String, PortInfo>();
         discoverEJBWebServices(module, correctedPortLocations, map);
         return map;

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java?rev=1091981&r1=1091980&r2=1091981&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
Thu Apr 14 01:10:20 2011
@@ -143,7 +143,7 @@ public class JAXWSEJBModuleBuilderExtens
 
             AbstractName sessionName = earContext.getNaming().createChildName(module.getModuleName(),
ejbName, j2eeType);
 
-            assert sessionName != null: "StatelesSessionBean object name is null";
+            assert sessionName != null: "StatelesSessionBean/Singleton object name is null";
 
             WebServiceBinding wsBinding = wsBindingMap.get(ejbName);
             if (wsBinding != null) {

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java?rev=1091981&r1=1091980&r2=1091981&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java
Thu Apr 14 01:10:20 2011
@@ -41,11 +41,11 @@ public class PortInfo implements Seriali
     private Boolean mtomEnabled;
 
     private String binding;
-    
+
     private QName wsdlPort;
-    
+
     private QName wsdlService;
-    
+
     private String location;
 
     public String getPortName() {
@@ -105,10 +105,10 @@ public class PortInfo implements Seriali
     }
 
     /*
-     * This is a bit tricky here since JAXB generated classes are not serializable, 
-     * so serialize the handler chain to XML and pass it as a String. 
+     * This is a bit tricky here since JAXB generated classes are not serializable,
+     * so serialize the handler chain to XML and pass it as a String.
      */
-    
+
     public void setHandlers(Class type, Object handlerChain) throws Exception {
         if (handlerChain == null) {
             return;
@@ -120,7 +120,7 @@ public class PortInfo implements Seriali
         /*
          * Since HandlerChainsType is a type, have to wrap it into some element
          */
-        JAXBElement element = 
+        JAXBElement element =
             new JAXBElement(HandlerChainsUtils.HANDLER_CHAINS_QNAME, type, handlerChain);
         m.marshal(element, writer);
 
@@ -146,7 +146,7 @@ public class PortInfo implements Seriali
     public void setWsdlService(QName wsdlService) {
         this.wsdlService = wsdlService;
     }
-    
+
     public String getLocation() {
         return location;
     }
@@ -154,14 +154,12 @@ public class PortInfo implements Seriali
     public void setLocation(String location) {
         this.location = location;
     }
-    
-    /*
-     * private String serviceName; private String portName; private String
-     * seiInterfaceName; private String wsdlFile; private String servletLink;
-     */
+
+    @Override
     public String toString() {
-        return "[" + serviceName + ":" + portName + ":" + seiInterfaceName
-                + ":" + wsdlFile + "]";
+        return "PortInfo [serviceName=" + serviceName + ", portName=" + portName + ", seiInterfaceName="
+ seiInterfaceName + ", wsdlFile=" + wsdlFile + ", servletLink=" + servletLink
+                + ", handlersAsXML=" + handlersAsXML + ", mtomEnabled=" + mtomEnabled + ",
binding=" + binding + ", wsdlPort=" + wsdlPort + ", wsdlService=" + wsdlService + ", location="
+ location
+                + "]";
     }
 
     public String getHandlersAsXML() {



Mime
View raw message