I have a confusion over spring transaction manager. I have below code in my spring bean xml as part of transactional manager. Do I still need to provide @Transactional in the target class(CacheTest in this case) ?
What I understand is this is either or situation. Either I can provide all in xml or I can go with annotation based. Right?
By the documentation, the AOP can handle by itself the transactions. Maybe the problem you have is that a non-Spring container beans is trying to use the Transactions, and there is other approach for that:
You are right, the AOP can make the transaction available using weaving, so the annotation would be superfluous. I was about to create an example but I found this one http://simplespringtutorial.com/springDeclarativeTransactions.html . Note that you can use the source code to test using only the annotation (which is already coded) or with AOP (which needs to follows the changes cited in the same web page).