}
else
{
if (DataSource.Tag.forName(reader.getLocalName()) == DataSource.Tag.UNKNOWN)
{
throw new ParserException("unexpected end tag" + reader.getLocalName());
}
}
break;
}
case START_ELEMENT : {
switch (DataSource.Tag.forName(reader.getLocalName()))
{
case CONNECTIONPROPERTY : {
connectionProperties.put(attributeAsString(reader, "name"), elementAsString(reader));
break;
}
case CONNECTIONURL : {
connectionUrl = elementAsString(reader);
break;
}
case DRIVERCLASS : {
driverClass = elementAsString(reader);
break;
}
case DRIVER : {
driver = elementAsString(reader);
break;
}
case POOL : {
pool = parsePool(reader);
break;
}
case NEWCONNECTIONSQL : {
newConnectionSql = elementAsString(reader);
break;
}
case URLDELIMITER : {
urlDelimiter = elementAsString(reader);
break;
}
case URLSELECTORSTRATEGYCLASSNAME : {
urlSelectorStrategyClassName = elementAsString(reader);
break;
}
case TRANSACTIONISOLATION : {
transactionIsolation = TransactionIsolation.valueOf(elementAsString(reader));
break;
}
case SECURITY : {
securitySettings = parseDsSecurity(reader);
break;
}
case STATEMENT : {
statementSettings = parseStatementSettings(reader);
break;
}
case TIMEOUT : {
timeOutSettings = parseTimeOutSettings(reader);
break;
}
case VALIDATION : {
validationSettings = parseValidationSetting(reader);
break;
}
default :
throw new ParserException("Unexpected element:" + reader.getLocalName());
}
break;
}
}
}
throw new ParserException("Reached end of xml document unexpectedly");
}