cancel
Showing results for 
Search instead for 
Did you mean: 

RuntimeException: UserTransaction begin/commit mismatch

claman
Champ in-the-making
Champ in-the-making
Hello everybody,
I'm using  a subclass of
org.springframework.transaction.support.AbstractPlatformTransactionManager
that invoke transaction methods begin(), commit() and rollback().
The couple begin/commit works fine but when invoking rollback() method, without to save nothing into alfresco session, it throws
"User Transaction begin/commit mismatch"
Here http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/core/source/java/org/..., I've seen that the problem could be TransactionInfo mismatch.

Does anyone know the reason at origin of that?

Thanks, regards.
Claman
1 REPLY 1

claman
Champ in-the-making
Champ in-the-making
I answer by myself,
the problem is that  TransactionInfo variable is holded into ThreadLocal variable, which is just used by
org.springframework.transaction.interceptor.TransactionAspectSupport
this is at origin of conflict!
A workaround, maybe not very clean, can be defining another class that use another ThreadLocal variabile to contain TransactionInfo.

bye