You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by dk...@apache.org on 2012/11/16 23:30:15 UTC
svn commit: r1410603 -
/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
Author: dkulp
Date: Fri Nov 16 22:30:15 2012
New Revision: 1410603
URL: http://svn.apache.org/viewvc?rev=1410603&view=rev
Log:
Semi revert a change that is causing issues until I can investigate more.
Modified:
aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java?rev=1410603&r1=1410602&r2=1410603&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java (original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java Fri Nov 16 22:30:15 2012
@@ -475,7 +475,6 @@ public class BlueprintContainerImpl
}
private void processProcessors() throws Exception {
- boolean changed = false;
// Instanciate ComponentDefinitionRegistryProcessor and BeanProcessor
for (BeanMetadata bean : getMetadata(BeanMetadata.class)) {
if (bean instanceof ExtendedBeanMetadata && !((ExtendedBeanMetadata) bean).isProcessor()) {
@@ -496,44 +495,42 @@ public class BlueprintContainerImpl
if (ComponentDefinitionRegistryProcessor.class.isAssignableFrom(clazz)) {
Object obj = repository.create(bean.getId(), ProxyUtils.asList(ComponentDefinitionRegistryProcessor.class));
((ComponentDefinitionRegistryProcessor) obj).process(componentDefinitionRegistry);
- changed = true;
} else if (Processor.class.isAssignableFrom(clazz)) {
Object obj = repository.create(bean.getId(), ProxyUtils.asList(Processor.class));
this.processors.add((Processor) obj);
- changed = true;
- } else {
+ } else {
continue;
}
- }
- if (changed) {
- // Update repository with recipes processed by the processors
untrackServiceReferences();
- Repository tmpRepo = new RecipeBuilder(this, tempRecipeIdSpace).createRepository();
-
- LOGGER.debug("Updating blueprint repository");
-
- for (String name : repository.getNames()) {
- if (repository.getInstance(name) == null) {
- LOGGER.debug("Removing uninstantiated recipe {}", new Object[] { name });
- repository.removeRecipe(name);
- } else {
- LOGGER.debug("Recipe {} is already instantiated", new Object[] { name });
- }
+ updateUninstantiatedRecipes();
+ getSatisfiableDependenciesMap(true);
+ trackServiceReferences();
+ }
+ }
+ private void updateUninstantiatedRecipes() {
+ Repository tmpRepo = new RecipeBuilder(this, tempRecipeIdSpace).createRepository();
+
+ LOGGER.debug("Updating blueprint repository");
+
+ for (String name : repository.getNames()) {
+ if (repository.getInstance(name) == null) {
+ LOGGER.debug("Removing uninstantiated recipe {}", new Object[] { name });
+ repository.removeRecipe(name);
+ } else {
+ LOGGER.debug("Recipe {} is already instantiated", new Object[] { name });
}
-
- for (String name : tmpRepo.getNames()) {
- if (repository.getInstance(name) == null) {
- LOGGER.debug("Adding new recipe {}", new Object[] { name });
- Recipe r = tmpRepo.getRecipe(name);
- if (r != null) {
- repository.putRecipe(name, r);
- }
- } else {
- LOGGER.debug("Recipe {} is already instantiated and cannot be updated", new Object[] { name });
+ }
+
+ for (String name : tmpRepo.getNames()) {
+ if (repository.getInstance(name) == null) {
+ LOGGER.debug("Adding new recipe {}", new Object[] { name });
+ Recipe r = tmpRepo.getRecipe(name);
+ if (r != null) {
+ repository.putRecipe(name, r);
}
+ } else {
+ LOGGER.debug("Recipe {} is already instantiated and cannot be updated", new Object[] { name });
}
- getSatisfiableDependenciesMap(true);
- trackServiceReferences();
}
}