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 » application generating MQ message ID

Post new topic  Reply to topic
 application generating MQ message ID « View previous topic :: View next topic » 
Author Message
ywang01
PostPosted: Sun Jun 15, 2003 4:25 pm    Post subject: application generating MQ message ID Reply with quote

Newbie

Joined: 04 Mar 2003
Posts: 3

HI MQ experts, please help.

I have the following code:
MQMessage mqMsg = new MQMessage();
mqMsg.expiry = MQC.MQWI_UNLIMITED;
mqMsg.format = MQC.MQFMT_STRING;
mqMsg.persistence = MQC.MQPER_PERSISTENCE_AS_Q_DEF;
mqMsg.backoutCount = 3;
mqMsg.writeString(msg);
BigInteger bi = new BigInteger("100000000000000000000000000000000000000000000123",16);
mqMsg.messageId = bi.toByteArray();
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options = MQC.MQPMO_FAIL_IF_QUIESCING;
putQ.put(mqMsg, pmo);
String tmp = new BigInteger(mqMsg.messageId).toString(16);
System.out.println("The msg id after sending the message is:" + tmp);

It works fine from a standalone java program. The same code was loaded into WebLogic and run within a MDB bean. This code was used to send a message using MQ native java API. The problem is that, the same code run within Weblogic, will cause MQ Series to generate new Msg ID.

Can any one shine some lights on it? Thanks a bunch.
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 » application generating MQ message ID
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.