openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <>
Subject Re: question about extended context and transactions
Date Mon, 05 May 2008 09:01:53 GMT
Adam Hardy wrote:
> If I put a flush() into the code after the JPA operation, it tries to 
> commit and throws an exception, but it also scrubs my entity from the 
> EntityManager and then my JSPs can't do any lazy loading to display the 
> data again (and give the user a second chance to enter correct data).
> So what am I doing wrong? Have I mis-configured the Spring 
> TransactionManager somehow? Is there a JPA setting I should be using? 
> Should I be doing something completely different?

Maybe you should try to validate the data before you try to merge it in 
the database. Most JSP framworks support validation, and it is also 
integrated in JSF.

In other words, JSP/JSF should handle validation, not DB.


View raw message