On Jun 11, 2009, at 3:07 PM, Martin Probst wrote:
>> I was thinking of the Closeable instance registered when the
>> session is
>> created.
>
> Yes, that should work.
>
OK.
I have updated the bug you have logged to reflect our current thoughts
on the matter.
> Is there a way to do all of that automatically behind the scenes, with
> the user just writing @Context Session session?
Yes.
> I assume I'd need to
> somehow provide an Injectable<Session> to Jersey, but that depends (at
> least for my current use case) on the HTTP request for Authentication
> information.
>
I recommend that you utilize the JAX-RS SecurityContext class. When
used with Servlet and with auth config set up one can access the
principle with this class.
You can also roll your own SecurityContext implementation if you wish,
linked to some other web-based security mechanism. See the Atom-server
sample for such a case.
Paul.