Hi!

I'm trying to create a schedule service at jboss 4.2.1 but I'm not sure what to 
do.
I need a service to be started by the application server that runs every half 
an hour.

I wrote a class but the problem is when I start jboss, I have the following 
error message:

anonymous wrote : 10:11:11,280 ERROR [TimerServiceImpl] Cannot create txtimer
  | java.lang.IllegalStateException: Unable to persist timer

anonymous wrote : Caused by: java.sql.SQLException: Unique constraint 
violation:  in statement [insert into TIMERS 
(TIMERID,TARGETID,INITIALDATE,TIMERINTERVAL,INSTANCEPK,INFO) values 
(?,?,?,?,?,?)]

Here is the class:


  | @Service
  | @Management(AtividadeTimerServiceManagement.class)
  | public class AtividadeTimerServiceBean implements 
AtividadeTimerServiceLocal,
  |             AtividadeTimerServiceManagement {
  | 
  |     @Resource
  |     private TimerService timerService;
  | 
  |     public void create() throws Exception {
  |             this.timerService.createTimer(15*60*1000, 5*60*1000, null);
  |     }
  | 
  |     public void destroy() {
  | 
  |     }
  | 
  |     public void start() throws Exception {
  |     }
  | 
  |     public void stop() {
  |     }
  | 
  |      @Timeout
  |     public void monitorPeriodoCadastral(Timer timer) {
  |              log.info("monitorPeriodoCadastral...");
  |     }
  | }
  | 

Does anybody have any idea why am I getting this error message?
Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127802#4127802

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127802
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to