org.apache.jackrabbit.core.journal
Class JNDIDatabaseJournal

java.lang.Object
  extended by org.apache.jackrabbit.core.journal.AbstractJournal
      extended by org.apache.jackrabbit.core.journal.DatabaseJournal
          extended by org.apache.jackrabbit.core.journal.JNDIDatabaseJournal
All Implemented Interfaces:
Journal, DatabaseAware

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


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
JNDIDatabaseJournal()
          Deprecated.  
 
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, createCheckSchemaOperation, createConnectionHelper, doLock, 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, setRepositoryHome, setRevision, sync, unlock, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIDatabaseJournal

public JNDIDatabaseJournal()
Deprecated. 
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 a DataSource acquired from JNDI with the configured data source location.

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:
#getConnection()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.