openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1477475 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContext.java
Date Tue, 30 Apr 2013 05:15:28 GMT
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()



Mime
View raw message