| org.mmbase.storage.implementation.database.DatabaseStorageManagerFactory
DatabaseStorageManagerFactory | public class DatabaseStorageManagerFactory extends StorageManagerFactory (Code) | | A storage manager factory for database storages.
This factory sets up a datasource for connecting to the database.
If you specify the datasource URI in the 'datasource' property in mmbaseroot.xml configuration file,
the factory attempts to obtain the datasource from the application server. If this fails, or no datasource URI is given,
it attempts to use the connectivity offered by the JDBC Module, which is then wrapped in a datasource.
Note that if you provide a datasource you should make the JDBC Module inactive to prevent the module from
interfering with the storage layer.
author: Pierre van Rooden since: MMBase-1.7 version: $Id: DatabaseStorageManagerFactory.java,v 1.49 2008/02/22 12:27:48 michiel Exp $ |
catalog | protected String catalog(Code) | | The catalog used by this storage.
|
dataSource | protected DataSource dataSource(Code) | | The datasource in use by this factory.
The datasource is retrieved either from the application server, or by wrapping the JDBC Module in a generic datasource.
|
supportsTransactions | protected boolean supportsTransactions(Code) | | Whether transactions and rollback are supported by this database
|
transactionIsolation | protected int transactionIsolation(Code) | | The transaction isolation level available for this storage.
Default TRANSACTION_NONE (no transaction support).
The actual value is determined from the database metadata.
|
checkBinaryFileBasePath | public static boolean checkBinaryFileBasePath(String basePath)(Code) | | Tries to ensure that basePath existis and is writable. Logs error and returns false otherwise.
Parameters: basePath - a Directory name since: MMBase-1.8.1 |
createDataSource | protected DataSource createDataSource(String binaryFileBasePath)(Code) | | Parameters: binaryFileBasePath - For some datasource a file base path may be needed (some configurations of hsql). It can be null during bootstrap. In lookup.xml an alternative URL may be configured then which does not need the file base path. since: MMBase-1.8 |
getBinaryFileBasePath | public String getBinaryFileBasePath(boolean check)(Code) | | Returns the base path for 'binary file'
Parameters: check - If the path is only perhaps needed, you may want to provide 'false' here. since: MMBase-1.8.1 |
getDataSource | public DataSource getDataSource()(Code) | | Returns the DataSource associated with this factory.
since: MMBase-1.8 |
getDatabaseName | public String getDatabaseName()(Code) | | Doing some best effort to get a 'database name'.
since: MMBase-1.8 |
getDocumentReader | public StorageReader getDocumentReader() throws StorageException(Code) | | MMBase determine it using information gained from the datasource, and the lookup.xml file
in the database configuration directory
Storage configuration files should become resource files, and configurable using a storageresource property.
The type of reader to return should be a StorageReader.
throws: StorageException - if the storage could not be accessed while determining the database type a StorageReader instance |
getVersion | public double getVersion()(Code) | | |
instantiateBasicHandler | protected Object instantiateBasicHandler(Class handlerClass)(Code) | | |
load | protected synchronized void load() throws StorageException(Code) | | Opens and reads the storage configuration document.
Obtain a datasource to the storage, and load configuration attributes.
throws: StorageException - if the storage could not be accessed or necessary configuration data is missing or invalid |
supportsTransactions | public boolean supportsTransactions()(Code) | | |
|
|