use of org.springframework.jdbc.datasource.DelegatingDataSource in project iaf by ibissource.
the class NarayanaXADataSourceFactory method augmentXADataSource.
@Override
protected DataSource augmentXADataSource(XADataSource xaDataSource, String product) {
return new // Cannot use NarayanaDatasource as the PGSQL driver does not implement the Datasource interface
DelegatingDataSource() {
@Override
public Connection getConnection() throws SQLException {
Properties properties = new Properties();
properties.put(TransactionalDriver.XADataSource, xaDataSource);
properties.setProperty(TransactionalDriver.poolConnections, "true");
properties.setProperty(TransactionalDriver.maxConnections, "100");
return ConnectionManager.create(null, properties);
}
};
}
Aggregations