|
Comment:
|
The locks are created by this in testLazyCollectionLoadingWithClearedSession: store.getInventories().size();
In AbstractPersistentCollection#readSize, withTemporarySessionIfNeeded gets called multiple times in order to init and read the collection. I'm not 100% clear on the sequence, but it needs stepped through to make sure temp sessions are getting closed.
Although, that brings up a question. If the test does not call s.clear(), AbstractPersistentCollection uses that session. If s.clear() is called, a temp session is created. Should the cleared session be passed and used by AbstractPersistentCollection, or is creating a temp session expected?
|