users@glassfish.java.net

Generate ETag with Jersey

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Jun 2009 15:25:32 PDT

Hello,
I'm developing a RESTful service using GlassFish EJB3 and Jersey.
My client application is WPF application written in C#.

I would like to be able to have my client applcation "be updated" when something changes on the service side.
Base on that I'm caching all the entities return from the service on the client side I can pretty easy find which entities are new and deleted by polling on the service resources every so often.
The problem is how to know when they are updated.
I though of using Etags which help me notice that an entities has change, maybe even reduce network usage.

1. Is that a good idea?
2. How can I generate ETags with Jersey in the mode no-code-needed way?

Thank you,
Ido.
[Message sent by forum member 'ido_ran' (ido_ran)]

http://forums.java.net/jive/thread.jspa?messageID=349213