ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Problem with registering remote queue with JMSAdmin

Post new topic  Reply to topic
 Problem with registering remote queue with JMSAdmin « View previous topic :: View next topic » 
Author Message
56mer
PostPosted: Thu Aug 16, 2007 6:08 am    Post subject: Problem with registering remote queue with JMSAdmin Reply with quote

Newbie

Joined: 16 Aug 2007
Posts: 2
Location: France

Hello,

I try to put message in a remote queue on a remote queue manager but I have problem at connection time.

My system :
QM1 (local queue manager) :
qLocal1 (local queue)
qRemote1 -> remote queue to qLocal2 on QM2
qTrans1 (transmission queue between qLocal1 and qLocal2)

QM2 (remote queue manager) :
qLocal2 (local queue)

The queues on QM1 were created with runmqsc.

Here is my connection code :
Code:
        java.util.Hashtable environment = new java.util.Hashtable();
        environment.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.mq.jms.context.WMQInitialContextFactory");
        environment.put(Context.PROVIDER_URL, "<myServer>:<myPort>/<myChannelName>");
        initialContext = new InitialContext(environment);
        qconFactory = (QueueConnectionFactory) initialContext.lookup("QM1");

        // for local queue on local QM1
        queue = (Queue) initialContext.lookup(<qLocal2>); // queue remote => KO
        qcon = qconFactory.createQueueConnection();

=> work fine. Idem with qTrans1.

Code:
        // for remote queue on local QM1
        queue = (Queue) initialContext.lookup(<qLocal1>); // queue remote => KO
        qcon = qconFactory.createQueueConnection();
=> last line fails : Object queue:qLocal1 not found on queue manager QM1

The problem is that my qRemote1 remote queue is not registered in the QM1 JNDI. So I have to add entry with JMSAdmin
As described in topic http://mqseries.net/phpBB/viewtopic.php?t=24375&view=previous&sid=6189b1fae5bfadebf10698ba3cd729c2, I have configured JMSAdmin to use the same JNDI context as used bellow.

Code:
5648-C60, 5724-B41, 5655-F10 (c) Copyright IBM Corp. 2002. Tous droits réservés.
Démarrage des classes WebSphere MQ pour l'administration Java(tm) Message Service

Initialisation du contexte JNDI...
   INITIAL_CONTEXT_FACTORY: com.ibm.mq.jms.context.WMQInitialContextFactory
   PROVIDER_URL: <myServer>:<myPort>/<myChannelName>
Terminé

Bienvenue dans l'interface par ligne de commande de l'outil d'admin.

InitCtx> display CTX

  Contenu de InitCtx

   a  MQ1             com.ibm.mq.jms.MQQueueConnectionFactory
   a  qLocal1         com.ibm.mq.jms.MQQueue
   a  qTrans1         com.ibm.mq.jms.MQQueue

  3 Objet(s)
    0 Contexte(s)
    3 Liaison(s), 3 Géré(es)

When I try to add qRemote1 :

Code:
InitCtx> def q(qRemote1)


I have a message like that : Impossible to link object.

With JMSAdmin trace enabled, I can only find the exception :
javax.naming.NamingException exception caught: Caught an Exception trying to bind qRemote1. Exception was: com.ibm.mq.pcf.PCFException: MQJE001 : Code achèvement 2, raison 4001

Help would be appreciate to solve this problem. Thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 16, 2007 7:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Before you try to add the queue to the JNDI did you make sure it exists on the qmgr?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
56mer
PostPosted: Fri Aug 17, 2007 2:48 am    Post subject: Reply with quote

Newbie

Joined: 16 Aug 2007
Posts: 2
Location: France

Thanks all to have spent time on my topic.
The solution was quite very simple : I wasn't using the last version of the ME01 pac (mqcontext.jar containing WMQInitialContextFactory class).
The problem with remote queues have been fixed in release 1.2.0 of pac ME01.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 17, 2007 8:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

56mer wrote:
Thanks all to have spent time on my topic.
The solution was quite very simple : I wasn't using the last version of the ME01 pac (mqcontext.jar containing WMQInitialContextFactory class).
The problem with remote queues have been fixed in release 1.2.0 of pac ME01.


Don't use that support pack for JNDI repository. It is only suitable for a development environment. In a full J2EE environment you should be using either the WAS JNDI setup or integrate with the file based JNDI (sun). It allows for environment stability that only a fixed JNDI setup can give you.

Using the support pack is essentially turning the qmgr into a JNDI repository.
Not a good idea when you change the JNDI as you change the qmgr.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Problem with registering remote queue with JMSAdmin
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.