|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem in getting msg from Queue |
« View previous topic :: View next topic » |
Author |
Message
|
kishan |
Posted: Thu Nov 14, 2002 6:16 am Post subject: Problem in getting msg from Queue |
|
|
Newbie
Joined: 28 Aug 2002 Posts: 4
|
Hi,
I am putting a msg in Queue and waiting upto 2 minutes and trying to get the reply msg back using MQ with PTP. The same is working when I am running as a stand alone program successfully.
I am executing the same class in WebSphere3.5 env using EJB's experiencing a prolbem while reading the msg with 2033 and javax.transaction.TransactionRolledback .
Statless Session Bean with trans_attr=TRANS_NOT_SUPP, wait interval on reply msg is 2 minutes, msg expiry limit while putting is 1 min.
Hoping the suggestions at the earliest and Thanking you inadvance.
*** FYI - Used Methods ***
public void sendRequest(String newMQMessage) {
try {
MQMessage mqMessage = new MQMessage();
mqMessage.messageType = MQC.MQMT_REQUEST;
mqMessage.putApplicationType = MQC.MQAT_JAVA;
mqMessage.expiry = messageExpiryInterval;
mqMessage.format = MQC.MQFMT_STRING;
mqMessage.replyToQueueManagerName = amiServerQueueManager;
mqMessage.replyToQueueName = responseAMIQueueName;
mqMessage.writeString(newMQMessage);
requestQueue.put(mqMessage);
msgId = mqMessage.messageId;
}catch (MQException mqException) {}
}
public String retrieveResponse() {
String serverResponse = null;
try {
MQMessage replyMessage = new MQMessage();
MQMessage recivedMessage = new MQMessage();
int messageLength = 0;
MQGetMessageOptions getMessageOptions=new MQGetMessageOptions();
getMessageOptions.options = MQC.MQGMO_WAIT;
getMessageOptions.waitInterval = messageTimeOutInterval;
getMessageOptions.matchOptions = MQC.MQMO_MATCH_CORREL_ID;
replyMessage.correlationId = msgId;
responseQueue.get(replyMessage, getMessageOptions);
messageLength = replyMessage.getTotalMessageLength();
serverResponse = replyMessage.readString(messageLength);
} catch (Exception Exception) {}
return serverResponse;
}
regards,
Kishan |
|
Back to top |
|
 |
mgrabinski |
Posted: Thu Nov 14, 2002 10:20 pm Post subject: |
|
|
Master
Joined: 16 Oct 2001 Posts: 246 Location: Katowice, Poland
|
2033 simply means there are no messages on your queue _________________ Marcin Grabinski <>< |
|
Back to top |
|
 |
kishan |
Posted: Fri Nov 15, 2002 2:03 am Post subject: |
|
|
Newbie
Joined: 28 Aug 2002 Posts: 4
|
HI,
I am getting the response with the same while running as a standalone program. The exception as I mentioned is only through application WebSphere3.5, Ejb, MQ series PTP.
wating for solution.
thanx
Kishan |
|
Back to top |
|
 |
mgrabinski |
Posted: Fri Nov 15, 2002 2:11 am Post subject: |
|
|
Master
Joined: 16 Oct 2001 Posts: 246 Location: Katowice, Poland
|
Do you use MQMO_MATCH_CORREL_ID in both cases? _________________ Marcin Grabinski <>< |
|
Back to top |
|
 |
mqonnet |
Posted: Fri Nov 15, 2002 6:20 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
javax.transaction.TransactionRolledback suggests that there was a transaction associated with the GET(if you got this exception after the MQGET call). From the code that you posted, it does not seem that you are using SYNCPOINT. But you might want to check that. Are you using transactions at all. And if so, who is the transaction coordinator/manager. Is it MQ or some third party tool. Try explicitly using no_syncpoint while putting and getting the messages. That would be the safest scenario at any time. Also check in debug to see if the msgid field has appropriate values prior to MQGET call. Is it possible that you issued an MQBROWSE/MQGET outside of this application, or another waited getter is active which you are not aware of. Does this happen at all times or just once.
I dont have much knowledge of the EJB and the way it is implemented. But looking at the exception and the reason code, this is what i deduce.
Hope this helps.
Cheers.
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|