mirror of https://github.com/apache/openjpa.git
rollback all SingleEMTestCase changes
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1006039 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
044164b4ad
commit
7920a950aa
|
@ -106,20 +106,16 @@ public abstract class SingleEMTestCase
|
||||||
* @return false if the EntityManager was already closed.
|
* @return false if the EntityManager was already closed.
|
||||||
*/
|
*/
|
||||||
protected boolean close() {
|
protected boolean close() {
|
||||||
boolean brc = false;
|
|
||||||
if (em == null)
|
if (em == null)
|
||||||
return brc;
|
return false;
|
||||||
|
|
||||||
try {
|
rollback();
|
||||||
rollback();
|
|
||||||
|
|
||||||
if (!em.isOpen())
|
if (!em.isOpen())
|
||||||
return brc;
|
return false;
|
||||||
} finally {
|
|
||||||
em.close();
|
em.close();
|
||||||
brc = em.isOpen();
|
return !em.isOpen();
|
||||||
}
|
|
||||||
return !brc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue