mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
Added "context.commit()" method to allow mid-context commits.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@486 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -224,6 +224,22 @@ public class Context
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Commit any transaction that is currently in progress, but do not
|
||||
* close the context.
|
||||
*
|
||||
* @exception SQLException
|
||||
* if there was an error completing the database transaction or closing
|
||||
* the connection
|
||||
*/
|
||||
public void commit()
|
||||
throws SQLException
|
||||
{
|
||||
// Commit any changes made as part of the transaction
|
||||
connection.commit();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close the context, without committing any of the changes performed using
|
||||
* this context. The database connection is freed. No exception is thrown
|
||||
|
Reference in New Issue
Block a user