Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Running a J2EE project on WAS at a regular interval  RSS feed

 
Joe Cheung
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going create a J2EE project which might be a servlet or EJB to poll (or check) any change in a DB and do some business logic or mapping everytime when the DB is changed. So, my question is how I can configure a J2EE project to run at a regular interval, says 5 mins?

Since my WAS is running on J2EE 1.3 so I cannot use Timer approach which is available on EJB running on J2EE 1.4.

Also, no client is needed to invoke the program, meaning that there is no client to make a web request to servlet nor call the remote interface of EJB
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java.util.Timer and TimerTask classes can be used for scheduling tasks for repeated execution.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!