提交 fb9f4972 authored 作者: Thomas Mueller's avatar Thomas Mueller

The built-in connection pool is now a bit faster, specially if the system…

The built-in connection pool is now a bit faster, specially if the system property "h2.runFinalize" is set to "false".
上级 971794ac
...@@ -17,7 +17,12 @@ Change Log ...@@ -17,7 +17,12 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>- <ul><li>The built-in connection pool is now a bit faster, specially if the system property
"h2.runFinalize" is set to "false".
</li><li>The scale was not set correctly in some cases when using
CREATE TABLE AS SELECT if there was no explicit column definition.
</li><li>When trying to connect to a server using TCP/IP failed, it will retry at most
until the timeout. Before, it was the timeout multiplied with the retry count.
</li></ul> </li></ul>
<h2>Version 1.3.155 (2011-05-27)</h2> <h2>Version 1.3.155 (2011-05-27)</h2>
......
...@@ -120,7 +120,9 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -120,7 +120,9 @@ public class JdbcConnection extends TraceObject implements Connection {
+ ", " + quote(user) + ", \"\");"); + ", " + quote(user) + ", \"\");");
} }
this.url = ci.getURL(); this.url = ci.getURL();
openStackTrace = new Exception("Stack Trace"); if (SysProperties.runFinalize) {
openStackTrace = new Exception("Stack Trace");
}
} catch (Exception e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
......
...@@ -245,7 +245,9 @@ public class JdbcConnectionPool implements DataSource, ConnectionEventListener { ...@@ -245,7 +245,9 @@ public class JdbcConnectionPool implements DataSource, ConnectionEventListener {
} else { } else {
closeConnection(pc); closeConnection(pc);
} }
notifyAll(); if (activeConnections >= maxConnections - 1) {
notifyAll();
}
} }
private void closeConnection(PooledConnection pc) { private void closeConnection(PooledConnection pc) {
......
...@@ -436,7 +436,9 @@ public class JdbcXAConnection extends TraceObject implements XAConnection, XARes ...@@ -436,7 +436,9 @@ public class JdbcXAConnection extends TraceObject implements XAConnection, XARes
public PooledJdbcConnection(JdbcConnection conn) { public PooledJdbcConnection(JdbcConnection conn) {
super(conn); super(conn);
openStackTrace = new Exception("Stack Trace"); if (SysProperties.runFinalize) {
openStackTrace = new Exception("Stack Trace");
}
} }
public synchronized void close() throws SQLException { public synchronized void close() throws SQLException {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论