dev@glassfish.java.net

REST client caching entities?

From: Bobby Bissett <bobby.bissett_at_oracle.com>
Date: Mon, 14 Mar 2011 12:17:25 -0400

Hi all,

I have this small rest service I've created, and a client to go along with it. There's a test class that calls the client, putting it through some gets, puts, and deletes. Everything runs fine if the address for my ClientConfig is local, e.g. "http://localhost:8080/myservice". With a localhost address I can run the tests over and over with the same (passing) results.

But if I change that name to a fully qualified name for the same server, "http://hostname.us.oracle.com:8080/myservice," I have GET requests returning data even though there is nothing on the server. The @GET method in the resource class isn't even being called, but data is coming back to my client anyway.

When I try using a tcp tunnel app to monitor the traffic, everything works if I access the tcp tunnel process with localhost, but with a FQN I can clearly see that calls are not being made to the server for my GET requests, and I'm getting back some kind of cached entity. The PUT and DELETE calls I can see going over the wire, just no GET requests.

Can someone tell me how I turn this off? This is not something I was expecting, and the code that is going to rely on this won't be able to work this way.

Thanks,
Bobby