Actions are for processing servlet requests, I would recommend not using
them for anything else.  If the logic you are placing in the action is
useful in other contexts, I suggest moving it to another object (into
the BO's).  Have the method(s) involved take the parameters as their
correct types if not unreasonable (e.g. you are using only two
parameters), otherwise pass the ParameterParser.  Use the actions to
extract data from the RunData/ParameterParser and delegate to BO's.

john mcnally 

Jason van Zyl wrote:
> 
> On 9/24/01 9:54 PM, "Gonzalo A. Diethelm" <[EMAIL PROTECTED]>
> wrote:
> 
> >>> I believe Turbine manages some kind of pool for these, but
> >>> I'm not sure it is public... I see there is a RunDataService, but
> >>> it will only give back a RunData object given HttpServletRequest,
> >>> HttpServletResponse and ServletConfig objects; maybe what I'm
> >>> trying to do doesn't make any sense outside a servlet context?
> >>
> >> I would imagine so, if you give a detailed example of what you're
> >> trying to accomplish maybe we can help.
> >
> > I will eventually call an action this way:
> >
> > ActionLoader.getInstance().exec(data, "myAction");
> 
> As an aside can I ask why you are using the ActionLoader directly? This is
> not a pattern I'm familiar with. Back to the question at hand ...
> 
> > So, I want to fake that the myAction action is being called...
> > Inside myAction, the code looks at the ParameterParser associated
> > with data in order to gather information.
> 
> So where are you executing this action. I still don't fully understand what
> you are trying to do. I assume you are trying to execute the action outside
> the context of processing a request, yes?
> 
> The more detail you can give me the more I can help :-)
> 
> > Any hints? Thanks in advance,
> >
> 
> --
> 
> jvz.
> 
> Jason van Zyl
> 
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to