Merge pull request #23795 from arjantijms/jta_cleanup

Small amount of cleanup for JPA (Persistence) container