Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » @PrePersist endless loop
@PrePersist endless loop [message #383035] Tue, 18 November 2008 13:36 Go to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
When an entity is persisted some other entities must be created; in this case allocations on batches based on the amount specified. I use the @PrePersist annotation and then start creating and persisting new entities. This resulst in an endless loop. Do note that there is only ONE Batchtransferline entity being persisted, Batch and Batchcount entites are created.

If this is not the right way to do it, how else? I of course can make it a separate method and call it from the user interface, but I would prefer to code it like a trigger; upon store allocate the amount.


Thread [AWT-EventQueue-1] (Suspended (breakpoint at line 78 in Batchtransferline))
Batchtransferline.preSaveHook() line: 78
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabase(b oolean) line: 1241
RepeatableWriteUnitOfWork.commitToDatabase(boolean) line: 478
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabaseWi thPreBuiltChangeSet(UnitOfWorkChangeSet, boolean) line: 1370
RepeatableWriteUnitOfWork.writeChanges() line: 300
EntityManagerImpl.flush() line: 384
EJBQueryImpl.performPreQueryFlush() line: 936
EJBQueryImpl.executeReadQuery() line: 378
EJBQueryImpl.getResultList() line: 517
Batch.findAllThatHaveAmountLeftOrderByBatchnr(Batchtype) line: 103
Batchcount.changeAllocation(BigInteger, Batchtransferline) line: 85
Batchtransferline.preSaveHook() line: 86
Batchtransferline(AbstractBean).preSave() line: 230
GeneratedMethodAccessor81.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
PrivilegedAccessHelper.invokeMethod(Method, Object, Object[]) line: 344
EntityClassListener(EntityListener).invokeMethod(Method, Object, Object[], DescriptorEvent) line: 297
EntityClassListener.invokeMethod(String, DescriptorEvent) line: 64
EntityClassListener(EntityListener).preUpdateWithChanges(Des criptorEvent) line: 426
DescriptorEventManager.notifyListener(DescriptorEventListene r, DescriptorEvent) line: 656
DescriptorEventManager.notifyEJB30Listeners(DescriptorEvent) line: 593
DescriptorEventManager.executeEvent(DescriptorEvent) line: 187
ExpressionQueryMechanism(DatabaseQueryMechanism).updateObjec tForWriteWithChangeSet() line: 1083
UpdateObjectQuery.executeCommitWithChangeSet() line: 84
ExpressionQueryMechanism(DatabaseQueryMechanism).executeWrit eWithChangeSet() line: 290
UpdateObjectQuery(WriteObjectQuery).executeDatabaseQuery() line: 58
UpdateObjectQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line: 666
UpdateObjectQuery(DatabaseQuery).executeInUnitOfWork(UnitOfW orkImpl, AbstractRecord) line: 585
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor kObjectLevelModifyQuery(UnitOfWorkImpl, AbstractRecord) line: 114
UpdateObjectQuery(ObjectLevelModifyQuery).executeInUnitOfWor k(UnitOfWorkImpl, AbstractRecord) line: 86
RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQue ry(DatabaseQuery, AbstractRecord) line: 2587
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord, int) line: 1178
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery, AbstractRecord) line: 1162
RepeatableWriteUnitOfWork(AbstractSession).executeQuery(Data baseQuery) line: 1108
CommitManager.commitChangedObjectsForClassWithChangeSet(Unit OfWorkChangeSet, String) line: 297
CommitManager.commitAllObjectsForClassWithChangeSet(UnitOfWo rkChangeSet, Class) line: 228
CommitManager.commitAllObjectsWithChangeSet(UnitOfWorkChange Set) line: 185
RepeatableWriteUnitOfWork(AbstractSession).writeAllObjectsWi thChangeSet(UnitOfWorkChangeSet) line: 3129
RepeatableWriteUnitOfWork(UnitOfWorkImpl).commitToDatabas
Re: @PrePersist endless loop [message #383809 is a reply to message #383035] Wed, 19 November 2008 13:43 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The issues is that your flushMode is AUTO, which requires a flush() before
any query execution, and you are executing a query from inside your
preSave event (which is called from a flush).

You need to set your flushMode mode to commit,
i.e.
entityManager.setFlushMode(FlushModeType.COMMIT);

In EclipseLink 1.1 their will also be a query hint to set the flushMode.


Please also log a bug for the loop, if we are in the process of a flush,
we should not attempt another flush, although if the query's flush mode is
auto, we will have to throw an error.

----
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: @PrePersist endless loop [message #383817 is a reply to message #383809] Mon, 24 November 2008 13:49 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
> Please also log a bug for the loop, if we are in the process of a flush,
> we should not attempt another flush, although if the query's flush mode
> is auto, we will have to throw an error.

Done.
Re: @PrePersist endless loop [message #383818 is a reply to message #383809] Mon, 24 November 2008 14:02 Go to previous messageGo to next message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
> You need to set your flushMode mode to commit,
> i.e.
> entityManager.setFlushMode(FlushModeType.COMMIT);
>
> In EclipseLink 1.1 their will also be a query hint to set the flushMode.

Too bad there isn't a EntityManagerFactory setting so all EMs are set to this flushmode per default. I'm using a proxy on the EMF now.

Tom
Re: @PrePersist endless loop [message #383820 is a reply to message #383818] Mon, 24 November 2008 14:27 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

In the EclipseLink 1.1 stream there is a persistence unit property for
this,

"eclipselink.persistence-context.flush-mode"="COMMIT"


James : Wiki : Book : Blog : Twitter
Re: @PrePersist endless loop [message #383821 is a reply to message #383820] Mon, 24 November 2008 15:23 Go to previous message
Tom Eugelink is currently offline Tom Eugelink
Messages: 807
Registered: July 2009
Senior Member
Hm. I switched from an application generated event to the eclipse @PrePersist event. The code is executed, new objects are created, EM.persist(...) is called, but none of the new objects are actually persisted.

If I switched back to the application generated pre-save event (first thing when a transaction's commit is started), it works just fine. Please note that I'm building a fat client and that all changes are made outside a transaction. When the save butten is pressed, a transaction is started and the main entity is merged. Below is the persist code:

lEntityManager.clear(); // prevent errors from a previous store session (not rollbacked optimistic lock increments) to screw things up
preSave(); // event
lEntityManager.getTransaction().begin();
duringSavePreMerge(); // event
T lMergedEntity = lEntityManager.merge(getEntity());
duringSavePostMerge(); // event
lEntityManager.getTransaction().commit();
postSave(); // event


The application event is the "duringSavePreMerge" call, EclipseLink generates its event in the "commit". Can that be the cause? (If I bind to the "duringSavePostMerge" event, the changes are still persisted.)

Tom
Previous Topic:Support for InheritanceType.TABLE_PER_CLASS
Next Topic:JPA/EclipseLink "abuse": table rows -> hash map?
Goto Forum:
  


Current Time: Tue Sep 16 13:34:38 GMT 2014

Powered by FUDForum. Page generated in 0.04199 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software