Discussions

EJB design: Problem with MDB listening to a Foreign JMS Queue

  1. We have a problem with MDB listening to a Foreign JMS Queue which is configured on same machine [server 1]. This foreign JMS Queue is configured to listen to another Queue defined on a remote machine [server 2].

     

    The onmessage() of MDB is expected to carry out DB operations[fetching encrypted BLOB object with other data types] based on header data in the message received and transmit a new message to another response Queue configured on same machine.

     

    The PROBLEM we are facing is

    The MDB is able to receive the first message, carry out DB fetch operation and transmit it to the response queue

    But for 2nd message onwards the DB fetching returns no data despite the data being present in Database.

     

    Gives error as :

    <Jan 12, 2006 11:40:44 AM GMT+05:30> <Warning> <J2EE> <BEA-160081> <The JMS connection factory resou

    rce FM_JMS_CONNECTION_FACTORY declared in the EJB "fileDeliveryjmsMessage" as part of application "_

    appsdir_serverFarmApp_ear" does not support XA. It cannot be used inside a transaction context.>

    <Jan 12, 2006 11:40:45 AM GMT+05:30> <Warning> <J2EE> <BEA-160081> <The JMS connection factory resou

    rce FM_JMS_CONNECTION_FACTORY declared in the EJB "fileDeliveryjmsMessage" as part of application "_

    appsdir_serverFarmApp_ear" does not support XA. It cannot be used inside a transaction context.>

     

     

    Observed that if we write context.setRollback() in case of exceptions of onMessage() the data is retrieved from DB after repeated 2-4 failures!!

     

    It works fine if we have both the queues reside on same server.

     

    Appreciate if you can let me know on how to get this working?

    Do you see any specific problems with configuration of Foreign Queue or Oracle XA connection pool as transaction, etc.?

     

     

     

    We are using Oracle 10G & Weblogic Prtal Server 8.

    Also have defined a XA connection pool for DB connection.

    Working of Foreign JMS Queue required us to define different Portal Domain and Server names for the 2 servers.

    Necessary resource references (wrapper) are defined for MDB in the deployment descriptors

     

     

    Thanks & Regards

    Veda Kumar KV.
  2. I had bad expr. in one of my last project regarding XA transactions. In your case only JMS part is distributed while DB need not be distributed.

    I will sugesst you use non-XA DB driver and try again.

    please let me know what u find out.
    shrini