Author |
Message
|
bdrummond |
Posted: Tue Jun 29, 2004 5:13 am Post subject: JAVA App can't see clustered queues |
|
|
Disciple
Joined: 06 May 2004 Posts: 164
|
Hi,
We're having a few problems when a JAVA application is trying to put messages to a clustered queue which exists on 2 (remote) full repository boxes.
If we specify the clustered queue in the connection configuration, we receive the 2085 error code.
I have also tried creating a local Alias queue that has the clustered queue as the base queue howver we get the 2082 error code.
If we put to a normal local queue, this works ok.
The queue manager we are putting messages on to is part of the cluster and an amqsput works for both of the scenarios above.
Can anyone shed any light as to why this would be happening..?
Cheers. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jun 29, 2004 9:05 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
By what you described, you appear to have some concepts backwards. I would suggest you re-read the Using Java manual.
Quote: |
If we specify the clustered queue in the connection configuration, we receive the 2085 error code. |
No, don't do that!!
Quote: |
I have also tried creating a local Alias queue that has the clustered queue as the base queue howver we get the 2082 error code. |
No, don't do that either.
Just connect and open the queue as follows:
Code: |
MQQueueManager _qMgr = new MQQueueManager("MY_QUEUE_MANAGER");
int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING;
MQPutMessageOptions pmo = new MQPutMessageOptions();
MQQueue _qOut = _qMgr.accessQueue( "MY_CLUSTER_QUEUE", openOptions, null, null, null );
MQMessage sendmsg = new MQMessage();
sendmsg.format = MQC.MQFMT_STRING;
sendmsg.messageType = MQC.MQMT_DATAGRAM;
sendmsg.messageId = MQC.MQMI_NONE;
sendmsg.correlationId = MQC.MQCI_NONE;
sendmsg.writeString("This is a test message to a cluster queue.");
_qOut.put(sendmsg, pmo);
_qOut.close();
_qMgr.disconnect(); |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
bdrummond |
Posted: Wed Jun 30, 2004 5:25 am Post subject: |
|
|
Disciple
Joined: 06 May 2004 Posts: 164
|
Hi Roger,
The basa JAVA code now seems to work and can open the queue for output.
However, when using the JMS admin tool, with the following settings:
FAILIFQUIESCE(YES)
QUEUE(ECL.HUB.RC_EUDP.RQST)
QMANAGER()
PERSISTENCE(APP)
CCSID(1208)
TARGCLIENT(JMS)
ENCODING(NATIVE)
PRIORITY(APP)
EXPIRY(APP)
VERSION(1)
This seems to fail.
Can you suggest anything else that could be incorrect...? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 30, 2004 5:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
bdrummond wrote: |
This seems to fail. |
Please be more specific. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bdrummond |
Posted: Wed Jun 30, 2004 6:06 am Post subject: |
|
|
Disciple
Joined: 06 May 2004 Posts: 164
|
We are receiving MQRC 2085 if we specify the local QM with the Clustered (remote) queue.
We receive MQRC 2058 if we leave the QM field blank.
How does the JMS pass the Java open options..? |
|
Back to top |
|
 |
vennela |
Posted: Wed Jun 30, 2004 7:28 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Are you trying to create a QueueSender or a QueueReceiver in your application |
|
Back to top |
|
 |
bdrummond |
Posted: Wed Jun 30, 2004 8:15 am Post subject: |
|
|
Disciple
Joined: 06 May 2004 Posts: 164
|
|
Back to top |
|
 |
vennela |
Posted: Wed Jun 30, 2004 8:46 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You able to PUT a message to a local queue with your JMS app
Can you PUT a message to the CLUSTER queue using amqsput
Did you double check the queue name (spelling and case )
Can we look at the code snippet |
|
Back to top |
|
 |
bdrummond |
Posted: Wed Jun 30, 2004 11:06 pm Post subject: |
|
|
Disciple
Joined: 06 May 2004 Posts: 164
|
Hi,
The code is able to put to a local queue and we can also perform a successful amqsput to the Clustered Queue.
It looks as though the JMS code (supplied by an external company) does not connect via the createQueueConnection and createQueueSession functions.
By all accounts, to do this will take a large re-write of the code as this is the first time that this particular JMS application has tried top connect to MQ.
So I think we will just have toi write a small script that will get the messages from the local queue and put them on to the Clustered Queue.
Not ideal but with the timescales that we are working to, seems to be the easiest option.
Thanks. |
|
Back to top |
|
 |
|