Affects Version/s: None
Fix Version/s: 2.0.0-beta3
Per javadoc for EntityManagerFactory.getCache():
- Access the cache that is associated with the entity manager
- factory (the "second level cache").
- @return instance of the Cache interface
- @throws IllegalStateException if the entity manager factory
- has been closed
public Cache getCache();
Throwing a new IllegalStateException is trivial, but throwing the same exception we do for other operations on a closed factory is a bit more involved.
Short reason :
- BrokerFactory.assertOpen() is not public, and the saved exception (used when trace is enabled) is also not available outside of AbstractBrokerFactory.
- EMFImpl.getCache() caches the cache. The same object implements the JPA cache interface and the OpenJPA StoreCache interface. Historically getting the StoreCache does not require the EMF to be open (this may be an oversight).
|Field||Original Value||New Value|
|Status||Open [ 1 ]||Closed [ 6 ]|
|Resolution||Fixed [ 1 ]|
|Fix Version/s||2.0.0-beta3 [ 12314857 ]|
|Fix Version/s||2.0.0 [ 12314019 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|4d 2h 56m||1||Michael Dick||22/Mar/10 17:26|