When using Berkeley DB 6.1.19. with Java API (JNI) there is a bug that prevents users from calling "Environment.lockVector()":
Setting a lock timeout for the LockRequest and defining "LockRequestMode.GET_TIMEOUT" is not correctly mapped in the JNI implementation. Instead of setting "timeout", "op" is getting set. I found the error and fixed it for my local Installation:
source file: lang/java/libdb_java/db_java_wrap.c line 1868 (Java_com_sleepycat_db_internal_db_1javaJNI_DbEnv_1lock_1vec):
case DB_LOCK_GET_TIMEOUT: /* Needed: mode, timeout, obj. Returned: lock. */ prereq->op = (db_lockop_t)(*jenv)->GetIntField( jenv, jlockreq, lockreq_timeout_fid);
must be fixed to:
prereq->timeout = (db_lockop_t)(*jenv)->GetIntField( jenv, jlockreq, lockreq_timeout_fid);
Thanks for reporting the issue.
We will take a look and fix it if there is a bug here.
Winter, Oracle Berkeley DB