I have some questions about point cuts and transactions.
Here below how I defined my transactions attributes. (code section)
1. Does "search" is intercepted by "search*" pattern ?
2. What are the loggers I need to debug/info enable to see that the transaction is created.
3. In spite of marking my search methods as read only, I've seem JTA errors related with commit. Is that normal ?
4. Where I can find a good and thorough explanation on propagation ?
5. Do you see any issue with my point cut definition ?
Code:<tx:advice id="txAdvice"> <tx:attributes> <tx:method name="get*" read-only="true" propagation="REQUIRED"/> <tx:method name="list*" read-only="true" propagation="REQUIRED"/> <tx:method name="find*" read-only="true" propagation="REQUIRED"/> <tx:method name="searc*" read-only="true" propagation="REQUIRED"/> <tx:method name="execute*" read-only="true" propagation="REQUIRED"/> <tx:method name="*"/> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut id="txOperation" expression="execution(* com.pkg.service..*.*(..)) or execution(* com.pkg.dao..*.*(..))"/> <aop:advisor pointcut-ref="txOperation" advice-ref="txAdvice"/> </aop:config>
This is an example of error that occur on a "get*" method
Thanks!Code:Caused by: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit one phase] operation. vmcid: 0x0 minor code: 0 completed: No at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:321) at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030) at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397) at com.sun.enterprise.distributedtx.UserTransactionImpl.commit(UserTransactionImpl.java:197) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1028) ... 187 more
Q


Reply With Quote
