Author |
Message
|
meetgaurav |
Posted: Wed Oct 21, 2009 3:43 am Post subject: MQ encoding of messages |
|
|
Voyager
Joined: 08 Sep 2008 Posts: 94
|
Hi
I have a MDB service deployed in OC4J picking messages from a MQ. Currently we are planning to deploy the service for different regions. An also we have different languages.
In C language we use Ccs Id and pass it in read options to read a message in specific encoding format. But in case of MDB how to do the same. Please help us. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 21, 2009 10:47 am Post subject: Re: MQ encoding of messages |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
meetgaurav wrote: |
Hi
I have a MDB service deployed in OC4J picking messages from a MQ. Currently we are planning to deploy the service for different regions. An also we have different languages.
In C language we use Ccs Id and pass it in read options to read a message in specific encoding format. But in case of MDB how to do the same. Please help us. |
In JMS you set the CCSID on the queue connection factory. If you receive a TextMessage it will be translated to the CCSID of the connection factory.
If you do not set the CCSID of the cf the default CCSID of the client platform will be used.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
meetgaurav |
Posted: Wed Oct 21, 2009 10:00 pm Post subject: |
|
|
Voyager
Joined: 08 Sep 2008 Posts: 94
|
FJB_Saper,
This is fine while the MDB is replying the response message, since we creating the connection factory.
But for incoming we are not creating any connection factory. Simply receiving the messages in OnMessage(Message msg) method of the MDB.
Is their anyway to encode the message after receiving in Onmessage() method ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Oct 22, 2009 5:14 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And how please do you deploy an MDB without a Connection Factory?
It is in the MDB port setup that you reference a queue/topic and a connection factory, right?
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
meetgaurav |
Posted: Fri Oct 23, 2009 3:51 am Post subject: |
|
|
Voyager
Joined: 08 Sep 2008 Posts: 94
|
Got it. You mean while creating the bindings I need to set it rite ?
Something like
def qcf(queue.connection.factory) QMANAGER(queue.manager) TRANSPORT(client) HOSTNAME(127.0.0.1) CHANNEL(MY.CLIENT) PORT(1414) CCSID(819)
def Q(MY_QUEUE) QUEUE(MY_QUEUE) QMANAGER(queue.manager) TARGCLIENT(JMS) PERSISTENCE(PERS) CCSID(819) |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 23, 2009 6:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Exactly although as you are working in java 1208 would my preferred CCSID over 819...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|