Back Forum Reply New

Transaction advisor pointcut

Hello, i try to implement a generic DAO, and i got a problem with transactions.

I dont see (in logs) transactions wrapping my dao.

Here is the config :Code:
lt;tx:advice id=quot;txAdvicequot; transaction-manager=quot;TestTxManagerquot;gt;
lt;tx:attributesgt;
lt;tx:method name=quot;*quot; /gt;
lt;/tx:attributesgt;
lt;/tx:advicegt;

lt;aop:config gt;
lt;aop:pointcut id=quot;genericDAOMethodsquot;
expression=quot;execution(* com.octo.appfuse.persistence.genericdao.GenericDAO.*(..))quot;/gt;
lt;aop:advisor advice-ref=quot;txAdvicequot; pointcut-ref=quot;genericDAOMethodsquot; /gt;
lt;/aop:configgt;

lt;bean id=quot;categoryDaoquot; parent=quot;abstractDaoquot;gt;   lt;property name=quot;proxyInterfacesquot;gt;      lt;valuegt;com.octo.appfuse.persistence.genericdao.dao.CategoryDAOlt;/valuegt;   lt;/propertygt;   lt;property name=quot;targetquot;gt;       lt;bean parent=quot;abstractDaoTargetquot;gt;lt;constructor-arggt;
lt;valuegt;com.octo.appfuse.persistence.genericdao.business.model.Categorylt;/valuegt;lt;/constructor-arggt;       lt;/beangt;   lt;/propertygt;
lt;/beangt;

lt;bean id=quot;abstractDaoTargetquot;     class=quot;com.octo.appfuse.persistence.genericdao.impl.GenericDAOHibernateImplquot; abstract=quot;truequot;gt;   lt;property name=quot;sessionFactoryquot;gt;       lt;ref bean=quot;TestSessionFactoryquot;/gt;   lt;/propertygt;   lt;property name=quot;namingStrategyquot;gt;       lt;ref bean=quot;extendedFinderNamingStrategyquot; /gt;   lt;/propertygt;
lt;/beangt;

lt;bean id=quot;abstractDaoquot; class=quot;org..aop.framework.ProxyFactoryBeanquot; abstract=quot;truequot;gt;   lt;property name=quot;interceptorNamesquot;gt;       lt;listgt;lt;valuegt;finderIntroductionAdvisorlt;/valuegt;       lt;/listgt;   lt;/propertygt;
lt;/beangt;
Why the transaction advisor doesnt apply on my dao ?
Is there a way to test pointcut at runtime ?

Thanks
Antoine
¥
Back Forum Reply New