I would have thought of implementing the clean up service as servlet filter
outside struts. Or doing the same within an interceptor.
Are there any dependencies that would need the clean up service to be bound
to a session context?
- Frank
-Original Message-
From: [EMAIL PROTECTED]
the @Resource annotation is included in Java SE 6. If you can't move to
Java 6 and have to use Java 5, the annotation can be found in
common-annotations.jar
(note that a Java EE 5 app can still run in the Java SE 6 JRE)
as per the DB clean up service, if you're using Spring for DI you could
I've been doing periodic tasks in my web app: I'm using Spring and
setting a periodic task to execute is kind of straightforward, but has
nothing to do with Struts 2.
2008/4/11, Peter Theissen [EMAIL PROTECTED]:
Hello,
I now searched a while to get an idea how to implement
a DB clean up
I doubt that this filter/interceptor approach to executing a task
periodically would be a good idea:
What if it is take too long? What happens to the current user request?
What if it just time out?
Typical periodic clean up tasks are better performed when nobody is
using the system (or at least
No, no dependencies at all. It should just do
the cleanup every day.
However, I would like to use my certain action
methods, since they already contain all the
funtionalities for DB acces.
Thanks
Peter
I would have thought of implementing the clean up service as servlet filter
outside struts.
Sorry, of course i meant servlet context listener, not servlet filter
However, I would like to use my certain action
methods, since they already contain all the
funtionalities for DB acces.
Then i guess it would be a smart way by letting spring inject the DBA object
into your action(s)
I doubt that this filter/interceptor approach to executing a task
periodically would be a good idea:
What if it is take too long? What happens to the current user request?
What if it just time out?
Agree, you're right (btw, i meant context listener when i wrote filter -
sorry).
But still
Then I guess it would be a good excercice to refactor that database
access code into a DAO to decouple your actions from the DB.
2008/4/11, Peter Theissen [EMAIL PROTECTED]:
No, no dependencies at all. It should just do
the cleanup every day.
However, I would like to use my certain action
8 matches
Mail list logo