On 16/01/2014 22:07, r...@apache.org wrote: > Author: remm > Date: Thu Jan 16 22:07:28 2014 > New Revision: 1558930 > > URL: http://svn.apache.org/r1558930 > Log: > - Add dedicated listener for framework and EE integration. > - Fix context classloader with SSO session expiration.
Rather than have multiple components bind and unbind threads and call the associated listener, I wonder if it might be better to exposing the bindThread() and unbindThread() methods on the Context. I'll see if I can find some time to take a look. <snip/> > Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1558930&r1=1558929&r2=1558930&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) > +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Jan > 16 22:07:28 2014 > @@ -92,6 +92,7 @@ import org.apache.catalina.Loader; > import org.apache.catalina.Manager; > import org.apache.catalina.Pipeline; > import org.apache.catalina.Realm; > +import org.apache.catalina.ThreadBindingListener; > import org.apache.catalina.Valve; > import org.apache.catalina.WebResource; > import org.apache.catalina.WebResourceRoot; > @@ -807,6 +808,11 @@ public class StandardContext extends Con > > private String containerSciFilter; > > + protected static final ThreadBindingListener DEFAULT_NAMING_LISTENER = > (new ThreadBindingListener() { > + public void bind() {} > + public void unbind() {} > + }); > + protected ThreadBindingListener threadBindingListener = > DEFAULT_NAMING_LISTENER; What is the purpose of the above code? Would it not be simpler just to leave threadBindingListener as null? Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org