You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How do you disable transactions in User Storage SPI in keycloak 19.0.2 w/quarkus?
#14578
I have a User Storage SPI that worked really well in keycloak 12.0.4 with WildFly and used with an application generate with JHipster that obtains use credentials from our corporate Sybase database.
I am now porting it to the latest version (keycloak 19.0.2 with quarkus).
I have managed to get it mostly working, except for logging in. To log in we have to called a stored procedure that creates and uses a temporary table. To do that there CANNOT be any transactions. I have not been able to either turn on autocommit nor disable transactions. I have tried using @transactional(TxType.NOT_SUPPORTED) and @transactional(TxType.NEVER) and yet, somehow, a transaction is ALWAYS magically started causing errors such as:
Caused by: java.sql.SQLException: The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
The database is also setup to expect all connections to have auto commit enabled, which I not been able to enable. We were getting this error until we changed the stored procs to allow 'anymode'
Caused by: java.sql.SQLException: Stored procedure 'CommonSecurity.DBO.esp_UserLoginByAppName' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I have a User Storage SPI that worked really well in keycloak 12.0.4 with WildFly and used with an application generate with JHipster that obtains use credentials from our corporate Sybase database.
I am now porting it to the latest version (keycloak 19.0.2 with quarkus).
I have managed to get it mostly working, except for logging in. To log in we have to called a stored procedure that creates and uses a temporary table. To do that there CANNOT be any transactions. I have not been able to either turn on autocommit nor disable transactions. I have tried using @transactional(TxType.NOT_SUPPORTED) and @transactional(TxType.NEVER) and yet, somehow, a transaction is ALWAYS magically started causing errors such as:
Caused by: java.sql.SQLException: The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
The database is also setup to expect all connections to have auto commit enabled, which I not been able to enable. We were getting this error until we changed the stored procs to allow 'anymode'
Caused by: java.sql.SQLException: Stored procedure 'CommonSecurity.DBO.esp_UserLoginByAppName' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode.
All reactions