Re: Access RunData from scheduled job
Ludwig Magnusson <[email protected]> Thu, 01 Nov 2012 09:03:47 +0100
| Newsgroups | gmane.comp.jakarta.turbine.user |
|---|---|
| Message-ID | <[email protected]> |
RunData wraps an HttpServletRequest and an HttpServletResponse. It contains a lot of methods for easy access to things you might need from these objects such ass parameters and cookies. My guess is that you do not have all of this in you scheduled job, correct? Without knowing anything about your code my guess is that there is too much logic in your action. I my projects, I always tro to put all my logic into my services and the actions are only responsible for checking permissions and parsing the paramaters received from http requests and then pass them into the services. So again, without knowing anything about your code my guess is that you can move the logic from your action into a service and then call that service both from your action and your scheduled job. /Ludwig On Thu 01 Nov 2012 08:47:16 AM CET, Szűcs Attila wrote: > Hi, > > I need to access the RunData in one of my scheduled jobs. The job invokes a regular action I have already written. The action of course needs the Context and the RunData objects. > I don't want to copy - paste the same action just to run it in the job. So how can I get the RunData for my scheduled job? > > Thanks, > Atti >