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 » SVRCONN channel increased while calling JAVA client

Post new topic  Reply to topic
 SVRCONN channel increased while calling JAVA client « View previous topic :: View next topic » 
Author Message
peterw686
PostPosted: Fri Mar 05, 2004 11:24 am    Post subject: SVRCONN channel increased while calling JAVA client Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Hi All,

I don't know if this is a problem or nature of MQ.

I write a java client program to send a message to the queue. I realize that every time I call the program to send one message, on the queue manager it creates a new SVRCONN channel and the status is "running".

In my code, I already put finally{} to close the connection.

Code:
finally{
      logger.info("send() end <<<<<<<<<<<<<<<<<<<<");
      try{
        // close the queue
        if( queue != null ){
          System.out.println("Close Queue");
          queue.close();
          queue = null;
        }

        // disconnect from the queue manager
        if( mqManager != null ){
          mqManager.close();
          System.out.println("Close QM");
          mqManager = null;
        }
        }catch(MQException mqe){}
    }


My questions are:
1. Is something wrong with this code? If not, why the channel instance will not disappear after close the connection?
2. Is there a limit for how many channel instances one queue manager have?

Thanks in advanced.
Peter
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Mar 05, 2004 11:34 am    Post subject: Reply with quote

Jedi

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

1.
Quote:
mqManager.close();

Shouldn't that be:
Code:
mqManager.disconnect();


2. MaxActiveChannels

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
peterw686
PostPosted: Fri Mar 05, 2004 11:41 am    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Thanks Eddie.

Two more stupid questions:
1. what's the difference between qmanager.close() and qmanager.disconnect();

2. how to check the MaxActiveChannels? Is there is MQSC command?
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Mar 05, 2004 11:52 am    Post subject: Reply with quote

Jedi

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

1. I'm not really a Java programmer (it's what I drink when I used to write assembler ), but I'm going to guess it's intended for other classes derived from MQManagedObject, like MQQueue, but not MQQueueManager. But, any Java programmers out there can feel free to shoot me down in flames. (Pulls on Nomex underwear. )

2. http://www.mqseries.net/phpBB2/viewtopic.php?t=13691&highlight=maxactivechannels

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
peterw686
PostPosted: Fri Mar 05, 2004 12:25 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2002
Posts: 73

Hi Eddie,

1. You are right, the disconnect() works

2. I checked the MQ setup on the unix box and could not find that setting in ini. Do you know what's the default value?
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Mar 05, 2004 3:24 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

The Java manual does not list .close as a valid method for the MQQueueManager object.
_________________
Peter Potkay
Keep Calm and MQ On
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 » SVRCONN channel increased while calling JAVA client
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.