OPENJPA-1323 Enhanced to conform to the new spec requirement.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@818153 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2009-09-23 16:14:35 +00:00
parent fbb7e1208a
commit 6485137930
2 changed files with 4 additions and 2 deletions

View File

@ -82,7 +82,7 @@ public class TestMixedLockManagerRefreshException extends SequencedActionsTest {
{Act.TestEmployee, 1, Default_FirstName},
{Act.RefreshWithLock, 1, LockModeType.NONE },
{Act.TestException, 0, TransactionRequiredException.class },
{Act.TestException, 0, null },
{Act.RefreshWithLock, 1, LockModeType.READ },
{Act.TestException, 0, TransactionRequiredException.class },

View File

@ -752,7 +752,9 @@ public class EntityManagerImpl
Map<String, Object> properties) {
assertNotCloseInvoked();
assertValidAttchedEntity(entity);
if (mode != null && mode != LockModeType.NONE) {
_broker.assertActiveTransaction();
}
_broker.assertWriteOperation();
processLockProperties(pushFetchPlan(), mode, properties);