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 » How to stop server connection channel if it is idle

Post new topic  Reply to topic
 How to stop server connection channel if it is idle « View previous topic :: View next topic » 
Author Message
vanimireddys
PostPosted: Mon Oct 18, 2010 12:03 pm    Post subject: How to stop server connection channel if it is idle Reply with quote

Newbie

Joined: 04 Oct 2010
Posts: 5

Hi,

I have a java application which connects to QueueManager and puts message in queue. After putting the message in queue I am closing the connection. After waiting for some time when no messages are available to put into queue I need to stop the server connection channel.

I have tried with PCF command to modify channel with KeepAliveInterval and HeartBeat, I am not ableto get what I am expecting.

Please help me how to stop the server connection channel, if the application is not using the channel for very long time.

Thanks in advance
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 18, 2010 12:55 pm    Post subject: Re: How to stop server connection channel if it is idle Reply with quote

Grand High Poobah

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

vanimireddys wrote:
I have tried with PCF command to modify channel with KeepAliveInterval and HeartBeat, I am not ableto get what I am expecting.


What are you expecting? More importantly what are you seeing that has led you to believe you need to do this? A svrconn channel should stop after a period of inactivity automatically.

Thought of course the status won't be stopped. But you knew that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Oct 19, 2010 2:43 pm    Post subject: Re: How to stop server connection channel if it is idle Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

vanimireddys wrote:
Hi,

I have a java application which connects to QueueManager and puts message in queue. After putting the message in queue I am closing the connection. After waiting for some time when no messages are available to put into queue I need to stop the server connection channel.

I have tried with PCF command to modify channel with KeepAliveInterval and HeartBeat, I am not ableto get what I am expecting.

Please help me how to stop the server connection channel, if the application is not using the channel for very long time.

Thanks in advance


If the channel is still running after you have finished putting messages it appears that you are not actually disconnecting correctly in your application. Make sure you are CLOSING the queue and DISCONNECTING from the queue manager.
_________________
Glenn
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Oct 19, 2010 2:46 pm    Post subject: Re: How to stop server connection channel if it is idle Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

Vitor wrote:
A svrconn channel should stop after a period of inactivity automatically.


You mean the svrconn connection will be cleaned up automatically after a period if the client end has died (did not disconnect cleanly for some reason) ?

If the client end is still active (connected), a svrconn will stay running indefinitely.
_________________
Glenn
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 19, 2010 4:56 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And even if a client app has issued a specific disconnect() or otherwise disposed of a connection object, a JVM may actually keep the connection open and lying around for a while "just in case".

At least for as long as the JVM itself is alive.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Tue Oct 19, 2010 9:36 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

in addition, svrconn chzannels are sometimes shared between several applications. make sure that no other application is using this channel if you still see it "running" although you already disconnected.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
vanimireddys
PostPosted: Wed Oct 20, 2010 12:17 pm    Post subject: How to stop server connection channel if it is idle Reply with quote

Newbie

Joined: 04 Oct 2010
Posts: 5

I have standalone application that is using connection pooling implemented using commons-pool-1.3.jar. After putting the message the connection is returned to the pool. Now I got requirement to kill the entire pool if atleast one connection is not used for specific period of time.

I thought of killing the server connection channel, if no connection is used for specific time.

Please let me know options available to achive this.

Thanks in advance.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 20, 2010 12:21 pm    Post subject: Re: How to stop server connection channel if it is idle Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

vanimireddys wrote:
I have standalone application that is using connection pooling implemented using commons-pool-1.3.jar. After putting the message the connection is returned to the pool. Now I got requirement to kill the entire pool if atleast one connection is not used for specific period of time.

I thought of killing the server connection channel, if no connection is used for specific time.

Please let me know options available to achive this.

Thanks in advance.


You need to implement that at the pool level. Make sure to set min connections in pool to 0.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to stop server connection channel if it is idle
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.