Source Code Cross Referenced for C3P0ProxyStatement.java in  » Database-JDBC-Connection-Pool » c3p0 » com » mchange » v2 » c3p0 » 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 » c3p0 » com.mchange.v2.c3p0 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * Distributed as part of c3p0 v.0.9.1.2
03:         *
04:         * Copyright (C) 2005 Machinery For Change, Inc.
05:         *
06:         * Author: Steve Waldman <swaldman@mchange.com>
07:         *
08:         * This library is free software; you can redistribute it and/or modify
09:         * it under the terms of the GNU Lesser General Public License version 2.1, as 
10:         * published by the Free Software Foundation.
11:         *
12:         * This software is distributed in the hope that it will be useful,
13:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
14:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15:         * GNU Lesser General Public License for more details.
16:         *
17:         * You should have received a copy of the GNU Lesser General Public License
18:         * along with this software; see the file LICENSE.  If not, write to the
19:         * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20:         * Boston, MA 02111-1307, USA.
21:         */
22:
23:        package com.mchange.v2.c3p0;
24:
25:        import java.sql.Statement;
26:        import java.sql.SQLException;
27:        import java.lang.reflect.Method;
28:        import java.lang.reflect.InvocationTargetException;
29:
30:        /**
31:         *  <p><b>Most clients need never use or know about this interface -- c3p0-provided Statements
32:         *  can be treated like any other Statement.</b></p>
33:         *
34:         *  <p>An interface implemented by proxy Connections returned
35:         *  by c3p0 PooledDataSources. It provides protected access to the underlying
36:         *  dbms-vendor specific Connection, which may be useful if you want to
37:         *  access non-standard API offered by your jdbc driver.
38:         */
39:        public interface C3P0ProxyStatement extends Statement {
40:            /**
41:             *  A token representing an unwrapped, unproxied jdbc Connection
42:             *  for use in {@link #rawStatementOperation}
43:             */
44:            public final static Object RAW_STATEMENT = new Object();
45:
46:            /**
47:             *  <p>Allows one to work with the unproxied, raw vendor-provided Statement . Some 
48:             *  database companies never got over the "common interfaces mean
49:             *  no more vendor lock-in!" thing, and offer non-standard API
50:             *  on their Statements. This method permits you to "pierce" the
51:             *  connection-pooling layer to call non-standard methods on the
52:             *  original Statement, or to pass the original Statement to 
53:             *  functions that are not implementation neutral.</p>
54:             *
55:             *  <p>To use this functionality, you'll need to cast a Statement
56:             *  retrieved from a c3p0-provided Connection to a 
57:             *  C3P0ProxyStatement.</p>
58:             *
59:             *  <p>This method works by making a reflective call of method <tt>m</tt> on
60:             *  Object <tt>target</tt> (which may be null for static methods), passing
61:             *  and argument list <tt>args</tt>. For the method target, or for any argument,
62:             *  you may substitute the special token <tt>C3P0ProxyStatement.RAW_STATEMENT</tt></p>
63:             *
64:             *  <p>Any ResultSets returned by the operation will be proxied
65:             *  and c3p0-managed, meaning that these resources will be automatically closed 
66:             *  if the user does not close them first when this Statement is closed or checked
67:             *  into the statement cache. <b>Any other resources returned by the operation are the user's
68:             *  responsibility to clean up!</b></p>
69:             *
70:             *  <p>If you have turned statement pooling on, incautious use of this method can corrupt the 
71:             *  PreparedStatement cache, by breaking the invariant
72:             *  that all cached PreparedStatements should be equivalent to a PreparedStatement newly created
73:             *  with the same arguments to prepareStatement(...) or prepareCall(...). If your vendor supplies API
74:             *  that allows you to modify the state or configuration of a Statement in some nonstandard way,
75:             *  and you do not undo this modification prior to closing the Statement or the Connection that
76:             *  prepared it, future preparers of the same Statement may or may not see your modification,
77:             *  depending on your use of the cache. Thus, it is inadvisable to use this method to call
78:             *  nonstandard mutators on PreparedStatements if statement pooling is turned on.. 
79:             */
80:            public Object rawStatementOperation(Method m, Object target,
81:                    Object[] args) throws IllegalAccessException,
82:                    IllegalArgumentException, InvocationTargetException,
83:                    SQLException;
84:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.