[keycloak-dev] Transaction active

Marek Posolda mposolda at redhat.com
Mon Aug 11 08:30:10 EDT 2014


On 11.8.2014 14:24, Stian Thorgersen wrote:
>
> ----- Original Message -----
>> From: "Marek Posolda" <mposolda at redhat.com>
>> To: keycloak-dev at lists.jboss.org
>> Sent: Monday, 11 August, 2014 1:04:46 PM
>> Subject: [keycloak-dev] Transaction active
>>
>> I believe that when tx.commit() or tx.rollback() is called, then
>> transaction shouldn't be in the active state anymore, right? Actually
>> JPA works this way, but our other transaction implementations
>> (TransactionManager, cache, mongo) are not. Should we change that?
> We should. It should also be possible to call begin() again to start a new transaction, not sure if that works either.
At least JPA supports more transactions inside single entityManager 
AFAIK. Not sure if it's good practice to use it this way and but it 
works. Our other implementations doesn't support this ATM as begin 
method will throw exception if transaction is already active and 
commit,rollback doesn't restart activeflag.

I can change it so commit,rollback will set active=false in our 
transaction impls? Should be quite easy change though.

Marek
>
>> Marek
>> _______________________________________________
>> keycloak-dev mailing list
>> keycloak-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>



More information about the keycloak-dev mailing list