2 Replies Latest reply on Oct 24, 2001 8:29 PM by hstech

    EJB Design question, what type of bean?

    pibakic

      Hi,

      I have a J2EE app which needs to start off a large batch procedure at, say, midnight every night. Currently it seems as though I should write a Message Driven Bean which watches a que, and upon receiving a message starts doing this large batch processing job, and a corresponding piece of code to put the message on the que at midnight every night. I would appreciate any comments on;

      Whether this would be correct usage of an MDB.
      Any suggestions on other possible solutions,

      Thanks for your time,

      Pib.

        • 1. Re: EJB Design question, what type of bean?
          cjohan

          Have a look at MBeans. There is an example of a timer MBean somewhere in the JBoss documentation, I think. An MBean runs like a service. It could check the time of day and run the batch procedure when it is time to do so.

          • 2. Re: EJB Design question, what type of bean?
            hstech

            Why does the batch process need to be started from an EJB? Why wouldn't you just start the process from a Scheduler app or something? If the batch process is to run in an EJB, then the Scheduler could just call a Session Bean that would do the work.

            Cheers,
            Aaron.