-
1. Re: Problem with JMS rollback
timfox May 7, 2007 4:44 PM (in response to keuller)Are you using MDBs or creating your own consumers directly on the queue?
-
2. Re: Problem with JMS rollback
keuller May 7, 2007 4:58 PM (in response to keuller)Hi Tim,
I'm using consumers directly using JMS API. -
3. Re: Problem with JMS rollback
timfox May 7, 2007 5:01 PM (in response to keuller)When you call rollback, any unacknowledged messages received in the current session will be redelivered automatically.
If that sesion closes, then the messages will be put back on the queue and available to be consumed by other sessions. -
4. Re: Problem with JMS rollback
keuller May 7, 2007 5:08 PM (in response to keuller)Tim,
But my aplication has a time interval when we check Queue and each verification is a new session. If I apply rollback in a Session s1, according with you another software has created session s2 and it will be consumes the message again, thats right ?
Or if I shutdown my application I'll close the current session and start again my application a new session will be created. So when a start again my application must be consumes all messages stored in table ?
Regards. -
5. Re: Problem with JMS rollback
timfox May 7, 2007 5:12 PM (in response to keuller)"keuller" wrote:
Tim,
But my aplication has a time interval when we check Queue and each verification is a new session. If I apply rollback in a Session s1, according with you another software has created session s2 and it will be consumes the message again, thats right ?
According to the JMS spec rollback caues recovery of the session, so the messages will be immediately redelivered to the *same session* that called rollback. So after rollback they won't be available to be consumed by another session until the first session (the one that called rollback) closes.
Or if I shutdown my application I'll close the current session and start again my application a new session will be created. So when a start again my application must be consumes all messages stored in table ?
Regards.
Yes, if you close the session that called rollback and create a new one, then that new session should receive the messages again.