Using checkin and checkout in transactions

IBM® Content Manager supports check-out and check-in operations on items.

The checkout operation is called to acquire a persistent write lock for items. When an item is checked out by a user, other users can not update it although they can still retrieve and view it. You need to call the checkout operation prior to updating or re-indexing an item, regardless of the transaction mode (implicit or explicit) that you use. When you are done with the item, call the checkin operation to release the persistent lock and make the item available for other users to update. After you create an item, you have the option to keep it in checked out state to prevent other users from changing it until you are completely done with the work. If you check out (or check in) an item using an explicit transaction, the check out is undone if the transaction is rolled back. If you check out an item using an implicit transaction, the checkout is committed. It is the application's responsibility to check the item back in, using checkin options or methods.

Important:

Calling the checkout method in an explicit transaction might cause contentions for other applications that are trying to check out the same items. As a result, the lock time out error (-911) might happen and the performance of the application might degrade. To avoid this contention, it is recommended that the applications perform the checkout action in an implicit transaction to alleviate system contentions for the resources. For applications that are not competing against the same item ID or for applications where the resource manager replicator is not running at the same time, calling the checkout method is not a problem.

If you check out or check in an item by using an explicit transaction, the checkout is undone if the transaction is rolled back. If you check out an item using an implicit transaction, the checkout is committed. You must check the item back in by using checkin options or methods.