~ubuntu-branches/ubuntu/trusty/mysql-connector-java/trusty

« back to all changes in this revision

Viewing changes to src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg, Miguel Landaeta
  • Date: 2013-07-02 17:07:51 UTC
  • mfrom: (1.1.8) (3.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20130702170751-f4rszjabxg0391fr
Tags: 5.1.25-1
* New upstream release
* Refreshed the patches
* Added a patch to build with one JDK and removed the build
  dependency on java-gcj-compat-dev
* Updated Standards-Version to 3.9.4 (no changes)
* Use canonical URLs for the Vcs-* fields
* debian/rules: Improved the clean target to allow rebuilds
* Updated the watch file
* Renamed debian/README.Debian-source to README.source

[ Miguel Landaeta ] 
* Fix FTBFS with OpenJDK 7 (Closes: #706668)
* Remove Michael Koch from Uploaders list.
  Thanks for your work on this package. (Closes: #654122).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
 
2
 Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
 
5
5
  The MySQL Connector/J is licensed under the terms of the GPLv2
35
35
import javax.sql.ConnectionEventListener;
36
36
import javax.sql.PooledConnection;
37
37
 
38
 
import com.mysql.jdbc.ConnectionImpl;
39
38
import com.mysql.jdbc.ExceptionInterceptor;
40
39
import com.mysql.jdbc.SQLError;
41
40
import com.mysql.jdbc.Util;
51
50
 */
52
51
public class MysqlPooledConnection implements PooledConnection {
53
52
 
54
 
        private static final Constructor JDBC_4_POOLED_CONNECTION_WRAPPER_CTOR;
 
53
        private static final Constructor<?> JDBC_4_POOLED_CONNECTION_WRAPPER_CTOR;
55
54
 
56
55
        static {
57
56
                if (Util.isJdbc4()) {
94
93
 
95
94
        // ~ Instance/static variables .............................................
96
95
 
97
 
        private Map connectionEventListeners;
 
96
        private Map<ConnectionEventListener, ConnectionEventListener> connectionEventListeners;
98
97
 
99
98
        private Connection logicalHandle;
100
99
 
113
112
        public MysqlPooledConnection(com.mysql.jdbc.Connection connection) {
114
113
                this.logicalHandle = null;
115
114
                this.physicalConn = connection;
116
 
                this.connectionEventListeners = new HashMap();
 
115
                this.connectionEventListeners = new HashMap<ConnectionEventListener, ConnectionEventListener>();
117
116
                this.exceptionInterceptor = this.physicalConn.getExceptionInterceptor();
118
117
        }
119
118
 
234
233
                        return;
235
234
                }
236
235
 
237
 
                Iterator iterator = this.connectionEventListeners.entrySet().iterator();
 
236
                Iterator<Map.Entry<ConnectionEventListener, ConnectionEventListener>> iterator = this.connectionEventListeners.entrySet().iterator();
238
237
                
239
238
                ConnectionEvent connectionevent = new ConnectionEvent(this,
240
239
                                sqlException);
241
240
 
242
241
                while (iterator.hasNext()) {
243
242
 
244
 
                        ConnectionEventListener connectioneventlistener = (ConnectionEventListener) ((Map.Entry)iterator
245
 
                                        .next()).getValue();
 
243
                        ConnectionEventListener connectioneventlistener = iterator.next().getValue();
246
244
 
247
245
                        if (eventType == CONNECTION_CLOSED_EVENT) {
248
246
                                connectioneventlistener.connectionClosed(connectionevent);
256
254
        protected ExceptionInterceptor getExceptionInterceptor() {
257
255
                return this.exceptionInterceptor;
258
256
        }
 
257
 
 
258
    public void addStatementEventListener(javax.sql.StatementEventListener listener) {
 
259
        throw new UnsupportedOperationException();
 
260
    }
 
261
 
 
262
    public void removeStatementEventListener(javax.sql.StatementEventListener listener) {
 
263
        throw new UnsupportedOperationException();
 
264
    }
259
265
}
 
 
b'\\ No newline at end of file'