class JmsRealmFactory {

	public String getFirstDatasourceJmsRealm() {
		Iterator<String> it = getRegisteredRealmNames();
		while (it.hasNext()) {
			String jr = (String) it.next();
			if (StringUtils.isNotEmpty(getJmsRealm(jr).getDatasourceName())) {
				return jr;
			}
		}
		return null;
	}

	private  JmsRealmFactory();

}