Java Doc for JDBCConnectionPool.java in  » Testing » PolePosition-0.20 » com » versant » core » jdbc » conn » 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 » Testing » PolePosition 0.20 » com.versant.core.jdbc.conn 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.versant.core.jdbc.conn.JDBCConnectionPool

JDBCConnectionPool
final public class JDBCConnectionPool implements Runnable,JdbcConnectionSource,HasMetrics(Code)
JDBC connection pool with a PreparedStatement cache for each connection.
See Also:   PooledConnection



Constructor Summary
public  JDBCConnectionPool(JdbcConfig jdbcConfig, LogEventStore pes, Driver jdbcDriver, SqlDriver sqlDriver)
     Create the pool.

Method Summary
public  voidaddMetrics(List list)
     Add all BaseMetric's for this store to the List.
public  voidcheck()
     Check that we can connect to the database and that the initSQL (if any) works.
public  voidcheckIdleConnections()
     Close excess idle connections or create new idle connections if less than minIdle (but do not exceed maxActive in total).
public  voidcloseIdleConnections()
     Close all idle connections.
public  voidcloseTimedOutConnections()
     Close active connections that have been out of the pool for too long.
public  voiddestroy()
     Close all connections and shutdown the pool.
public  voidfillStatus(PoolStatus s)
     Fill s with status info for this pool.
public  intgetActiveCount()
    
public  intgetConTimeout()
    
public  ConnectiongetConnection(boolean highPriority, boolean autoCommit)
     Allocate a PooledConnection from the pool.
public  PropertiesgetConnectionProperties()
     Return the connection prop of the pool.
public  StringgetDriverName()
     Get the JDBC driver class or null if not known.
public  intgetIdleCount()
    
public  StringgetInitSQL()
    
public  intgetIsolationLevel()
    
public  DrivergetJdbcDriver()
     Get the JDBC driver instance.
public  intgetMaxActive()
    
public  intgetMaxConAge()
    
public  intgetMaxIdle()
    
public  intgetMinIdle()
    
public  intgetPsCacheMax()
    
public  intgetReserved()
    
public  intgetTestInterval()
    
public  StringgetURL()
     Get our JDBC URL.
public  StringgetValidateSQL()
    
public  voidinit()
    
public  booleanisBlockWhenFull()
    
public  booleanisClearBatch()
    
public  booleanisJdbcDisablePsCache()
    
public  booleanisTestWhenIdle()
    
public  voidreturnConnection(Connection con)
    
public  voidreturnConnection(PooledConnection con)
     Return a PooledConnection to the pool.
public  voidrun()
     Perform maintenance operations on the pool at periodic intervals.
public  voidsampleMetrics(int[][] buf, int pos)
     Get values for our metrics.
public  voidsetBlockWhenFull(boolean blockWhenFull)
    
public  voidsetClearBatch(boolean clearBatch)
    
public  voidsetConTimeout(int conTimeout)
    
public  voidsetInitSQL(String initSQL)
    
public  voidsetIsolationLevel(int isolationLevel)
     If isolationLevel != 0 then the isolation level of newly created Connections is set to this.
public  voidsetJdbcDisablePsCache(boolean jdbcDisablePsCache)
    
public  voidsetMaxActive(int maxActive)
    
public  voidsetMaxConAge(int maxConAge)
    
public  voidsetMaxIdle(int maxIdle)
    
public  voidsetMinIdle(int minIdle)
    
public  voidsetPsCacheMax(int psCacheMax)
    
public  voidsetReserved(int reserved)
    
public  voidsetTestInterval(int testInterval)
    
public  voidsetTestWhenIdle(boolean on)
    
public  voidsetValidateSQL(String validateSQL)
    
public  voidtestIdleConnections()
     Test 1 idle connection.
public  StringtoString()
     Return our name and status.


Constructor Detail
JDBCConnectionPool
public JDBCConnectionPool(JdbcConfig jdbcConfig, LogEventStore pes, Driver jdbcDriver, SqlDriver sqlDriver)(Code)
Create the pool. Note that changes to jdbcConfig have no effect on the pool after construction i.e. fields in jdbcConfig are copied not referenced. The sqlDriver parameter is used to customize the pool to workaround bugs and so on in the JDBC driver or database. It can be null.




Method Detail
addMetrics
public void addMetrics(List list)(Code)
Add all BaseMetric's for this store to the List.



