I read the document of "Getting Started with Berkeley DB Java Edition"on the oracle library.I found this API:
Database
openDatabase(Transaction txn, String databaseName, DatabaseConfig dbConfig)
Opens, and optionally creates, a Database.
but when I use in my application I found this:
public Database openDatabase(Transaction var1, String var2, String var3, DatabaseConfig var4) throws DatabaseException, FileNotFoundException { return new Database(DatabaseConfig.checkNull(var4).openDatabase(this.dbenv, var1 == null?null:var1.txn, var2, var3)); }
enter image description here enter image description here there are four parameters not three, I don't know what's going on ... someone help me please ,thank you
I think you might have misused the two products: Berkeley DB (C Edition) and Berkeley DB Java Edition.
Both provide Java access APIs,
(1) Java API of com.sleepycat.db.Environment#openDatabase() for Berkeley DB (C Edition) -- 4 parameters
http://docs.oracle.com/cd/E17076_05/html/java/com/sleepycat/db/Environment.html#openDatabase-com.sleepycat.db.Transaction-java.lang.String-java.lang.String-com.sleepycat.db.DatabaseConfig-
(2) Java API of com.sleepycat.je.Environment#openDatabase() for Berkeley DB Java Edition -- 3 parameters
http://docs.oracle.com/cd/E17277_02/html/java/com/sleepycat/je/Environment.html#openDatabase-com.sleepycat.je.Transaction-java.lang.String-com.sleepycat.je.DatabaseConfig-