Spring AOP in Threads

Foermchen82

Top Contributor
Hallo zusammen,

ich habe einen Spring Application Server, der mittels AOP Aktionen bei Exceptions definiert. Funktioniert alles prima nur nicht, wenn der Methodenaufruf (saveSnapshots) in einem separatem Thread erfolgt. Wie schaffe ich es, dass auch dann mein entsprechender "ExceptionAdvise" gerufen wird?

Das ist meine AOP Konfiguration:

[XML]
<aop:config>
<aop😛ointcut id="transactionalMethods" expression="
execution(* com.ABC.dao.Dao.saveSnapshots(..))"/>
<aop:advisor
advice-ref="transactionAdvice"
pointcut-ref="transactionalMethods"
order="1"/>

<aop:aspect id="exitAfterException" ref="exceptionAdvice">
<aop:after-throwing
method="handleThrowable"
pointcut-ref="transactionalMethods"
throwing="throwable"/>
</aop:aspect>
</aop:config>
[/XML]

Danke im vorraus!!
 

Zurück
Oben