5 Replies Latest reply on Dec 16, 2005 3:21 AM by Karl Ivar Dahl

    Starting threads from Scheduler

    Karl Ivar Dahl Newbie

      Hi, I am currently initiating batch processing from a scheduler implementing org.jboss.varia.scheduler.Schedulable.

      This scheduler does a sequence of calls to an EJB (proxied by Spring).

      This works great, but to achieve better performance, I would like to do several of the EJB calls in parallell. As far as I can see it, this could be solved by a) Using 5-10 parallell threads in my scheduler, or b) Doing asynchronous MDB calls insted of calls to my SLSB.

      Do anyone have any experience with one vs. the other? Is it advisable to start threads from a scheduler at all?

      Are there other techniques that I can use to enable parallell batch processing?

      (As a side note if you wonder why the scheduler must do all these calls: I need the scheduler to break up the batch to allow me to have one transaction per call. I have so far been unable to make a new transaction when one EJB calls another EJB in combination with Spring and Hibernate.)

      Thanks,
      Karl Ivar Dahl