[jboss-dev-forums] [Design of JBossCache] - Re: Use of InvocationContext vs. explicit Option in the API

manik.surtani@jboss.com do-not-reply at jboss.com
Sun Jul 30 23:06:29 EDT 2006


InvocationContext has always been stored in ThreadLocal, except that this was always done by the TreeCache class when you called the overloaded method.  This has always had invocation-level scope.

Now you'd do it explicitly and the reasons for this shift are:

1.  Every time you use this, this is very explicit.  Little chance of using the wrong overloaded method.

2.  Cleaner interface API, since this is needed in Cache and not CacheSPI (form Hibernate, for example)

+1 on the accessors/mutators being static and handling the ThreadLocal business internally.

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

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



More information about the jboss-dev-forums mailing list