Hello,

I have deployed an application in my Karaf 4.1.5 using JMS, Camel, Hibernate, 
Aries Transaction Manager and PAX JDBC Pool.


Everything works fine except when I process parallel requests where I sometimes 
get a SQLException from dbcp class ManagedConnection reporting "Connection can 
not be used while enlisted in another transaction" and the request fails.

After some analyses I came to the assumption that it is maybe related to the 
fact that Hibernate doesn't support a ConnectionProvider for dbcp.


So I switch the connection pool to c3p0 which is supported by Hibernate. But 
here I face another problem just for a single request: some DB operations get 
executed before the transaction commits so I am also unable to rollback 
everything on exception. It seems that all flushes initiated by Hibernate 
directly go into the DB.


So I assume that anything with the transaction synchronisation/coordination is 
wrong. The transactional context is defined by a @Transactional annotation. 
From debugging I can see that the AriesPlatformTransactionManager and the 
C3p0PooledDatasourceFactory is involved. Do you have any hint what could cause 
this problem or how can I can I do more depth analyses?


Thanks in advice,

Christian

Reply via email to