struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <hus...@apache.org>
Subject Re: JPA in mailreader
Date Mon, 12 Nov 2007 18:00:43 GMT
Quite right. There's a static EntityManagerHelper that returns a fresh
EM for each transaction.

I think it would be great to have a couple of implementations to compare!

If you'd like to park it at the sq1-struts2 site for now, just let me
know your google ID.

-Ted.

On Nov 12, 2007 10:28 AM, Wes Wannemacher <wesw@wantii.com> wrote:
> On 11/12/07, Ted Husted <husted@apache.org> wrote:
> >
> > I use Spring and dependency-injection a lot, but I don't know see that
> > injecting the EntityManager buys us very much, especially now that we
> > have a standard API. So, I"ve just been using a static class that
> > instantiates the EM as a singleton. No big woof.
> >
>
> I would be careful, Ted, there is a one-to-one relationship with the
> EM and the transaction -
>
> http://openjpa.apache.org/docs/latest/manual/jpa_overview_em.html
>
> I'll finish up this "persistence" layer (DAOs / Entities) today or
> tomorrow and put it out somewhere for you to take a look at. I don't
> mind if we don't use what I've got, since it's really more about me
> learning JPA than anything else.
>
>
> -Wes
> --
> Wesley Wannemacher
> President, Head Engineer/Consultant
> WanTii, Inc.
> http://www.wantii.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
HTH, Ted <http://www.husted.com/ted/blog/>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message