users@jersey.java.net

[Jersey] Re: Multiple root contexts in tests

From: Arnaud Bailly <arnaud.oqube_at_gmail.com>
Date: Mon, 21 Mar 2011 05:02:49 -0700 (PDT)

Hello Jakub,
Here is an outline of those classes:


package my.package.root;

@Path("/data")
public class RequestResources {

  @Context
  HttpConfiguration configuration;

  @GET
  @Path("/queries")
  @Produces(MediaType.APPLICATION_JSON)
  public String listAllQueries(@Rpc RequesterRpc rpc) {
      // do some stuff
  }

  @GET
  @Path("/outputs")
  @Produces(MediaType.APPLICATION_JSON)
  public String listAllOutputs(@Rpc RequesterRpc rpc) {
     // do some other stuff
 }



What I really want to do is to customize the @Rpc injected interface in
order to have different implementations between test and production.

and the dummy resources:

@Path("/dummy")
public class DummyResources {

  @GET
  public String run() {
    return "";
  }
}



--
View this message in context: http://jersey.576304.n2.nabble.com/Multiple-root-contexts-in-tests-tp6184016p6191973.html
Sent from the Jersey mailing list archive at Nabble.com.