
Originally Posted by
denis.zhdanov
Am I right assuming that
- Your spring container contains definitions for the beans which bytecode is packed to the jar;
- There is an aop setup within the container;
- Aspects are not applied for those beans;
?
I.e. spring container correctly instantiates the beans but aop logic is not applied to them?
yes thats totally right. i'm already using the manager class and when i call a method on it it fails because hibernate is involved and that doesnt work without a transaction. here is a snippet of my applicationContext.xml:
Code:
<bean id="simpleManager" class="components.impl.SimpleManager"/>
<bean id="hbmTxManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
<tx:advice id="txAdvice" transaction-manager="hbmTxManager">
<tx:attributes>
<tx:method name="read" read-only="true"/>
<tx:method name="readAll" read-only="true"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="managerMethod" expression="execution(* components.impl.*Manager.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="managerMethod"/>
</aop:config>
maybe the expression is wrong? but i copied and pasted the path, so that there cant be a fault. i could debug if i knew the class that evaluates the aop:config-tags. do you know it?