Restlet Jax-RS extension and OSGi

2009-03-19 Thread David Fogel
Hello all- Has anybody actually tried to use the restlet Jax-RS extension in an OSGi environment? My guess is that no-one has, because it doesn't work :-) By doesn't work, I mean that trying to run a JaxRspplication in an OSGI container will result in extremely odd and unclear runtime

RE: Re: Why does the Restlet class have lifecycle methods?

2009-03-19 Thread David Fogel
Hi Jerome- In addition to propagating start/stop life-cycle methods to any contained or child restlets, should restlets also, by contract, propagate any new Context they receive via setContext()? I'm not sure what the solution is, but I've been finding that I don't always have access to a

Re: Restlet Jax-RS extension and OSGi

2009-03-19 Thread Stephan Koops
Hi David, thanks for reporting it including solutions. Is this code, that I could include in the Restlet extension, or does every developer has to include it in his own code? If the first is the case, please enter an issue for it with the relevant parts of your email

Hidden cache in GWT client?

2009-03-19 Thread martin
Hello all, I have used a GWT restlet client into an existing GWT application with success. My problem is that when I try to access a server resource several times, the client actually calls the server only one time! Let's be -a bit- more precise with the following piece of code:

Re: Hidden cache in GWT client?

2009-03-19 Thread Rob Heittman
Hi Martin, Underneath it all, GWT is using the XmlHttpRequest facility of the browser as a client. For GET requests, this is influenced by the caching-related response information your server resource exposes. Different browsers have different rules about how aggressive to be. Caching-related

RE: Re: Hidden cache in GWT client?

2009-03-19 Thread webpost
Hi Rob, Thanks for such a fast answer! After reading the discussion, I both tried to set a property on the client Request, and the server Response, with: MapString,Object map = new HashMapString,Object(); map.put(Cache-Control, no-store); // server side response.setAttributes(map); // client

RE: Re: Hidden cache in GWT client?

2009-03-19 Thread martin
Hi Rob, Thanks for your remarks! I tried to add an attribute Cache-Control with value no-cache both on the server response and the client request: // Server Restlet situation = new Restlet() { @Override public void handle(Request request, Response response) { ...

Example of using the Tag class with Restlet

2009-03-19 Thread Faisal
Hi, I am struggling to find an example of how to implement etag functionality in my restlet service. Have tried to search but to no avail. Can anyone provide example of how I can verify the state of the tag and content so as to decide whether to send the new XML response or content not modified

Re: Re: Hidden cache in GWT client?

2009-03-19 Thread Rob Heittman
You must use the non-standard header updating mechanism to manipulate Cache-Control: Form headers = (Form) response.getAttributes().get(org.restlet.http.headers); if (headers == null) { headers = new Form(); response.getAttributes().put(org.restlet.http.headers, headers); }

RE: Re: Restlet Jax-RS extension and OSGi

2009-03-19 Thread David Fogel
Hi Stephan- Well, in my previous message I actually described two quick fixes (that can be used by developers), as well as two solutions that involve changes to the extension. The easiest one for you to do quickly would be to add the following static code block to JaxRsRestlet: public class

Restlet @ Google I/O

2009-03-19 Thread Rob Heittman
Hi all, I was wondering if anyone else from the Restlet list was planning to attend Google I/O at the Moscone Center in San Francisco, May 27-28. (http://code.google.com/events/io/) ... or just was living nearby, or planning to be in the Bay Area around those dates. There is a bar walking

Re: Re: Restlet Jax-RS extension and OSGi

2009-03-19 Thread David Fogel
Hi Stephan- I've been experimenting with the restlet.ext.jaxrs support, trying to get a small test project working, and I've run into what seems like a pretty big problem. While I am fairly new to JAX-RS, it is my understanding that the suggested way of giving your Resource classes access to