Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Queue Manager in Session Bean

Status
Not open for further replies.

JParker

Technical User
Jul 9, 2001
2
US
Hello-

I'm running a stateless session bean in WebSphere (WAS) 3.5 and trying to connect to an MQSeries queue. MQSeries is running on the same server as WAS. As I understand, I need to connect using a "binding" connection. My code looks like this:

MQQueueManager aQMgr = null;

try {
// Create a connection to the queue manager
aQMgr = new MQQueueManager("QM_vna004");
}
catch (MQException mqe) {
System.out.println("An MQ error occured: CC:" +
mqe.completionCode + "Reason Code:" +
mqe.reasonCode);
}

Running this from a simple Java program on the server works just fine, but the EJB bombs on the "aQMgr = new MQQueueManager(qManager)" statement with a NullPointer exception. Anyone have any thoughts?

Thanks - JP
 
My code (which works) looks like this...

qMgr = new MQQueueManager(qManager, MQC.MQCNO_FASTPATH_BINDING);

hth,
C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top