You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Joe Germuska <Jo...@Germuska.com> on 2005/03/15 20:58:55 UTC
Best Way to use Custom ActionContext/Storing ActionContext in
ThreadLocal
Trying to unify these two threads:
"How to provide custom impl of ActionContext"
http://thread.gmane.org/gmane.comp.jakarta.struts.devel/25876
"Storing current ActionContext in ThreadLocal"
http://thread.gmane.org/gmane.comp.jakarta.struts.devel/25868
It would be great to get some ideas from people about the right way
to allow users to use an alternate implementation of the
ActionContext class. I am generally ill-disposed to a factory class
since it seems like so often factories also need configuration which
makes discovery tedious, but having a factory class which was an
Abstract class would also give us a convenient place to plug a static
"currentActionContext" method.
If no configuration is necessary, we could simply stipulate
"actionContextFactoryClass" as a String Property of ControllerConfig
and at least move forward with that. To be honest, for this specific
case I'm not thinking of any configuration use cases, so maybe I
shouldn't get hung up on it.
(Defining implementation classes and configuring them all in one
place is the solution that Spring provides which I think makes so
many people get so gung-ho about it.)
I think in writing this I've convinced myself to do it this way.
Will give it a little time for responses but I'm likely to try to do
this in the next couple of days.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org