|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
resource allocation exception what doe this mean ?? |
« View previous topic :: View next topic » |
Author |
Message
|
joecherian |
Posted: Thu Jan 16, 2003 6:45 am Post subject: resource allocation exception what doe this mean ?? |
|
|
Novice
Joined: 15 Dec 2002 Posts: 23 Location: India
|
Hello
when i tried to create a Queuereciever as follows, then i got the exception as
tmpQReceiver =(MQQueueReceiver)m_Session.createReceiver(m_Queue[nQueueReceiverIndex],
"JMSMessageID ='"+ strMessgId+"'");
(where strMessgId = messageID)
javax.jms.ResourceAllocationException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.MQQueueSession.getQueueOpenException(MQQueueSession.java:823)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:295)
what could be the reason ??
please help..
Thanks
Joe |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Jan 16, 2003 9:12 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Catch the linked exception and post it here:
Code: |
} catch( JMSException je ) {
/*******************************************/
/* Catch and display exception information */
/*******************************************/
System.out.println("JMSException: " + je);
Exception le = je.getLinkedException();
if (le != null) System.out.println("Linked exception: " + le);
}
|
|
|
Back to top |
|
 |
joecherian |
Posted: Thu Jan 16, 2003 7:53 pm Post subject: |
|
|
Novice
Joined: 15 Dec 2002 Posts: 23 Location: India
|
Hello,
thanks , i found out the reason.pls see the following code..
for (int i = 0;i < 10000;++i)
{
strMessgId = (String)MessageIDObj.m_vMessageID.get(ixInner);
//create the receiver with the messageID obtained from the vector
tmpQReceiver =(MQQueueReceiver)m_Session.createReceiver(m_Queue[nQueueReceiverIndex],
"JMSMessageID ='"+ strMessgId+"'");
txtMsgIn = (JMSBytesMessage)m_Session.createBytesMessage();
//recieve the message using the Queuereciever object
txtMsgIn = (JMSBytesMessage)tmpQReceiver.receive(1);
}
in my crashed source it was as above,
now i added two more statements to the loop as follows..
tmpQReceiver.close();
tmpQReceiver = null ;
now that crashing is gone..
earlier when it crashed, i found that after 240 iterations it crashed each time..is there any significance for this number 240..?
now it is solved.. but i wasted alot of time for that
thanks again
Joe |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|