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 » Message Id getting overwritten in MQJMS binding

Post new topic  Reply to topic
 Message Id getting overwritten in MQJMS binding « View previous topic :: View next topic » 
Author Message
mdshah7
PostPosted: Tue Sep 25, 2012 2:21 am    Post subject: Message Id getting overwritten in MQJMS binding Reply with quote

Newbie

Joined: 06 Sep 2011
Posts: 5

Hello,

I have an mdb deployed in weblogic that receives messages from MQ, reads the properties like MessageID,PutapplnName, etc from the messages through MQJMS binding and prints it. While printing the message id, it is replacing the alphabet characters with their lower case,

eg : When I put the message in the Q where the MDB is listening, the message id is 414D51204C55504C5558514D475220205012254C20142602, but once it is comsumed by the mdb and then I print it , it is getting changed to 414d51204c55504c5558514d475220205012254c20142602.. All the alphabets are getting replaced with lower case letters.

Is it an expected behaviour ? Is there anyway through which I can instruct weblogic not to overwrite this message id ?

Thanks for ur help.
Shah Alam
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Sep 25, 2012 3:07 am    Post subject: Re: Message Id getting overwritten in MQJMS binding Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

mdshah7 wrote:
414D51204C55504C5558514D475220205012254C20142602
414d51204c55504c5558514d475220205012254c20142602


That looks like HEX.... that is it goes from zero (0) to fifteen (15): 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

Probably it is just displaying differently ?! So ... it is the same byte-wise: 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f

0000, 0001, 0010, ...

Others may have better ideas
Back to top
View user's profile Send private message
mdshah7
PostPosted: Tue Sep 25, 2012 3:34 am    Post subject: Reply with quote

Newbie

Joined: 06 Sep 2011
Posts: 5

Thanks for replying..

That may be true. But is there anyway through which I can instrcut weblogic not to overwrite this message id?

Thanks again in advance..
Shah Alam
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Sep 25, 2012 4:09 am    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

mdshah7 wrote:
But is there anyway through which I can instrcut weblogic not to overwrite this message id?


If the message ID is HEX then WebLogic does not overwrite the value, since...

wikipedia wrote:
In mathematics and computer science, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a–f) to represent values ten to fifteen.

The place/tool/interface where you look just displays (the exactly same bits) but in lower-case (a b c d e f).

Thought probably you still come into conversion problems... you think you do ?
Back to top
View user's profile Send private message
mdshah7
PostPosted: Tue Sep 25, 2012 4:23 am    Post subject: Reply with quote

Newbie

Joined: 06 Sep 2011
Posts: 5

Thanks for ur reply,

To check this, I wrote a small standalone program to print the messageid. This program would use the normal MQ API to get a message and print it's corresponding Msgid. It was getting printed as CAPS..
Only when the MQJMS concept comes into picture, then the message id is getting disturbed.

BTW is there some setting in weblogic to tell it that it should not touch the MQ properties and keep it as it is ?

Thanks,
Shah Alam
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Sep 25, 2012 4:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mdshah7 wrote:
Only when the MQJMS concept comes into picture, then the message id is getting disturbed.


AFAIK it's part of the JMS standard that message id is set so no, you're pretty much done.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 25, 2012 1:28 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You need to think very carefully for a moment.

We've told you repeatedly several times that there is no meaningful difference between the value with lower case abcdef and with uppercase ABCDEF.

It does not in any way alter the value of the id at all to represent it using either set of letters or a mix of both.

If you somehow feel that you absolutely MUST have this in an UPPER case, then you can simply alter all of your print statements that output this value to use the bog standard java coding to UPPERCASE the text you give it before you print it.

Secondly, as you've just been mentioned, there's a specific aspect of the JMS messaging standard that means that all JMS implementations must do certain things when they send messages - which prevents all MQ JMS applications from being able to specify the MQMD.MessageID.

So you need to keep that fact in mind when designing MQ solutions that talk to JMS applications.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Sep 25, 2012 8:05 pm    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

Dear OP,

it is really important for you to understand that on HEX someone just needed to count from zero (0) to fifteen (15). And that he or she decided for the alphabet to represent ten (10) and eleven an up to fifteen. But he or she left it open whether to use capital letters or small ones.

I do not doubt that this can/might/may also lead to problems somehow/someday/somewhere. E.g. all of a sudden the 0...F (or 0...f) are stored with an ASCII-256 or base64... boom: a is not A, b is not B.

As mqjeff suggests you may e.g. use the uppercase-function then.

Make sure you understand what happens (on bits (0 and 1) level) and that you are aware of the codepage/charset (currently applied to these bits), encoding (big or little endian) or if other means of bits-representation (e.g. HEX, BLOB, base64) are currently chosen/applied and potentially conversions between those (and where they happen).
Back to top
View user's profile Send private message
mdshah7
PostPosted: Tue Sep 25, 2012 11:30 pm    Post subject: Reply with quote

Newbie

Joined: 06 Sep 2011
Posts: 5

ok guys ! Many thanks for your help..
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 » Message Id getting overwritten in MQJMS binding
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.