openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1363546 - /openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java
Date Thu, 19 Jul 2012 21:14:03 GMT
Author: rmannibucau
Date: Thu Jul 19 21:14:03 2012
New Revision: 1363546

URL: http://svn.apache.org/viewvc?rev=1363546&view=rev
Log:
OWB-686 wrappedApp should be volatile and setter be consistent with getter

Modified:
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java?rev=1363546&r1=1363545&r2=1363546&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java
(original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/OwbApplicationFactory.java
Thu Jul 19 21:14:03 2012
@@ -27,21 +27,24 @@ public class OwbApplicationFactory exten
 {
     private ApplicationFactory wrapped;
     
-    private Application wrappedApplication;
+    private volatile Application wrappedApplication;
+
+    private WebBeansContext webBeansContext;
     
     public OwbApplicationFactory(ApplicationFactory applicationFactory)
     {
         wrapped = applicationFactory;
+        webBeansContext = WebBeansContext.currentInstance();
     }
 
     @Override
     public Application getApplication()
     {
-        if(!WebBeansContext.getInstance().getBeanManagerImpl().isInUse())
+        if(!webBeansContext.getBeanManagerImpl().isInUse())
         {
             return wrapped.getApplication();
         }
-        
+
         if(wrappedApplication == null)
         {
             wrappedApplication = new OwbApplication(wrapped.getApplication());
@@ -53,6 +56,7 @@ public class OwbApplicationFactory exten
     @Override
     public void setApplication(Application arg0)
     {
+        wrappedApplication = arg0;
         wrapped.setApplication(arg0);
     }
 



Mime
View raw message