my dog learned polymorphism*
The moose likes Websphere and the fly likes Problem with MDB listening to a Foreign JMS Queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Problem with MDB listening to a Foreign JMS Queue " Watch "Problem with MDB listening to a Foreign JMS Queue " New topic
Author

Problem with MDB listening to a Foreign JMS Queue

VedaKumar Kompalli
Greenhorn

Joined: Oct 07, 2005
Posts: 10
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<br /> <br /> rce FM_JMS_CONNECTION_FACTORY declared in the EJB "fileDeliveryjmsMessage" as part of application "_<br /> <br /> 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<br /> <br /> rce FM_JMS_CONNECTION_FACTORY declared in the EJB "fileDeliveryjmsMessage" as part of application "_<br /> <br /> 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
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

When a application connects to a message queue and database, this really counts as two databases, ergo an XA transaction that supports 2PC is required. The reason this does not happen when the queues are on the same server is that WebSphere performs optimization to avoid the 2PC because the connections are local and pointing to the same database. On a foreign connect, a 2PC is forced, and the database drivers must be XA compliant as well as the databases themselves must support 2PC.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with MDB listening to a Foreign JMS Queue
 
Similar Threads
XA-Transaction Error with WAS 6.1, MQ (SIB) and Oracle 10g
MDB XA Transactions Behaviour
Why onMessage is being called on application server startup?
MDB listening to external MQ in Glassfish
Container Managed Transactions with an MDB