Skip to content

Commit 9043a16

Browse files
committed
#60 - Remove longRunning flag from PooledConnection
1 parent 088fddf commit 9043a16

3 files changed

Lines changed: 2 additions & 23 deletions

File tree

ebean-datasource/src/main/java/io/ebean/datasource/pool/BusyConnectionBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void closeBusyConnections(long leakTimeMinutes) {
9292
//tmp.add(slots[i]);
9393
PooledConnection pc = slots[i];
9494
//noinspection StatementWithEmptyBody
95-
if (pc.isLongRunning() || pc.getLastUsedTime() > olderThanTime) {
95+
if (pc.getLastUsedTime() > olderThanTime) {
9696
// PooledConnection has been used recently or
9797
// expected to be longRunning so not closing...
9898
} else {

ebean-datasource/src/main/java/io/ebean/datasource/pool/PooledConnection.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ final class PooledConnection extends ConnectionDelegator {
7171
* The reason for a connection closing.
7272
*/
7373
private String closeReason;
74-
/**
75-
* Set this to true if the connection will be busy for a long time.
76-
* This means it should skip the suspected connection pool leak checking.
77-
*/
78-
private boolean longRunning;
7974
/**
8075
* Flag to indicate that this connection had errors and should be checked to
8176
* make sure it is okay.
@@ -175,21 +170,6 @@ String getFullDescription() {
175170
return "name[" + name + "] startTime[" + getStartUseTime() + "] busySeconds[" + getBusySeconds() + "] stackTrace[" + getStackTraceAsString() + "] stmt[" + getLastStatement() + "]";
176171
}
177172

178-
/**
179-
* Return true if the connection should be treated as long running (skip connection pool leak check).
180-
*/
181-
boolean isLongRunning() {
182-
return longRunning;
183-
}
184-
185-
/**
186-
* Set this to true if the connection is a long running connection and should skip the
187-
* 'suspected connection pool leak' checking.
188-
*/
189-
public void setLongRunning(boolean longRunning) {
190-
this.longRunning = longRunning;
191-
}
192-
193173
/**
194174
* Close the connection fully NOT putting in back into the pool.
195175
* <p>
@@ -361,7 +341,6 @@ void resetForUse() {
361341
this.createdByMethod = null;
362342
this.lastStatement = null;
363343
this.hadErrors = false;
364-
this.longRunning = false;
365344
}
366345

367346
/**

ebean-datasource/src/main/java/io/ebean/datasource/pool/PreparedStatementDelegator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.sql.*;
88
import java.util.Calendar;
99

10-
class PreparedStatementDelegator implements PreparedStatement {
10+
abstract class PreparedStatementDelegator implements PreparedStatement {
1111

1212
protected final PreparedStatement delegate;
1313

0 commit comments

Comments
 (0)