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 » General IBM MQ Support » IBM Message Broker PUB/SUB Application Exception

Post new topic  Reply to topic
 IBM Message Broker PUB/SUB Application Exception « View previous topic :: View next topic » 
Author Message
rajeshisyourfriend
PostPosted: Tue Mar 20, 2007 10:45 pm    Post subject: IBM Message Broker PUB/SUB Application Exception Reply with quote

Newbie

Joined: 20 Mar 2007
Posts: 2
Location: Hyderabad

Hi all
I am trying to subscribe a topic on Messge Broker v 6.0 for that i have written one stand alone application using JMS API(com.ibm.mqjms.jar) and there i am getting one exception.
Can any help me solving this problem.

Exception in thread "main" javax.jms.JMSException: MQJMS1111: JMS1.1 The required Queues/Publish Subscribe services are not set up {0}
at com.ibm.mq.jms.MQConnection.setSubscriptionStores(MQConnection.java:3755)
at com.ibm.mq.jms.MQConnection.getMQPubSubServices(MQConnection.java:3686)
at com.ibm.mq.jms.MQSession.addPubSubServices(MQSession.java:6609)
at com.ibm.mq.jms.MQSession.createTopic(MQSession.java:4688)
at com.ibm.mq.jms.MQTopicSession.createTopic(MQTopicSession.java:623)
at com.ca.pubsub.TEST.main(TEST.java:33)

By looking at the exception Trace i am sure that some thing should be enable on the broker or QM to enable this application to subscribe the topic
. If anyone know about that please tell me.
Rajesh kumar
Back to top
View user's profile Send private message Yahoo Messenger
marcin.kasinski
PostPosted: Wed Mar 21, 2007 12:15 am    Post subject: Re: IBM Message Broker PUB/SUB Application Exception Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Can you show your code and definitions of all objects ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
rajeshisyourfriend
PostPosted: Wed Mar 21, 2007 12:50 am    Post subject: Re: IBM Message Broker PUB/SUB Application Exception Reply with quote

Newbie

Joined: 20 Mar 2007
Posts: 2
Location: Hyderabad

marcin.kasinski wrote:
Can you show your code and definitions of all objects ?


Here is code that i have written
/////////////////////////////Code///////////////////////////////
package com.ca.pubsub;

import javax.jms.JMSException;
import javax.jms.TextMessage;
import javax.jms.Topic;
import javax.jms.TopicConnection;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;

import com.ibm.mq.jms.*;

public class TEST {

public static void main(String[] args) throws JMSException
{
MQTopicConnectionFactory factory = new MQTopicConnectionFactory();
factory.setBrokerControlQueue("SYSTEM.BROKER.CONTROL.QUEUE");
factory.setBrokerQueueManager("WBRK6_DEFAULT_QUEUE_MANAGER");
factory.setBrokerSubQueue("TEST");
factory.setHostName("yadra04-2k3.ca.com");
factory.setPort(2414);

factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP); // after using this type of connection i got TopicConnection
TopicConnection topicConnection = factory.createTopicConnection();
topicConnection.start();

TopicSession topicSession = (TopicSession) topicConnection.createSession(false,TopicSession.AUTO_ACKNOWLEDGE);
Topic topic = topicSession.createTopic("$SYS/Broker/WBRK6_DEFAULT_BROKER/StatisticsAccounting/Snapshot/default/#");
TopicSubscriber topicSubscriber = topicSession.createDurableSubscriber(topic,"Message Flow Statistics Subscriber");
TextMessage msg = (TextMessage)topicSubscriber.receive();
System.out.println(msg.getText());
}
}
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » IBM Message Broker PUB/SUB Application Exception
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.