HHH-9312 - Database connection leak with JTA transaction tracking and background thread not releasing database connection

(cherry picked from commit 9e1afbaf49dacb3e345666ca1f27b1a6e74d3de2)