org.apache.jackrabbit.core.persistence.db
Class JNDIDatabasePersistenceManager
java.lang.Object
org.apache.jackrabbit.core.persistence.AbstractPersistenceManager
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager
- All Implemented Interfaces:
- PersistenceManager
- Direct Known Subclasses:
- JNDIDatabasePersistenceManager
public class JNDIDatabasePersistenceManager
- extends DatabasePersistenceManager
Database persistence manager that uses JNDI to acquire the database
connection. The JNDI location of the DataSource
to be used in
given as the dataSourceLocation
configuration property.
See the SimpleDbPersistenceManager
for more configuration
details.
WARNING: The acquired database connection is kept
for the entire lifetime of the persistence manager instance. The
configured data source should be prepared for this.
Fields inherited from class org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager |
autoReconnect, blobDeleteSQL, blobFS, blobInsertSQL, blobSelectExistSQL, blobSelectSQL, blobStore, blobUpdateSQL, con, externalBLOBs, INITIAL_BUFFER_SIZE, initialized, nodeReferenceDeleteSQL, nodeReferenceInsertSQL, nodeReferenceSelectExistSQL, nodeReferenceSelectSQL, nodeReferenceUpdateSQL, nodeStateDeleteSQL, nodeStateInsertSQL, nodeStateSelectExistSQL, nodeStateSelectSQL, nodeStateUpdateSQL, propertyStateDeleteSQL, propertyStateInsertSQL, propertyStateSelectExistSQL, propertyStateSelectSQL, propertyStateUpdateSQL, schema, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, SLEEP_BEFORE_RECONNECT |
Methods inherited from class org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager |
buildSQLStatements, checkSchema, close, closeConnection, closeResultSet, closeStatement, destroy, destroy, destroy, executeStmt, exists, exists, exists, getSchema, getSchemaDDL, getSchemaObjectPrefix, init, initConnection, initPreparedStatements, isExternalBLOBs, load, load, load, logException, prepareSchemaObjectPrefix, reestablishConnection, resetStatement, setExternalBLOBs, setExternalBLOBs, setSchema, setSchemaObjectPrefix, store, store, store, store |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JNDIDatabasePersistenceManager
public JNDIDatabasePersistenceManager()
getDataSourceLocation
public String getDataSourceLocation()
- Returns the JNDI location of the data source.
- Returns:
- data source location
setDataSourceLocation
public void setDataSourceLocation(String dataSourceLocation)
- Sets the JNDI location of the data source.
- Parameters:
dataSourceLocation
- data source location
getConnection
protected Connection getConnection()
throws NamingException,
SQLException
- Returns a JDBC connection from a
DataSource
acquired from JNDI
with the configured data source location.
- Overrides:
getConnection
in class DatabasePersistenceManager
- Returns:
- new database connection
- Throws:
NamingException
- if the given data source location does not exist
SQLException
- if a database access error occurs- See Also:
DatabasePersistenceManager.getConnection()
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.