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 API Support » message Id byte array changing

Post new topic  Reply to topic
 message Id byte array changing « View previous topic :: View next topic » 
Author Message
gss4u
PostPosted: Thu Jun 09, 2005 11:45 pm    Post subject: message Id byte array changing Reply with quote

Newbie

Joined: 20 May 2005
Posts: 9

In java, i am retrieving the messages from queue and storing the messages in the hashmap with messageid(byte []) as key and message string as value. Now when i retrieve message id back...and try to seach the message with the message id given as matchoptions then i am getting the 2033 error(ie. no messag found) when i conver the byte array to string to see the message id string... i found that string while storing to the hashmap is different from what i get back from the hashmap.... please help
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jun 10, 2005 3:30 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It is somewhat likely that Hashmap calls toString on the object it's given as a key.

This will hose up your messageID from an MQ perspective.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 10, 2005 7:47 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

This really depends on the methods you use to setup your hashmap.

A) do use put(object, object)
b) do use get(object)

And DO NOT USE any strings as representation of a byte[] unless it is the hex representation of every byte in the array...

Enjoy
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 API Support » message Id byte array changing
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.