-
1. Re: Message redelivery
timfox Oct 30, 2006 5:59 AM (in response to ctomc)"ctomc" wrote:
I know that resending because of exception in onMessage is not part of JMS spec but as far as I know jboss messaging(and mq) support this behavior.
If a RuntimeException is thrown then redelivery should occur - this is mandated in the JMS spec 1.1, section 4.5.2.
If this is not happening, can you replicate this in a simple test case / example and we can investigate further?
Thanks. -
2. Re: Message redelivery
ovidiu.feodorov Oct 31, 2006 9:05 PM (in response to ctomc)There is something I don't understand here, please forgive my intrusion:
Tomaz says that he uses MDBs. The RuntimeException is thrown from within MDB's onMessage().
4.5.2 is about MessageListener's onMessage(), and actually the session's acknowledgment mode has bearing on the behavior. This is a different situation.
Tomaz, what EJB version are you using? 2.1 or 3?
Joining Tim in his request, could you please sent a test case that fails, or somehow guide us into replicating the failure? -
3. Re: Message redelivery
weston.price Oct 31, 2006 9:29 PM (in response to ctomc)
If a RuntimeException is thrown then redelivery should occur - this is mandated in the JMS spec 1.1, section 4.5.2.
Sort of. As Ovidiu points out, this is a bit different situation if he is using MDBs. This is one gray area where the JMS spec and the EJB spec are not exactly in agreement. If an runtime exception is thrown in the context of of a transaction, no problems there. However, if the exception is thrown using a NotSupported or BMT the spec is less clear as the delivery of the message occurs in a 'unspecified transaction context.
JBoss supports varying behavior depending upon version and whether or not you are using JMS/JCA. -
4. Re: Message redelivery
timfox Nov 1, 2006 4:02 AM (in response to ctomc)Apologies - my head is in JMS world :)
If the JCA / MDB container layer calls the message listener directly in the case of a JMS MDB, and handles the redelivery itself then this is really a question for Weston, not a JMS question, n'est ce pas? -
5. Re: Message redelivery
ctomc Nov 1, 2006 7:29 AM (in response to ctomc)Hi guys,
I have been out for little holidays....
I am using EJB3. And I will make some simple test case when I come to office tomorrow.
If you think that ejb 2.1 would behave behave differently I can try that also.
cheers,
tomaz -
6. Re: Message redelivery
timfox Nov 1, 2006 7:37 AM (in response to ctomc)Hmmmm.
This
ERROR [MessageCallbackHandler] RuntimeException was thrown from onMessage, 90625 will be redelivered
Tells me that the JCA layer/MDB container is *not* calling onMessage directly (since this is logged from JBM), therefore JMS semantics do apply, and we need to follow the JMS spec.
So, yes please Tomasz, please replicate in a simple test case/test program and we will investigate further. -
7. Re: Message redelivery
weston.price Nov 1, 2006 10:03 AM (in response to ctomc)We also have to find out what version of JBoss (unless I missed it) as well as RC* candidate of EJB3. Both are important in terms of JCA being used at all. Transaction attributes would be good to know as well.
-
8. Re: Message redelivery
ctomc Nov 2, 2006 5:23 AM (in response to ctomc)Hi guys.
I can confirm that problem exists only when I use EJB3 MDB.
Jboss is 4.0.5.GA with ejb3 implementation that came with it. :-)
all the configuration is default(only what messaging install changed it)
I have created a simple test case that i attached to issue http://jira.jboss.com/jira/browse/JBMESSAGING-633
tomaz -
9. Re: Message redelivery
ovidiu.feodorov Nov 2, 2006 10:46 PM (in response to ctomc)Thanks.
I've scheduled it for 1.0.2.CR1. I'll try to take a look at the test case ASAP, and I'll get back to you on this thread if I have further questions. -
10. Re: Message redelivery
weston.price Nov 2, 2006 10:49 PM (in response to ctomc)If it is in fact the JMS/JCA adapter being used (this would be with EJB3RC9) let me know. There were some things added to support EJB3 that may be an issue.
-
11. Re: Message redelivery
ovidiu.feodorov Nov 2, 2006 10:53 PM (in response to ctomc)Absolutely, thanks.