Java Doc for MultiPool.java in  » Database-ORM » MMBase » org » mmbase » module » 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.module.database 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.module.database.MultiPool

MultiPool
public class MultiPool (Code)
JDBC Pool, a dummy interface to multiple real connection
author:
   vpro
version:
   $Id: MultiPool.java,v 1.61 2007/12/06 08:05:51 michiel Exp $

Inner Class :static class ConnectionCloser implements Runnable


Constructor Summary
 MultiPool(DatabaseSupport databaseSupport, String url, String name, String password, int conMax)
    
 MultiPool(DatabaseSupport databaseSupport, String url, String name, String password, int conMax, int maxQueries)
    

Method Summary
 voidcheckTime()
    
protected  voidcreatePool()
    
protected  booleanfillPool(boolean logStack)
     Fills the connection pool.
protected  voidfinalize()
    
public  Iterator<MultiConnection>getBusyPool()
     For reporting purposes the connections in busypool can be listed.
 MultiConnectiongetFree()
    
 longgetMaxLifeTime()
     Gets the time in ms how long a query may live before it is killed.
protected  MultiConnectiongetMultiConnection()
     Request a new 'real' Connection and wraps it in a new 'MultiConnection' object.
public  Iterator<MultiConnection>getPool()
     For reporting purposes the connections in pool can be listed.
public  intgetSize()
    
public  intgetTotalConnectionsCreated()
    
 voidputBack(MultiConnection con)
    
protected  voidreplaceConnection(MultiConnection multiCon)
     Tries to fix this multi-connection if it is broken (e.g.
 voidsetMaxLifeTime(long maxLifeTime)
     Set the time in ms how long a query may live before it is killed.
public  voidshutdown()
     'realcloses' all connections.
public  StringtoString()
    


Constructor Detail
MultiPool
MultiPool(DatabaseSupport databaseSupport, String url, String name, String password, int conMax) throws SQLException(Code)



MultiPool
MultiPool(DatabaseSupport databaseSupport, String url, String name, String password, int conMax, int maxQueries) throws SQLException(Code)
Establish connection to the JDBC Pool(s)




Method Detail
checkTime
void checkTime()(Code)
Check the connections



createPool
protected void createPool()(Code)
Fills the connection pool
since:
   MMBase-1.7



fillPool
protected boolean fillPool(boolean logStack)(Code)
Fills the connection pool. true if the pool contains connections and mmbase can be started.
since:
   MMBase-1.7



finalize
protected void finalize()(Code)



getBusyPool
public Iterator<MultiConnection> getBusyPool()(Code)
For reporting purposes the connections in busypool can be listed. An Iterator on a copy of the BusyPool is returned.
See Also:   JDBC.listConnections



getFree
MultiConnection getFree()(Code)
Get a free connection from the pool



getMaxLifeTime
long getMaxLifeTime()(Code)
Gets the time in ms how long a query may live before it is killed.
since:
   MMBase-1.8



getMultiConnection
protected MultiConnection getMultiConnection() throws SQLException(Code)
Request a new 'real' Connection and wraps it in a new 'MultiConnection' object.
since:
   MMBase-1.7



getPool
public Iterator<MultiConnection> getPool()(Code)
For reporting purposes the connections in pool can be listed. An Iterator on a copy of the Pool is returned.
See Also:   JDBC.listConnections



getSize
public int getSize()(Code)
get the pool size



getTotalConnectionsCreated
public int getTotalConnectionsCreated()(Code)
get the number of statements performed



putBack
void putBack(MultiConnection con)(Code)
putback the used connection in the pool



replaceConnection
protected void replaceConnection(MultiConnection multiCon) throws SQLException(Code)
Tries to fix this multi-connection if it is broken (e.g. if database restarted).
since:
   MMBase-1.7.1



setMaxLifeTime
void setMaxLifeTime(long maxLifeTime)(Code)
Set the time in ms how long a query may live before it is killed.
since:
   MMBase-1.8



shutdown
public void shutdown()(Code)
'realcloses' all connections.
since:
   MMBase-1.6.2



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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