Design advice needed


EJB design: Design advice needed

  1. Design advice needed (1 messages)

    Hello All,

    I am implementing a reporting module in which the following should happen (in a nutshell): look up all forum moderators and send each one a message containing how many members in each of their corresponding forums are. this process will be started by an admin via web browser.

    This is how i am planning to implement this:

    Struts action receives a request to send out reports and sends a message to Queue A. MDB listening on Queue A looks up all forum moderators and for each of the moderators sends a message to Queue B. MDB listening on Queue B will do the part of actual looking up # of members for each moderator and sending an email with this count to the appropriate moderator.

    My question is: is it a good design? Would it be better if the MDB that listens on Queue A does all the work in loop and there is no MDB listening on Queue B involved? Any other design issues/comments/suggestions with this approach?

    Thanks a lot!
  2. Design advice needed[ Go to top ]

    It depends on how modular you want things to be.

    If you foresee a situation where you want to send messages to exactly one moderator (or some other subset of all the moderators), then separating the logic into two MDBs is a good idea. Otherwise, it is may be overkill.

    If you don't need it now (or soon), don't build it. You can always split up the logic later if you need to.