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 service with Struts2. The best link I found > was the following one: > following > http://www.javabeat.net/javabeat/ejb3/articles/timer_services_api_in_ejb_3_0_2.php > > What I dont understand is how to get the session context. > As described in the link Im using dependency injection: > >>> > @Resource > Private SessionContext s; > <<< > but unfortunately that doesnt work. Eclipse says that it > doesnt know the @Resource annotation. > However, the ejb3-persistence.jar is integrated in the > libs. Therefore, the annotation should be well known > to Eclipse? > > What I also dont understand that - even when I got that > stuff with that timer working - "who" starts the bean the > first time? Do I have to reconfigure something? > What happens if I restart the server? > > Another more general question is: > is that the most suitable way to implement the > DB clean up service, assuing that further services > wont be added in the future (otherwise: scheduler as > far from what I've read)? > > Thanks and best regards > Peter > > > > > --------------------------------------------------------------------- > 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]