ee,hash,hashing,transaction,transactions,locking,logging,access method,access me thods,java,C,C++">
public static DbTxnMgr open(String dir, int flags, int mode, DbEnv dbenv) throws DbException;
The dir pathname argument is interpreted as described in Berkeley DB File Naming.
The flags and mode arguments specify how files will be opened and/or created if they do not already exist. The flags value is specified by logically OR'ing together one or more of the following values:
The number of transactions that are potentially at risk is governed by how often the log is checkpointed (see db_checkpoint for more information) and how many log updates can fit on a single log page.
All files created by the transaction subsystem are created with mode mode (as described in chmod(2)) and modified by the process' umask value at the time of creation (see umask(2)))). The group ownership of created files is based on the system and directory defaults, and is not further specified by Berkeley DB.
The transaction subsystem is configured based on the dbenv argument. It is expected that applications will use a single DbEnv object as the argument to all of the subsystems in the Berkeley DB package. The fields of the DbEnv object used by DbTxnMgr.open are described below. Any of the DbEnv fields that are not explicitly set will default to appropriate values.
The following fields in the DbEnv object may be initialized, using the appropriate set method, before calling DbTxnMgr.open:
The DbTxnMgr.open method throws an exception that encapsulates an errno on failure.
The DbTxnMgr.open method may fail and throw an exception for any of the errors specified for the following Berkeley DB and C library functions: abort(3), close(3), DbEnv.version, fcntl(3), fflush(3), fprintf(3), free(3), fstat(3), fsync(3), getenv(3), getpid(3), getuid(3), isdigit(3), lseek(3), malloc(3), memcpy(3), memset(3), mmap(3), munmap(3), open(3), pstat_getdynamic(3), read(3), shmat(3), shmctl(3), shmdt(3), sigfillset(3), sigprocmask(3), stat(3), strerror(3), strlen(3), sysconf(3), time(3), DbTxnMgr.unlink, unlink(3), vfprintf(3), vsnprintf(3), and write(3).
In addition, the DbTxnMgr.open method may fail and throw an exception encapsulating errno for the following conditions:
The DB_THREAD flag was specified and spinlocks are not implemented for this architecture.
The dbenv parameter was null.