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 » MQ Reports with JMS

Post new topic  Reply to topic
 MQ Reports with JMS « View previous topic :: View next topic » 
Author Message
petefrancis
PostPosted: Tue Jan 22, 2002 7:46 am    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2002
Posts: 6
Location: London, England

I am using a message driven bean to pick up data messages and MQSeries reports from an MQSeries queue. The data messages that I'm receiving in my MDB can be cast to TextMessage and then dealt with. The reports are arriving but I am having trouble interpreting them. I don't seem to be able to cast the MQSeries report messages or extract any data from them. How can I do this?

Thanks in advance
Peter Francis
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Tue Jan 22, 2002 8:33 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I strongly suspect that the report messages coming back may be binary. Can you dump an instance of a report message prior to it being picked up? For example using the amqsbcg sample tool or MQJExplorer?
Back to top
View user's profile Send private message
petefrancis
PostPosted: Tue Jan 22, 2002 10:16 am    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2002
Posts: 6
Location: London, England

They are just the standard MQSeries report messages that appear on the MQSeries queue. I thought that I would be able to cast it to MQMessage but that doesn't seem to have worked. Any ideas?
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Tue Jan 22, 2002 2:31 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I think were getting some wires crossed here. MDB, OnMessage and TextMessages are all components of JMS. MQMessage is a component of base MQ Java. Assuming your MDB wakes up in its MessageListener in an OnMessage callback then you already have a Message object reference. The question is ... what can you cast this to? My bet will be that only ByteMessage will be allowed.
Back to top
View user's profile Send private message
petefrancis
PostPosted: Wed Jan 23, 2002 2:44 am    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2002
Posts: 6
Location: London, England

Yeah, sorry, I'll try to be a bit clearer. The messages are being put onto MQSeries using the straight MQ API. The report options are being set as follows:

msg.report = MQC.MQRO_COA + MQC.MQRO_COD;

The reports are being generated correctly and put onto another MQSeries queue called report. I want to use an MDB to pick up these reports and process the results. Is this allowed/possible/good practice?

Some other messages are being put onto an MQSeries queue using the MQ API and being picked up by an MDB without problems. However, these are purely text and can be casted to a TextMessage inside the MDB and then processed.
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Wed Jan 23, 2002 8:08 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I see no problem with having report messages ... which are simply no more and no less than regular MQSeries messages with report information content, being read by an MDB associated to the queue into which the report messages are arriving. At the very least, the messages can be consumed as ByteMessages and "maybe" as TextMessages.
Back to top
View user's profile Send private message
petefrancis
PostPosted: Wed Jan 23, 2002 8:30 am    Post subject: Reply with quote

Newbie

Joined: 21 Jan 2002
Posts: 6
Location: London, England

Thats what I would have though but I get a CastException when I try to do a cast to any of the message types. Also when I call the getJMSType() method it returns null. If I look at the message using MQ Explorer (by turning off my MDB) it does not appear to carry any data, I think it just has header info. If an MQ report message was being consumed by the normal MQ API rather than an MDB would it an MQMessage?

Has anyone got this working?
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ Reports with JMS
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.