when SequentialDB throws an exception, it fails to release its ReadWriteLock, so use ScopedReadLock and ScopedWriteLock to automatically release the lock even when exception is thrown.
when SequentialDB throws an exception, it fails to release its ReadWriteLock,
so use ScopedReadLock and ScopedWriteLock to automatically release the
lock even when exception is thrown.

izenecloud/izenelib,pombredanne/izenelib,pombredanne/izenelib,pombredanne/izenelib,izenecloud/izenelib,pombredanne/izenelib,izenecloud/izenelib,izenecloud/izenelib