Java Doc for DatabaseStorageManagerFactory.java in  » Database-ORM » MMBase » org » mmbase » storage » implementation » database » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » MMBase » org.mmbase.storage.implementation.database 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $


Field Summary
protected  Stringcatalog
     The catalog used by this storage.
protected  DataSourcedataSource
     The datasource in use by this factory.
protected  booleansupportsTransactions
    
protected  inttransactionIsolation
     The transaction isolation level available for this storage.


Method Summary
public static  booleancheckBinaryFileBasePath(String basePath)
     Tries to ensure that basePath existis and is writable.
protected  DataSourcecreateDataSource(String binaryFileBasePath)
    
Parameters:
  binaryFileBasePath - For some datasource a file base path may be needed (some configurations of hsql).
public  StringgetBinaryFileBasePath()
    
public  StringgetBinaryFileBasePath(boolean check)
    
public  StringgetCatalog()
    
public  DataSourcegetDataSource()
     Returns the DataSource associated with this factory.
public  StringgetDatabaseName()
     Doing some best effort to get a 'database name'.
public  StorageReadergetDocumentReader()
     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.
public  doublegetVersion()
    
protected  ObjectinstantiateBasicHandler(Class handlerClass)
    
protected  ObjectinstantiateChainedHandler(Class handlerClass, Object handler)
    
protected  SearchQueryHandlerinstantiateQueryHandler(Object data)
    
protected synchronized  voidload()
     Opens and reads the storage configuration document.
public static  voidmain(String[] args)
    
public  booleansupportsTransactions()
    

Field Detail
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.





Method Detail
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()(Code)
As DatabaseStorageManagerFactory.getBinaryFileBasePath(boolean) with true



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



getCatalog
public String getCatalog()(Code)



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)



instantiateChainedHandler
protected Object instantiateChainedHandler(Class handlerClass, Object handler)(Code)



instantiateQueryHandler
protected SearchQueryHandler instantiateQueryHandler(Object data)(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



main
public static void main(String[] args)(Code)



supportsTransactions
public boolean supportsTransactions()(Code)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.