|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.storage.StorageManagerFactory
org.mmbase.storage.implementation.database.DatabaseStorageManagerFactory
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 'dataource' property in mmbaseroot.xml configuration file, the factory attempts to obtain the datasource from the appplication 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.
| Field Summary | |
protected java.lang.String |
catalog
The catalog used by this storage. |
protected javax.sql.DataSource |
dataSource
The datasource in use by this factory. |
protected boolean |
supportsTransactions
Whether transactions and rollback are supported by this database |
protected int |
transactionIsolation
The transaction isolation level available for this storage. |
| Fields inherited from class org.mmbase.storage.StorageManagerFactory |
attributes, changeManager, disallowedFields, getSurrogator, mmbase, queryHandler, queryHandlerClasses, setSurrogator, storageManagerClass, typeMappings |
| Constructor Summary | |
DatabaseStorageManagerFactory()
|
|
| Method Summary | |
protected java.lang.String |
getBinaryFileBasePath()
Returns the base path for 'binary file' |
java.lang.String |
getCatalog()
Returns the name of the catalog used by this storage ( null if no catalog is used). |
StorageReader |
getDocumentReader()
Locates and opens the storage configuration document. |
double |
getVersion()
Returns the version of this factory implementation. |
protected java.lang.Object |
instantiateBasicHandler(java.lang.Class handlerClass)
Instantiate a basic handler object using the specified class. |
protected java.lang.Object |
instantiateChainedHandler(java.lang.Class handlerClass,
java.lang.Object handler)
Instantiate a chained handler object using the specified class. |
protected SearchQueryHandler |
instantiateQueryHandler(java.lang.Object data)
Instantiate a SearchQueryHandler object using the specified object. |
protected void |
load()
Opens and reads the storage configuration document. |
boolean |
supportsTransactions()
Returns whether transactions, and specifically rollback, is supported in the storage layer. |
| Methods inherited from class org.mmbase.storage.StorageManagerFactory |
getAttribute, getAttributes, getChangeManager, getDisallowedFields, getGetSurrogator, getMMBase, getScheme, getScheme, getSearchQueryHandler, getSetSurrogator, getStorageIdentifier, getStorageIdentifier, getStorageManager, getTypeMappings, hasOption, init, newInstance, newInstance, setAttribute, setAttributes, setDisallowedFields, setOption, setScheme |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String catalog
protected javax.sql.DataSource dataSource
protected int transactionIsolation
protected boolean supportsTransactions
| Constructor Detail |
public DatabaseStorageManagerFactory()
| Method Detail |
public double getVersion()
StorageManagerFactory
getVersion in class StorageManagerFactorypublic boolean supportsTransactions()
StorageManagerFactory
supportsTransactions in class StorageManagerFactorytrue if trasnactions are supportedpublic java.lang.String getCatalog()
StorageManagerFactorynull if no catalog is used).
getCatalog in class StorageManagerFactory
protected void load()
throws StorageException
load in class StorageManagerFactoryStorageException - if the storage could not be accessed or necessary configuration data is missing or invalid
public StorageReader getDocumentReader()
throws StorageException
getDocumentReader in class StorageManagerFactoryStorageException - if the storage could not be accessed while determining the database typeprotected java.lang.String getBinaryFileBasePath()
protected java.lang.Object instantiateBasicHandler(java.lang.Class handlerClass)
StorageManagerFactory
instantiateBasicHandler in class StorageManagerFactoryhandlerClass - the class to instantuate teh object with
protected java.lang.Object instantiateChainedHandler(java.lang.Class handlerClass,
java.lang.Object handler)
StorageManagerFactory
instantiateChainedHandler in class StorageManagerFactoryhandlerClass - the class to instantuate teh object withhandler - a handler thatw a sinstantiated previously.
this handler should be passed to the new handler class during or
after constrcution, so the ne whandler can 'chain' any events it cannot
handle to this class.
protected SearchQueryHandler instantiateQueryHandler(java.lang.Object data)
StorageManagerFactory
instantiateQueryHandler in class StorageManagerFactory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||