[Lift] Re: One further: JPA + JTA + Lift

2008-09-10 Thread Kris Nuttycombe
The principal reason I'm using Hibernate is because the base JPA unfortunately doesn't provide support for non-standard type persistence, and so a few of my entities are annotated with @Type in order to use custom mappings for some of the org.joda.time classes (the Order object in question being

[Lift] Re: One further: JPA + JTA + Lift

2008-09-10 Thread Kris Nuttycombe
That possibility had occurred to me. Perhaps the best thing is just to create a separate object for the persistence context that defines both persistence transaction operations. You'd then have implementations for both JTA and RESOURCE_LOCAL type persistence units and store that in the

[Lift] Re: One further: JPA + JTA + Lift

2008-09-10 Thread Derek Chen-Becker
Thanks for pointing that out. I usually use JTA-enabled datasources so I don't muck around with UserTransaction directly that much. Derek On Wed, Sep 10, 2008 at 2:23 PM, Martin Ellis [EMAIL PROTECTED] wrote: On Wed, Sep 10, 2008 at 4:27 PM, Kris Nuttycombe [EMAIL PROTECTED] wrote: The

[Lift] Re: One further: JPA + JTA + Lift

2008-09-10 Thread Kris Nuttycombe
Thanks a lot, Martin. That's definitely useful to know, and, wow... too much magic. On Wed, Sep 10, 2008 at 2:23 PM, Martin Ellis [EMAIL PROTECTED] wrote: On Wed, Sep 10, 2008 at 4:27 PM, Kris Nuttycombe [EMAIL PROTECTED] wrote: The only question I have is thread safety - it doesn't seem

[Lift] Re: One further: JPA + JTA + Lift

2008-09-09 Thread Oliver Lambert
Now, now lets not get testi ;-) On 09/09/2008, at 9:34 PM, Viktor Klang wrote: On Tue, Sep 9, 2008 at 10:09 AM, Oliver [EMAIL PROTECTED] wrote: Actually, is this the essence of the cookie. Why has the object been detached in the example Kris gives - is there something wrong with

[Lift] Re: One further: JPA + JTA + Lift

2008-09-09 Thread Viktor Klang
On Tue, Sep 9, 2008 at 3:59 PM, Oliver Lambert [EMAIL PROTECTED] wrote: Now, now lets not get testi ;-) *laugh* It's chill ;) Cheers, On 09/09/2008, at 9:34 PM, Viktor Klang wrote: On Tue, Sep 9, 2008 at 10:09 AM, Oliver [EMAIL PROTECTED] wrote: Actually, is this the essence of the

[Lift] Re: One further: JPA + JTA + Lift

2008-09-09 Thread Kris Nuttycombe
On Tue, Sep 9, 2008 at 10:09 AM, Oliver [EMAIL PROTECTED] wrote: Actually, is this the essence of the cookie. Why has the object been detached in the example Kris gives - is there something wrong with RequestVar lifecycle? Right; sorry, I should have been more clear about my question. I

[Lift] Re: One further: JPA + JTA + Lift

2008-09-09 Thread Derek Chen-Becker
I'm pretty sure that the RequestVar should be around for the life of the Lift session, which means that you should still have a valid lift session in *any* snippet that would get called. Viktor's correct that this is a common error that people run into with JPA, but it's usually because they're

[Lift] Re: One further: JPA + JTA + Lift

2008-09-08 Thread Oliver
It looks a little like the RequestVar has had its lifecycle closing hook called by the time you call getSubscriptions Try touch/get the subscriptions before you pass them into the bind. cheers Oliver On Tue, Sep 9, 2008 at 7:31 AM, Kris Nuttycombe [EMAIL PROTECTED]wrote: I've been following