Hi i have a following question.
According to spring docs tx:annotation-driven only respects bean definition that it is define in.
However i have the following code
<import resource="applicationContext-service1.xml"/>
<import resource="applicationContext-service2.xml"/>
<import resource="applicationContext-service3.xml"/>
<tx:annotation-driven/>
” only looks for @Transactional on beans in the same application context it is defined in. This means that, if you put “.
I have beans definte in service1, 2, 3 …
1.) Do I actually have to add tx:annotation-driven to applicationContext-service1.xml … etc.
2.) Does the order of import resource matter for transaction boundary creation.
An application context is not an XML file. All the beans declared in the imported files are part of the same application context. And the order doesn’t matter.