The question is, if we can fix liquibase instead of require people to
change DS? Maybe I can try to continue in your branch later this week
and look at it?
Another possibility: Don't bootstrap JTA automatically at
KeycloakSessionFactory.create() but instead do it just in HTTP requests
(in KeycloakSessionServletFilter ). Then liquibase bootstrap won't be an
issue?
Marek
On 06/08/16 17:31, Bill Burke wrote:
I hooked in JTA on my branch. When KeycloakSessionFactory.create()
is
executed this happens:
* the code will check the JTA TransactionManager to see if a transaction
is currently active
* If there is an active transaction, it is suspended
(TransactionManager.suspend()). A new one is created and associated
with the thread TransactionManager.begin()
* A wrapper for the JTA transaction is created and registered with the
KeycloakTransactionManager
* At transaction completion if there was a suspended JTA transaction it
is resumed.
There are some issues with this though. You have to modify the
KeycloakDS <datasource> declaration and put in a flag jta="false". If
you don't do this then you get errors at boot time with Liquibase. So,
that change to KeycloakDS is the actual issue here. Migrating apps will
have to set the jta flag before they will be able to run with the latest
keycloak version. We may be able to specify a warning at boot time.
Bill
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev