Skip to content

Commit

Permalink
Install first, then start
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Aug 25, 2013
1 parent 713c801 commit 5851923
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions qnode/src/main/java/org/jpos/qnode/QNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@

import java.io.File;
import java.io.FileFilter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.ServiceLoader;
import java.util.*;

import static java.util.ResourceBundle.getBundle;

Expand Down Expand Up @@ -147,15 +144,18 @@ public boolean accept(File f) {
}
});
if (bundles != null) {
for (File b : bundles) {
registerOSGIBundle(b);
List<Bundle> bundleList = new ArrayList<Bundle>(bundles.length);
for (File f : bundles) {
bundleList.add(installOSGIBundle(f));
}
for (Bundle b : bundleList) {
b.start();
}
}
}

private void registerOSGIBundle (File b) throws BundleException {
private Bundle installOSGIBundle (File b) throws BundleException {
BundleContext context = osgiFramework.getBundleContext();
Bundle bundle = context.installBundle("file:" + b.getAbsolutePath());
bundle.start();
return context.installBundle("file:" + b.getAbsolutePath());
}
}

0 comments on commit 5851923

Please sign in to comment.