Author: gpetracek
Date: Tue Feb 28 18:54:41 2012
New Revision: 1294781
URL: http://svn.apache.org/viewvc?rev=1294781&view=rev
Log:
OWB-650 reset proxy-cache after destroying a std. context
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=1294781&r1=1294780&r2=1294781&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Tue Feb 28 18:54:41 2012
@@ -1251,4 +1251,9 @@ public class BeanManagerImpl implements
{
return inUse;
}
+
+ public void resetProxyCache()
+ {
+ this.cacheProxies.clear();
+ }
}
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java?rev=1294781&r1=1294780&r2=1294781&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
Tue Feb 28 18:54:41 2012
@@ -89,6 +89,7 @@ public final class ContextFactory
{
ContextsService contextService = getContextsService();
contextService.endContext(RequestScoped.class, request);
+ resetProxyCache();
}
public void initSessionContext(Object session)
@@ -108,6 +109,7 @@ public final class ContextFactory
{
ContextsService contextService = getContextsService();
contextService.endContext(SessionScoped.class, session);
+ resetProxyCache();
}
public void initApplicationContext(Object parameter)
@@ -133,6 +135,7 @@ public final class ContextFactory
{
ContextsService contextService = getContextsService();
contextService.endContext(ApplicationScoped.class, parameter);
+ resetProxyCache();
}
public void initSingletonContext(Object parameter)
@@ -152,6 +155,7 @@ public final class ContextFactory
{
ContextsService contextService = getContextsService();
contextService.endContext(Singleton.class, parameter);
+ resetProxyCache();
}
public void initConversationContext(Object context)
@@ -171,6 +175,7 @@ public final class ContextFactory
{
ContextsService contextService = getContextsService();
contextService.endContext(ConversationScoped.class, null);
+ resetProxyCache();
}
/**
@@ -252,4 +257,9 @@ public final class ContextFactory
contextService.deActivateContext(scopeType);
}
+
+ private void resetProxyCache()
+ {
+ this.webBeansContext.getBeanManagerImpl().resetProxyCache();
+ }
}