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 » JMS message Impl in MQSeries 5.2

Post new topic  Reply to topic
 JMS message Impl in MQSeries 5.2 « View previous topic :: View next topic » 
Author Message
gkorodi
PostPosted: Sun Sep 28, 2003 4:04 pm    Post subject: JMS message Impl in MQSeries 5.2 Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
bower5932
PostPosted: Mon Sep 29, 2003 10:42 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
gkorodi
PostPosted: Tue Sep 30, 2003 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Tue Sep 30, 2003 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS message Impl in MQSeries 5.2
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.