@Override protected ManagedConnectionFactory createMcf(XaDataSource arg0, String arg1, ClassLoader arg2) throws NotFoundException, DeployException { final XAManagedConnectionFactory xaManagedConnectionFactory = new XAManagedConnectionFactory(xaDataSourceConfig.getXaDataSourceProperty()); if (xaDataSourceConfig.getUrlDelimiter() != null) { xaManagedConnectionFactory.setURLDelimiter(xaDataSourceConfig.getUrlDelimiter()); } if (xaDataSourceConfig.getXaDataSourceClass() != null) { xaManagedConnectionFactory.setXADataSourceClass(xaDataSourceConfig.getXaDataSourceClass()); } if (xaDataSourceConfig.getUrlSelectorStrategyClassName() != null) { xaManagedConnectionFactory .setUrlSelectorStrategyClassName(xaDataSourceConfig.getUrlSelectorStrategyClassName()); } if (xaDataSourceConfig.getXaPool() != null && xaDataSourceConfig.getXaPool().isSameRmOverride() != null) { xaManagedConnectionFactory.setIsSameRMOverrideValue(xaDataSourceConfig.getXaPool().isSameRmOverride()); } if (xaDataSourceConfig.getNewConnectionSql() != null) { xaManagedConnectionFactory.setNewConnectionSQL(xaDataSourceConfig.getNewConnectionSql()); } if (xaDataSourceConfig.getUrlSelectorStrategyClassName() != null) { xaManagedConnectionFactory .setUrlSelectorStrategyClassName(xaDataSourceConfig.getUrlSelectorStrategyClassName()); } setMcfProperties(xaManagedConnectionFactory, xaDataSourceConfig, xaDataSourceConfig.getStatement()); return xaManagedConnectionFactory; }
setStringIfNotNull(context, dataSource.getNewConnectionSql()); } else if (attributeName.equals(Constants.URL_DELIMITER.getName())) { setStringIfNotNull(context, dataSource.getUrlDelimiter()); } else if (attributeName.equals(Constants.URL_PROPERTY.getName())) { setStringIfNotNull(context, dataSource.getUrlProperty());
private ModifiableXaDataSource buildXaDataSource(XaDataSource xads) throws org.jboss.jca.common.api.validator.ValidateException { final DsXaPool xaPool; if (xads.getXaPool() == null) { xaPool = new DsXaPoolImpl(Defaults.MIN_POOL_SIZE, Defaults.INITIAL_POOL_SIZE, Defaults.MAX_POOL_SIZE, Defaults.PREFILL, Defaults.USE_STRICT_MIN, Defaults.FLUSH_STRATEGY, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING, Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL, Defaults.ALLOW_MULTIPLE_USERS, null, Defaults.FAIR, null); } else { final DsXaPool p = xads.getXaPool(); xaPool = new DsXaPoolImpl(getDef(p.getMinPoolSize(), Defaults.MIN_POOL_SIZE), getDef(p.getInitialPoolSize(), Defaults.INITIAL_POOL_SIZE), getDef(p.getMaxPoolSize(), Defaults.MAX_POOL_SIZE), getDef(p.isPrefill(), Defaults.PREFILL), getDef(p.isUseStrictMin(), Defaults.USE_STRICT_MIN), getDef(p.getFlushStrategy(), Defaults.FLUSH_STRATEGY), getDef(p.isSameRmOverride(), Defaults.IS_SAME_RM_OVERRIDE), getDef(p.isInterleaving(), Defaults.INTERLEAVING), getDef(p.isPadXid(), Defaults.PAD_XID) , getDef(p.isWrapXaResource(), Defaults.WRAP_XA_RESOURCE), getDef(p.isNoTxSeparatePool(), Defaults.NO_TX_SEPARATE_POOL), getDef(p.isAllowMultipleUsers(), Defaults.ALLOW_MULTIPLE_USERS), p.getCapacity(), getDef(p.isFair(), Defaults.FAIR), p.getConnectionListener()); } return new ModifiableXaDataSource(xads.getTransactionIsolation(), xads.getTimeOut(), xads.getSecurity(), xads.getStatement(), xads.getValidation(), xads.getUrlDelimiter(), xads.getUrlProperty(), xads.getUrlSelectorStrategyClassName(), xads.isUseJavaContext(), xads.getPoolName(), xads.isEnabled(), xads.getJndiName(), xads.isSpy(), xads.isUseCcm(), xads.isConnectable(), xads.isTracking(), xads.getMcp(), xads.isEnlistmentTrace(), xads.getXaDataSourceProperty(), xads.getXaDataSourceClass(), xads.getDriver(), xads.getNewConnectionSql(), xaPool, xads.getRecovery()); }
@Override protected ManagedConnectionFactory createMcf(XaDataSource arg0, String arg1, ClassLoader arg2) throws NotFoundException, DeployException { final XAManagedConnectionFactory xaManagedConnectionFactory = new XAManagedConnectionFactory(xaDataSourceConfig.getXaDataSourceProperty()); if (xaDataSourceConfig.getUrlDelimiter() != null) { xaManagedConnectionFactory.setURLDelimiter(xaDataSourceConfig.getUrlDelimiter()); } if (xaDataSourceConfig.getXaDataSourceClass() != null) { xaManagedConnectionFactory.setXADataSourceClass(xaDataSourceConfig.getXaDataSourceClass()); } if (xaDataSourceConfig.getUrlSelectorStrategyClassName() != null) { xaManagedConnectionFactory .setUrlSelectorStrategyClassName(xaDataSourceConfig.getUrlSelectorStrategyClassName()); } if (xaDataSourceConfig.getXaPool() != null && xaDataSourceConfig.getXaPool().isSameRmOverride() != null) { xaManagedConnectionFactory.setIsSameRMOverrideValue(xaDataSourceConfig.getXaPool().isSameRmOverride()); } if (xaDataSourceConfig.getNewConnectionSql() != null) { xaManagedConnectionFactory.setNewConnectionSQL(xaDataSourceConfig.getNewConnectionSql()); } if (xaDataSourceConfig.getUrlSelectorStrategyClassName() != null) { xaManagedConnectionFactory .setUrlSelectorStrategyClassName(xaDataSourceConfig.getUrlSelectorStrategyClassName()); } setMcfProperties(xaManagedConnectionFactory, xaDataSourceConfig, xaDataSourceConfig.getStatement()); return xaManagedConnectionFactory; }
final MyXaMCF xaManagedConnectionFactory = new MyXaMCF(); if (xaDataSourceConfig.getUrlDelimiter() != null) { xaManagedConnectionFactory.setURLDelimiter(xaDataSourceConfig.getUrlDelimiter());
setStringIfNotNull(context, dataSource.getNewConnectionSql()); } else if (attributeName.equals(Constants.URL_DELIMITER.getName())) { setStringIfNotNull(context, dataSource.getUrlDelimiter()); } else if (attributeName.equals(Constants.URL_PROPERTY.getName())) { setStringIfNotNull(context, dataSource.getUrlProperty());
setStringIfNotNull(context, dataSource.getNewConnectionSql()); } else if (attributeName.equals(Constants.URL_DELIMITER.getName())) { setStringIfNotNull(context, dataSource.getUrlDelimiter()); } else if (attributeName.equals(Constants.URL_SELECTOR_STRATEGY_CLASS_NAME.getName())) { setStringIfNotNull(context, dataSource.getUrlSelectorStrategyClassName());
private ModifiableXaDataSource buildXaDataSource(XaDataSource xads) throws org.jboss.jca.common.api.validator.ValidateException { final DsXaPool xaPool; if (xads.getXaPool() == null) { xaPool = new DsXaPoolImpl(Defaults.MIN_POOL_SIZE, Defaults.INITIAL_POOL_SIZE, Defaults.MAX_POOL_SIZE, Defaults.PREFILL, Defaults.USE_STRICT_MIN, Defaults.FLUSH_STRATEGY, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING, Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL, Defaults.ALLOW_MULTIPLE_USERS, null, Defaults.FAIR, null); } else { final DsXaPool p = xads.getXaPool(); xaPool = new DsXaPoolImpl(getDef(p.getMinPoolSize(), Defaults.MIN_POOL_SIZE), getDef(p.getInitialPoolSize(), Defaults.INITIAL_POOL_SIZE), getDef(p.getMaxPoolSize(), Defaults.MAX_POOL_SIZE), getDef(p.isPrefill(), Defaults.PREFILL), getDef(p.isUseStrictMin(), Defaults.USE_STRICT_MIN), getDef(p.getFlushStrategy(), Defaults.FLUSH_STRATEGY), getDef(p.isSameRmOverride(), Defaults.IS_SAME_RM_OVERRIDE), getDef(p.isInterleaving(), Defaults.INTERLEAVING), getDef(p.isPadXid(), Defaults.PAD_XID) , getDef(p.isWrapXaResource(), Defaults.WRAP_XA_RESOURCE), getDef(p.isNoTxSeparatePool(), Defaults.NO_TX_SEPARATE_POOL), getDef(p.isAllowMultipleUsers(), Defaults.ALLOW_MULTIPLE_USERS), p.getCapacity(), getDef(p.isFair(), Defaults.FAIR), p.getConnectionListener()); } return new ModifiableXaDataSource(xads.getTransactionIsolation(), xads.getTimeOut(), xads.getSecurity(), xads.getStatement(), xads.getValidation(), xads.getUrlDelimiter(), xads.getUrlProperty(), xads.getUrlSelectorStrategyClassName(), xads.isUseJavaContext(), xads.getPoolName(), xads.isEnabled(), xads.getJndiName(), xads.isSpy(), xads.isUseCcm(), xads.isConnectable(), xads.isTracking(), xads.getMcp(), xads.isEnlistmentTrace(), xads.getXaDataSourceProperty(), xads.getXaDataSourceClass(), xads.getDriver(), xads.getNewConnectionSql(), xaPool, xads.getRecovery()); }