jndi connect refactor