Author |
Message
|
steveforduk |
Posted: Sun Apr 29, 2007 7:23 am Post subject: Can I stop JMS setting GMO_CONVERT? |
|
|
Newbie
Joined: 28 Apr 2007 Posts: 2
|
Hi.
First, let me just say that I'm an expert in neither MQ nor Java/JMS!
We're trying to configure a MDB on Webogic 9.2 to communicate with MQ using the 5.3 MQ client.
We can connect ok but when the MDB tries to read a message (ie calls MQGET) we get a 2046 reason code in the trace file. It appears that the reason for this is that GMO_CONVERT is being set. The owner of the queue (effectively our customer) advises us not to set GMO_CONVERT as they 'do not support it'. They can see, on the server side of the connection, GMO_CONVERT having been set yet AFAIK we're doing nothing directly that would cause it to be set.
A simple java program (not JMS) works fine but when I set GMO_CONVERT it returns a 2046 just like our MDB.
I read something on a different forum that suggested that MQ JMS 'always sets GMO_CONVERT'.
Does anyone know if this indeed the case?
Can anyone suggest a way that we can get around this and successfully read from MQ using our MDB and JMS WITHOUT setting GMO_CONVERT?
As above, we're using a MDB for this and thus are not directly writing code to make the connection, get messages etc...
Thanks for your help.
Steve. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Apr 29, 2007 8:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I really don't understand what your customer is trying to tell you.
Presumably, they're trying to tell you that the data in their messages is not String data - so probably that means you need to process it as a BytesMessage and not a TextMessage.
What is the contents of the MQMD.Format field of a message when it's sitting on the queue? (you can use amqsbcg or amqsbcgc to non-destructively view the messages on the queue). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
steveforduk |
Posted: Sun Apr 29, 2007 9:06 am Post subject: |
|
|
Newbie
Joined: 28 Apr 2007 Posts: 2
|
I get a 2009 error (from MQGET) when I try browsing the queue using amqsbcgc.
The advice we're given is that we should not use the MQGMO Translation option and do not need to as messages are already converted to the agreed format of UTF-8.
We have also successfully read the queue from another simple Java app (MQRead) that explicitly sets the GMO options. Sure enough when I set GMO_CONVERT, it stop working with a 2046 error. |
|
Back to top |
|
 |
Vitor |
Posted: Sun Apr 29, 2007 10:28 am Post subject: Re: Can I stop JMS setting GMO_CONVERT? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
steveforduk wrote: |
The owner of the queue (effectively our customer) advises us not to set GMO_CONVERT as they 'do not support it'. |
If the message does not need / want conversion, it should be PUT with a format of MQFMT_NONE (or however you spell it).
steveforduk wrote: |
They can see, on the server side of the connection, GMO_CONVERT having been set |
Using what? A crystal ball? How do you see the options an application is using on GET via the connection??
(I am not now nor have I ever been a Java person, but am intertested to know how that would be possible) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Sun Apr 29, 2007 11:39 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
All MQI calls actually execute on the queue manager and it is quite easy to examine the client MQI options using a tracing facility either via the API crossing exit or using a TCP trace. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Apr 29, 2007 12:15 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
steveforduk wrote: |
I get a 2009 error (from MQGET) when I try browsing the queue using amqsbcgc. |
So that's a different problem than the 2046.
You need to get more straight answers from the customer. What is the actual contents of the message, what are the actual reasons they recommend against MQGMO_CONVERT, what is really going on.
You can also look at using client side MQ tracing.
I'm also very unclear how you could get a 2046 with JMS. It should not be possible for JMS to produce a set of MQ options that are not valid in combination. I suppose it's possible that adding a CONVERT(YES) to a SVRCONN might cause this - but it seems very unlikely. You should instead get a 2110 MQRC_NOT_CONVERTED. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Apr 30, 2007 9:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
steveforduk wrote: |
I get a 2009 error (from MQGET) when I try browsing the queue using amqsbcgc.
The advice we're given is that we should not use the MQGMO Translation option and do not need to as messages are already converted to the agreed format of UTF-8.
|
HOW SO? I just hope they did not use writeUTF method of the message...
I hope you do realise that writeUTF and readUTF need to be used as a pair and as such are quite restrictive and not at all suited for JMS.
If you write the message in UTF-8 make sure to use writeString, set the format to MQFMT_STRING and set the CCSID to 1208 on the message.
This will allow you to read the message in JMS with no problem at all....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|