openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravi P Palacherla <>
Subject Re: Problem of partial commit in OpenJPA
Date Tue, 13 Apr 2010 19:08:41 GMT

Sudhir ,

I assume you are using container managed transaction and have default
transaction mode for the stateless session bean.

I am unable to replicate the issue on WLS10.3 (openJPA
openjpa-1.1.0-r422266:657916) and here is the testcase  that I

To throw AppExcetion after the find I have to do the following:

em.persist( aDepartment );
Department newDept = em.find( Department.class,
if ( newDept == null ) {
    throw new AppException(new Exception("dept not found"));

With above testcase I am unable to replicate the issue meaning nothing is
persisted in the database in case of AppException. Hence the rollback is
happening completely (not partial).

Please review the attached testcase and let me know how it is different with
your application.
That will help to isolate your problem.


In sudhir's code snippet, aDepartment is persisted and aDepartment.getName()
is used in the find.
I guess  aDepartment will be managed after the persist statement and the
find will always return a non-null object. So, I think that newDept should
never be null.

Is my understanding incorrect ?

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message