public static synchronized JMX reconnectJMX(String locatorHost, int locatorPort) {
    """
	Connect/Reconnect to a locator host/port
	@param locatorHost the locator host
	@param locatorPort the locator port
	@return the JMX connection
    """
			
		try
		{

				ClientCache cache = null;
				
				cache = ClientCacheFactory.getAnyInstance();
					
				if(cache != null && !cache.isClosed())
				{
						cache.close();
				}
				
				
		}
		catch (Exception e)
		{
				System.out.println("Cache was closed");
		}
		
		if(jmx != null)
		{
			
			jmx.dispose();
			jmx = null;
		}
			
		SingletonGemFireJmx.setLocatorJmxHost(locatorHost);
		SingletonGemFireJmx.setLocatorPort(locatorPort);
			
		return getJmx();
	}
public static synchronized JMX reconnectJMX(String locatorHost, int locatorPort)
	{
			
		try
		{

				ClientCache cache = null;
				
				cache = ClientCacheFactory.getAnyInstance();
					
				if(cache != null && !cache.isClosed())
				{
						cache.close();
				}
				
				
		}
		catch (Exception e)
		{
				System.out.println("Cache was closed");
		}
		
		if(jmx != null)
		{
			
			jmx.dispose();
			jmx = null;
		}
			
		SingletonGemFireJmx.setLocatorJmxHost(locatorHost);
		SingletonGemFireJmx.setLocatorPort(locatorPort);
			
		return getJmx();
	}
public static synchronized JMX reconnectJMX ( String locatorHost , int locatorPort ) { try { ClientCache cache = null ; cache = ClientCacheFactory . getAnyInstance ( ) ; if ( cache != null && ! cache . isClosed ( ) ) { cache . close ( ) ; } } catch ( Exception e ) { System . out . println ( "Cache was closed" ) ; } if ( jmx != null ) { jmx . dispose ( ) ; jmx = null ; } SingletonGemFireJmx . setLocatorJmxHost ( locatorHost ) ; SingletonGemFireJmx . setLocatorPort ( locatorPort ) ; return getJmx ( ) ; }
Connect/Reconnect to a locator host/port
@param locatorHost the locator host
@param locatorPort the locator port
@return the JMX connection
Connect / Reconnect to a locator host / port