We're trying to switch from openjpa 2.1.1 to 2.4.0 and we noticed some change
of behavior in our internal junit tests.

After we're done with a test, we execute the following succession of ops:
- create a new entity manager
- create a transaction and persist some objects in that transaction
- commit the transaction
- then call evictAll on the current entity manager
- the close on the EM
- then we clear out our tables with row sql.

What we noticed happening was the our L2 cache was still having refs to
objects after the mentioned set of ops. That was not happening with open jpa
2.1.1. 

Debugging the code, in our complex scenario, when calling close on the EM,
it promotes the L1 cache obj to L2 cache. On a simple test, with just
creating one pojo, executing the transaction, clearing the cache, evictAll,
close on EM, seems like the evictAll was promoting the object to the L2
cache.

Why is there logic to promote from L1 to L2 on calls to evictAll or close on
the EM? Shouldn't this be done only when a transaction gets committed? 



--
View this message in context: 
http://openjpa.208410.n2.nabble.com/open-jpa-2-4-0-Promoting-from-L1-cache-to-L2-cache-change-of-behavior-compared-to-open-jpa-2-1-1-tp7588802.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Reply via email to