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 » Migrating client appl from WMQ6 jars to WMQ7 jars

Post new topic  Reply to topic
 Migrating client appl from WMQ6 jars to WMQ7 jars « View previous topic :: View next topic » 
Author Message
rtarasov
PostPosted: Tue Dec 10, 2013 10:53 pm    Post subject: Migrating client appl from WMQ6 jars to WMQ7 jars Reply with quote

Newbie

Joined: 10 Dec 2013
Posts: 2

Hi Guys,

Have a problem migrating client application from WMQ 6 to WMQ 7 client jars.
The problem appears when I try to connect to topics residing on broker queue manager
in the cluster containing two queue managers(one is GATE another HUB).

With WMQ6 jars the subscriptions are correctly created on broker QM(HUB).
With WMQ7 jars the subscriptions are created on the GATE QM and do not reach the broker QM.

When I connect directly to the HUB QM with WMQ7 jars everything works too.

As far as the below code is working fine with WMQ6 jars I suppose that the problem is in client configuration when I move to WMQ7 jars.
Probably something is missing in factory config. Correct me if I wrong.

We use WMQ version 7.0.1.8.

In order to connect to the topics I use the next MQTopicConnectionFactory:
....
Code:
factory = new MQTopicConnectionFactory();

factory.setCCSID(environment.getMqCCSid());
factory.setPort(environment.getMqHostPort());
factory.setHostName(environment.getMqHostName());
factory.setQueueManager(environment.getMqQueueManager());//GATE
factory.setChannel(environment.getMqChannel());

factory.setBrokerSubQueue(environment.getMqTemporarySubQueueName());
factory.setBrokerControlQueue(environment.getMqControlQueue());
factory.setBrokerQueueManager(environment.getMqSubQueueManager());//HUB
//this line is changed from: factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setTransportType(WMQConstants.WMQ_CM_CLIENT);

topicConnection = (MQTopicConnection) factory.createTopicConnection();
topicConnection.start();

topicConnection.setExceptionListener(topicConnectionExceptionListener);

....

and later on to subscribe to topic:
....
Code:
public synchronized TopicSubscriber subscribe(IMQTopic topic)
      throws JMSException {
   try {
      MQTopicSession session = (MQTopicSession) topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      topicSessionList.add(session);
      Topic tp = session.createTopic(topic.getName());
      TopicSubscriber subscriber = session.createSubscriber(tp);
      
   
      return subscriber;
   } catch (JMSException exception) {
      if (SupportedMQExceptions.isExceptionSupported(exception)){
         topicConnectionExceptionListener.onException(exception);
      } else {
         throw exception;
      }
   }
   return null;   
}

....

Could you please give me a hint what is wrong?

Regards,

Roman.
Back to top
View user's profile Send private message
gs
PostPosted: Mon Dec 16, 2013 12:26 am    Post subject: Reply with quote

Master

Joined: 31 May 2007
Posts: 254
Location: Sweden

Do you get any exception and in that case what?

Also note that Pub/Sub functionality was moved to WMQ with version 7.0.
Back to top
View user's profile Send private message
rtarasov
PostPosted: Mon Dec 16, 2013 6:52 am    Post subject: Reply with quote

Newbie

Joined: 10 Dec 2013
Posts: 2

Hi gs,

I don't get any exceptions on client side. Subscribing to topics without any problems but later can see that subscriptions are not created on the broker QM and subsequently messages are not coming from the topics.

I can reach the queues defined on the broker QM(but not topics).

Tried to trace both GATE QM and HUB QM(broker QM) but can't get anything from the trace except for some MQRC_NO_MSG_AVAILABLE, MQRC_PROPERTY_NOT_AVAILABLE at the GATE and HUB. Even more the trace generated by the GATE QM in the case I connect with WMQ 6 jars generates additionally MQRC_OBJECT_IN_USE and MQRC_SELECTOR_ERROR.

Quote:
Also note that Pub/Sub functionality was moved to WMQ with version 7.0.


What it could mean from client's point of view? Should it be transparent?

Thanks in advance,

Roman.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Mon Dec 16, 2013 8:18 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2602
Location: The Netherlands (Amsterdam)

Have you checked these migration items: http://www-01.ibm.com/support/docview.wss?uid=swg27016064&aid=1

hope it helps!
_________________
Michael



MQSystems Facebook page
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Migrating client appl from WMQ6 jars to WMQ7 jars
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.