This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MDB XA Transactions Behaviour

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • 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 ]
 
Kumar Subramanian
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic