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.
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 ]
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 ]
Joined: Oct 01, 2008
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.
Joined: Oct 08, 2008
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 ]