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

bstansberry@jboss.com do-not-reply at jboss.com
Fri Jul 28 12:51:08 EDT 2006


I personally prefer the overloaded API as well (I don't mind lots of methods, as long as they all belong there and it's clear what's meant to be used when.)

Another thing I thought about was having the accessor/mutator for InvocationContext.setOptionOverrides() be static (or adding a static version), to at least get rid of the getCurrent() call. (The static method would do that for you).  Similar to Thread.sleep() instead of Thread.currentThread().sleep().

But then I remember I'm always typing Thread.currentThread().sleep() and Thread.currentThread().setContextClassLoader() and having the IDE complain about the former and not the latter.  That's always annoyed me.

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

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



More information about the jboss-dev-forums mailing list