1
votes

Im currently using flyway 1.7 and jBoss 7. When flyway migrations are running if the time to fully migrate takes more than 5 minutes jBoss shows that it timeouts the transaction, but even after that flyway keeps on migrating and eventually i end up with a fully migrated DB but a failed deployment because of the transaction timeout. I also recently realised that if i try to shut down jBoss while the migrations are running, migrations are not affected and they keep on executing. Is this a desirable behaviour? Is flyway running the migrations under some sort of her own blocked transaction that i cant do anything about it?

Regards, D

1
Could you post your datasource and your flyway configuration? Thx - Axel Fontaine

1 Answers

0
votes

I'd suggest to use the flyway in a standalone application. This application may parse your standalone.xml file for the parameters of the database connection. This has the advantage that the code used for the migration is not loaded when the JBoss is started, so that it does not waste your memory. Second advantage (correct me if I'm wrong): You can configure your Hibernate settings to validate the DB structure when the application is starting within your JBoss. So you can be sure that the DB structure matches to the requirements of your object model.