Skip to content

Commit

Permalink
Correct the suggested solution for issue #35
Browse files Browse the repository at this point in the history
  • Loading branch information
debbabi committed Apr 13, 2016
1 parent 1c394cc commit 90982f1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions python/cohorte/boot/loaders/osgi_inner.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,15 +704,16 @@ def load(self, configuration):
elif bundle.file == osgi_jar_file:
_logger.debug("OSGi framework is already installed.")
else:
_logger.debug("Installing Java bundle %s...", bundle.name)
java_bundles.append(context.installBundle(bundle.url))
_logger.debug("Installing Java bundle %s (is_fragment=%s)...", bundle.name, bundle.is_fragment())
b = context.installBundle(bundle.url)
if not bundle.is_fragment():
java_bundles.append(b)

try:
# Start the bundles
for bundle in java_bundles:
_logger.debug("Starting %s...", bundle.getSymbolicName())
if not bundle.is_fragment():
bundle.start()
_logger.debug("Starting %s...", bundle.getSymbolicName())
bundle.start()
except jpype.JavaException as ex:
# Log the bundle exception and its cause
_logger.error("Error starting bundle: %s",
Expand Down

0 comments on commit 90982f1

Please sign in to comment.