Refactored named query access. Best practice from Java EE 7 workshop.