Hello,
I have an application where CRUD service's methods declared in aspects
The transaction configuration:Code:privileged aspect AddressServiceImpl_Roo_Service { declare @type: AddressServiceImpl: @Service; declare @type: AddressServiceImpl: @Transactional; @Autowired AddressRepository AddressServiceImpl.addressRepository; public void AddressServiceImpl.deleteAddress(Address address) { addressRepository.remove(address); } public void AddressServiceImpl.saveAddress(Address address) { addressRepository.store(address); } ...
aspectj-maven-plugin 1.2 is used for compile time weaving.Code:<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
Issue: When service's method is called from none transactional controller or integration test, transaction is not initiated on this method. If method is declared directly in serviceImpl.java, the transaction is started as expected.
Is there any limitation of aspectj and spring transactions?
Thank you for help,
Vladimir


Reply With Quote