GhostDragon
Programmer
Using Java...
I have code that works from the commandline but when I use it within my actual application receiveNoWait() returns null. recieve() works fine but my app needs receiveNoWait() in order to proceed. I double-check that there are messages available. I am new to MQSeries so I may be overlooking something very simple.
tSess = tConn.createTopicSession( false, Session.AUTO_ACKNOWLEDGE );
t = (Topic)context.lookup( queueJNDI );
if( tSub==null )
tSub = tSess.createSubscriber(t);
..............
msg = (TextMessage)tSub.receiveNoWait(); //this blows up
I have code that works from the commandline but when I use it within my actual application receiveNoWait() returns null. recieve() works fine but my app needs receiveNoWait() in order to proceed. I double-check that there are messages available. I am new to MQSeries so I may be overlooking something very simple.
tSess = tConn.createTopicSession( false, Session.AUTO_ACKNOWLEDGE );
t = (Topic)context.lookup( queueJNDI );
if( tSub==null )
tSub = tSess.createSubscriber(t);
..............
msg = (TextMessage)tSub.receiveNoWait(); //this blows up