Hi,
I installed MQSeries server (v5.2) on Win 2000.
And I wrote a simple java application trying to connect to the MQSeries server, in IBM's documentation, there are two methods for the client to connect to the MQSeries server:
(1) Using JNDI interface
(2) using TCP/IP
Since I don't know anything about jndi, I chose using TCP/IP.
Following is the sample code from the IBM's redbook - "MQSeries using java':
///////////////////////////////////////////////////////////
private String HOSTNAME = "hostname";
private String QMGRNAME = "queuemanagername";
private String CHANNEL = "channelname";
private MQQueueManager qMgr;
private QueueConnectionFactory factory;
private QueueConnection connection;
factory = new com.ibm.mq.jms.MQQueueConnectionFactor();
factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setQueueManager(QMGRNAME
factory.setHostName(HOSTNAME);
factory.setChannel(CHANNEL);
////////////////////////////////////////////////////////////
I am wondering what should be used for the host name, queue manager name etc? And how does this app find the queue manager created on the MQSeries sever? I tried using URL and ip address for the MQSeries server. But I got error:
//////////////////////////////////////////////////////
MQSample.java:29: cannot resolve symbol
symbol : method setQueueManager (java.lang.String)
location: interface javax.jms.QueueConnectionFactory
factory.setQueueManager(QMGRNAME);
^
MQSample.java:30: cannot resolve symbol
symbol : method setHostName (java.lang.String)
location: interface javax.jms.QueueConnectionFactory
factory.setHostName(HOSTNAME);
^
MQSample.java:31: cannot resolve symbol
symbol : method setChannel (java.lang.String)
location: interface javax.jms.QueueConnectionFactory
factory.setChannel(CHANNEL);
/////////////////////////////////////////////////////
Anyone used TCP/IP as the connection method for JMS MQSeries?
Thanks a lot in advance.
Bin
email: bzhang@chicagosystemsgroup.com
I installed MQSeries server (v5.2) on Win 2000.
And I wrote a simple java application trying to connect to the MQSeries server, in IBM's documentation, there are two methods for the client to connect to the MQSeries server:
(1) Using JNDI interface
(2) using TCP/IP
Since I don't know anything about jndi, I chose using TCP/IP.
Following is the sample code from the IBM's redbook - "MQSeries using java':
///////////////////////////////////////////////////////////
private String HOSTNAME = "hostname";
private String QMGRNAME = "queuemanagername";
private String CHANNEL = "channelname";
private MQQueueManager qMgr;
private QueueConnectionFactory factory;
private QueueConnection connection;
factory = new com.ibm.mq.jms.MQQueueConnectionFactor();
factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setQueueManager(QMGRNAME
factory.setHostName(HOSTNAME);
factory.setChannel(CHANNEL);
////////////////////////////////////////////////////////////
I am wondering what should be used for the host name, queue manager name etc? And how does this app find the queue manager created on the MQSeries sever? I tried using URL and ip address for the MQSeries server. But I got error:
//////////////////////////////////////////////////////
MQSample.java:29: cannot resolve symbol
symbol : method setQueueManager (java.lang.String)
location: interface javax.jms.QueueConnectionFactory
factory.setQueueManager(QMGRNAME);
^
MQSample.java:30: cannot resolve symbol
symbol : method setHostName (java.lang.String)
location: interface javax.jms.QueueConnectionFactory
factory.setHostName(HOSTNAME);
^
MQSample.java:31: cannot resolve symbol
symbol : method setChannel (java.lang.String)
location: interface javax.jms.QueueConnectionFactory
factory.setChannel(CHANNEL);
/////////////////////////////////////////////////////
Anyone used TCP/IP as the connection method for JMS MQSeries?
Thanks a lot in advance.
Bin
email: bzhang@chicagosystemsgroup.com