geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r786248 - in /geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint: container/ServiceRecipe.java di/Repository.java
Date Thu, 18 Jun 2009 20:26:56 GMT
Author: gnodet
Date: Thu Jun 18 20:26:56 2009
New Revision: 786248

URL: http://svn.apache.org/viewvc?rev=786248&view=rev
Log:
Fix synchronization problem on services again

Modified:
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
    geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.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=786248&r1=786247&r2=786248&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 Jun 18 20:26:56 2009
@@ -213,7 +213,7 @@
      */
     private Object internalGetService(Bundle bundle, ServiceRegistration registration) {
         LOGGER.debug("Retrieving service for bundle {} and service registration {}", bundle,
registration);
-        synchronized (serviceLock) {
+        synchronized (blueprintContainer.getRepository().getInstanceLock()) {
             // Create initial service
             if (this.service == null) {
                 try {

Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java?rev=786248&r1=786247&r2=786248&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java
(original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/di/Repository.java
Thu Jun 18 20:26:56 2009
@@ -73,4 +73,10 @@
 
     void destroy();
 
+    /**
+     * Lock that should be used to synchronized creation of singletons
+     *
+     * @return
+     */
+    public Object getInstanceLock();
 }



Mime
View raw message