]
Emond Papegaaij commented on HHH-5773:
--------------------------------------
Perhaps it is possible to solve this with the addition of another property. So you'll
have a property to control the semantics at commit (the current 'cacheMode'
property) and a property to control what type of actions are registered (new). This would
make it fully backwards compatible.
Disable registration of AfterTransactionCompletionProcess based on
Session CacheMode
------------------------------------------------------------------------------------
Key: HHH-5773
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5773
Project: Hibernate Core
Issue Type: Improvement
Components: caching (L2), core
Affects Versions: 3.6.0
Reporter: Emond Papegaaij
The session keeps track of all changes to entities in the 'actionQueue'. This
ActionQueue contains a AfterTransactionCompletionProcessQueue, which grows rapidly with
every change/insert/delete of entities. There seems to be no way to clear this queue,
other than to commit or rollback. I can understand that Hibernate needs to keep track of
changes in a transaction, but this list should not hold references to entities. Perhaps
references can be replaced by lazy proxies?
In our case, we are trying to import many (millions) records into the database. This
needs to be performed in a single transaction. These records reference entities in a
complex (and large) data-structure. The entities in this structure are not modified, but
as the ActionQueue contains all newly inserted records, which in turn reference the
entities in this structure, the entire structure ends up in the session. Flushing and
clearing has no effect.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: