Hmm, thinking about this a bit, and referring to your comments on the JIRA issue raised:
"bstansberry(a)jboss.com" wrote :
| 2007-08-23 17:02:21,162 DEBUG [org.jboss.cache.marshall.VersionAwareMarshaller] Wrote
version 20
| 2007-08-23 17:02:21,162 DEBUG [org.jboss.cache.marshall.CacheMarshaller200] Region
based call. Using region /JSESSION/localhost/http-field
| 2007-08-23 17:02:21,162 DEBUG [org.jboss.cache.marshall.CacheMarshaller200]
Marshalling object true
| 2007-08-23 17:02:21,162 DEBUG [org.jboss.cache.marshall.CacheMarshaller200] Writing
region /JSESSION/localhost/http-field to stream
| 2007-08-23 17:02:21,162 DEBUG [org.jboss.cache.statetransfer.StateTransferManager]
locking the /JSESSION/localhost/http-scoped subtree to return the in-memory (transient)
state
|
| The second line shows the problem -- "/JSESSION/localhost/http-field" is
written to the stream; it should be "/JSESSION/localhost/http-scoped", or
perhaps nothing at all.
|
I'm guessing this is being written on the sender's side?
So, this means:
1) The ThreadLocal value being leaked on the receiver is irrelevant, as this will always
be overwritten when the next communication comes in.
2) The ThreadLocal on the sender is irrelevant as well, since this only becomes a problem
if the sender attempts to reuse a thread and the next call is a return value. (if not,
the ThreadLocal will just get overwritten again).
So, the only real problem is if the ThreadLocal leaks (and this seems to happen with async
replication as per the JGroups code above), and a sending thread is then reused as a
receiving thread. Now AFAIK, JGroups maintains separate thread pools for sending and
receiving, so the above should never happen.
Does the above accurately describe the issue you're seeing, though?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137880#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...