• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.Timer allowed in an MDB?  RSS feed

 
David Larson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using an EJB 2.0 container and I need to execute some code periodically in an MDB. According to the EJB 2.0 spec, it's illegal managed threads (start, stop, suspend, resume, change priority, etc.)
So without the Timer Service introduced in EJB 2.1, how does one execute tasks at intervals? Is java.util.Timer allowed?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two options (plus "breaking the spec" as the third):
1) Use a separate scheduling tool such as Quartz
2) Use a vendor specific solution (a thread launched from a WebLogic startup class, for example)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!