Java Doc for DatabaseManager.java in  » J2EE » Enhydra-Application-Framework » com » lutris » appserver » server » sql » 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 » J2EE » Enhydra Application Framework » com.lutris.appserver.server.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.lutris.appserver.server.sql.DatabaseManager

DatabaseManager
public interface DatabaseManager (Code)
The database management object interface. This class implementing this interface manages the database connections for one application.
version:
   $Revision: 1.2 $
author:
   Paul Morgan


Field Summary
 booleandebug
     Flag to enable debug logging of queries and transactions.


Method Summary
public  DBConnectionallocateConnection(String dbName)
     Allocate a connection to the specified logic database.
public  DBConnectionallocateConnection()
     Allocate a connection to the default logical database.
public  ObjectIdallocateObjectId(String dbName)
     Allocate an object id from the specified logical database.
Parameters:
  dbName - Logical name of the database from which to obtain an object id.
public  ObjectIdallocateObjectId()
     Allocate an object id from the specified logical database. The allocated connection object.
exception:
  DatabaseManagerException - If a nonexistent default logical database has been set.
exception:
  ObjectIdException - If a problem (e.g.
public  voidcheckOId(String dbName, ObjectId oid)
    
public  voidcheckOId(ObjectId oid)
    
public  DBQuerycreateQuery(String dbName)
     Create a query object for the specified logical database.
Parameters:
  dbName - Logical name of the database from which to obtain a query.
public  DBQuerycreateQuery()
     Create a query object for the default logical database.
public  DBTransactioncreateTransaction(String dbName)
     Create a transaction object for the specified logical database.
Parameters:
  dbName - Logical name of the database from which to obtain a transaction.
public  DBTransactioncreateTransaction()
     Create a transaction object for the default logical database.
public  LogicalDatabasefindLogicalDatabase(String dbName)
    
public  intgetActiveConnectionCount(String dbName)
     Returns the number of currently active connections for the supplied logical database name.
public  ConfiggetConfig()
    
public  StringgetDefaultDB()
    
public  String[]getLogicalDatabaseNames()
     Returns the list of managed logical databases.
public  intgetMaxConnectionCount(String dbName)
     Returns the maximum number of concurent connections that existed at any time since this object was created, or resetMaxConnectionCount() was called. This is a historical highwater mark.
public  DategetMaxConnectionCountDate(String dbName)
     Returns the time when the maximum refered to by maxConnectionCount() occured.
public  longgetRequestCount(String dbName)
     Returns the number of requests made to the database since startup time.
public  StringgetType(String dbName)
     Returns a description of the logical database type.
public  StringlogicalDatabaseType(String dbName)
     Return a logical database type for the default logical database.
Parameters:
  dbName - Logical name of the database from which to obtain a query.
public  StringlogicalDatabaseType()
     Return a logical database type for the default logical database.
public  voidregisterMBeans(String appPrefix, Config appConfig, ClassLoader clsLoader)
    
public  voidresetMaxConnectionCount(String dbName)
     Reset the maximum connection count.
public  voidsetDefaultDatabase(String dbName)
     Set the default logical database.
public  voidshutdown()
     Shutdown the database manager.
public  voidunregisterMBeans()
    

Field Detail
debug
boolean debug(Code)
Flag to enable debug logging of queries and transactions.





Method Detail
allocateConnection
public DBConnection allocateConnection(String dbName) throws DatabaseManagerException, SQLException(Code)
Allocate a connection to the specified logic database. The connection should be returned to the pool by calling its release() function. A thread will wait if no connections are available. Interupted exceptions are converted to errors.
Parameters:
  dbName - Logical name of the database to allocate a connection to. The allocated connection object.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.
exception:
  SQLException - If a SQL error occures.



allocateConnection
public DBConnection allocateConnection() throws DatabaseManagerException, SQLException(Code)
Allocate a connection to the default logical database. The connection should be returned to the pool by calling its release() function. A thread will wait if no connections are available. Interupted exceptions are converted to errors. The allocated connection object.
exception:
  DatabaseManagerException - If a nonexistent default logical database name is supplied.
exception:
  SQLException - If a SQL error occures.
See Also:   DatabaseManager.setDefaultDatabase



allocateObjectId
public ObjectId allocateObjectId(String dbName) throws DatabaseManagerException, ObjectIdException(Code)
Allocate an object id from the specified logical database.
Parameters:
  dbName - Logical name of the database from which to obtain an object id. The allocated unique OID
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.
exception:
  ObjectIdException - If a problem (e.g. SQL error) occured in obtaining the OID.



allocateObjectId
public ObjectId allocateObjectId() throws DatabaseManagerException, ObjectIdException(Code)
Allocate an object id from the specified logical database. The allocated connection object.
exception:
  DatabaseManagerException - If a nonexistent default logical database has been set.
exception:
  ObjectIdException - If a problem (e.g. SQL error) occured in obtaining the OID.
See Also:   DatabaseManager.setDefaultDatabase



checkOId
public void checkOId(String dbName, ObjectId oid) throws DatabaseManagerException, ObjectIdException(Code)
Check does oid belong to Object id's range [minOId, currentOId]
Parameters:
  dbName - Logical name of the database from which to check an object id.
Parameters:
  oid - oid which will be checked.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.
exception:
  ObjectIdException - If a oid does't belong to range.



checkOId
public void checkOId(ObjectId oid) throws DatabaseManagerException, ObjectIdException(Code)
Check does oid belong to Object id's range [minOId, currentOId] for default database
Parameters:
  oid - oid which will be checked.
exception:
  DatabaseManagerException - If a nonexistent default logical database has been set.
exception:
  ObjectIdException - If a oid does't belong to range.



createQuery
public DBQuery createQuery(String dbName) throws DatabaseManagerException, SQLException(Code)
Create a query object for the specified logical database.
Parameters:
  dbName - Logical name of the database from which to obtain a query. The query
exception:
  DatabaseManagerException - If a nonexistent or invalid logical database name is supplied.
exception:
  SQLException - If a problem occured creating the query.



createQuery
public DBQuery createQuery() throws DatabaseManagerException, SQLException(Code)
Create a query object for the default logical database. The query
exception:
  DatabaseManagerException - If a nonexistent default logical database has been set.
exception:
  SQLException - If a problem occured creating the query.
See Also:   DatabaseManager.setDefaultDatabase



createTransaction
public DBTransaction createTransaction(String dbName) throws DatabaseManagerException, SQLException(Code)
Create a transaction object for the specified logical database.
Parameters:
  dbName - Logical name of the database from which to obtain a transaction. The transaction
exception:
  DatabaseManagerException - If a nonexistent or invalid logical database name is supplied.
exception:
  SQLException - If a problem occured creating the transaction.



createTransaction
public DBTransaction createTransaction() throws DatabaseManagerException, SQLException(Code)
Create a transaction object for the default logical database. The transaction
exception:
  DatabaseManagerException - If a nonexistent default logical database has been set.
exception:
  SQLException - If a problem occured creating the transaction.
See Also:   DatabaseManager.setDefaultDatabase



findLogicalDatabase
public LogicalDatabase findLogicalDatabase(String dbName) throws DatabaseManagerException(Code)



getActiveConnectionCount
public int getActiveConnectionCount(String dbName) throws DatabaseManagerException(Code)
Returns the number of currently active connections for the supplied logical database name. If not implemented, then -1 is returned.
Parameters:
  dbName - The logical database name.The number of currently active connections.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.



getConfig
public Config getConfig()(Code)
Return main configuration class main configuration class.



getDefaultDB
public String getDefaultDB()(Code)
Return default database name (given in config file) default database name



getLogicalDatabaseNames
public String[] getLogicalDatabaseNames()(Code)
Returns the list of managed logical databases. List of logical database names.



getMaxConnectionCount
public int getMaxConnectionCount(String dbName) throws DatabaseManagerException(Code)
Returns the maximum number of concurent connections that existed at any time since this object was created, or resetMaxConnectionCount() was called. This is a historical highwater mark. If not implemented, then -1 is returned.
Parameters:
  dbName - The logical database name.The highwater mark for number of connections, or -1.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.



getMaxConnectionCountDate
public Date getMaxConnectionCountDate(String dbName) throws DatabaseManagerException(Code)
Returns the time when the maximum refered to by maxConnectionCount() occured. If not implemented, then null is returned.
Parameters:
  dbName - The logical database name.The Date of when the maximum number of connections occured.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.



getRequestCount
public long getRequestCount(String dbName) throws DatabaseManagerException(Code)
Returns the number of requests made to the database since startup time.
Parameters:
  dbName - The logical database name.The number of database requests since the server started.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.



getType
public String getType(String dbName) throws DatabaseManagerException(Code)
Returns a description of the logical database type.
Parameters:
  dbName - The logical database name.A text description of the logical database type.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.



logicalDatabaseType
public String logicalDatabaseType(String dbName) throws DatabaseManagerException, SQLException(Code)
Return a logical database type for the default logical database.
Parameters:
  dbName - Logical name of the database from which to obtain a query. logical database type
exception:
  DatabaseManagerException - If a nonexistent default logical database has been set.
exception:
  SQLException - If a problem occured creating the query.
See Also:   DatabaseManager.setDefaultDatabase



logicalDatabaseType
public String logicalDatabaseType() throws DatabaseManagerException, SQLException(Code)
Return a logical database type for the default logical database. logical database type
exception:
  DatabaseManagerException - If a nonexistent default logical database has been set.
exception:
  SQLException - If a problem occured creating the query.
See Also:   DatabaseManager.setDefaultDatabase



registerMBeans
public void registerMBeans(String appPrefix, Config appConfig, ClassLoader clsLoader)(Code)



resetMaxConnectionCount
public void resetMaxConnectionCount(String dbName) throws DatabaseManagerException(Code)
Reset the maximum connection count. See maxConnectionCount(). The highwater mark should be reset to the current number of connections.
Parameters:
  dbName - The logical database name.
exception:
  DatabaseManagerException - If a nonexistent logical database name is supplied.



setDefaultDatabase
public void setDefaultDatabase(String dbName) throws DatabaseManagerException(Code)
Set the default logical database. This should be used with caution, but it makes allocating connections easier.
Parameters:
  dbName - The default logical dabase name.
exception:
  DatabaseManagerException - If a nonexistent or illegal logical database name is supplied.



shutdown
public void shutdown()(Code)
Shutdown the database manager. All logical databases will be shutdown and all connection closed.



unregisterMBeans
public void unregisterMBeans()(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.