Given I have web application and enable liquibase updates with liquibase.enabled=true.
The application connects to Oracle db.
Let's say I have 2 users/schemas, one for deployment, second one for the application:
Application properties look like:
When I boot up the application (whereas liquibase update is executed) and I try to DROP USER appdeploy CASCADE;
Then I get ORA-01940: cannot drop a user that is currently connected
what indicates web application didn't release db connections
It's possible that the appuser connection is established before liquibase gets a chance to run with the appdeploy connection. Do you have a sample application that you can share that demonstrates the problem?
Hi Phil,
I pushed sample app here: https://github.com/pmihalcin/liquibase-sample
I think the problem is that we use DataSourceBuilder to create the Liquibase-specific DataSource. It will be using a connection pool so it will create and keep open whatever the default number of connections is for the pool. I think we need to do one of the following:
Hi Andy,
Thanks for the fix!
Will this fix also appear in 1.5.x boot version?
@wilkinsona
Yeah, it will. It's only marked as being in 1.4.7 as GitHub only allows a single milestone to be assigned to an issue. Anything fixed in 1.4.x (as this was) is also merged forwards into 1.5.x and master.