openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nino Saturnino Martinez Vazquez Wael <nino.marti...@jayway.dk>
Subject Re: JPA and persistence context
Date Thu, 03 Apr 2008 11:27:32 GMT
So I guess no one uses OpenJPA in web applications?

Only thing I wanted were some snipplets showing how you did transactions 
etc in a web application.


regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:
> Hi
>
> I wonder what best practices are on persistence context when running 
> in a web application(Apache Wicket). Currently my ap are using 
> extended, since it's the only way it works. But I found out why..
>
> When I switch to transaction based after I do changes i need to do 
> tx.begin tx.commit.
>
> So if I run via extended my pojo's never gets detached and tx's are 
> never used?
>
> And if I use transaction based I need to run a transaction every time 
> I wish to update?
>
> I'd like to hear your input and how you do it in your web application?
>
> BTW I use spring(2.0.1) to manage my entitymanager etc (I have 
> annotated my daoclass with @transactional)
>
> regards
>

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


Mime
View raw message