Java Doc for JdbcDataSource.java in  » Web-Mail » james-2.3.1 » org » apache » james » util » dbcp » 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 » Web Mail » james 2.3.1 » org.apache.james.util.dbcp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.james.util.dbcp.JdbcDataSource

JdbcDataSource
public class JdbcDataSource extends AbstractLogEnabled implements Configurable,Disposable,DataSourceComponent(Code)

This is a reliable DataSource implementation, based on the pooling logic provided by DBCP and the configuration found in Avalon's excalibur code.

This uses the normal java.sql.Connection object and java.sql.DriverManager. The Configuration is like this:

 <jdbc>
 <pool-controller min="5" max="10" connection-class="my.overrided.ConnectionClass">
 <keep-alive>select 1</keep-alive>
 </pool-controller>
 <driver>com.database.jdbc.JdbcDriver</driver>
 <dburl>jdbc:driver://host/mydb</dburl>
 <user>username</user>
 <password>password</password>
 </jdbc>
 

These configuration settings are available:

  • driver - The class name of the JDBC driver
  • dburl - The JDBC URL for this connection
  • user - The username to use for this connection
  • password - The password to use for this connection
  • keep-alive - The SQL query that will be used to validate connections from this pool before returning them to the caller. If specified, this query MUST be an SQL SELECT statement that returns at least one row.
  • max - The maximum number of active connections allowed in the pool. 0 means no limit. (default 2)
  • max_idle - The maximum number of idle connections. 0 means no limit. (default 0)
  • initial_size - The initial number of connections that are created when the pool is started. (default 0)
  • min_idle - The minimum number of active connections that can remain idle in the pool, without extra ones being created, or zero to create none. (default 0)
  • max_wait - The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely. (default -1)
  • testOnBorrow - The indication of whether objects will be validated before being borrowed from the pool. If the object fails to validate, it will be dropped from the pool, and we will attempt to borrow another. (default true)
  • testOnReturn - The indication of whether objects will be validated before being returned to the pool. (default false)
  • testWhileIdle - The indication of whether objects will be validated by the idle object evictor (if any). If an object fails to validate, it will be dropped from the pool. (default false)
  • timeBetweenEvictionRunsMillis - The number of milliseconds to sleep between runs of the idle object evictor thread. When non-positive, no idle object evictor thread will be run. (default -1)
  • numTestsPerEvictionRun - The number of objects to examine during each run of the idle object evictor thread (if any). (default 3)
  • minEvictableIdleTimeMillis - The minimum amount of time an object may sit idle in the pool before it is eligable for eviction by the idle object evictor (if any). (default 1000 * 60 * 30)

version:
   CVS $Revision: 494012 $


Field Summary
 BasicDataSourcesource
    


Method Summary
public  voidconfigure(Configuration configuration)
    
public  voiddispose()
    
public  ConnectiongetConnection()
    

Field Detail
source
BasicDataSource source(Code)





Method Detail
configure
public void configure(Configuration configuration) throws ConfigurationException(Code)

See Also:   org.apache.avalon.framework.configuration.Configurable.configure(Configuration)



dispose
public void dispose()(Code)

See Also:   org.apache.avalon.framework.configuration.Configurable.dispose



getConnection
public Connection getConnection() throws SQLException(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.