Posted By:
Shashank_Mehrotra
Posted On:
Monday, February 18, 2002 12:16 PM
I use the following code fragment for creating my 'consumer' : m_queueConnection = m_queueConnectionFactory.createQueueConnection(); m_queueSession = m_queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); m_queueReceiver = m_queueSession.createReceiver(m_queue); m_queueConnection.start(); and the following code fragment for creating my 'producer' m_queueConnection = m_queueConnectionFactory.createQueueConnection(); m_queueSession = m_queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); m_queueSender = m_queueSession.createSender(m_queue); m_queueConnection.start(); Both
More>>
I use the following code fragment for creating my 'consumer' :
m_queueConnection = m_queueConnectionFactory.createQueueConnection();
m_queueSession = m_queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
m_queueReceiver = m_queueSession.createReceiver(m_queue);
m_queueConnection.start();
and the following code fragment for creating my 'producer'
m_queueConnection = m_queueConnectionFactory.createQueueConnection();
m_queueSession = m_queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
m_queueSender = m_queueSession.createSender(m_queue);
m_queueConnection.start();
Both these code fragments do not produce exceptions. However when I
try and receive or send a message I get the IllegalStateException saying the
'Consumer is closed' and the 'Session is closed'.
What step am I missing out in activating/starting up the consumer/producer which is causing
this exception. (I am using Weblogic to deploy these classes)
<<Less