Class JNDIDatabaseJournal
- java.lang.Object
-
- org.apache.jackrabbit.core.journal.AbstractJournal
-
- org.apache.jackrabbit.core.journal.DatabaseJournal
-
- org.apache.jackrabbit.core.journal.JNDIDatabaseJournal
-
- All Implemented Interfaces:
Journal,DatabaseAware
@Deprecated public class JNDIDatabaseJournal extends DatabaseJournal
Deprecated.This class should not be used because it is not database vendor specific. Each DatabaseJournal now supports getting the connection via JNDI by setting the driver to javax.naming.InitialContext and the URL to the JNDI name.Database journal that uses JNDI to acquire the database connection. The JNDI location of the
DataSourceto be used in given as thedataSourceLocationconfiguration 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.jackrabbit.core.journal.DatabaseJournal
DatabaseJournal.DatabaseRevision, DatabaseJournal.RevisionTableJanitor
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.core.journal.DatabaseJournal
cleanRevisionStmtSQL, getLocalRevisionStmtSQL, insertLocalRevisionStmtSQL, insertRevisionStmtSQL, schemaObjectPrefix, selectGlobalStmtSQL, selectMinLocalRevisionStmtSQL, selectRevisionsStmtSQL, updateGlobalStmtSQL, updateLocalRevisionStmtSQL
-
-
Constructor Summary
Constructors Constructor Description JNDIDatabaseJournal()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ConnectiongetConnection()Deprecated.Returns a JDBC connection from aDataSourceacquired from JNDI with the configured data source location.StringgetDataSourceLocation()Deprecated.Returns the JNDI location of the data source.protected voidinit()Deprecated.Overridden to avoid the driver and url checks in DatabaseJournal.voidsetDataSourceLocation(String dataSourceLocation)Deprecated.Sets the JNDI location of the data source.-
Methods inherited from class org.apache.jackrabbit.core.journal.DatabaseJournal
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
-
Methods inherited from class org.apache.jackrabbit.core.journal.AbstractJournal
createProducer, doSync, getConsumer, getId, getNamePathResolver, getProducer, getRepositoryHome, getResolver, getRevision, lockAndSync, register, setInternalVersionManager, setRepositoryHome, setRevision, sync, syncAgainOnNewRecords, unlock, unregister
-
-
-
-
Method Detail
-
getDataSourceLocation
public String getDataSourceLocation()
Deprecated.Returns the JNDI location of the data source.- Returns:
- data source location
-
setDataSourceLocation
public void setDataSourceLocation(String dataSourceLocation)
Deprecated.Sets the JNDI location of the data source.- Parameters:
dataSourceLocation- data source location
-
getConnection
protected Connection getConnection() throws SQLException
Deprecated.Returns a JDBC connection from aDataSourceacquired from JNDI with the configured data source location.- Returns:
- new database connection
- Throws:
SQLException- if a database access error occurs- See Also:
DataSource.getConnection()
-
init
protected void init() throws JournalExceptionDeprecated.Overridden to avoid the driver and url checks in DatabaseJournal.- Overrides:
initin classDatabaseJournal- Throws:
JournalException- if initialization fails
-
-