4 Replies Latest reply on Nov 18, 2005 7:28 PM by patrick_ibg

    Pattern for getting status of MDB's job

    patrick_ibg

      I'm relatively new to EJB, esp. MDBs.

      I looked at Bill Burke's Consumer/Producer example, and noticed that status is held in static public fields of a SLSB ("TestStatusBean"), which is looked up by the client via JNDI.

      Is there a cleaner pattern to do this that can also work for multiple client calls to the same MDB? Could I simply keep status info as part of the MDB's state, and return it via business methods (similar to SFSB)?

      Also, how can I setup an MDB such that it operates as a singleton and consumes only one message at a time?

      Thanks in advance...