Joe Germuska wrote:

So, I was just about to add support for static access to the "current" ActionContext using ThreadLocal, and then I realized that this approach is more commonly used with classes than with interfaces.

Since ActionContext is an interface, we'd have to do something like this:

public static final ThreadLocal currentInstance = new ThreadLocal();

Is it too weird to have this as a public member? Is there some artful way to hide it more? Of course, we'd have
public static void setCurrentInstance(ActionContext ctx)

Why not just put the ThreadLocal the same place you put these methods wrapping it? Interfaces can't have static methods so you'll have to have it on some concrete class somewhere, yes?
-Paul


and
public ActionContext getCurrentInstance()

but I'm sketched out at having to leave the member itself public.

That said, I'm still happier with ActionContext as an interface than an abstract class.

Any words of wisdome, or should I just go ahead and do this?

Joe



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to