• Post Reply Bookmark Topic Watch Topic
  • New Topic

Implementing Services with EJB

 
Dennis Meyer
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
as I'm new in EJB I am not sure how to implement a service best. We want to run a service inside the container. When the application server is starting ist should start that service which is implemented as endless loop (althoug there is no better way to do it).
This service should run certain jobs which are based on session beans.
Is it possible to do that gracefully inside the container? Other suggestions welcome!
THX for all comments,
Dennis
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some application servers have a concept of "startup classes" with which you could start your endless loop (in a new thread, of course). Otherwise, you could look into running a scheduling software such as Quartz (or simply a cron job which launches a standalone client every now and then).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!