You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2009/08/28 22:09:25 UTC
svn commit: r809012 -
/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/container/ServiceRecipe.java
Author: gawor
Date: Fri Aug 28 20:09:25 2009
New Revision: 809012
URL: http://svn.apache.org/viewvc?rev=809012&view=rev
Log:
more synchronization fixes
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=809012&r1=809011&r2=809012&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 Fri Aug 28 20:09:25 2009
@@ -161,8 +161,8 @@
LOGGER.debug("Registering service {} with interfaces {} and properties {}",
new Object[] { name, classes, props });
- registration = blueprintContainer.registerService(classArray, new TriggerServiceFactory(), props);
registrationProperties = props;
+ registration = blueprintContainer.registerService(classArray, new TriggerServiceFactory(), props);
}
}
@@ -298,6 +298,13 @@
}
public synchronized Object getService(Bundle bundle, ServiceRegistration registration) {
+ /** getService() can get called before registerService() returns with the registration object.
+ * So we need to set the registration object in case registration listeners call
+ * getServiceReference().
+ */
+ if (this.registration == null) {
+ this.registration = registration;
+ }
return internalGetService(bundle, registration);
}