servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r642907 - in /servicemix/smx3/trunk: common/servicemix-common/src/main/java/org/apache/servicemix/common/ common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/ deployables/serviceengines/servicemix-lwcontainer/src/main/...
Date Mon, 31 Mar 2008 07:19:35 GMT
Author: gnodet
Date: Mon Mar 31 00:19:33 2008
New Revision: 642907

URL: http://svn.apache.org/viewvc?rev=642907&view=rev
Log:
SM-1296: the lightweight container should allow deployment of SU without any endpoints

Modified:
    servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
    servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
    servicemix/smx3/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerXBeanDeployer.java

Modified: servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java?rev=642907&r1=642906&r2=642907&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
(original)
+++ servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/AbstractDeployer.java
Mon Mar 31 00:19:33 2008
@@ -57,4 +57,11 @@
     protected void validate(Endpoint endpoint) throws DeploymentException {
         endpoint.validate();
     }
+
+    protected void validate(ServiceUnit su) throws DeploymentException {
+        if (su.getEndpoints().size() == 0) {
+            throw failure("deploy", "No endpoint found", null);
+        }
+    }
+
 }

Modified: servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java?rev=642907&r1=642906&r2=642907&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
(original)
+++ servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
Mon Mar 31 00:19:33 2008
@@ -94,17 +94,12 @@
 
             // Retrieve endpoints
             Collection<Endpoint> endpoints = getServices(applicationContext);
-            if (endpoints == null || endpoints.isEmpty()) {
-                throw failure("deploy", "No endpoints found", null);
-            }
             for (Endpoint endpoint : endpoints) {
                 endpoint.setServiceUnit(su);
                 validate(endpoint);
                 su.addEndpoint(endpoint);
             }
-            if (su.getEndpoints().size() == 0) {
-                throw failure("deploy", "No endpoint found", null);
-            }
+            validate(su);
             return su;
         } catch (Throwable e) {
             if (applicationContext != null) {

Modified: servicemix/smx3/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerXBeanDeployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerXBeanDeployer.java?rev=642907&r1=642906&r2=642907&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerXBeanDeployer.java
(original)
+++ servicemix/smx3/trunk/deployables/serviceengines/servicemix-lwcontainer/src/main/java/org/apache/servicemix/lwcontainer/LwContainerXBeanDeployer.java
Mon Mar 31 00:19:33 2008
@@ -21,8 +21,11 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.jbi.management.DeploymentException;
+
 import org.apache.servicemix.common.BaseComponent;
 import org.apache.servicemix.common.Endpoint;
+import org.apache.servicemix.common.ServiceUnit;
 import org.apache.servicemix.common.xbean.AbstractXBeanDeployer;
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.SpringServiceUnitContainer;
@@ -60,6 +63,9 @@
         } catch (Exception e) {
             throw new RuntimeException("Can not find 'jbi' bean", e);
         }
+    }
+
+    protected void validate(ServiceUnit su) throws DeploymentException {
     }
 
 }



Mime
View raw message