Refactoring JAX-RS providers