| Author | 
		  Message
		 | 
		
		  | firoj.badsa | 
		  
		    
			  
				 Posted: Tue May 08, 2012 9:59 am    Post subject: Ping a server from message flow | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 16 Feb 2007 Posts: 104
  
  | 
		  
		    
			  
				Hi,
 
 
Is there any way I can ping a server from WMB and get a response? Or is there any way I can check the availability of the server?
 
 
thanks in advance, | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | lancelotlinc | 
		  
		    
			  
				 Posted: Tue May 08, 2012 10:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | firoj.badsa | 
		  
		    
			  
				 Posted: Tue May 08, 2012 10:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 16 Feb 2007 Posts: 104
  
  | 
		  
		    
			  
				@lancelotlinc, could you please explain a bit how can I achieve this.   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Tue May 08, 2012 10:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				step 1: identify the mechanisms that the server provides for accepting requests to determine that it is alive.
 
step 2: identify the mechanisms that exist in Broker that are capable of using at least one of the mechanisms in step 1. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | firoj.badsa | 
		  
		    
			  
				 Posted: Tue May 08, 2012 10:19 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 16 Feb 2007 Posts: 104
  
  | 
		  
		    
			  
				step 1: I can use the ping command from AIX to check the server availability. no FTP/SFTP
 
step 2: I do not know if there is something in WMB like this. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Tue May 08, 2012 10:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				| Well, you can use the TCPIP nodes to send any kind of network request you want. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Tue May 08, 2012 10:28 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				| But what happens if the server dies just after it responds to your ping? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue May 08, 2012 10:29 am    Post subject: Re: Ping a server from message flow | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| firoj.badsa wrote: | 
   
  
	| Is there any way I can ping a server from WMB and get a response? Or is there any way I can check the availability of the server? | 
   
 
 
 
Why would you want to? What use or advantage does this give you? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | lancelotlinc | 
		  
		    
			  
				 Posted: Tue May 08, 2012 11:12 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA 
  | 
		  
		    
			  
				
   
	| firoj.badsa wrote: | 
   
  
	step 1: I can use the ping command from AIX to check the server availability. no FTP/SFTP
 
step 2: I do not know if there is something in WMB like this. | 
   
 
 
 
In a JCN, you can have the following:
 
 
   
	| Code: | 
   
  
	
 
InetAddress address =
 
InetAddress.getByName("www.somecompany_url.com");
 
qreachable =address.isReachable(1024*4);
 
if(qreachable=true) //Yes, we can !
 
else //no we cannot
 
 
 | 
   
 
 _________________ http://leanpub.com/IIB_Tips_and_Tricks
 
Save $20: Coupon Code: MQSERIES_READER | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |