org.apache.jackrabbit.core.journal
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
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 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
Method Summary |
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. |
Methods inherited from class org.apache.jackrabbit.core.journal.DatabaseJournal |
append, appending, buildSQLStatements, close, createSchemaSQL, doLock, doUnlock, getDriver, getInstanceRevision, getJanitorEnabled, getJanitorFirstRunHourOfDay, getJanitorSleep, getPassword, getReconnectDelayMs, getRecords, getSchema, getSchemaObjectPrefix, getUrl, getUser, init, initInstanceRevisionAndJanitor, setDriver, setJanitorEnabled, setJanitorFirstRunHourOfDay, setJanitorSleep, setPassword, setReconnectDelayMs, setSchema, setSchemaObjectPrefix, setUrl, setUser, tableExists |
Methods inherited from class org.apache.jackrabbit.core.journal.AbstractJournal |
createProducer, doSync, getConsumer, getId, getNamePathResolver, getProducer, getRepositoryHome, getResolver, getRevision, lockAndSync, register, setRepositoryHome, setRevision, sync, unlock, unregister |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JNDIDatabaseJournal
public JNDIDatabaseJournal()
- Deprecated.
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 a
DataSource
acquired from JNDI
with the configured data source location.
- Overrides:
getConnection
in class DatabaseJournal
- Returns:
- new database connection
- Throws:
SQLException
- if a database access error occurs- See Also:
DatabaseJournal.getConnection()
init
protected void init()
throws JournalException
- Deprecated.
- Overridden to avoid the driver and url checks in DatabaseJournal.
- Overrides:
init
in class DatabaseJournal
- Throws:
JournalException
- if initialization fails- See Also:
DatabaseJournal.getConnection()
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.