openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nino Saturnino Martinez Vazquez Wael <>
Subject JPA and persistence context
Date Wed, 02 Apr 2008 14:28:56 GMT

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)


-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
+45 2936 7684

View raw message