• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem with MDB listening to a Foreign JMS Queue

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 4354
45
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
You've gotta fight it! Don't give in! Read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic