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 » MQJMS1013 problem

Post new topic  Reply to topic
 MQJMS1013 problem « View previous topic :: View next topic » 
Author Message
Surge
PostPosted: Mon Sep 10, 2001 8:27 am    Post subject: Reply with quote

Newbie

Joined: 09 Sep 2001
Posts: 4

Hello !
I am in very need of some help about MQSeries functioning !
I have a Java apllication. It looks up the Queue, gets QueueSender and QueueReceiver and then it sets the message listener to the receiver via setMessageListener(). The message listener implements MessageListener interface . Everything is corresponded to the documentation.
While running the application I get an exception:
"javax.jms.JMSException: MQJMS1013: operation invalid whilst session is using asynchronous delivery
"

This exception is raised in the send() method of the QueueSender instance. I can't find an explanation for MQJMS1013.
Please help !
Back to top
View user's profile Send private message Yahoo Messenger
bower5932
PostPosted: Mon Sep 17, 2001 10:53 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I just wrote a small program, and I get the same error that you do. I went out and checked one of our internal databases, and I found the following:

The program is trying to send messages and do asynchronous message listening using one active thread. This is not allowed, as the MQJMS1013 message states. The program should instantiate two different Sessions - one for asynchronous delivery and one for non-asynchronous work, like the send method.

However, when I look at the Using Java manual, it indicates under the Session object that the setMessageListener has an effect on the listening and that all forms of sending messages are supported. I'll see if I can find more detail.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Surge
PostPosted: Tue Sep 18, 2001 3:06 am    Post subject: Reply with quote

Newbie

Joined: 09 Sep 2001
Posts: 4

Thank you very much !
Could you, please, tell me where you have found the information about that "Session" issue in the documentation ? I can hardly recall the text, I think I have seen the information about this problem, but if you could tell me where you saw it, it will help me a lot in making the problem statement or showing to the others what bug I am stuck in.
I will also post your reply on several other message boards and forums, because I have seen people posting messages like "MQJMS1013 problem."
Back to top
View user's profile Send private message Yahoo Messenger
bower5932
PostPosted: Tue Sep 18, 2001 10:02 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

The comment about the Session object's setMessageListener is from the JMS interfaces and classes chapter of the Using Java manual.

I also asked around and was pointed to a comment that explains your problem. It is in the Writing MQ JMS Programs chapter under a section titled Asynchronous Delivery. It states:

Use of asynchronous delivery with a QueueReceiver marks the entire session as asynchronous. It is an error to make an explicit call to the receive methods of a QueueReceiver that is associated with a Session that is using asynchronous delivery.

So, once you setMessageListener, you disabled your ability to send syncronously and you are getting the MQJSM1013 error. Hope this helps to explain.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
EddieA
PostPosted: Wed Sep 19, 2001 5:12 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

There's also the following comments in one of the samples provided (PTPSample02):

// Now that we have stopped sending messages, we can start the
// connection. This also starts asynchronous receive on
// the session - it would be illegal to send a message while
// asynchronous receive was active on the same session.

Cheers.

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Surge
PostPosted: Wed Sep 19, 2001 5:13 am    Post subject: Reply with quote

Newbie

Joined: 09 Sep 2001
Posts: 4

First, thank you again for info. I compiled a new test app where I just added another Session object and made QueueSender and QueueListener in separate sessions. And test worked, messages went to MessageListener and no exception was raised.

I found the comment you pointed at while working before my desperate post . But I don't use receive() method. Maybe the comment goes deeper than I think, but - people who posted on another forum got this exception IN THE SAMPLES ! (ChatApp from the book or site, I also downloaded it once). Also I need a deeper understanding of Java and synchronization, but - another one - why did this test function with FioranoMQ JMS ? I think there is some problem witn MQSeries JMS realisation...


Back to top
View user's profile Send private message Yahoo Messenger
Surge
PostPosted: Wed Sep 19, 2001 5:24 am    Post subject: Reply with quote

Newbie

Joined: 09 Sep 2001
Posts: 4

While answering to bower5932 post I didn't notice a post from EddieA
Thank you all guys ! I have found the example and comments about async receive.
Back to top
View user's profile Send private message Yahoo Messenger
zasel
PostPosted: Tue Jul 23, 2002 9:17 am    Post subject: MQJMS1013: Reply with quote

Newbie

Joined: 23 Jul 2002
Posts: 1

So, what to do?
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 » MQJMS1013 problem
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.