org.apache.jackrabbit.core.fs.db
Class JNDIDatabaseFileSystem
java.lang.Object
org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
org.apache.jackrabbit.core.fs.db.JNDIDatabaseFileSystem
- All Implemented Interfaces:
- FileSystem
Deprecated. This class should not be used because it is not database vendor specific.
Each DatabaseFileSystem now supports getting the connection via JNDI
by setting the driver to javax.naming.InitialContext
and the URL to the JNDI name.
Database file system 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
DbFileSystem for more configuration details.
WARNING: The acquired database connection is kept
for the entire lifetime of the file system instance. The configured data
source should be prepared for this.
public class JNDIDatabaseFileSystem
- extends DatabaseFileSystem
| Fields inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem |
con, copyFileSQL, copyFilesSQL, deleteFileSQL, deleteFolderSQL, INITIAL_BUFFER_SIZE, initialized, insertFileSQL, insertFolderSQL, schema, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix, selectChildCountSQL, selectDataSQL, selectExistSQL, selectFileAndFolderNamesSQL, selectFileExistSQL, selectFileNamesSQL, selectFolderExistSQL, selectFolderNamesSQL, selectLastModifiedSQL, selectLengthSQL, SLEEP_BEFORE_RECONNECT, updateDataSQL, updateLastModifiedSQL |
|
Method Summary |
protected java.sql.Connection |
getConnection()
Deprecated. Returns a JDBC connection from a DataSource acquired from JNDI
with the configured data source location. |
java.lang.String |
getDataSourceLocation()
Deprecated. Returns the JNDI location of the data source. |
void |
setDataSourceLocation(java.lang.String dataSourceLocation)
Deprecated. Sets the JNDI location of the data source. |
| Methods inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem |
buildSQLStatements, checkSchema, close, closeConnection, closeResultSet, closeStatement, copy, copyDeepFolder, copyFile, createDeepFolder, createFolder, deleteFile, deleteFolder, equals, executeStmt, exists, getInputStream, getOutputStream, getRandomAccessOutputStream, getSchema, getSchemaObjectPrefix, hasChildren, hashCode, init, initConnection, initPreparedStatements, isFile, isFolder, lastModified, length, list, listFiles, listFolders, move, prepareSchemaObjectPrefix, reestablishConnection, resetStatement, setSchema, setSchemaObjectPrefix, touch, verifyRootExists |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
JNDIDatabaseFileSystem
public JNDIDatabaseFileSystem()
- Deprecated.
getDataSourceLocation
public java.lang.String getDataSourceLocation()
- Deprecated.
- Returns the JNDI location of the data source.
- Returns:
- data source location
setDataSourceLocation
public void setDataSourceLocation(java.lang.String dataSourceLocation)
- Deprecated.
- Sets the JNDI location of the data source.
- Parameters:
dataSourceLocation - data source location
getConnection
protected java.sql.Connection getConnection()
throws javax.naming.NamingException,
java.sql.SQLException
- Deprecated.
- Returns a JDBC connection from a
DataSource acquired from JNDI
with the configured data source location.
- Overrides:
getConnection in class DatabaseFileSystem
- Returns:
- new database connection
- Throws:
javax.naming.NamingException - if the given data source location does not exist
java.sql.SQLException - if a database access error occurs
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.