Bug 56746 - Webssocket secure client thread cannot access webapp resources
Summary: Webssocket secure client thread cannot access webapp resources
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.54
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2014-07-19 00:06 UTC by David
Modified: 2014-07-28 21:53 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description David 2014-07-19 00:06:34 UTC
The new SecureIOThreadFactory method in org.apache.tomcat.websocket.AsyncChannelWrapperSecure
 sets the context class loader of the secure websocket client threads to it's own standard class loader - thus preventing the them from accessing webapp resources.

Removing this line restores access, as the new threads then have the classloader of the calling (webapp) thread
Comment 1 Mark Thomas 2014-07-28 21:53:43 UTC
Sorry. That was me being overly cautious about memory leaks. The threads will be stopped when the connection is closed so there should not be the possibility of a memory leak.

This has been fixed in 7.0.x for 7.0.56 onwards and in 8.0.x for 8.0.11 onwards.