The Question is not private or public, the question is: How is it invoked and which AOP implementation you use!
If you use (default) Spring Proxy AOP, then all AOP functionality provided by Spring (like ) will only be taken into account if the call goes through the proxy. -- This is normally the case if the annotated method is invoked from another bean.@Transactional
This has two implications:
- Because private methods must not be invoked from another bean (the exception is reflection), their Annotation is not taken into account.
@Transactional
- If the method is public, but it is invoked from the same bean, it will not be taken into account either (this statement is only correct if (default) Spring Proxy AOP is used).
@See Spring Reference: Chapter 9.6 9.6 Proxying mechanisms
IMHO you should use the aspectJ mode, instead of the Spring Proxies, that will overcome the problem. And the AspectJ Transactional Aspects are woven even into private methods (checked for Spring 3.0).