Hi,
the quartz scheduler from Spring seemed to be a quite nice solution for
my DB clean up service. Thanks for that hint.
Now I have a quite curios problem. If I, e.g. create a bean in
applicationContext.xml as follows:
>>>
<bean id="simpleTrigger"
class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<!-- props are first commented out, since they are not important
for this issue
<property name="jobDetail" ref="jobInvokation"/>
<property name="repeatInterval" value="10000"/>
-->
</bean>
<<<
I get a org.springframework.beans.factory.BeanCreationException:
nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException:
Error loading class
[org.springframework.scheduling.quartz.SimpleTriggerBean]
But anyhow, if I import the class using:
import org.springframework.scheduling.quartz.SimpleTriggerBean;
in some POJO in the project everything is fine.
What am I missing?
Thanks and best regards
Peter
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]