Author |
Message
|
jhaake |
Posted: Thu Apr 20, 2006 5:26 am Post subject: |
|
|
Novice
Joined: 17 Apr 2006 Posts: 13
|
Oh, and the other question. BlockIP2 (according to the log) is successfully allowing connection and then I'm getting 2035 on the remote application. So I'd say it is after passing through the exit, but then ultimately failing. |
|
Back to top |
|
 |
EddieA |
Posted: Thu Apr 20, 2006 7:32 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
How is my PC and the client software supposed to know where SCMDEV01_QMGR is located |
For amqsputc, the simplist way is to define the MQSERVER environment value. The more complicated way is to use a Client Channel Table.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jhaake |
Posted: Thu Apr 20, 2006 11:22 am Post subject: |
|
|
Novice
Joined: 17 Apr 2006 Posts: 13
|
Thank you, EddieA,
My results were surprising to me.
Code: |
C:\Java\Jar>set MQSERVER=JCH.SVRCONN/TCP/rhscmdev01(1414)
C:\Java\Jar>amqsputc JCH1 SCMDEV01_QMGR
Sample AMQSPUT0 start
target queue is JCH1
fred1
fred2
fred3
Sample AMQSPUT0 end
|
Client amqsputc is working fine. Connected as user 'jhaake' which is my windows userid - great (except I thought it would be capitalized).
But my java output hasn't changed.
Code: |
C:\Java\Jar>java com.mycorp.util.MQ_Tester rhscmdev01 SCMDEV01_QMGR 1414 JCH.SVRCONN JCH1 get
//////////////// MQSeries Tester Started ////////////////
Hostname: rhscmdev01
Queue Manager: SCMDEV01_QMGR
Port: 1414
Channel: JCH.SVRCONN
Queue: JCH1
Command: get
MQJE001: Completion Code 2, Reason 2035
|
And here's my pretty basic java code for MQ connection:
Code: |
private void connect() throws MQException {
// Set up MQ environment
MQEnvironment.hostname = hostname;
MQEnvironment.port = port;
MQEnvironment.channel = channelname;
MQEnvironment.userID = "jhaake";
//MQEnvironment.password = "junk";
// turn on MQ tracing
// trace levels:
// 1 provides entry/exit/exception info
// 2 additionally provides parameter info
// 3 additionally provides transmited/recieved headers & data blocks
// 4 additionally provides transmited/recieved user data info
// 5 additionally provides JVM methods tracing
int traceLevel = 5;
try {
FileOutputStream traceFile = new FileOutputStream( "MQ_Tester.trace" );
MQEnvironment.enableTracing( traceLevel, traceFile );
} catch( IOException ioe ) {
//trace to System.err instead
MQEnvironment.enableTracing( traceLevel );
}
// create a connection to the queue manager
qMgr = new MQQueueManager( qmgrname );
}
|
Is it really just a problem with my JAVA client then?!?!? |
|
Back to top |
|
 |
wschutz |
Posted: Thu Apr 20, 2006 11:40 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
Wow, thanks for telling me about MO01 !!! Hasn't changed what I'm seeing though:
On the MQ server (linux) side:
# /tmp/q -iSYSTEM.ADMIN.QMGR.EVENT -m SCMDEV01_QMGR -w100
MQSeries Q Program by Paul Clarke [ V4.3 Build:Jun 9 2004 ]
Connecting ...connected to 'SCMDEV01_QMGR '.
$,D?0SCMDEV01_QMGR
|
Jeff said MO01, the "q" program is MA01. See the "evmon.c" program in that package. _________________ -wayne |
|
Back to top |
|
 |
Tibor |
Posted: Fri Apr 21, 2006 3:44 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Java clients inquiry some information when connecting to the queue manager. That's why I set the 'inq' authority on the queue manager and the necessary queues. |
|
Back to top |
|
 |
jhaake |
Posted: Fri Apr 21, 2006 7:34 am Post subject: |
|
|
Novice
Joined: 17 Apr 2006 Posts: 13
|
Tibor,
You had the piece of information that proved to be my solution.
I only had connect authorization to the qmgr. Added +inq to the qmgr and everything worked.
I'd assumed inq was only for queues and not qmgrs. Guess I'd better read documentation a bit closer.
Thank you all for your replies. I learned several things along the way. |
|
Back to top |
|
 |
|