[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread David Pollak
On Wed, Sep 3, 2008 at 10:29 PM, Oliver <[EMAIL PROTECTED]> wrote: > Using your Model object as a starting point I created a JPA wrapper (partly > finished) and dragged it to my persistence module. I feel that is where it > belongs for unit/integration testing. Currenly it uses ThreadLocal, I gues

[Lift] Re: JPA

2008-09-03 Thread David Pollak
On Wed, Sep 3, 2008 at 10:11 PM, Oliver <[EMAIL PROTECTED]> wrote: > On Thu, Sep 4, 2008 at 2:38 PM, David Pollak <[EMAIL PROTECTED]> wrote: > >> >> >> Oliver wrote: >> >> >> >> On Thu, Sep 4, 2008 at 2:16 PM, David Pollak <[EMAIL PROTECTED]> wrote: >> >>> >>> At this point, there's no specific pl

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread Oliver
Using your Model object as a starting point I created a JPA wrapper (partly finished) and dragged it to my persistence module. I feel that is where it belongs for unit/integration testing. Currenly it uses ThreadLocal, I guess I could hide a RequestVar using a function callback to the Web tier (and

[Lift] Re: JPA

2008-09-03 Thread Oliver
On Thu, Sep 4, 2008 at 2:38 PM, David Pollak <[EMAIL PROTECTED]> wrote: > > > Oliver wrote: > > > > On Thu, Sep 4, 2008 at 2:16 PM, David Pollak <[EMAIL PROTECTED]> wrote: > >> >> At this point, there's no specific plans for JPA support. >> >> The Record/Field code needs to be finished. Once that

[Lift] Re: JPA

2008-09-03 Thread Derek Chen-Becker
There will always be the ability to just drop JPA Pojos (or Posos :) ) into Lift and use them, which is what my demo app will currently show. David, however, has cooked a lot of nice functionality into the Mapper code, and when there's a framework under that to separate out DB access, hopefully we'

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread Derek Chen-Becker
The way I've structured the "demo" JPA project is as separate persistence and webapp modules under a master Maven project. In that respect, the persistence module is an independent Maven project and has no reliance on Lift at all, just scala. The RequestVar usage is strictly for use within a Lift w

[Lift] Re: JPA

2008-09-03 Thread David Pollak
Oliver wrote: > > > On Thu, Sep 4, 2008 at 2:16 PM, David Pollak <[EMAIL PROTECTED] > > wrote: > > > At this point, there's no specific plans for JPA support. > > The Record/Field code needs to be finished. Once that's done, > there'll > be opportunitie

[Lift] Re: JPA

2008-09-03 Thread Oliver
On Thu, Sep 4, 2008 at 2:16 PM, David Pollak <[EMAIL PROTECTED]> wrote: > > At this point, there's no specific plans for JPA support. > > The Record/Field code needs to be finished. Once that's done, there'll > be opportunities to add JPA support. > As a matter of interest, what Record/Field cod

[Lift] Re: JPA

2008-09-03 Thread David Pollak
At this point, there's no specific plans for JPA support. The Record/Field code needs to be finished. Once that's done, there'll be opportunities to add JPA support. Oliver wrote: > Hi > > I know Derek Chen-Becker has been working on the JPA example for Lift > and this helped me a lot getting

[Lift] JPA

2008-09-03 Thread Oliver
Hi I know Derek Chen-Becker has been working on the JPA example for Lift and this helped me a lot getting my own JPA layer up and running. There appear to be others who are interested in getting their own JPA solution working too. Is there any intention of formalize JPA access with an API, someth

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread Oliver
I found thread http://groups.google.com/group/liftweb/browse_thread/thread/fb4aea7c0d13d17e which pretty much explains the lifecyle hook additions. The RequestVar solution as you point out, gets rid of the LoanWrapper requirement which is nice. However, at the moment, the persistence project, with

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread Oliver
What lifecycle managment on RequestVar does 0.10 add and can I read about it anywhere? Why is RequestVar a better solution that using a threadLocal? Oliver On Thu, Sep 4, 2008 at 8:12 AM, Derek Chen-Becker <[EMAIL PROTECTED]>wrote: > Technically, no. I use the Model object to also hold some impl

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread Derek Chen-Becker
Technically, no. I use the Model object to also hold some implicit defs for converting java.util collections into their Scala counterparts to make some of the JPA API easier to work with: // Implicit defs to help with entity member access implicit def setToWrapper[A](set : java.util.Set[A]) = ne

[Lift] Re: JPA w/Scala - never mind

2008-09-03 Thread Derek Chen-Becker
Yes, 100% pure Scala. It means you have to use orm.xml for some things, but that's pretty easy to deal with. Derek On Wed, Sep 3, 2008 at 3:23 PM, Tim Perrett <[EMAIL PROTECTED]> wrote: > > @derek Awesome, is that new example using scala in the persistence > module? > > Cheers > > Tim > > > --~

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread Kris Nuttycombe
Thanks, Derek. Today's my first day with Lift so I'm just coming up to speed, and I'm not familiar with RequestVar. As I understand this solution though, I would no longer need the Model threadlocal or the LoanWrapper at all (since I'm depending upon the container to manage the EntityManager's lif

[Lift] Re: JPA w/Scala - never mind

2008-09-03 Thread Tim Perrett
@derek Awesome, is that new example using scala in the persistence module? Cheers Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To un

[Lift] Re: JPA w/Scala - never mind

2008-09-03 Thread Charles F. Munat
Great! Derek Chen-Becker wrote: > Sorry I didn't get back to you on that. I'm working on an improved > version of the tutorial to include a complete example but it's dependent > on 0.10-SNAPSHOT right now. As soon as 0.10 goes GA I'll revise the > tutorial page. > > Derek > > On Tue, Sep 2,

[Lift] Whence 0.10?

2008-09-03 Thread Derek Chen-Becker
Is it going to be out anytime soon? I'm holding off on updating the JPA tutorial until 0.10 isn't in SNAPSHOT since I don't want to have things break with last-minute commits. Thanks, Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread Derek Chen-Becker
Yeah, you have to provide the DTD for the XML for the persistence API to pick it up correctly. As for a JNDI lookup, you could write a utility lookup method: import javax.naming.InitialContext def lookupEM() = (new InitialContext()).lookup("my JNDI name here").asInstanceOf[EntityManager] and then

[Lift] Re: JPA w/Scala - never mind

2008-09-03 Thread Derek Chen-Becker
Sorry I didn't get back to you on that. I'm working on an improved version of the tutorial to include a complete example but it's dependent on 0.10-SNAPSHOT right now. As soon as 0.10 goes GA I'll revise the tutorial page. Derek On Tue, Sep 2, 2008 at 8:35 PM, Charles F. Munat <[EMAIL PROTECTED]>

[Lift] Re: Basic example not running in maven/jetty

2008-09-03 Thread Mark
Never mind, this problem was caused by our company's content filter thinking that i was not allowed to download the rhino-js library great. On Sep 3, 4:16 pm, Mark <[EMAIL PROTECTED]> wrote: > I'm trying to run a basic lift-application generated by the maven- > archetype lift-archetype-basic,

[Lift] Re: Problems with persistence context (Lift/JPA)

2008-09-03 Thread nuttycom
Okay, I've figured out the first error - I needed to declare the tag as http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/ persistence http://java.sun.com/xml/ns/persistence/per

[Lift] Problems with persistence context (Lift/JPA)

2008-09-03 Thread Kris Nuttycombe
Hi, all, I'm trying to get a simple Lift webapp working with my existing EJB3 persistence artifact, and am getting some strange errors on startup. I've been following the directions from http://liftweb.net/index.php/Lift_and_JPA_(javax.persistence) closely, but using my existing entities jar inst

[Lift] Re: RTL Localization

2008-09-03 Thread Marius
On Sep 3, 9:05 am, Tim Perrett <[EMAIL PROTECTED]> wrote: > > ... it really depends on the specific situation. I'm not sure though > > in what extend this is a framework concern (other then load perhaps > > css and js per language just like templatea are ... like /styles/ > > homepage_ar_SA.css

[Lift] Re: Basic example not running in maven/jetty

2008-09-03 Thread Mark
Ok, i've probably found the cause: a proxy at the company i am working for thought it would be smart to filtered out a certain repo location. Maven just assumed that the proxy's error message was the POM's content (in this case it was the rhino js pom). Sadly, it only failed later on when i got th

[Lift] Basic example not running in maven/jetty

2008-09-03 Thread Mark
I'm trying to run a basic lift-application generated by the maven- archetype lift-archetype-basic, as described in the 'howto start'. I was successful doing this a few months ago, but now maven keeps complaining about a missing class: org.mozilla.javascript.ErrorReporter. It seems to be the yuicom

[Lift] Re: RTL Localization

2008-09-03 Thread Tim Perrett
> ... it really depends on the specific situation. I'm not sure though > in what extend this is a framework concern (other then load perhaps > css and js per language just like templatea are ... like /styles/ > homepage_ar_SA.css and lift would automatically pick the right thing > per language). I

[Lift] Re: RTL Localization

2008-09-03 Thread Marius
Or one other solution would be that the link references in the page to be generated by a snippet (perhaps a built in snippet) to reference css per language. This has the advantages: 1. Not much changes on lift side .. so it seems simpler. 2. It will work even if the static resources (css, js,imag