Author |
Message
|
mr_jaber |
Posted: Wed Aug 05, 2009 8:55 pm Post subject: Exception During MDB Execution behavior |
|
|
Apprentice
Joined: 21 May 2009 Posts: 28
|
Hi,
I have an Oracle AS 10.1.3.3 which contains an MDB (Container Managed Transation) that listens to an MQ queue, in case of any exceptions during the execution of the MDB the i prform MessageDrivenContext.setRollbackOnly() assuming that it will be returned to the queue or even transformed to the DeadLetter queue, but this is not happening, and the message could not be found any more. my question is what is the expected behavior i mean does it supposed to return it back to the queue or send it to the deadletter queue for that queuemanager, and is there any specfic configuration i need to do to allow this to happened !
Thanks |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu Aug 06, 2009 1:45 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
There was [what looks like] very similar behaviour to this (but for a different app server (weblogic)) recently described on here posted by PeterPotKay. Its probably worth you finding the thread for more info.
In summary, for Weblogic, the messages were actually backed out the next time a good message was receieved (so that a commit was performed).
Do you messages appear after the next commit? |
|
Back to top |
|
 |
mr_jaber |
Posted: Thu Aug 06, 2009 3:13 am Post subject: |
|
|
Apprentice
Joined: 21 May 2009 Posts: 28
|
it seems u missed the ".. here .." link on your post, any way Oracle Application Server allows you defining what called "ExceptionQueue" on which all failed delivered messages resides, but i am asking if MQ can handle this it self by defining the DeadLetter Queue and/or Backout Queue and MDB transaction.
and to answer your question the message is lost for ever.
Thanks |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu Aug 06, 2009 4:03 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
mr_jaber wrote: |
it seems u missed the ".. here .." link on your post,
|
No I didnt, I just didnt have all the time in the world to do the searching for you so I tried to give you enough help to be able to find this for yourself.
If you backout a message to the input q and have a backout queue defined i'd expect to see it there. If no BOQ is defined id expect it to appear in the DLQ - id never expect MQ to lose persistent messages!
Unfortunatly I cant offer Oracle AS specific help but maybe someone else can..... |
|
Back to top |
|
 |
mr_jaber |
Posted: Thu Aug 06, 2009 4:19 am Post subject: |
|
|
Apprentice
Joined: 21 May 2009 Posts: 28
|
- Take it easy .. i used to see"here" on forums as linkable this is why i brough this up, so its not a big deal man.
- i have described how to do this from the Oracle AS perspective. And my question is all about IBM MQ side providing other options directing the failed messages without going through AS level configuration for that particular queue.
- i think ill simply go with the "ExceptionQueue" option.
Thanks alot |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu Aug 06, 2009 4:27 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
mr_jaber wrote: |
- Take it easy .. i used to see"here" on forums as linkable this is why i brough this up, so its not a big deal man.
|
Ok.... its just easy for people to try and get the volunteers on here to do all their work for them!
Quote: |
And my question is all about IBM MQ side providing other options directing the failed messages without going through AS level configuration for that particular queue.
|
I hope my 2nd response answered this. It is possible to do this at the MQ level by setting the BOQ property on your input queue. |
|
Back to top |
|
 |
Rani.chitti |
Posted: Thu Aug 06, 2009 5:58 am Post subject: |
|
|
Newbie
Joined: 31 Jul 2009 Posts: 8
|
Hi mr_jaber
I am trying to connect MQ with 10.3.1 and my MDB does not pick the messages from the MQ.Could you please provide me some details about your configuration and the code.
here is the link which i started
http://www.mqseries.net/phpBB2/viewtopic.php?t=50221
Thanks |
|
Back to top |
|
 |
mr_jaber |
Posted: Fri Aug 07, 2009 9:34 am Post subject: |
|
|
Apprentice
Joined: 21 May 2009 Posts: 28
|
Quote: |
Ok.... its just easy for people to try and get the volunteers on here to do all their work for them!
|
don't let these people take advantage of u, just stop answering them
for the other "volunteers"; the Back Out queue is not working, i specified it on the Queue Property "Back out requeue queue" as the same queue name .. what do i miss here !
Thanks
[/quote] |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 07, 2009 10:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mr_jaber wrote: |
the Back Out queue is not working, i specified it on the Queue Property "Back out requeue queue" as the same queue name .. what do i miss here !
|
Specify the backout queue as a different local queue. Specifying the same queue would cause a loop. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 07, 2009 1:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mr_jaber wrote: |
Quote: |
Ok.... its just easy for people to try and get the volunteers on here to do all their work for them!
|
don't let these people take advantage of u, just stop answering them
for the other "volunteers"; the Back Out queue is not working, i specified it on the Queue Property "Back out requeue queue" as the same queue name .. what do i miss here !
Thanks
|
Don't forget to specify a backout threshold on the main queue.
This should be 0<bothresh<max MDB retry _________________ MQ & Broker admin |
|
Back to top |
|
 |
mr_jaber |
Posted: Sat Aug 08, 2009 8:14 am Post subject: |
|
|
Apprentice
Joined: 21 May 2009 Posts: 28
|
i did specify the threshold, i have noticed that the MessageDrivenContext().setRollbackOnly(); which i am using on my MDB in case of any exception throws No Transaction Exception.
Is it true that this Transaction should be created by the AS since i am using CMT, and what is the proper Transaction Attribute to be used (Required "with XA support" or Not Supported). |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Aug 08, 2009 9:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The transaction management should be left to the container. However the transactional attribute in the deployment descriptor should really be "requires new". (with XA). You need to make sure that the qcf specified in JNDI will support XA.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mr_jaber |
Posted: Sat Aug 08, 2009 9:28 am Post subject: |
|
|
Apprentice
Joined: 21 May 2009 Posts: 28
|
First:
i am quoting from the infocenter help (Handling poison messages)
"When the session is non-transacted, with AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE, a message is backed out only after a system error, or if the application terminates unexpectedly."
so do i really need to provide the Transaction Support thing, can't i just rely on the RuntimeException that would be thrown from the MDB itself.
Second:
i have recreated the QCF to be XAQCF and modified the Resource Adapter classes and interfaces to be XA, and i modified the Transaction Attribute to be RequiresNew, it gives me the following Exception:
Caused by: javax.resource.NotSupportedException: createJMSObjectsMQJMS1068: failed to obtain XAResource
at oracle.j2ee.ra.jms.generic.EndpointConsumer.<init>(EndpointConsumer.java:80)
at oracle.j2ee.ra.jms.generic.JMSResourceAdapter.endpointActivation(JMSResourceAdapter.java:9
at oracle.j2ee.connector.ResourceAdapterWrapper.activateEndpoint(ResourceAdapterWrapper.java:496)
at oracle.j2ee.connector.ResourceAdapterWrapper.endpointActivation(ResourceAdapterWrapper.java:306)
at com.evermind.server.ejb.MessageDrivenHome.initializeJCAServer(MessageDrivenHome.java:574)
any ideas ... |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Aug 08, 2009 8:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Looks like you are using a client connection. Do you have the extended transactional client jar on your class path?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mr_jaber |
Posted: Sat Aug 08, 2009 9:04 pm Post subject: |
|
|
Apprentice
Joined: 21 May 2009 Posts: 28
|
i figured that out before and added "com.ibm.mqetclient.jar" to my classpath, but now it seems that i had to install a certain fix pack to MQ 6, cause of "MQJMS2002:Failed to Get Message From MQ". |
|
Back to top |
|
 |
|