Skip to content

Commit

Permalink
explicit cleanup of threadlocals
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@3850 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Oct 5, 2009
1 parent 0a6b971 commit dd53e73
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
Expand Up @@ -1429,6 +1429,7 @@ public <T> SessionBean<T> getBean(EjbDescriptor<T> descriptor)
public void cleanup()
{
services.cleanup();
this.currentInjectionPoint.remove();
}

public InterceptorRegistry<Class<?>, Interceptor> getManagedBeanInterceptorRegistry()
Expand Down
Expand Up @@ -86,6 +86,9 @@ public void setActive(boolean active)
this.active.set(Boolean.valueOf(active));
}

public abstract void cleanup();
public void cleanup()
{
this.active.remove();
}

}
Expand Up @@ -174,6 +174,7 @@ public void destroy()
@Override
public void cleanup()
{
super.cleanup();
if (getBeanStore() != null)
{
getBeanStore().clear();
Expand Down
Expand Up @@ -62,4 +62,11 @@ protected boolean isCreationLockRequired()
return true;
}

@Override
public void cleanup()
{
super.cleanup();
beanStore.remove();
}

}
Expand Up @@ -91,7 +91,4 @@ public boolean isActive()
return true;
}

@Override
public void cleanup() {}

}

0 comments on commit dd53e73

Please sign in to comment.