Posted: Sun Jun 15, 2003 4:25 pm Post subject: application generating MQ message ID
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.
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