*/
public synchronized void init(String homeDir) throws DataStoreException {
try {
initDatabaseType();
connectionPool = new Pool(this, maxConnections);
ConnectionRecoveryManager conn = getConnection();
DatabaseMetaData meta = conn.getConnection().getMetaData();
log.info("Using JDBC driver " + meta.getDriverName() + " " + meta.getDriverVersion());
meta.getDriverVersion();
ResultSet rs = meta.getTables(null, null, schemaObjectPrefix + tableSQL, null);
boolean exists = rs.next();
rs.close();
if (!exists) {
// CREATE TABLE DATASTORE(ID VARCHAR(255) PRIMARY KEY,
// LENGTH BIGINT, LAST_MODIFIED BIGINT, DATA BLOB)
conn.executeStmt(createTableSQL, null);
}
putBack(conn);
} catch (Exception e) {
throw convert("Can not init data store, driver=" + driver + " url=" + url + " user=" + user +
" schemaObjectPrefix=" + schemaObjectPrefix + " tableSQL=" + tableSQL + " createTableSQL=" + createTableSQL, e);