You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by gn...@apache.org on 2012/05/17 17:22:06 UTC
svn commit: r1339643 -
/aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
Author: gnodet
Date: Thu May 17 15:22:06 2012
New Revision: 1339643
URL: http://svn.apache.org/viewvc?rev=1339643&view=rev
Log:
[ARIES-536] Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
Modified:
aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
Modified: aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
URL: http://svn.apache.org/viewvc/aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java?rev=1339643&r1=1339642&r2=1339643&view=diff
==============================================================================
--- aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java (original)
+++ aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java Thu May 17 15:22:06 2012
@@ -313,7 +313,14 @@ public class BlueprintExtender implement
if (compatible) {
final BlueprintContainerImpl blueprintContainer = new BlueprintContainerImpl(bundle.getBundleContext(), context.getBundle(), eventDispatcher, handlers, executors, pathList);
containers.put(bundle, blueprintContainer);
- blueprintContainer.schedule();
+ String val = context.getProperty("org.apache.aries.blueprint.synchronous");
+ if (Boolean.parseBoolean(val)) {
+ LOGGER.debug("Starting creation of blueprint bundle {} synchronously", bundle.getSymbolicName());
+ blueprintContainer.run();
+ } else {
+ LOGGER.debug("Scheduling creation of blueprint bundle {} asynchronously", bundle.getSymbolicName());
+ blueprintContainer.schedule();
+ }
} else {
LOGGER.info("Bundle {} is not compatible with this blueprint extender", bundle.getSymbolicName());
}