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 » Can I stop JMS setting GMO_CONVERT?

Post new topic  Reply to topic
 Can I stop JMS setting GMO_CONVERT? « View previous topic :: View next topic » 
Author Message
steveforduk
PostPosted: Sun Apr 29, 2007 7:23 am    Post subject: Can I stop JMS setting GMO_CONVERT? Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Sun Apr 29, 2007 8:36 am    Post subject: Reply with quote

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
View user's profile Send private message
steveforduk
PostPosted: Sun Apr 29, 2007 9:06 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Sun Apr 29, 2007 10:28 am    Post subject: Re: Can I stop JMS setting GMO_CONVERT? Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Sun Apr 29, 2007 11:39 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Sun Apr 29, 2007 12:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Apr 30, 2007 9:35 am    Post subject: Reply with quote

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
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 » Can I stop JMS setting GMO_CONVERT?
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.