Say.. you have a JMS Session, transacted...
| Session consumerSess = conn.createSession(true, Session.SESSION_TRANSACTED);
| MessageConsumer consumer = consumerSess.createConsumer(queue1);
| conn.start();
|
Say, an user now being aware of what he is doing calls message.acknowledge();
int count = 0;
| while (true)
| {
| Message m = consumer.receive(200);
| if (m == null)
| {
| break;
| }
| m.acknowledge(); // This is invalid, but I guess we should just ignore
this call
| count++;
| }
|
ATM, a subsequent call to rollback is useless, as m.acknowledge already fired a
transaction commit.
Message javadoc states we should ignore the call to ack:
"Calls to acknowledge are ignored for both transacted sessions and sessions specified
to use implicit acknowledgement modes. "
so.. what should we do on this case?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221136#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...