Allow configuration of read-only entities for each session independently
------------------------------------------------------------------------
Key: HHH-3330
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3330
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Environment: 3.2.5.GA, Database independent
Reporter: Rodrigo Ezequiel Merino
Priority: Minor
Attachments: ConfigurableReadOnlyPersistenceContext.java
Some batch processes have input data which isn't modified during that process, but
which may be updated in other use cases. However, when the batch process session is
flushed, those unmodifiable objects are checked for needed updates. This can lead to a
significant performace degradation when dealing with large volumes of objects.
It would be of great help to be able to inform the session at creation time which entities
are read-only for that session. When an object is added to the persistenceContext or its
status changed, if its status is MANAGED and its class is one of the configured as
read-only, the status is changed to READ_ONLY.
In addition to the less cpu time consumed, it frees the memory used by the snapshot copy
used for dirty checking.
This code is implemented as a decorator for the PersistenceContext and attached in this
issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira