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


001:        /*
002:         * This software is released under a licence similar to the Apache Software Licence.
003:         * See org.logicalcobwebs.proxool.package.html for details.
004:         * The latest version is available at http://proxool.sourceforge.net
005:         */
006:        package org.logicalcobwebs.proxool;
007:
008:        import java.sql.Connection;
009:        import java.sql.SQLException;
010:
011:        /**
012:         * You can listen to the lifecycle of a connection. Sometimes, you may
013:         * want to perform a task when the connection is born or dies. Actually,
014:         * the reason why we originally did this is now obsolete. But the code
015:         * remains here just in case. You need to
016:         * {@link ProxoolFacade#setConnectionListener register}
017:         * your implementation with ProxoolFacade.
018:         *
019:         * <pre>
020:         * String alias = "myPool";
021:         * ConnectionListenerIF myConnectionListener = new MyConnectionListener();
022:         * ProxoolFacade.{@link org.logicalcobwebs.proxool.ProxoolFacade#addConnectionListener addConnectionListener}(alias, myConnectionListener);
023:         * </pre>
024:         *
025:         * @version $Revision: 1.7 $, $Date: 2003/03/03 11:11:57 $
026:         * @author billhorsman
027:         * @author $Author: billhorsman $ (current maintainer)
028:         */
029:        public interface ConnectionListenerIF {
030:
031:            /**
032:             * Happens everytime we create a new connection. You can use this
033:             * to allocate resources to a connection that might be useful during
034:             * the lifetime of the connection.
035:             *
036:             * @param connection the connection that has just been created
037:             * @throws SQLException if anything goes wrong (which will then be logged but ignored)
038:             */
039:            void onBirth(Connection connection) throws SQLException;
040:
041:            /**
042:             * Happens just before we expire a connection. You can use this to
043:             * reclaim resources from a connection.
044:             *
045:             * @param connection the connection that is about to expire
046:             * @throws SQLException if anything goes wrong (which will then be logged but ignored)
047:             */
048:            void onDeath(Connection connection) throws SQLException;
049:
050:            /**
051:             * Happens after every successful execute. Note that the command
052:             * is not fully implemented at this stage. At some point it might represent
053:             * the SQL that is sent to the database (or the procedure call that was used).
054:             *
055:             * @param command what command was being executed
056:             * @param elapsedTime how long the call took (in milliseconds)
057:             */
058:            void onExecute(String command, long elapsedTime);
059:
060:            /**
061:             * Happens everytime an exception was thrown during an execute method
062:             * Note that the command
063:             * is not fully implemented at this stage. At some point it might represent
064:             * the SQL that is sent to the database (or the procedure call that was used).
065:             *
066:             * @param command what command was being executed
067:             * @param exception what exception was thrown
068:             */
069:            void onFail(String command, Exception exception);
070:
071:        }
072:
073:        /*
074:         Revision history:
075:         $Log: ConnectionListenerIF.java,v $
076:         Revision 1.7  2003/03/03 11:11:57  billhorsman
077:         fixed licence
078:
079:         Revision 1.6  2003/02/08 00:35:30  billhorsman
080:         doc
081:
082:         Revision 1.5  2002/12/15 19:21:42  chr32
083:         Changed @linkplain to @link (to preserve JavaDoc for 1.2/1.3 users).
084:
085:         Revision 1.4  2002/10/25 16:00:20  billhorsman
086:         added better class javadoc
087:
088:         Revision 1.3  2002/10/23 21:04:36  billhorsman
089:         checkstyle fixes (reduced max line width and lenient naming convention
090:
091:         Revision 1.2  2002/10/16 11:45:52  billhorsman
092:         removed obsolete cleanupClob method and added more javadoc
093:
094:         Revision 1.1.1.1  2002/09/13 08:12:34  billhorsman
095:         new
096:
097:         Revision 1.5  2002/08/24 19:43:04  billhorsman
098:         new execute events
099:
100:         Revision 1.4  2002/06/28 11:15:41  billhorsman
101:         didn't really need ListenerIF
102:
103:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.