What you are seeing is a class misconception about Spring AOP.
Since newPrint()
is being called from a method inside the same class, no advice is triggered and therefor no handling for transactional takes place.
Had you called the method newPrint()
outside the class, a new transaction would be created whether or not the caller already participated in a transaction.
Since you have used @Transactional
on the class, every method get's the default @Transactional
settings and that is why you actually have a transaction.
Take a look at this section of the Spring reference documentation for a detailed discussion on how AOP works in Spring.
A total hack to get your code working like you expect would be the following:
((Unsubcriber ) AopContext.currentProxy()).newPrint();
This solution is mentioned in various places among which is this SO post.