mysql server time out

I have a java application which access a mysql server

after every 11mn of inactivity i loose the connection

the mysql server variable timeout are 28800s somy question is why do i loose the connection after 11mn?

Does java has any way to listen to object

so that if the conn object state change to disconnect i can have a listener performs the reconnection

I came with the idea of using a thread or a timer which will check the connection every 11 mn and reconnect me if necessary but i was wondering if that can overwhelmed my application

[577 byte] By [lildavesflavaa] at [2007-11-27 4:14:15]
# 1
Your application is going to be overwhelmed if you do some little thing every ELEVEN MINUTES? Are you seriously asking that?
DrClapa at 2007-7-12 9:20:36 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Keeping connections open until they times out is bad practice.Consider connection pooling.
BalusCa at 2007-7-12 9:20:36 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

> Your application is going to be overwhelmed if you do

> some little thing every ELEVEN MINUTES? Are you

> seriously asking that?

What about asking me first how many user i have and on which can of network i am running my application and stuff like that first?

my main issue is not really to overwhelmed my application, it is more and true efficiency issue.

I fix this issue by adding autoreconnect=true after host name in the statement to create the connection.

Thanks

lildavesflavaa at 2007-7-12 9:20:36 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...