| Author | 
		  Message
		 | 
		
		  | peterw686 | 
		  
		    
			  
				 Posted: Fri Mar 05, 2004 11:24 am    Post subject: SVRCONN channel increased while calling JAVA client | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Fri Mar 05, 2004 11:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | peterw686 | 
		  
		    
			  
				 Posted: Fri Mar 05, 2004 11:41 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Fri Mar 05, 2004 11:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | peterw686 | 
		  
		    
			  
				 Posted: Fri Mar 05, 2004 12:25 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | PeterPotkay | 
		  
		    
			  
				 Posted: Fri Mar 05, 2004 3:24 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 15 May 2001 Posts: 7723
  
  | 
		  
		    
			  
				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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |