Posted: Sun Jul 07, 2002 9:44 pm Post subject: getting MQJMS1057 on acknowledge.
Centurion
Joined: 22 Jan 2002 Posts: 132 Location: India
HI,
I am using MQseries 5.2 with MQSeries classes for Java Message Service (JMS) V5.21 on WINNT machine.
I have open the session as connection.createQueueSession(transacted,Session.AUTO_ACKNOWLEDGE)
and when the message is received on the receiver's onMessage method then I am getting MQJMS1057 on trying to do the message.acknowledge().
javax.jms.IllegalStateException: MQJMS1057: Message has no session associated with it
at com.ibm.jms.JMSMessage.acknowledge(JMSMessage.java:3233)
Hi
The problem is that if session is created as Session.AutoAcknowledge I shud not be acknowledging the message but if I dont acknowledge the message the message is backed out.
I have a typical asynchronus request reply scenario
Application 1 - creates a request message. It creates the temporary queue and set the setJMSReplyTo field with that value, and also set the message listener to itself to listen on temporary queue and send the request (say request on Queue named Queue.TempQueue).
Apllication 2 which is listening on Queue.TempQueue receives the message and process it and send the reply back to the Temporary Queue as defined.
The problem which I am facing is that all the things work fine but the message remain on the "Queue.TempQueue" with its backout count increases. and if try to call message.acknowledge from the application2 I get the MQJMS1057 error.
Also one intresting observation is that say Application2 keep on running then if I again send messages again and again then everything is working fine. but if I try to close the session within the onMessage method in Application 2 I get the messages backed out.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum