@Path("personneManagerRS") @RequestScoped public class PersonneManagerRS { @Inject PersonneManagerLocal personneManager; @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Collection findAll() { return personneManager.findAll(); } @GET @Path("/{index}") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Personne getPerson(@PathParam("index") int index) { return personneManager.find(index); } }