Hi All,
If I instanciate more connection than the max specified by
getMaxConnections(), it seems that getConnection() is waiting forever,
until a connection of the pool is released. Ok, but is there a way to
detect this, and
1/ produce a warning
2/ create despite everything a new connection on the fly
(stupid) snippet:
JdbcConnectionPool pool = JdbcConnectionPool.create("jdbc:h2:D:/db/
plop", "system", "manager");
pool.setMaxConnections(20);
Connection [] cons = new Connection[21];
for (int i=0; i<21; i++){
cons[i] = pool.getConnection(); // will block forever at
21st loop
}
Thanks !
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.