Author |
Message
|
prasannal |
Posted: Sun Mar 27, 2005 7:25 pm Post subject: Exception in application MQJMS1024: session closed |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi,
While reading from a queue using MQ JMS API, I am getting following Exception. I am opening the queue under transaction.
java.lang.Exception: Exception reading JMS message from MQ queue 'A.TO.B.INQ' : MQJMS1024: session closed
What could be the possible reason?
Thanks,
Prasanna |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Mar 28, 2005 3:25 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You'll have to post the linked exception or more of your log. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasannal |
Posted: Mon Mar 28, 2005 5:35 am Post subject: Session closed Exception |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi Jeff,
I have only the line I have shown in my log.
This is code where it is throws this exception-
if (session == null) {
session = connection.createQueueSession(true,
Session.AUTO_ACKNOWLEDGE);
ioQueue = session.createQueue(queueName);
qreceiver = session.createReceiver(ioQueue);
}
jmsMsg = qreceiver.receive(10000); //should get message in 10 secs. else sleep
Note that before this code block, QueueConnection has already been created.
Thanks,
Plad |
|
Back to top |
|
 |
malammik |
Posted: Mon Mar 28, 2005 6:48 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Mar 28, 2005 3:59 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please change your code to REPORT the linked exception, and then post that. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 29, 2005 1:22 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As well you might want to look at your code and compare it against a typical JMS implementation.
The message appears clear enough to me.
You will get an exception everytime you attempt a receive without having started the connection first. You need to do an explicit start.
Enjoy and read the manual Using Java  |
|
Back to top |
|
 |
|