com.mchange.v2.c3p0

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 JDBC Connection Pool » c3p0 » com.mchange.v2.c3p0 
com.mchange.v2.c3p0
Java Source File NameTypeComment
AbstractConnectionCustomizer.javaClass An abstract implementation of the ConnectionCustomizer interface in which all methods are no-ops.
AbstractConnectionTester.javaClass

Having expanded the once-simple ConnectionTester interface to support both user-specified queries and return of root cause Exceptions (via an out-param), this interface has grown unnecessarily complex.

If you wish to implement a custom Connection tester, here is the simple way to do it

  1. Extend com.mchange.v2.c3p0.AbstractConnectionTester
  2. Override only the two abstract methods
    • public int activeCheckConnection(Connection c, String preferredTestQuery, Throwable[] rootCauseOutParamHolder)
    • public int statusOnException(Connection c, Throwable t, String preferredTestQuery, Throwable[] rootCauseOutParamHolder)
  3. Take care to ensure that your methods are defined to allow preferredTestQuery and rootCauseOutParamHolder to be null.

Parameter rootCauseOutParamHolder is an optional parameter, which if supplied, will be a Throwable array whose size it at least one.

C3P0ProxyConnection.javaInterface

Most clients need never use or know about this interface -- c3p0-provided Connections can be treated like any other Connection.

An interface implemented by proxy Connections returned by c3p0 PooledDataSources.

C3P0ProxyStatement.javaInterface

Most clients need never use or know about this interface -- c3p0-provided Statements can be treated like any other Statement.

An interface implemented by proxy Connections returned by c3p0 PooledDataSources.

C3P0Registry.javaClass
ComboPooledDataSource.javaClass
ConnectionCustomizer.javaInterface
ConnectionTester.javaInterface

Define your own Connection tester if you want to override c3p0's default behavior for testing the validity of Connections and responding to Connection errors encountered.

Recommended: If you'd like your ConnectionTester to support the user-configured preferredTestQuery parameter, please implement com.mchange.v2.c3p0.UnifiedConnectionTester .

DataSources.javaClass

A simple factory class for creating DataSources.

DriverManagerDataSource.javaClass
DriverManagerDataSourceFactory.javaClass
FullQueryConnectionTester.javaInterface
JndiRefConnectionPoolDataSource.javaClass
JndiRefForwardingDataSource.javaClass
PoolBackedDataSource.javaClass
PoolBackedDataSourceFactory.javaClass A class offering Factory methods for creating DataSources backed by Connection and Statement Pools.
PoolConfig.javaClass

Encapsulates all the configuration information required by a c3p0 pooled DataSource.

Newly constructed PoolConfig objects are preset with default values, which you can define yourself (see below), or you can rely on c3p0's built-in defaults.

PooledDataSource.javaInterface

Most clients need never use or know about this interface -- c3p0 pooled DataSources can be treated like any other DataSource.

The functionality in this interface will be only be of interest if 1) for administrative reasons you like to keep close track of the number and status of all Connections your application is using; 2) to work around problems encountered while managing a DataSource whose clients are poorly coded applications that leak Connections, but which you are not permitted to fix; or 3) to work around problems that may occur if an underlying jdbc driver / DBMS system is unreliable.

QueryConnectionTester.javaInterface
SQLWarnings.javaClass
UnifiedConnectionTester.javaInterface

Having expanded the once-simple ConnectionTester interface to support both user-specified queries and return of root cause Exceptions (via an out-param), this interface has grown unnecessarily complex.

If you wish to implement a custom Connection tester, here is the simple way to do it

  1. Extend com.mchange.v2.c3p0.AbstractConnectionTester
  2. Override only the two abstract methods
    • public int activeCheckConnection(Connection c, String preferredTestQuery, Throwable[] rootCauseOutParamHolder)
    • public int statusOnException(Connection c, Throwable t, String preferredTestQuery, Throwable[] rootCauseOutParamHolder)
  3. Take care to ensure that your methods are defined to allow preferredTestQuery and rootCauseOutParamHolder to be null.

Parameter rootCauseOutParamHolder is an optional parameter, which if supplied, will be a Throwable array whose size it at least one.

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