mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved oracle pscache error handle.
This commit is contained in:
@@ -22,6 +22,7 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.ConcurrentModificationException;
|
||||
@@ -438,6 +439,17 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
this.setConnectionProperties(property);
|
||||
}
|
||||
}
|
||||
{
|
||||
String property = properties.getProperty("druid.maxPoolPreparedStatementPerConnectionSize");
|
||||
if (property != null && property.length() > 0) {
|
||||
try {
|
||||
int value = Integer.parseInt(property);
|
||||
this.setMaxPoolPreparedStatementPerConnectionSize(value);
|
||||
} catch (NumberFormatException e) {
|
||||
LOG.error("illegal property 'druid.maxPoolPreparedStatementPerConnectionSize'", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isKillWhenSocketReadTimeout() {
|
||||
@@ -1443,6 +1455,12 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
}
|
||||
|
||||
if (requireDiscard) {
|
||||
if (holder.statementTrace != null) {
|
||||
for (Statement stmt : holder.statementTrace) {
|
||||
JdbcUtils.close(stmt);
|
||||
}
|
||||
}
|
||||
|
||||
this.discardConnection(holder.getConnection());
|
||||
holder.setDiscard(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user