Posted: Sat Sep 17, 2005 2:40 am Post subject: MQJMS3036: Brkr msg selection valid only when using MQSI bkr
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
Hi,
Anoop here. I am trying to use pu/sub with the WBIEB. I have configured 2 message flows one with real time input node and other with real time optimized flow node.
I have hosted the definitions of TCF's in JNDI -
InitCtx> def tcf(IP_2003) brokerver(v2) transport(direct) hostname(localhost) port(2003)
InitCtx> def tcf(IP_2004) brokerver(v2) transport(direct) hostname(localhost) port(2004).
and a topic
InitCtx> def t(basic) topic(messages/basic) brokerver(v2)
I have created the topic messages/basic in the topics tab of WBIMB domain perspective.
now i am executing the java code given below
String icf = "com.sun.jndi.fscontext.RefFSContextFactory";
String providerURL = "file:/C:/JNDI-Directory";
String tcfObjectName = "IP_2003";
String topicObjectName = "basic";
String message = "Japan";
Hashtable ht = new Hashtable();
ht.put(InitialContext.PROVIDER_URL, providerURL);
ht.put(InitialContext.INITIAL_CONTEXT_FACTORY, icf);
ht.put(InitialContext.REFERRAL, "throw");
try {
InitialContext ic = new InitialContext(ht);
TopicConnectionFactory qcf =
(TopicConnectionFactory) ic.lookup(tcfObjectName);
TopicConnection tConn = qcf.createTopicConnection();
TopicSession tSession =tConn.createTopicSession(false, QueueSession.AUTO_ACKNOWLEDGE);
Topic topic = (Topic) ic.lookup(topicObjectName);
TopicPublisher publisher = tSession.createPublisher(topic);
publisher.setDeliveryMode(DeliveryMode.PERSISTENT);
TextMessage textMessage =(TextMessage)
tSession.createTextMessage();
textMessage.setText(message);
publisher.publish(textMessage);
System.out.println("Posted Topic");
}
I am getting :
javax.jms.JMSException: MQJMS3036: Broker side message selection valid only when using MQSI broker
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:530)
at com.ibm.mq.jms.MQTopicConnectionFactory.createDirectTopicConnection(MQTopicConnectionFactory.java:506)
at com.ibm.mq.jms.MQTopicConnectionFactory.createDirectTopicConnection(MQTopicConnectionFactory.java:461)
at com.ibm.mq.jms.MQTopicConnectionFactory.createTopicConnection(MQTopicConnectionFactory.java:216)
at com.anoop.learnmq.Publisher.main(Publisher.java:61)
I have no idea what i am doing wrong or what I am missing out on ..
I found out the solution myself .. was using an older version of the mqjms jar which had the internal checks for (super.brokerVersion!=1 && ...)
The vesrion tat was coming from my TCF was 2. So the check failed.
Replaced it with newer jar.. and it works fine.
Cheers,
Anoop
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