users@jersey.java.net

Re: [Jersey] Database Transactions with Jersey

From: Craig McClanahan <craigmcc_at_gmail.com>
Date: Wed, 11 Aug 2010 14:39:55 -0700

On Wed, Aug 11, 2010 at 12:48 PM, Christian Helmbold <
christian.helmbold_at_yahoo.de> wrote:

> As Paul Sandoz said, the transaction must be available for rendering, if
> lazy loading is used. Therefore @Transactional on resource methods is not
> the best idea. Maybe I'll separate the transactional code, like you
> suggested. For now I'll go with a simple Servlet Filter since it seems to
> work properly.
>

Try it, you'll like it :-).

Besides making transactional annotations actually work as expected, the
separation of concerns will be good for your overall application
architecture.


>
> Christian
>
> Craig