Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.2.0.RELEASE, 1.2.1.RELEASE, 1.2.2.RELEASE
-
None
-
All environments
Description
Presently, Spring does not support @Transactional on static methods (See https://jira.springsource.org/browse/SPR-5999). Therefore, the annotations do not serve a purpose.
Also, from what I understand about Entity Managers, once a transaction is complete, the object becomes detached. Detached entities do not have access to data store resources. Therefore, if the Spring teams at some point allow @Transactional on static methods, you will not be able to load entity relationships after calling the find method. The entity will be detached. I may be wrong on this point since I don't fully understand Entity Managers.