Refactoring session handling to use InitialContext only