@Transactional not being honored
mbasnight Aug 11, 2010 1:58 PMI have set up JPA with a JTA TX Mgr (Geronimo, fusesource.com's servicemix TX mgr). The TX mgr is exposed via a osgi:reference. Im using Extended PC's. These are being injected (properly) into my Repository code, but when i throw a exception, i dont see the rollback happen down to the database. My camel route thats processing this does in fact rollback. Its marked as transacted(). Ive been wading thru spring tx and spring aop to see whats happening but so far im at a loss. Below is my configuration & code.
It is interesting to note that it does in fact save the data to the database, and the rollback does not take place. I assume there is some transaction going on there behind the scenes. It is also interesting to note that NO TX advice works, neither in aop advice or xmlns:tx. I went so far to mark TX's as readonly and data still saves. I have also included the debug logs from servicemix regarding the spring and hibernate code. I also made sure the Repository was a prototype as per the javadoc.
Any help would be appreciated!
Below is the output from the DEBUG output of servicemix 4.2.0 fuse 02-00.
Edited by: mbasnight on Aug 11, 2010 5:52 PM - removed the debug and put into a attachment named output.txt
-
jpa-persistence.xml 2.2 KB
-
persistence.xml 1.1 KB
-
jndi.xml 2.0 KB
-
JTAPersonRepository.java 635 bytes
-
output.txt 3.9 KB