I will call this pattern InvocationContextLocal.

A simple/naive implementation is:

Add an interceptor before the transaction interceptor that maintains a thread 
local
stack of invocation contexts.

Each part of the system will use its own "slot" in the invocation context to 
store state.
It can also define its own order of close context processing.

In the transaction demarcation interceptor "enlist" this context in the 
transaction
for synchronization at commit/rollback.

On the invocation return stroke close the context (unless it was enlisted
in a transaction).
If there is a transaction, the transaction synchronization does the context 
close
processing.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861202#3861202

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861202


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to