I'm not totally sure how JAX-RS context injection plays with anonymous classes... I wouldn't think there's any problem, tho'.