No Wait on Blocks

Normally when a BDB XML transaction is blocked on a lock request, it must wait until the requested lock becomes available before its thread-of-control can proceed. However, it is possible to configure a transaction handle such that it will report a deadlock rather than wait for the block to clear.

You do this on a transaction by transaction basis by specifying DB_TXN_NOWAIT to the XmlManager::createTransaction() method.

For example:

XmlTransaction txn = NULL; 
try {
    txn = myManager.createTransaction(DB_TXN_NOWAIT);
    ...
} catch (XmlException &e) {
        // Deadlock detection and exception handling omitted
        // for brevity