Hi,
Currently i think most people are using Spring.
When we have fully implemented JAX-RS 1.1 with integration to EE 6 it
should be possible to inject the right persistent stuff like one can
do with Servlet or EJB.
It should be possible to roll your own using a ResourceFilter to set
the boundaries of the transaction. One tricky aspect is that the
transaction might need to be kept open while the response is written,
thus you might need to close the transaction at the very end before
the request/response goes out of scope. One what to do this is to
utilize the Closeable service:
https://jersey.dev.java.net/nonav/apidocs/1.1.1-ea/jersey/com/sun/jersey/spi/CloseableService.html
IIRC some other developers have overridden the
ServletContainer.service method.
Paul.
On Aug 24, 2009, at 11:32 PM, jaxzin wrote:
>
> I've looked at the bookmark sample, but has anyone accomplished
> making the
> usage of JPA and JTA more transparent? I'd like it to be as
> transparent as
> it is for EJB 3.0. I'm trying to decide if I should extract the
> transaction
> management into a Servlet Filter, or if there is a type of Provider or
> ResourceFilter that would make more sense for Jersey.
>
> Any ideas?
>
> My instinct is to create a ResourceFilter and manage its transaction
> based
> on the response status.
> --
> View this message in context: http://n2.nabble.com/Transparent-JTA-tp3506232p3506232.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>