datadryad/dryad-repo — pull request #517 by dleehr (2014-02-06 22:03:43+00:00)
Title: Fix RIS and BibText citation downloads - Avoid aborting context before DSpaceObject is used.

Avoid aborting context before DSpaceObject is used.

Fixes RIS and BibText citation downloads, as well as other spring views in ResourceIdentifierController.

context.abort() was called in a finally block in getDSO(). After getting a DSO other other methods attempt to use the object, but any operation that accesses the database fails, because context.abort() clears out the database connection pointer.

Now, the context is only aborted within getDSO() if an item was not found. If an item was found, the context is stored in a request attribute and aborted after the item is no longer needed.

This issue surfaced in 27f62e8e6cc7e0207cf602f42ce93621fc5ec5b7 - [Ticket: 1729] Closing of context object