Search in sources :

Example 1 with RestServlet

use of org.datanucleus.api.rest.RestServlet in project tests by datanucleus.

the class BasicTest method setUp.

protected void setUp() throws Exception {
    LOG.info("********** " + toString() + " [setUp] **********");
    super.setUp();
    server = new Server(PORT);
    Context root = new Context(server, "/", Context.SESSIONS);
    ServletHolder holder = new ServletHolder(new RestServlet());
    // TODO Set this based on which datastore in use
    holder.setInitParameter("persistence-context", "h2-backend");
    root.addServlet(holder, "/dn/*");
    server.start();
}
Also used : Context(org.mortbay.jetty.servlet.Context) Server(org.mortbay.jetty.Server) ServletHolder(org.mortbay.jetty.servlet.ServletHolder) RestServlet(org.datanucleus.api.rest.RestServlet)

Aggregations

RestServlet (org.datanucleus.api.rest.RestServlet)1 Server (org.mortbay.jetty.Server)1 Context (org.mortbay.jetty.servlet.Context)1 ServletHolder (org.mortbay.jetty.servlet.ServletHolder)1