{
boolean trace = log.isTraceEnabled();
if (urlSelector == null)
{
JBossStringBuilder buffer = new JBossStringBuilder();
buffer.append("Missing configuration for HA local datasource. ");
if (getConnectionURL() == null)
buffer.append("No connection-url. ");
if (urlDelimiter == null)
buffer.append("No url-delimiter. ");
throw new JBossResourceException(buffer.toString());
}
// try to get a connection as many times as many urls we have in the list
for(int i = 0; i < urlSelector.getUrlList().size(); ++i)
{