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 » General IBM MQ Support » Connection stop problem

Post new topic  Reply to topic Goto page 1, 2  Next
 Connection stop problem « View previous topic :: View next topic » 
Author Message
deb
PostPosted: Wed Jul 18, 2007 12:55 am    Post subject: Connection stop problem Reply with quote

Novice

Joined: 18 Jul 2007
Posts: 18
Location: Germany

Hello,

I am using MQSeris 5.3 (AIX) with Weblogic 8.1 (Windows XP)

My problem is whenever i start a connection as below:

##############################################
Context context = new InitialContext();
QueueConnectionFactory queueFactory = (QueueConnectionFactory) context.lookup("MyConnectionFactory");
QueueConnection queueConnection = queueFactory.createQueueConnection();
QueueSession queueSession = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
Queue queue = (Queue) context.lookup("MyQueue");
QueueReceiver queueReceiver = queueSession.createReceiver(queue);
queueReceiver.setMessageListener(this);
queueConnection.start();

##############################################

A new connection is created and i can see a new process in created
in the AIX machine where my MQSeries is installed as below:

mqm 2457784 393348 0 15:41:04 - 0:00 amqcrsta -m MyQmanager

But when i try to stop the connection as below:

##############################################
try {
queueSession.commit();
queueConnection.stop();
} finally {
queueConnection = null;
}

##############################################

The connection seem to stop on the client side as messages are not
received from the queue after that. But the below process continues
to live on the MQSeries installed server:

mqm 2457784 393348 0 15:41:04 - 0:00 amqcrsta -m MyQmanager

As a result of which whenever i do a start and stop a new process is
created and continues to live. This is creating problem for me as because
of this it exceeds the maximum connection allowed from the MQSeries which i have configured to be 1000 in the qm.ini file.


Any help or suggestion would be greatly appreciated.

Many thanks in advance.

Deb
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 18, 2007 1:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Which version of v5.3 are you using? Are you using connection pooling in Weblogic, and if so how is it configured?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deb
PostPosted: Wed Jul 18, 2007 1:17 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2007
Posts: 18
Location: Germany

Hello,

I am using IBM WebSphere MQ for AIX, Version 5.3

No i am not using connection pooling in weblogic.


Regards
Deb
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 18, 2007 1:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

deb wrote:
I am using IBM WebSphere MQ for AIX, Version 5.3


Apologies for being inexplicit. What CSD is it patched to?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deb
PostPosted: Wed Jul 18, 2007 1:30 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2007
Posts: 18
Location: Germany

It is Fix Pack 10 (CSD10)

Regards
Deb
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 18, 2007 2:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Right - before we start, understand Java is not my thing. Advice should be viewed with that clearly understood. Especially if you think I'm talking rubbish, because I may well be.

From that, why are you using the stop method of the queueConnection rather than the close method? Doesn't stop just stop the data while some kind of Java recovery cleanup thing happens, so you can use start to resume the flow? Don't you need to use close to terminate the link and release the resources, stopping the process?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deb
PostPosted: Wed Jul 18, 2007 2:46 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2007
Posts: 18
Location: Germany

I don't disagree with you, yes there is a stop and a close method and i have used both, but i still have the same problem even when i use the
close method.

Regards

Deb
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 18, 2007 3:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Then you've either found a bug, which may require a more recent CSD (always a good idea when you're using Java) or you need someone who knows more about the queueConnection object than I do.

Such a person will not be hard to find in here.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deb
PostPosted: Wed Jul 18, 2007 4:21 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2007
Posts: 18
Location: Germany

Ok let say this is a Java issue as JMS is not able to terminate the below
process:

mqm 2457784 393348 0 15:41:04 - 0:00 amqcrsta -m MyQmanager

But is there a way to find any unused connection and eliminate these
amqcrsta -m MyQmanager processes started by inetd.


Regards
Deb
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 18, 2007 4:29 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Firstly, you shouldn't still be using inetd. It's been replaced with runmqlsr, and this could be a source of your problem.

http://www-304.ibm.com/jct09002c/isv/tech/faq/individual.jsp?oid=1:81789

Secondly, try this:

http://www-304.ibm.com/jct09002c/isv/tech/faq/individual.jsp?oid=1:79687
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jul 18, 2007 4:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I would look for bugs in the version of WebLogic you're using.

It should be creating and storing only a few (equal to the connection pool size) channels, and passing those to your JMS code.

I seem to remember some old posts in the Java/JMS forum here about some weblogic bugs.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 18, 2007 4:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Vitor wrote:

Are you using connection pooling in Weblogic, and if so how is it configured?


deb wrote:

No i am not using connection pooling in weblogic.


jefflowrey wrote:

It should be creating and storing only a few (equal to the connection pool size) channels, and passing those to your JMS code.



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deb
PostPosted: Wed Jul 18, 2007 4:46 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2007
Posts: 18
Location: Germany

Thanks Victor,
the links u provided does answer one of my question regarding the
unused process. Also i will use runmqlsr instead of inetd. Some of my
analysis regarding this issue now cleared that the problem is not on
MQSeries side but on the JMS client.

@jefflowrey,

Somewhere i read that if we call the connection close() method
inside the onMessage method of the listener class it hangs, After
analysys i found that this is happening in my case, the close method
hangs and the connection is never closed. Is there a fix to this so that
the close() method is successfully executed.
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Wed Jul 18, 2007 4:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

deb wrote:
Somewhere i read that if we call the connection close() method inside the onMessage method of the listener class it hangs, After
analysys i found that this is happening in my case, the close method
hangs and the connection is never closed. Is there a fix to this so that
the close() method is successfully executed.


I said you should be using the close method! Yay me!

You should try moving to the latest CSD. It's always a valid strategy, especially with MQ/Java problems.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
deb
PostPosted: Wed Jul 18, 2007 5:02 am    Post subject: Reply with quote

Novice

Joined: 18 Jul 2007
Posts: 18
Location: Germany

Vitor,

As i said the problem is not on the MQSeries side, its on the JMS side.
However when u are using a local JMS connection factory in weblogic
you have a checkbox in the console "Allow Close In On Message" and this
makes the close() method not to hang when called inside onMessage
method of the listener, but the same is not available in case of a weblogic
Foreign JMS server configuration for MQSeries and right now this is the
problem!!!
Where do i configure "Allow Close In On Message" for MQSeries in the JMS
client.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » Connection stop 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.