You don't necessarily need anything specifically in your applicationContext.xml, but the class does need to be component scanned by Spring for the @Transactional annotation to work.
If you'd rather not scan the class, you could use the following bit of XML to achieve exactly the same thing the annotation does:
Code: Select all
<aop:pointcut id="yourServiceOperation" expression="execution(* org.broadleafcommerce.core.order.service.OrderService.*(..))"/>
<aop:advisor advice-ref="blTxAdvice" pointcut-ref="yourServiceOperation" order="1"/>
If you do it this way, you may want to specify only the methods that you need the transactional wrapper around as AOP does add some performance overhead. You would do this by instead of specifying "OrderService.*" only "OrderService.myMethod" for example.