Background Thread in J2EE


General J2EE: Background Thread in J2EE

  1. Background Thread in J2EE (2 messages)

    Hi All,

    I have a J2EE application that needs a special component. This component is not to be referenced by any other component or a client. All it does is wake up every few seconds, does some processing, and then gos to sleep. What would be the ideal way to implement this component: As a servlet? As a MDB? Or as something else?


    Threaded Messages (2)

  2. Background Thread in J2EE[ Go to top ]

    Try Quartz.
  3. Background Thread in J2EE[ Go to top ]

    I would suggest you write the component as a Thread, and start the thread in the init() method of a servlet. Then, in your web.xml configuration file, specify that your servlet will load on startup.