KEYCLOAK-2235 Fix possible transaction leak at startup with add-user
This commit is contained in:
1 parent
c5b0bb64f7
commit
6b2fb9a2bb
1 file changed
+1
@@ -326,6 +326,7 @@ public class KeycloakApplication extends Application {
|
||||
session.getTransaction().commit();
|
||||
logger.addUserSuccess(userRep.getUsername(), realmRep.getRealm());
|
||||
} catch (ModelDuplicateException e) {
|
||||
session.getTransaction().rollback();
|
||||
logger.addUserFailedUserExists(userRep.getUsername(), realmRep.getRealm());
|
||||
} catch (Throwable t) {
|
||||
session.getTransaction().rollback();
|
||||
|
||||
Reference in new issue
Block a user