-
1. Re: Are Seam-managed transactions limited to JSF?
gavin.king Feb 24, 2007 2:25 PM (in response to rmcdonough)So what, precisely, is the client?
-
2. Re: Are Seam-managed transactions limited to JSF?
rmcdonough Feb 24, 2007 2:53 PM (in response to rmcdonough)The client is Flex, but it could be another HTTP-based client. I have a more long-winded explanation or what I'm trying to d in this post:
http://jboss.com/index.html?module=bb&op=viewtopic&t=102479
I'm trying to expose JAXB annotated Entity beans via a RESTful web service. The JAXB-code is living on the web tier at the moment. Some of my services are POJOs, others are Session Beans. My solution to my problems is to start a UserTransaction before the session bean is invoked. I'm new to Seam, but it appears that it may offer a cleaner solution.
Ryan- -
3. Re: Are Seam-managed transactions limited to JSF?
gavin.king Feb 24, 2007 4:30 PM (in response to rmcdonough)OK, so, forget *everything* you know from Spring, etc. :-)
In Seam and EJB3, persistence context != transaction context.
So you can have an SFSB with an EJB3 extended persistence context that spans multiple transactions. Or you can have a Seam conversation with a Seam-managed persistence context that spans multiple transactions. None of this is in any way related to JSF or to Seam transaction management.
I strongly recommend against the idea of spanning an atomic JTA transaction across multiple calls to the server. Instead, use a conversation, and span the conversation across multiple calls. -
4. Re: Are Seam-managed transactions limited to JSF?
rmcdonough Feb 24, 2007 5:56 PM (in response to rmcdonough)OK, so, forget *everything* you know from Spring, etc. :-)
No worries there, not really a fan ;)
Thanks for clearing this up. One thing I should clarify tho', my transactions don't span multiple HTTP requests, just . In a nut shell, my servlet is calling and EJB that returns a Hibernate entity. The once the entity is returned from the SLSB, the servlet does the unmarshalling.
So I'm not spanning multiple requests here, I'm just trying to do more stuff to an entity once it has been returned from an EJB. Thanks for your input.
Ryan- -
5. Re: Are Seam-managed transactions limited to JSF?
gavin.king Feb 24, 2007 8:31 PM (in response to rmcdonough)Oh OK, in that case, just wrap SeamServletFilter around your servlet, and it will set up a Seam request context that spans the whole HTTP request instead of letting SeamInterceptor make a little request context on each call to the EJB layer.
Then the Seam-managed PC will span the whole HTTP request without even the need for a long-running conversation. -
6. Re: Are Seam-managed transactions limited to JSF?
rmcdonough Mar 1, 2007 9:48 PM (in response to rmcdonough)Hey Gavin,
Thanks a lot for the tips! It took a few trial and errors, but this is working like a champ now and I'm quite happy with the results. Now there's two frameworks to thank you for ;) Seam is freakin' great.
Ryan- -
7. Re: Are Seam-managed transactions limited to JSF?
gavin.king Mar 1, 2007 10:18 PM (in response to rmcdonough)Cool. Cheers :-)