You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by dj...@apache.org on 2011/08/04 05:52:30 UTC
svn commit: r1153741 -
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
Author: djencks
Date: Thu Aug 4 03:52:29 2011
New Revision: 1153741
URL: http://svn.apache.org/viewvc?rev=1153741&view=rev
Log:
OWB-582 Also don't replace a service provided in initial services
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java?rev=1153741&r1=1153740&r2=1153741&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java Thu Aug 4 03:52:29 2011
@@ -108,17 +108,19 @@ public class WebBeansContext
this.openWebBeansConfiguration = openWebBeansConfiguration;
//pluggable service-loader
- String implementationLoaderServiceName =
- openWebBeansConfiguration.getProperty(ImplementationLoaderService.class.getName());
- if (implementationLoaderServiceName == null)
+ if (initialServices == null || !initialServices.containsKey(ImplementationLoaderService.class))
{
- implementationLoaderService = new DefaultImplementationLoaderService();
- }
- else
- {
- implementationLoaderService = ImplementationLoaderService.class.cast(get(implementationLoaderServiceName));
+ String implementationLoaderServiceName =
+ openWebBeansConfiguration.getProperty(ImplementationLoaderService.class.getName());
+ if (implementationLoaderServiceName == null)
+ {
+ serviceMap.put(ImplementationLoaderService.class, new DefaultImplementationLoaderService());
+ }
+ else
+ {
+ serviceMap.put(ImplementationLoaderService.class, ImplementationLoaderService.class.cast(get(implementationLoaderServiceName)));
+ }
}
- registerService(ImplementationLoaderService.class, implementationLoaderService);
if (initialServices != null)
{
@@ -131,6 +133,7 @@ public class WebBeansContext
serviceMap.put(entry.getKey(), entry.getValue());
}
}
+ this.implementationLoaderService = getService(ImplementationLoaderService.class);
this.securityService = getService(SecurityService.class);
WebBeansUtil.initProxyFactoryClassLoaderProvider();