Thursday, 15 August 2013

java - JDBC connection pools in glassfish server -



java - JDBC connection pools in glassfish server -

i have configured jdbc pool in glassfish server.

max pool size=500 , steady pool size=100 , pool resize quantity=8, idle-time-out-in-seconds=300 .

after doing more research came know after idel-time-out-in-seconds inactive sessions(pool resize quantity) removed pool if size of pool more steady pool size.

suppose server started , pool has 100 connections , there no request server, in case connections become idle size of pool 100 same steady pool sessions , will inactive sessions never removed pool ?

suppose server started , pool has 100 connections , there no request server, in case connections become idle size of pool 100 same steady pool sessions, inactive sessions never removed pool?

the inactive connections removed pool, recreated ensure minimum number of connections in pool (indicated steady-pool-size setting) available.

from oracle docs:

idle timeout: maximum time in seconds connection can remain idle in pool. after time, pool can close connection. property not command connection timeouts on database server.

to create sure can activate monitoring jdbc connection pool. open glassfish admin ui , navigate server-config -> monitoring. enable monitoring service , set level "jdbc connection pool" high. navigate server (the sec item in upper left menu of glassfish admin ui) -> monitor -> resources , select connection pool. can see how many connection have been opened, closed, released , timed out.

see also:

database connection not release after idle time out in glassfish

java jdbc glassfish

No comments:

Post a Comment