code refactoring for jndi naming politics