}
protected Context createRESTEndpoint(int port, EmbeddedCacheManager cacheManager, RestServerConfiguration configuration) {
Context ctx = new Context(new org.mortbay.jetty.Server(port), "/", Context.SESSIONS);
ctx.setInitParams(Collections.singletonMap("resteasy.resources", "org.infinispan.rest.Server"));
ctx.addEventListener(new ResteasyBootstrap());
ctx.addServlet(HttpServletDispatcher.class, "/rest/*");
ServletContext servletContext = ctx.getServletContext();
ServerBootstrap.setCacheManager(servletContext, cacheManager);
ServerBootstrap.setConfiguration(servletContext, configuration);
return ctx;