You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2013/04/30 07:15:28 UTC

svn commit: r1477475 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java

Author: struberg
Date: Tue Apr 30 05:15:28 2013
New Revision: 1477475

URL: http://svn.apache.org/r1477475
Log:
OWB-852 improve getContextsService performance

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=1477475&r1=1477474&r2=1477475&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 Tue Apr 30 05:15:28 2013
@@ -91,6 +91,7 @@ public class WebBeansContext
     private final InterceptorResolutionService interceptorResolutionService = new InterceptorResolutionService(this);
     private final DeploymentValidationService deploymentValidationService = new DeploymentValidationService(this);
     private ScannerService scannerService;
+    private ContextsService contextsService;
 
     public WebBeansContext()
     {
@@ -340,7 +341,11 @@ public class WebBeansContext
 
     public ContextsService getContextsService()
     {
-        return getService(ContextsService.class);
+        if (contextsService == null)
+        {
+            contextsService = getService(ContextsService.class);
+        }
+        return contextsService;
     }
 
     public SecurityService getSecurityService()