You need to change the "idle-timeout" attribute of the connection pool. You can access the admin console (GUI) to do it or using CLI :
it will be of the format :
eg :
GLASSFISH_HOME/bin/asadmin set server.resources.jdbc-connection-pool.<POOL_NAME>.idle-timeout-in-seconds=180
Substitute <POOL_NAME> with your pool's name.
[Message sent by forum member 'jr158900']
http://forums.java.net/jive/thread.jspa?messageID=485666