-
1. Re: JMS publish roll-back
hchirino May 13, 2002 7:08 PM (in response to donahuept)Yes.. read the JMS spec.
-
2. Re: JMS publish roll-back
mkotsbak May 21, 2002 7:28 PM (in response to donahuept)How would that be configured in J2EE/jboss? Is it an option, or is it like this as default? Are the messages not accessible by readers of the queue before commit then (like DB-transactions)?
-
3. Re: JMS publish roll-back
hchirino May 22, 2002 7:37 PM (in response to donahuept)that is a standard JMS feature. Read the jms spec or hit the jms tutorial: http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html
-
4. Re: JMS publish roll-back
donahuept May 23, 2002 12:23 PM (in response to donahuept)Here is how:
To start with, the first (transaction) parameter of your createTopicSession call should be "true" as in:
topicSession = topicConnection.createTopicSession(true,Session.AUTO_ACKNOWLEDGE);
Later you commit or rollback the transaction:
topicSession.commit();
topicSession.rollback();
Reader of queue will not see the message until the commit just like a DB. -
5. Re: JMS publish roll-back
mkotsbak May 26, 2002 4:36 AM (in response to donahuept)> Here is how:
>
> To start with, the first (transaction) parameter of
> your createTopicSession call should be "true" as in:
> topicSession =
> topicConnection.createTopicSession(true,Session.AUTO_A
> KNOWLEDGE);
>
> Later you commit or rollback the transaction:
> topicSession.commit();
> topicSession.rollback();
>
> Reader of queue will not see the message until the
> commit just like a DB.
Thx. I found it in the JMS-doc. Just that you normally don't need to do it like you say above. You can just use the normal container managed transactions, and it will work on JMS too. -
6. Re: JMS publish roll-back
philc Aug 2, 2002 2:21 PM (in response to donahuept)JMS using Container managed transactions without calling session.commit() or session.rollback()
> You can just use the normal container managed
> transactions, and it will work on JMS too.
I am trying to do this but i doesn't work. The messages seem to be blocked. (The listener never gets them). Could you show me and example.
Philippe