|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JMS message Impl in MQSeries 5.2 |
« View previous topic :: View next topic » |
Author |
Message
|
gkorodi |
Posted: Sun Sep 28, 2003 4:04 pm Post subject: JMS message Impl in MQSeries 5.2 |
|
|
Novice
Joined: 28 Sep 2003 Posts: 13 Location: Boston-London-Budapest
|
I am trying to use BytesMessageImpl, StreamMessageImpl or TextMessageImpl. Everything extends MessageImpl which implements javax.jms.Message. How can I avoid this method to be called in the underlying code and why is it not implemented in IBM's code?
I am using MQSeries on Solaris, v5.2 with CSD04. Where can I look up some info on this?
I get the following error on a publisher:
2003-09-28 19:45:03,802 DEBUG (JMSPublisher.java:55) - TopicSession has been established
2003-09-28 19:45:03,822 DEBUG (JMSPublisher.java:59) - Topic has been created SomeTopic
2003-09-28 19:45:03,887 DEBUG (JMSPublisher.java:62) - TopicPublisher has been created
Exception in thread "main" java.lang.NoSuchMethodError: com.ibm.jms.JMSMessage._setTimeToLive(JJ)V
at com.ibm.mq.jms.MQTopicPublisher.buildBaseMessage(MQTopicPublisher.java:975)
at com.ibm.mq.jms.MQTopicPublisher.publish(MQTopicPublisher.java:381)
at com.ibm.mq.jms.MQTopicPublisher.publish(MQTopicPublisher.java:516)
at com.statestreet.wms.ctm.JMSPublisher.<init>(JMSPublisher.java:69)
at com.statestreet.wms.ctm.JMSPublisher.main(JMSPublisher.java:168)
Ooops, the code actually is like this:
MQTopic mytopic = (MQTopic) mqtopicsession.createTopic("SomeTopic");
logger.debug("Topic has been created SomeTopic");
MQTopicPublisher mqtpub = (MQTopicPublisher) mqtopicsession.createPublisher(mytopic);
logger.debug("TopicPublisher has been created");
//create message
TextMessageImpl mm = new TextMessageImpl();
mm.setTextBody("This is a test message");
mqtpub.publish(mm);
//This is where it bums out
Much appreciated! _________________ Gabe "The Hun" Korodi |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Sep 29, 2003 10:42 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I don't think you're supposed to use *Impl classes. I believe these are classes that IBM has implemented and you are supposed to stick with the more generic classes. |
|
Back to top |
|
 |
gkorodi |
Posted: Tue Sep 30, 2003 1:16 pm Post subject: |
|
|
Novice
Joined: 28 Sep 2003 Posts: 13 Location: Boston-London-Budapest
|
Thanks for the response. I will look for other solutions within the java libraries.
Cheers, _________________ Gabe "The Hun" Korodi |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 30, 2003 1:56 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
gkorodi wrote: |
Thanks for the response. I will look for other solutions within the java libraries. |
What he's saying is that you should be using
Code: |
TextMessage mm = new TextMessage();
mm.setTextBody("This is a test message");
|
instead of
Code: |
TextMessageImpl mm = new TextMessageImpl();
mm.setTextBody("This is a test message"); |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|