servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r751752 - /servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
Date Mon, 09 Mar 2009 16:59:15 GMT
Author: gnodet
Date: Mon Mar  9 16:59:15 2009
New Revision: 751752

URL: http://svn.apache.org/viewvc?rev=751752&view=rev
Log:
When deploying an osgi powered service assembly, undeploy the sa when the bundle is stopped
and make sure the state of the sa is preserved across bundle restarts

Modified:
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java?rev=751752&r1=751751&r2=751752&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
Mon Mar  9 16:59:15 2009
@@ -677,10 +677,13 @@
         if (sa != null) {
             try {
                 if (sa.getState() == AbstractLifecycleJbiArtifact.State.Started) {
-                    sa.stop();
+                    sa.stop(false);
                 }
                 if (sa.getState() == AbstractLifecycleJbiArtifact.State.Stopped) {
-                    sa.shutDown();
+                    sa.shutDown(false, true);
+                }
+                for (ServiceUnitImpl su : sa.getServiceUnitsList()) {
+                    su.undeploy();
                 }
             } catch (Exception e) {
                 LOGGER.error("Error unregistering deployed service assembly", e);



Mime
View raw message