I have a BasicDataSource bean called dataSource and this is used to establish JDBC connection.
databaseSql = new JdbcTemplate(dataSource);
databaseCall= new SimplejdbcCall(dataSource);
During runtime I reinitialised (destroyed and created again) this singleton bean and re-established JDBC connection by calling the above code.
I set the maxIdle and minIdle to be 0, to prevent any idle connection causing an error. However, when I do it, I get ‘data source is closed’ error. Why does it happen and how can I create a new JDBC connection?
5