Author: markt
Date: Mon Jul 28 21:52:47 2014
New Revision: 1614198
URL: http://svn.apache.org/r1614198
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56746
Allow secure WebSocket client threads to use the current context class loader
rather than explicitly setting it to the class loader that loaded the WebSocket
implementation. This allows WebSocket client connections from within web
applications to access, amongst other things, the JNDI resources associated
with the web application.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1614197
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1614198&r1=1614197&r2=1614198&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
Mon Jul 28 21:52:47 2014
@@ -569,7 +569,8 @@ public class AsyncChannelWrapperSecure i
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName("WebSocketClient-SecureIO-" + count.incrementAndGet());
- t.setContextClassLoader(this.getClass().getClassLoader());
+ // No need to set the context class loader. The threads will be
+ // cleaned up when the connection is closed.
t.setDaemon(true);
return t;
}
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1614198&r1=1614197&r2=1614198&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 28 21:52:47 2014
@@ -72,6 +72,18 @@
</fix>
</changelog>
</subsection>
+ <subsection name="WebSocket">
+ <changelog>
+ <fix>
+ <bug>56746</bug>: Allow secure WebSocket client threads to use the
+ current context class loader rather than explicitly setting it to the
+ class loader that loaded the WebSocket implementation. This allows
+ WebSocket client connections from within web applications to access,
+ amongst other things, the JNDI resources associated with the web
+ application. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Web applications">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]