public static String getPrimaryGatewaySenderMember(JMX jmx)
	{
		String objectNamePattern = "GemFire:service=GatewaySender,gatewaySender=REMOTE,type=Member,member=*";

		Collection<ObjectName> objectNames =  jmx.searchObjectNames(objectNamePattern);
		if(objectNames == null)
			return null;
		
		GatewaySenderMXBean bean = null;
		GatewaySenderMXBean primarySender = null;
		ObjectName primaryObjectName = null;
		for (ObjectName objectName : objectNames)
		{
			
			bean = jmx.newBean(GatewaySenderMXBean.class, objectName);
			
			if(bean.isPrimary())
			{
				primarySender = bean;
				primaryObjectName = objectName;
				break;	
			}
		}
		
		if(primarySender == null)
			return null;
		
		return primaryObjectName.getKeyProperty("member");
	}
public static String getPrimaryGatewaySenderMember ( JMX jmx ) { String objectNamePattern = "GemFire:service=GatewaySender,gatewaySender=REMOTE,type=Member,member=*" ; Collection < ObjectName > objectNames = jmx . searchObjectNames ( objectNamePattern ) ; if ( objectNames == null ) return null ; GatewaySenderMXBean bean = null ; GatewaySenderMXBean primarySender = null ; ObjectName primaryObjectName = null ; for ( ObjectName objectName : objectNames ) { bean = jmx . newBean ( GatewaySenderMXBean . class , objectName ) ; if ( bean . isPrimary ( ) ) { primarySender = bean ; primaryObjectName = objectName ; break ; } } if ( primarySender == null ) return null ; return primaryObjectName . getKeyProperty ( "member" ) ; }
@param jmx the JMX connection
@return the string containing the