//Extension reauthPlugin = null;
Boolean backgroundValidation = Defaults.BACKGROUND_VALIDATION;
Long backgroundValidationMillis = null;
Boolean useFastFail = Defaults.USE_FAST_FAIL;
Extension validConnectionChecker = null;
String checkValidConnectionSql = null;
Boolean validateOnMatch = Defaults.VALIDATE_ON_MATCH;
Extension staleConnectionChecker = null;
Extension exceptionSorter = null;
Boolean useStrictMin = Defaults.USE_STRICT_MIN;
FlushStrategy flushStrategy = Defaults.FLUSH_STRATEGY;
Boolean isSameRmOverride = Defaults.IS_SAME_RM_OVERRIDE;
Boolean interleaving = Defaults.INTERLEAVING;
Boolean padXid = Defaults.PAD_XID;
Boolean wrapXaDataSource = Defaults.WRAP_XA_RESOURCE;
Boolean noTxSeparatePool = Defaults.NO_TX_SEPARATE_POOL;
String recoveryUsername = null;
String recoveryPassword = null;
Boolean noRecovery = Defaults.NO_RECOVERY;
//elements reading
while (reader.hasNext())
{
switch (reader.nextTag())
{
case END_ELEMENT : {
if (DataSources.Tag.forName(reader.getLocalName()) == DataSources.Tag.XA_DATASOURCE)
{
LegacyXaDataSourceImp xaDsImpl = new LegacyXaDataSourceImp(xaDataSourceClass,
driver, transactionIsolation, xaDataSourceProperty);
xaDsImpl.buildTimeOut(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetry,
allocationRetryWaitMillis, xaResourceTimeout, setTxQueryTimeout, queryTimeout, useTryLock);
xaDsImpl.buildDsSecurity(userName, password, securityDomain, null);
xaDsImpl.buildStatement(sharePreparedStatements, preparedStatementsCacheSize, trackStatements);
xaDsImpl.buildValidation(backgroundValidation, backgroundValidationMillis, useFastFail,
validConnectionChecker, checkValidConnectionSql, validateOnMatch, staleConnectionChecker,
exceptionSorter);
xaDsImpl.buildCommonPool(minPoolSize, minPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy,
isSameRmOverride, interleaving, padXid, wrapXaDataSource, noTxSeparatePool);
xaDsImpl.buildRecovery(recoveryUsername, recoveryPassword, noRecovery);
xaDsImpl.buildOther(urlDelimiter, urlSelectorStrategyClassName, newConnectionSql, useJavaContext,
poolName, enabled, jndiName, spy, useCcm, jta);
xaDsImpl.buildXaDataSourceImpl();
return xaDsImpl;
}
else
{
if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.UNKNOWN)
{
throw new UnknownTagException(reader.getLocalName());
}
}
break;
}
case START_ELEMENT : {
switch (XaDataSource.Tag.forName(reader.getLocalName()))
{
case SECURITY_DOMAIN :
case SECURITY_DOMAIN_AND_APPLICATION : {
securityDomain = elementAsString(reader);
userName = null;
break;
}
case XA_DATASOURCE_PROPERTY : {
xaDataSourceProperty.put(attributeAsString(reader, "name"), elementAsString(reader));
break;
}
case XA_DATASOURCE_CLASS : {
xaDataSourceClass = elementAsString(reader);
break;
}
case NEW_CONNECTION_SQL : {
newConnectionSql = elementAsString(reader);
break;
}
case URL_DELIMITER : {
urlDelimiter = elementAsString(reader);
break;
}
case URL_SELECTOR_STRATEGY_CLASS_NAME : {
urlSelectorStrategyClassName = elementAsString(reader);
break;
}
case TRANSACTION_ISOLATION : {
transactionIsolation = TransactionIsolation.valueOf(elementAsString(reader));
break;
}
case INTERLEAVING : {
interleaving = elementAsBoolean(reader);
break;
}
case IS_SAME_RM_OVERRIDE : {
isSameRmOverride = elementAsBoolean(reader);
break;
}
case NO_TX_SEPARATE_POOLS : {
noTxSeparatePool = elementAsBoolean(reader);
break;
}
case PAD_XID : {
padXid = elementAsBoolean(reader);
break;
}
case WRAP_XA_RESOURCE : {
wrapXaDataSource = elementAsBoolean(reader);
break;
}
case TRACK_CONNECTION_BY_TX : {
interleaving = false;
break;
}
case VALID_CONNECTION_CHECKER : {
String classname = elementAsString(reader);
validConnectionChecker = new Extension(classname, null);
break;
}
case EXCEPTION_SORTER : {
String classname = elementAsString(reader);
exceptionSorter = new Extension(classname, null);
break;
}
case STALE_CONNECTION_CHECKER : {
String classname = elementAsString(reader);
staleConnectionChecker = new Extension(classname, null);
break;
}
case JNDI_NAME : {
poolName = elementAsString(reader);