Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Read Only Context in DSpace 6

Objects read by a read only context are not intended to be modified.  The context object should not be committed.

The read only context is intended for data security.  Implementations using this context should not be able to accidentally save chages.

(question) Do read only connections also have optimized performance?

Batch Context in DSpace 6

Hibernate provides a mechanism to submit a large batch of changes to a database in a memory-efficient manner.

See https://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/batch.html

Hibernate Issues Discovered in DSpace 6.1

Surprisingly, Hibernate Database Connections are shared between DSpace Context objects.  Therefore, database connections used by read only contexts and by editable contexts are shared. 

The proper commit/closure of a database connection differs for read only connections and writable connections.  Since these connections are shared, unexpected behavior has been discovered when an incompatible database connection is used by a DSpace context.

Recommended use of Hibernate and the Context Object (DSpace 6.2 and beyond)

Hibernate Queries

In order to take advantage of the hibernate cache and other hibernate features, all queries for DSOs will be performed through the hibernate framework rather than by generating SQL explicitly.

...