JMS implementation with EJB MDB

Discussions

EJB programming & troubleshooting: JMS implementation with EJB MDB

  1. JMS implementation with EJB MDB (3 messages)

    Hi,

    I am writing a portion of a J2EE application and would like to perform asynchronous processing. Following are some questions i have:

     How does JMS process message, queue and Message-Driven-Beans? I mean when a message is send to a queue, how does it know which MDB should be receiving the message?

     I am using JBoss and WebLogic App servers which has JMS Under normal circumtances, is it all right to use the default queue that comes with the JMSProvider (i.e. the application server in this case)? Or should we write some other codes for create queue?

     In terms of design, should one MDB only performs a single function? The reason for this is that a MDB seems to only have a single 'onMessage' method?

     The following is what my application tries to achieve: Servlet will call a method in a StatelessSessionBean. SessionBean perform first some processing. And since part of the process does not require to be done at the same time, i would like it to happen asynchronously. I actually intend to have that part of the processing happens in an MDB. Is that the correct way to use JMS & MDB? How else could i perform asynchronous processing?

    Thanks,

    Naidu Sanapala

    Laurel, Maryland, USA.

    ..................................................................................................
    Naidu Sanapala - JAVA ARCHITECT , Laurel , Maryland , USA
    1.SUN Certified Enterprise Architect for J2EE Technology
    2.Sun Certified [EJB] Business Component Developer for the J2EE Platform
    3.Sun Certified Web Component Developer for the J2EE Platform
    4.Sun Certified Java Programmer for the Java 2 Platform - 1.4
    5.IBM Certified Solution Developer for XML and Related Technologies
    ....................................................................................................

    Threaded Messages (3)

  2. JMS implementation with EJB MDB[ Go to top ]

    No offence meant......... How did you achieve all the certifications listed in your post? I am not sure that your message as posted, will receive any constructive replies on this message board.

    If you are kidding then I am sorry for my post. If not, then I suggest you remove the certification listing and report your question as a newbie........
  3. JMS implementation with EJB MDB[ Go to top ]

    JMS performs routing using topics, queues and selectors.

    I'd create queues for each type of operation you need to do. Each MDB should perform a single function.

    You SSB should just send a JMS message then your MDB can process it asynchronously.

    James
    LogicBlaze
  4. hi[ Go to top ]

    hi
     
     MDB's listen on queue that you configure. Any message that comes to the queue on MDB is invoked by the apps server. You definitely dont have any control or prediction on what MDB will get called.

     if you want to have some short of naive control on your MDBS depending on your messages then you can associate a filter based on a message property. when a messages comes which satisfies that selection criteria your MDB will be called.

    thanks
    satya