Source Code Cross Referenced for ConnectionWrapper.java in  » Web-Framework » JAT » com » jat » integration » db » connectionpool » 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 Framework » JAT » com.jat.integration.db.connectionpool 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.jat.integration.db.connectionpool;
002:
003:        import java.sql.CallableStatement;
004:        import java.sql.Connection;
005:        import java.sql.DatabaseMetaData;
006:        import java.sql.PreparedStatement;
007:        import java.sql.SQLException;
008:        import java.sql.SQLWarning;
009:        import java.sql.Savepoint;
010:        import java.sql.Statement;
011:        import java.util.Map;
012:
013:        /**
014:         * <p>Title: JAT</p>
015:         * <p>Description: </p>
016:         * <p>Copyright: Copyright (c) 2004 -2005 Stefano Fratini (stefano.fratini@gmail.com)</p>
017:         * <p>Distributed under the terms of the GNU Lesser General Public License, v2.1 or later</p>
018:         * @author stf
019:         * @version 1.0
020:         * @since 1.2
021:         */
022:
023:        public class ConnectionWrapper implements  Connection {
024:
025:            public ConnectionWrapper(ConnectionPoolDataSource parent,
026:                    Connection con) {
027:                this .dataSource = parent;
028:                this .con = con;
029:            }
030:
031:            public void destroy() {
032:                try {
033:                    this .con.close();
034:                } catch (SQLException ex) {
035:                }
036:            }
037:
038:            public void close() throws SQLException {
039:                this .dataSource.releaseConnection(this );
040:            }
041:
042:            public Statement createStatement() throws SQLException {
043:                return con.createStatement();
044:            }
045:
046:            public PreparedStatement prepareStatement(String sql)
047:                    throws SQLException {
048:                return con.prepareStatement(sql);
049:            }
050:
051:            public CallableStatement prepareCall(String sql)
052:                    throws SQLException {
053:                return con.prepareCall(sql);
054:            }
055:
056:            public String nativeSQL(String sql) throws SQLException {
057:                return con.nativeSQL(sql);
058:            }
059:
060:            public void setAutoCommit(boolean autoCommit) throws SQLException {
061:                con.setAutoCommit(autoCommit);
062:            }
063:
064:            public boolean getAutoCommit() throws SQLException {
065:                return con.getAutoCommit();
066:            }
067:
068:            public void commit() throws SQLException {
069:                con.commit();
070:            }
071:
072:            public void rollback() throws SQLException {
073:                con.rollback();
074:            }
075:
076:            public boolean isClosed() throws SQLException {
077:                return con.isClosed();
078:            }
079:
080:            public DatabaseMetaData getMetaData() throws SQLException {
081:                return con.getMetaData();
082:            }
083:
084:            public void setReadOnly(boolean readOnly) throws SQLException {
085:                con.setReadOnly(readOnly);
086:            }
087:
088:            public boolean isReadOnly() throws SQLException {
089:                return con.isReadOnly();
090:            }
091:
092:            public void setCatalog(String catalog) throws SQLException {
093:                con.setCatalog(catalog);
094:            }
095:
096:            public String getCatalog() throws SQLException {
097:                return con.getCatalog();
098:            }
099:
100:            public void setTransactionIsolation(int level) throws SQLException {
101:                con.setTransactionIsolation(level);
102:            }
103:
104:            public int getTransactionIsolation() throws SQLException {
105:                return con.getTransactionIsolation();
106:            }
107:
108:            public SQLWarning getWarnings() throws SQLException {
109:                return con.getWarnings();
110:            }
111:
112:            public void clearWarnings() throws SQLException {
113:                con.clearWarnings();
114:            }
115:
116:            public Statement createStatement(int resultSetType,
117:                    int resultSetConcurrency) throws SQLException {
118:                return con.createStatement(resultSetType, resultSetConcurrency);
119:            }
120:
121:            public PreparedStatement prepareStatement(String sql,
122:                    int resultSetType, int resultSetConcurrency)
123:                    throws SQLException {
124:                return con.prepareStatement(sql, resultSetType,
125:                        resultSetConcurrency);
126:            }
127:
128:            public CallableStatement prepareCall(String sql, int resultSetType,
129:                    int resultSetConcurrency) throws SQLException {
130:                return con
131:                        .prepareCall(sql, resultSetType, resultSetConcurrency);
132:            }
133:
134:            public Map getTypeMap() throws SQLException {
135:                return con.getTypeMap();
136:            }
137:
138:            public void setTypeMap(Map map) throws SQLException {
139:                con.setTypeMap(map);
140:            }
141:
142:            public void setHoldability(int holdability) throws SQLException {
143:                con.setHoldability(holdability);
144:            }
145:
146:            public int getHoldability() throws SQLException {
147:                return con.getHoldability();
148:            }
149:
150:            public Savepoint setSavepoint() throws SQLException {
151:                return con.setSavepoint();
152:            }
153:
154:            public Savepoint setSavepoint(String name) throws SQLException {
155:                return con.setSavepoint(name);
156:            }
157:
158:            public void rollback(Savepoint savepoint) throws SQLException {
159:                con.rollback();
160:            }
161:
162:            public void releaseSavepoint(Savepoint savepoint)
163:                    throws SQLException {
164:                con.releaseSavepoint(savepoint);
165:            }
166:
167:            public Statement createStatement(int resultSetType,
168:                    int resultSetConcurrency, int resultSetHoldability)
169:                    throws SQLException {
170:                return con.createStatement(resultSetType, resultSetConcurrency,
171:                        resultSetHoldability);
172:            }
173:
174:            public PreparedStatement prepareStatement(String sql,
175:                    int resultSetType, int resultSetConcurrency,
176:                    int resultSetHoldability) throws SQLException {
177:                return con.prepareStatement(sql, resultSetType,
178:                        resultSetConcurrency, resultSetHoldability);
179:            }
180:
181:            public CallableStatement prepareCall(String sql, int resultSetType,
182:                    int resultSetConcurrency, int resultSetHoldability)
183:                    throws SQLException {
184:                return con.prepareCall(sql, resultSetType,
185:                        resultSetConcurrency, resultSetHoldability);
186:            }
187:
188:            public PreparedStatement prepareStatement(String sql,
189:                    int autoGeneratedKeys) throws SQLException {
190:                return con.prepareStatement(sql, autoGeneratedKeys);
191:            }
192:
193:            public PreparedStatement prepareStatement(String sql,
194:                    int[] columnIndexes) throws SQLException {
195:                return con.prepareStatement(sql, columnIndexes);
196:            }
197:
198:            public PreparedStatement prepareStatement(String sql,
199:                    String[] columnNames) throws SQLException {
200:                return con.prepareStatement(sql, columnNames);
201:            }
202:
203:            private Connection con = null;
204:            private ConnectionPoolDataSource dataSource = null;
205:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.