dev@jsr311.java.net

Re: Precondition support

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 10 Apr 2007 12:57:44 +0200

Jerome Louvel wrote:
>> - Often you'll need to obtain the same data to compute an entity tag
>> and last modified value as you'll need to service the request
>> (should
>> the preconditions be met). You don't want to have to fetch the same
>> data multiple times so you'd want some way to cache it between the
>> getEntityTag/getLastModified/http method. However its not
>> clear which
>> of the methods will actually be called since the preconditions might
>> not be met so then you end up with data lifecycle issues. We
>> considered thread-local approaches to caching data but that has
>> implications on the container for thread management.
>
> Hmm, I don't understand why we should take this into account. Isn't this an
> internal issue for the POJOs that we are annotating? They could also
> implement late data loading mechanisms if necessary. The first method
> invoked (getLastMofidied/getEntityTag/...) would check whether the internal
> data has been already initialized.
>

It makes it easier for the developer because they control the
application thread, as opposed to the runtime controlling the
application thread (e.g. compare SAX to StAX).

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109