• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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 ]
 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic