geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r803771 - /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
Date Thu, 13 Aug 2009 04:05:49 GMT
Author: gawor
Date: Thu Aug 13 04:05:49 2009
New Revision: 803771

URL: http://svn.apache.org/viewvc?rev=803771&view=rev
Log:
service properties should be evaluted only once

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java?rev=803771&r1=803770&r2=803771&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
Thu Aug 13 04:05:49 2009
@@ -70,6 +70,7 @@
     private final List<Recipe> explicitDependencies;
     private final boolean prototypeService;
 
+    private Map properties;
     private final AtomicBoolean registered = new AtomicBoolean();
     private volatile ServiceRegistration registration;
     private Map registrationProperties;
@@ -145,7 +146,9 @@
     public void register() {
         if (registered.compareAndSet(false, true)) {
             Hashtable props = new Hashtable();
-            Map properties = (Map) createRecipe(propertiesRecipe);
+            if (properties == null) {
+                properties = (Map) createRecipe(propertiesRecipe);
+            }
             props.putAll(properties);
             if (metadata.getRanking() == 0) {
                 props.remove(Constants.SERVICE_RANKING);



Mime
View raw message