check
public void check() throws Exception(Code)
Check that we can connect to the database and that the initSQL (if any) works.



checkIdleConnections
public void checkIdleConnections() throws Exception(Code)
Close excess idle connections or create new idle connections if less than minIdle (but do not exceed maxActive in total).



closeIdleConnections
public void closeIdleConnections()(Code)
Close all idle connections. This method closes idleCount connections. If another thread is making new connections at the same time the idle list will not be empty on return.



closeTimedOutConnections
public void closeTimedOutConnections()(Code)
Close active connections that have been out of the pool for too long. This is a NOP if activeTimeout <= 0.



destroy
public void destroy()(Code)
Close all connections and shutdown the pool.



fillStatus
public void fillStatus(PoolStatus s)(Code)
Fill s with status info for this pool.



getActiveCount
public int getActiveCount()(Code)



getConTimeout
public int getConTimeout()(Code)



getConnection
public Connection getConnection(boolean highPriority, boolean autoCommit) throws SQLException(Code)
Allocate a PooledConnection from the pool.
Parameters:
  highPriority - If this is true then reserved high priority
Parameters:
  autoCommit - Must the connection have autoCommit set?



getConnectionProperties
public Properties getConnectionProperties()(Code)
Return the connection prop of the pool.



getDriverName
public String getDriverName()(Code)
Get the JDBC driver class or null if not known.



getIdleCount
public int getIdleCount()(Code)



getInitSQL
public String getInitSQL()(Code)



getIsolationLevel
public int getIsolationLevel()(Code)



getJdbcDriver
public Driver getJdbcDriver()(Code)
Get the JDBC driver instance.



getMaxActive
public int getMaxActive()(Code)



getMaxConAge
public int getMaxConAge()(Code)



getMaxIdle
public int getMaxIdle()(Code)



getMinIdle
public int getMinIdle()(Code)



getPsCacheMax
public int getPsCacheMax()(Code)



getReserved
public int getReserved()(Code)



getTestInterval
public int getTestInterval()(Code)



getURL
public String getURL()(Code)
Get our JDBC URL.



getValidateSQL
public String getValidateSQL()(Code)



init
public void init()(Code)



isBlockWhenFull
public boolean isBlockWhenFull()(Code)



isClearBatch
public boolean isClearBatch()(Code)



isJdbcDisablePsCache
public boolean isJdbcDisablePsCache()(Code)



isTestWhenIdle
public boolean isTestWhenIdle()(Code)



returnConnection
public void returnConnection(Connection con) throws SQLException(Code)



returnConnection
public void returnConnection(PooledConnection con)(Code)
Return a PooledConnection to the pool. This is called by PooledConnection when it is closed. This is a NOP if the connection has been destroyed.
See Also:   PooledConnection.close



run
public void run()(Code)
Perform maintenance operations on the pool at periodic intervals.



sampleMetrics
public void sampleMetrics(int[][] buf, int pos)(Code)
Get values for our metrics.



setBlockWhenFull
public void setBlockWhenFull(boolean blockWhenFull)(Code)



setClearBatch
public void setClearBatch(boolean clearBatch)(Code)



setConTimeout
public void setConTimeout(int conTimeout)(Code)



setInitSQL
public void setInitSQL(String initSQL)(Code)



setIsolationLevel
public void setIsolationLevel(int isolationLevel)(Code)
If isolationLevel != 0 then the isolation level of newly created Connections is set to this.
See Also:   Connection.TRANSACTION_READ_COMMITTED
See Also:    etc



setJdbcDisablePsCache
public void setJdbcDisablePsCache(boolean jdbcDisablePsCache)(Code)



setMaxActive
public void setMaxActive(int maxActive)(Code)



setMaxConAge
public void setMaxConAge(int maxConAge)(Code)



setMaxIdle
public void setMaxIdle(int maxIdle)(Code)



setMinIdle
public void setMinIdle(int minIdle)(Code)



setPsCacheMax
public void setPsCacheMax(int psCacheMax)(Code)



setReserved
public void setReserved(int reserved)(Code)



setTestInterval
public void setTestInterval(int testInterval)(Code)



setTestWhenIdle
public void setTestWhenIdle(boolean on)(Code)



setValidateSQL
public void setValidateSQL(String validateSQL)(Code)



testIdleConnections
public void testIdleConnections()(Code)
Test 1 idle connection. If it fails, close it and repeat.



toString
public String toString()(Code)
Return our name and status.



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.