You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/01/21 14:14:56 UTC

svn commit: r613879 - /servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/gshell/features/internal/CommandProxy.java

Author: gnodet
Date: Mon Jan 21 05:14:56 2008
New Revision: 613879

URL: http://svn.apache.org/viewvc?rev=613879&view=rev
Log:
Fix jbi feature deployment

Modified:
    servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/gshell/features/internal/CommandProxy.java

Modified: servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/gshell/features/internal/CommandProxy.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/gshell/features/internal/CommandProxy.java?rev=613879&r1=613878&r2=613879&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/gshell/features/internal/CommandProxy.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-features/src/main/java/org/apache/servicemix/gshell/features/internal/CommandProxy.java Mon Jan 21 05:14:56 2008
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.io.Reader;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Properties;
 
@@ -76,25 +77,14 @@
     protected void deploy(RepositoryAdmin admin) throws Exception {
         List<String> bundles = Arrays.asList(feature.getBundles());
         int idx0 = -1;
-        int idx1 = -1;
         while (++idx0 < bundles.size()) {
             if (bundles.get(idx0).startsWith("obr:")) {
-                if (idx1 < 0) {
-                    idx1 = idx0;
-                }
-                bundles.set(idx0, bundles.get(idx0).substring("obr:".length()));
+                String[] b = bundles.get(idx0).substring("obr:".length()).split(",");
+                doDeploy(admin, Arrays.asList(b), true);
             } else {
-                if (idx1 >= 0) {
-                    doDeploy(admin, bundles.subList(idx1, idx0), true);
-                    idx1 = -1;
-                } else {
-                    Bundle bundle = getBundleContext().installBundle(bundles.get(idx0), null);
-                    bundle.start();
-                }
+                Bundle bundle = getBundleContext().installBundle(bundles.get(idx0), null);
+                bundle.start();
             }
-        }
-        if (idx1 >= 0) {
-            doDeploy(admin, bundles.subList(idx1, idx0), true);
         }
     }