Can i use spring exception translation without using spring-managed-transaction?
I'm developing with JPA 2 and Spring 3.
I'm using the @Repository for my Dao classes hoping that i could make use of the Spring exception translation.
But the problem is, i'm not using the spring managed transaction (no @Transactional, no definition of transactionManager in my spring config file), but a custom transaction handling for my JPA apps.
Is it still possible somehow to make use of the translation from my custom transaction manager ? The implementation of this custom transaction manager is still using the EntityManagerFactory and EntityManager from JPA.
Please share your thoughts.
Thank you开发者_Go百科 !
If you use @Repository annotation, you will get Spring translated exception, whether you use spring transaction manager or not :
But of course, you won't get the Spring exceptions which would be thrown by the Spring transaction manager itself.
精彩评论