File tree Expand file tree Collapse file tree
main/java/org/apache/commons/dbcp2
test/java/org/apache/commons/dbcp2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,15 +131,17 @@ public void abort(final Executor executor) throws SQLException {
131131 protected void activate () {
132132 closed = false ;
133133 setLastUsed ();
134- if (beginRequest != null && connection != null ) {
135- try {
136- beginRequest .invoke (connection );
137- } catch (InvocationTargetException | IllegalAccessException ex ) {
138- log .warn ("Error calling beginRequest on connection" , ex );
139- }
140- }
134+
141135 if (connection instanceof DelegatingConnection ) {
142136 ((DelegatingConnection <?>) connection ).activate ();
137+ } else {
138+ if (beginRequest != null && connection != null ) {
139+ try {
140+ beginRequest .invoke (connection );
141+ } catch (InvocationTargetException | IllegalAccessException ex ) {
142+ log .warn ("Error calling beginRequest on connection" , ex );
143+ }
144+ }
143145 }
144146 }
145147
Original file line number Diff line number Diff line change @@ -425,12 +425,10 @@ public <T> T unwrap(final Class<T> iface) throws SQLException {
425425 throw new SQLException ("Not implemented." );
426426 }
427427
428- @ Override
429428 public void beginRequest () {
430429 beginRequestCount .incrementAndGet ();
431430 }
432431
433- @ Override
434432 public void endRequest () {
435433 endRequestCount .incrementAndGet ();
436434 }
You can’t perform that action at this time.
0 commit comments