Simple service locator written in Java