Hi Group,

My backend database is DB2. I have a junit test to
check the time out of a DB2 connection. A snippet of
it is as follows - 
Connection con =
DBConnectionManager.getInstance().getConnection(POOL_NAME);
try
{
        System.out.println("Thread to sleep.." + new Date());
        Thread.sleep(60000 * 60 * 18);
        System.out.println("Thread woke up..");
}
catch (InterruptedException e)
{
        System.out.println("Thread Interrupted.." + new
Date());
}

Statement st = con.createStatement();
ResultSet rs = st.executeQuery("SELECT * from temp");
if(rs.next())
{
        System.out.println("Value " + rs.getString(1));
}

System.out.println("Ending test.." + new Date());



I am guessing the value to pass on to Thread.sleep().
I tried with 10 hours yesterday, but the connection
worked out after 10 hours. Any ideas on what value
would is sufficient that to force a timeout.

Best Regards,
Janarthan S


                
__________________________________ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to