Author: [email protected]
Date: Mon Jan 30 09:48:17 2012
New Revision: 2019

Log:
AMDATU-529 Update serviceproperties for existing tenants when configuration is 
updated

Modified:
   
trunk/amdatu-core/tenant-factory/src/main/java/org/amdatu/core/tenant/factory/TenantServiceFactory.java

Modified: 
trunk/amdatu-core/tenant-factory/src/main/java/org/amdatu/core/tenant/factory/TenantServiceFactory.java
==============================================================================
--- 
trunk/amdatu-core/tenant-factory/src/main/java/org/amdatu/core/tenant/factory/TenantServiceFactory.java
     (original)
+++ 
trunk/amdatu-core/tenant-factory/src/main/java/org/amdatu/core/tenant/factory/TenantServiceFactory.java
     Mon Jan 30 09:48:17 2012
@@ -76,10 +76,12 @@
             .setInterface(Tenant.class.getName(), serviceProperties)
             .setImplementation(tenant);
 
-        if (m_components.putIfAbsent(pid, component) == null) {
+        Component registeredComponent = m_components.putIfAbsent(pid, 
component);
+        if (registeredComponent == null) {
             m_dependencyManager.add(component);
         }
         else {
+            registeredComponent.setServiceProperties(serviceProperties);
             m_logService.log(LogService.LOG_DEBUG, "pid already registered for 
tenant '" + properties.get(ID_KEY)
                 + "', skipping registration");
         }
_______________________________________________
Amdatu-commits mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-commits

Reply via email to