servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gra...@apache.org
Subject svn commit: r473934 - in /incubator/servicemix/trunk: common/servicemix-common/src/main/java/org/apache/servicemix/common/ common/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/ common/servicemix-common/src/main/java/org/apache/serv...
Date Sun, 12 Nov 2006 11:35:47 GMT
Author: grantm
Date: Sun Nov 12 03:35:46 2006
New Revision: 473934

URL: http://svn.apache.org/viewvc?view=rev&rev=473934
Log:
SM-536: moved endpoint validation method into AbstractDeployer and changed it to be a void
method as the underlying endpoint validation throws a DeploymentException

Modified:
    incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
    incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
    incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
    incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/BaseXBeanDeployer.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNDeployer.java

Modified: incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java?view=diff&rev=473934&r1=473933&r2=473934
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
(original)
+++ incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
Sun Nov 12 03:35:46 2006
@@ -54,4 +54,7 @@
         }
     }
 
+    protected void validate(Endpoint endpoint) throws DeploymentException {
+        endpoint.validate();
+    }
 }

Modified: incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java?view=diff&rev=473934&r1=473933&r2=473934
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
(original)
+++ incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
Sun Nov 12 03:35:46 2006
@@ -138,6 +138,7 @@
                         ep.setService(svc.getQName());
                         ep.setEndpoint(port.getName());
                         ep.setInterfaceName(binding.getPortType().getQName());
+                        validate(ep);
                         su.addEndpoint(ep);
                     }
                 }

Modified: incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java?view=diff&rev=473934&r1=473933&r2=473934
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
(original)
+++ incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
Sun Nov 12 03:35:46 2006
@@ -89,11 +89,8 @@
             for (Iterator iter = services.iterator(); iter.hasNext();) {
                 Endpoint endpoint = (Endpoint) iter.next();
                 endpoint.setServiceUnit(su);
-                if (validate(endpoint)) {
-                    su.addEndpoint(endpoint);
-                } else {
-                    logger.warn("Endpoint " + endpoint + "has not been validated");
-                }
+                validate(endpoint);
+                su.addEndpoint(endpoint);
             }
             if (su.getEndpoints().size() == 0) {
                 throw failure("deploy", "No endpoint found", null);
@@ -116,11 +113,6 @@
     
     protected List getServices(Kernel kernel) throws DeploymentException {
         return kernel.getServices(Endpoint.class);
-    }
-    
-    protected boolean validate(Endpoint endpoint) throws DeploymentException {
-        endpoint.validate();
-        return true;
     }
     
     protected List getXmlPreProcessors(String serviceUnitRootPath) {

Modified: incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/BaseXBeanDeployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/BaseXBeanDeployer.java?view=diff&rev=473934&r1=473933&r2=473934
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/BaseXBeanDeployer.java
(original)
+++ incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/BaseXBeanDeployer.java
Sun Nov 12 03:35:46 2006
@@ -47,13 +47,12 @@
         this.endpointClasses = endpointClasses;
     }
     
-    protected boolean validate(Endpoint endpoint) throws DeploymentException {
+    protected void validate(Endpoint endpoint) throws DeploymentException {
         for (int i = 0; i < endpointClasses.length; i++) {
             if (endpointClasses[i].isInstance(endpoint)) {
-                return super.validate(endpoint);
+                super.validate(endpoint);
             }
         }
-        return false;
     }
     
 }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java?view=diff&rev=473934&r1=473933&r2=473934
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
Sun Nov 12 03:35:46 2006
@@ -109,6 +109,7 @@
                     ep.setDefinition(def);
                     ep.setDescription(desc);
                     // Retrieve wsdl
+                    validate(ep);
 					su.addEndpoint(ep);
 				}
 			}

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNDeployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNDeployer.java?view=diff&rev=473934&r1=473933&r2=473934
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNDeployer.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNDeployer.java
Sun Nov 12 03:35:46 2006
@@ -90,6 +90,7 @@
             }
             ep = createEndpoint(url);
             ep.setServiceUnit(su);
+            validate(ep);
             su.addEndpoint(ep);
         }
         if (su.getEndpoints().size() == 0) {



Mime
View raw message