| Author | Message | 
		
		  | pcelari | 
			  
				|  Posted: Wed Jul 03, 2019 7:12 am    Post subject: Does .Net MQClient use CCDT file? |   |  | 
		
		  | Chevalier
 
 
 Joined: 31 Mar 2006Posts: 411
 Location: New York
 
 | 
			  
				| Greetings. 
 a .Net client application needs to connect to our clustered qmgrs. I already setup workload balancing across two qmgrs, and send the client a CCDT file that encapsulate the internal configuration that involves two qmgrs with different IPs and port. But the client insisted that I provide the host ip and port as ".Net doesn't use CCDT file."
 
 Is this true? It sounds counter-intuitive as I'll have to expose my internal settings to the external client.
 
 The MQ document about .Net support seems not to state this matter clearly.
 
 Would an .Net expert share some insight and clarification?
 
 thanks a lot!
 _________________
 pcelari
 -----------------------------------------
 - a master of always being a newbie
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Wed Jul 03, 2019 7:20 am    Post subject: Re: Does .Net MQClient use CCDT file? |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| pcelari wrote: |  
	| The MQ document about .Net support seems not to state this matter clearly. 
 Would an .Net expert share some insight and clarification?
 |  
 I am not now nor have I ever been a .NET expert (though it is better than my Java).
 
 I asked Mr. Google about "defining CCDT to .NET" and he suggested this as the first hit. I observed these as points 7 - 9:
 
 
 
   
	| Quote: |  
	| The client channel definition table (CCDT). The location of the CCDT is specified in the .NET application configuration file (applies to managed connections only)
 The client channel definition table (CCDT). The location of the CCDT is specified using the environment variables MQCHLIB and MQCHLTAB
 The client channel definition table (CCDT). The location of the CCDT is specified using the client configuration file
 
 |  
 This seems to be to state fairly clearly that there are 6 things .NET tries before it uses a CCDT.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | pcelari | 
			  
				|  Posted: Wed Jul 03, 2019 7:26 am    Post subject: |   |  | 
		
		  | Chevalier
 
 
 Joined: 31 Mar 2006Posts: 411
 Location: New York
 
 | 
			  
				| thanks so much Vitor. 
 I was confused by the  term "managed/unmanaged" connection. should have researched a bit more before posting the question. next time...
  _________________
 pcelari
 -----------------------------------------
 - a master of always being a newbie
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Wed Jul 03, 2019 8:09 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| pcelari wrote: |  
	| I was confused by the  term "managed/unmanaged" connection. should have researched a bit more before posting the question. next time... |  
 I think it has to do with if you're using MSoft's awesome code to run the connection or if you're writing something that works understandably.
 
 Put the same CCDT in the application configuration file and the location pointed to by the environment variables. Then you're covered, unless your client is using one of points 1-6 because the message providers they're used to don't have the equivalent of a CCDT.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | St!n0 | 
			  
				|  Posted: Thu Jul 04, 2019 6:55 am    Post subject: Re: Does .Net MQClient use CCDT file? |   |  | 
		
		  | Novice
 
 
 Joined: 02 Jan 2019Posts: 14
 
 
 | 
			  
				| 
   
	| pcelari wrote: |  
	| as I'll have to expose my internal settings to the external client.
 
 |  
 this is a bit off topic but I was just wondering how giving him the ip and port is exposing your settings as this information can easily be read from the AMQCLCHL.TAB file by opening it in notepadd++.
 Sure there will be alot of unreadable content but I can easily retreive qmgrname, channel and host + port from an AMQCLCHL.TAB file. So in that thought, sending a CCDT file over or giving connection parameters is the same thing, no? Please correct me if i'm wrong.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | exerk | 
			  
				|  Posted: Thu Jul 04, 2019 8:12 am    Post subject: Re: Does .Net MQClient use CCDT file? |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 02 Nov 2006Posts: 6339
 
 
 | 
			  
				| 
   
	| St!n0 wrote: |  
	| 
   
	| pcelari wrote: |  
	| as I'll have to expose my internal settings to the external client.
 
 |  
 this is a bit off topic but I was just wondering how giving him the ip and port is exposing your settings as this information can easily be read from the AMQCLCHL.TAB file by opening it in notepadd++.
 Sure there will be alot of unreadable content but I can easily retreive qmgrname, channel and host + port from an AMQCLCHL.TAB file. So in that thought, sending a CCDT file over or giving connection parameters is the same thing, no? Please correct me if i'm wrong.
 |  The IP Address is likely to be NATted on the inside, and the queue manager name in the CCDT file can be an alias (notwithstanding that the real name can still be derived).
 _________________
 It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bruce2359 | 
			  
				|  Posted: Thu Jul 04, 2019 8:25 am    Post subject: |   |  | 
		
		  |  Poobah
 
 
 Joined: 05 Jan 2008Posts: 9486
 Location: US: west coast, almost. Otherwise, enroute.
 
 | 
			  
				| IBM's recommended CCDT practice is to create a unique CCDT with only those qmgrs that the client can/will/should connect to, and expose that unique CCDT to only those client platforms that need to do so. _________________
 I like deadlines. I like to wave as they pass by.
 ב''ה
 Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gbaddeley | 
			  
				|  Posted: Thu Jul 04, 2019 4:22 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| 
   
	| bruce2359 wrote: |  
	| IBM's recommended CCDT practice is to create a unique CCDT with only those qmgrs that the client can/will/should connect to, and expose that unique CCDT to only those client platforms that need to do so. |  Indeed. If separate CCDT files are created for each app environment (Dev, Test, Prod etc), the app can connect to the same logical qmgr name in all environments, and the associated CCDT will use the appropriate CHANNEL & CONNAME to hit the correct qmgr for the environment.
 
 If its the only app on the server, we update mqclient.ini to point to their CCDT, eg.
 
 
   
	| Code: |  
	| Channels: ChannelDefinitionDirectory=D:\MQData
 ChannelDefinitionFile=MYAPP_PROD.TAB
 |  Containing:
 
 
   
	| Code: |  
	| DEFINE CHANNEL('MYAPP.PROD.SVRCONN') CHLTYPE(CLNTCONN) REPLACE + CONNAME('mqprodsvrhost.com(1415)') QMNAME('MYAPPMQ')
 |  This basically removes all MQ config dependencies from the app, they just connect to MYAPPMQ name in their code.
 _________________
 Glenn
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | pcelari | 
			  
				|  Posted: Fri Jul 05, 2019 7:17 am    Post subject: |   |  | 
		
		  | Chevalier
 
 
 Joined: 31 Mar 2006Posts: 411
 Location: New York
 
 | 
			  
				| Thanks so much for sharing all these! 
 Although it's beyond my inclination to learn .Net, your posts have gained me enough understanding that I could guide the .Net client party a bit to use the CCDT file we provide.
 _________________
 pcelari
 -----------------------------------------
 - a master of always being a newbie
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | exerk | 
			  
				|  Posted: Sat Jul 06, 2019 12:40 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 02 Nov 2006Posts: 6339
 
 
 | 
			  
				| 
   
	| pcelari wrote: |  
	| Thanks so much for sharing all these! 
 Although it's beyond my inclination to learn .Net, your posts have gained me enough understanding that I could guide the .Net client party a bit to use the CCDT file we provide.
 |  Not forgetting that an mqclient.ini file can be used to provide a more manageable solution...
 _________________
 It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |