Database journal that uses JNDI to acquire the database connection.
The JNDI location of the DataSource
to be used in given as
the dataSourceLocation
configuration property.
WARNING: The acquired database connection is kept for the entire lifetime of the journal instance. The configured data source should be prepared for this.
public class JNDIDatabaseJournal extends DatabaseJournal
DatabaseJournal.DatabaseRevision, DatabaseJournal.RevisionTableJanitor
cleanRevisionStmtSQL, getLocalRevisionStmtSQL, insertLocalRevisionStmtSQL, insertRevisionStmtSQL, schemaObjectPrefix, selectGlobalStmtSQL, selectMinLocalRevisionStmtSQL, selectRevisionsStmtSQL, updateGlobalStmtSQL, updateLocalRevisionStmtSQL
Constructor and Description |
---|
JNDIDatabaseJournal()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected Connection |
getConnection()
Deprecated.
Returns a JDBC connection from a
DataSource acquired from JNDI
with the configured data source location. |
String |
getDataSourceLocation()
Deprecated.
Returns the JNDI location of the data source.
|
protected void |
init()
Deprecated.
Overridden to avoid the driver and url checks in DatabaseJournal.
|
void |
setDataSourceLocation(String dataSourceLocation)
Deprecated.
Sets the JNDI location of the data source.
|
append, appending, buildSQLStatements, close, createCheckSchemaOperation, createConnectionHelper, doLock, doSync, doUnlock, getDatabaseType, getDataSourceName, getDriver, getInstanceRevision, getJanitorEnabled, getJanitorFirstRunHourOfDay, getJanitorSleep, getPassword, getRecords, getRecords, getSchema, getSchemaObjectPrefix, getUrl, getUser, init, initInstanceRevisionAndJanitor, isSchemaCheckEnabled, setConnectionFactory, setDatabaseType, setDataSourceName, setDriver, setJanitorEnabled, setJanitorFirstRunHourOfDay, setJanitorSleep, setPassword, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, setUrl, setUser
createProducer, doSync, getConsumer, getId, getNamePathResolver, getProducer, getRepositoryHome, getResolver, getRevision, lockAndSync, register, setInternalVersionManager, setRepositoryHome, setRevision, sync, syncAgainOnNewRecords, unlock, unregister
public String getDataSourceLocation()
public void setDataSourceLocation(String dataSourceLocation)
dataSourceLocation
- data source locationprotected Connection getConnection() throws SQLException
DataSource
acquired from JNDI
with the configured data source location.SQLException
- if a database access error occursDataSource.getConnection()
protected void init() throws JournalException
init
in class DatabaseJournal
JournalException
- if initialization failsCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.