Hello, We have the requirement to schedule regular tasks when the application starts. We are doing this by using TimerTasks and the Timer class to create background threads. This process works fine. Our problem is that the task doesn't seem to be able to get a hold of local references for either resources or ejbs. Does anyone have any suggestions? Thanks, Steve
Well, that will be a problem because the threads arent' running in a J2EE component context. You might be better off putting your Timer class and threads in a separate process that calls Servlets to invoke the processes. Kyle
My suggestion is to have your Timer drop off a JMS message and have an MDB waiting to consume it. The MDB can then invoke the necessary EJBs. This of course is assuming you are using EJB 2.0. [ January 23, 2003: Message edited by: Chris Mathews ]
Hi, Thanks for the suggestions - we'd toyed with the idea of making a request to the servlet but as you say its a bit nasty. The MDB is a good example but we are not using them - WAS4.0.3 Thanks for the suggestions. We've managed to get it working with global names - not ideal but a work around. Cheers, Steve