Source Code Cross Referenced for Pool.java in  » Database-JDBC-Connection-Pool » SmartPool » org » smartlib » pool » core » 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 JDBC Connection Pool » SmartPool » org.smartlib.pool.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#) Pool 1.0 02/08/01
003:         */
004:
005:        package org.smartlib.pool.core;
006:
007:        import java.sql.Connection;
008:        import java.util.*;
009:
010:        /**
011:         * This interface defines the behavior of the class that will manage the 
012:         * connections i.e a single pool of connections.
013:         */
014:
015:        public interface Pool {
016:
017:            /**
018:             * This method returns a Connection from the connection pool. 
019:             * The owner of this pool is marked as N/A indicating unknown.
020:             *
021:             * <b>Note: This method blocks if the pool size has reached it's 
022:             * maximum size and no free connections are available 
023:             * until a free connection is available</b>. The time period for which this
024:             * method blocks depends on the connection-wait-time-out specified in 
025:             * the configuration file.
026:             * 	 	 
027:             * 
028:             * @return Connection from the pool
029:             * @exception ConnectionPoolException if there is any problem 
030:             *		getting connection.	
031:             */
032:            public Connection getConnection() throws ConnectionPoolException;
033:
034:            /**
035:             * This method returns a Connection from the  pool. 
036:             * The owner of this connection is identified by <code>owner</code> .
037:             *
038:             * <b>Note: This method blocks if the pool size has reached it's 
039:             * maximum size and no free connections are available 
040:             * until a free connection is available</b>. The time period for which this
041:             * method blocks depends on the connection-wait-time-out specified in 
042:             * the configuration file.
043:             * 	 	 
044:             *
045:             * @param owner String identifying the owner.
046:             * @return Connection from the pool
047:             * 
048:             * @exception ConnectionPoolException if there is any problem 
049:             *		getting connection.	
050:             */
051:
052:            public Connection getConnection(String owner)
053:                    throws ConnectionPoolException;
054:
055:            /**
056:             * This method returns the current size of the pool.
057:             * @return Current size of the pool
058:             */
059:            public int getCurrentPoolSize();
060:
061:            /**
062:             * This method releases the Connection <code>conn</code> to the pool.
063:             */
064:            public void returnConnection(Connection conn);
065:
066:            /**
067:             * @return Vector of connections in use
068:             */
069:            public Vector getConnectionsInUse();
070:
071:            /**
072:             * @return Vector of registered ConnectionLeakListeners
073:             */
074:            public Vector getConnectionLeakListeners();
075:
076:            /**
077:             * @return Number of free connections in the pool.
078:             */
079:            public int getNoOfFreeConnections();
080:
081:            /**
082:             * This method adds  a connection leak listener. The methods of 
083:             * <code>cle</code> will be called when a leak is detected as per the
084:             * pool configuration.
085:             *
086:             * @param cle Class implementing ConnectionLeakListener interface.
087:             * @exception ConnectionPoolException If there is any problem 
088:             *	 adding ConnectionLeakListener.
089:             */
090:            public void addConnectionLeakListener(ConnectionLeakListener cle)
091:                    throws ConnectionPoolException;
092:
093:            /**
094:             * This method removes a connection leak listener.<code>cle</code> will
095:             * not get any further notifications.
096:             *
097:             * @param cle Class implementing ConnectionLeakListener interface.
098:             * @exception ConnectionPoolException If there is any problem 
099:             *	 removing ConnectionLeakListener.
100:             */
101:            public void removeConnectionLeakListener(ConnectionLeakListener cle)
102:                    throws ConnectionPoolException;
103:
104:            /**
105:             * This method releases excessive connections.
106:             */
107:            public void releaseConnections();
108:
109:            /**
110:             * This method shuts down the pool
111:             */
112:            public void shutDown();
113:
114:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.