What I meant was, with Spring proxies the ThreadLocal is cleaned up because the 
worker thread must finish executing the proxy method before it can be returned 
to the pool.  So the ThreadLocal is always cleaned up because the last thing 
the proxy does is remove from the ThreadLocal that it added at the beginning.

If HiveMind has a different approach that you like better, use it.  Just make 
sure the markThreadExit() method is called before the worker thread is returned 
to the pool.

----- Original Message ----
From: Urmeli <[EMAIL PROTECTED]>
To: [email protected]
Sent: Sunday, April 15, 2007 12:04:42 PM
Subject: Re: MINA and ThreadLocals used in other frameworks


Hi Rob,

I don't think that the HiveMind approach is more complex. You basically call
markThreadEntry() before the processing of the business logic starts and
need to call markThreadExit() afterwards. You can easily wrap this in an
IoFilter (the guy that invented HiveMind and Tapestry actually used a
ServletFilter for this purpose).

Is it possible with Spring to have methods ServiceA.DoThis() and
ServiceB.DoThat() been executed in one transaction by using the proxy
objects ? As far as I understood your statement you would need a
Facade-Object with a method DoThisAndThat() that calls both methods. I think
this adds complexity, doesn't it ?

I hope this doesn't get a bit off-topic :-)

Mike

-- 
View this message in context: 
http://www.nabble.com/MINA-and-ThreadLocals-used-in-other-frameworks-tf3576237.html#a10003793
Sent from the mina dev mailing list archive at Nabble.com.





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to