Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

MDB XA Transactions Behaviour

 
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Am working on an ATM interface it behavior is

In Unix Machine I have my Oracle Database, Webphere MQ, and MDB running in OC4J Server am configured my MDB to Support XA transaction. In MQ bindings also I used XA.

Testing
-------
MDB is picking a Message from MQ and in the OnMessage() and manually throwing an Exception. So this means Unsuccessful Execution of Onmessage() and in the catch block am calling setrollbackonly.

<trans-attribute>Required</trans-attribute>

Behaviour
---------
After Picking 1st message from MQ in the Onmessage () am throwing an exception, Again the ejbcreate() is calling and then OnMessage() again the exception again ejbCreate(). It happens for 7 times. On the 8th time My MDB is picking the 2nd Message and I checked the MQ the 1st Message is not there. I lost the Message. Whether this is the Actual Behavior???

Please Assist Me. Thanks in Advance
[ October 15, 2008: Message edited by: Meet Gaurav ]
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can check the retry counts configured for your deployment
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where Exactly. Am using OC4J Server 10.1.3

Any Specific File...
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am just testing this in Exception Case.. In Case the server crashes or Power Shut Down of the Server. What will happen ?? After some time If I started the server the Oc4j will process that message that message will still in the MQ Queue..

Am very curious to know how the server is working. Thinking in Different Angles

Please Assist Me
[ October 16, 2008: Message edited by: Meet Gaurav ]
 
Kumar Subramanian
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its container specific option. In your case it is orion-ejb-jar xml. I think param is max retry count or delivery count - am not sure - suggest you to check the syntax and usage of a config param before using.

Your MQ can retain the messages in the queue if the consumer (your MDB) is not available and these messages will get processed once the consumer is available.
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Kumar,

In case if the server crashes whether the message will be on the Queue or in the Container itself..Because I tryed calling System.exit(0) inside OnMessage() and the server is shutting down.. And the message is not on the Websphere MQ Queue.

I used max-delivery-count="10" in Orion-ejb.jar. Still the MDB is picking that message for 5 Times only. At 6th time the message is not there..Could you please assist me.
[ October 17, 2008: Message edited by: Meet Gaurav ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic