I am creating a JDBC ODBC connection through JAVA programs. I have to make with this connection so many times . After some times the program throws the Too Many Client Task Exception . How can is resolve this problem . I am pasting a sample example of my requirement
class connectiondemo
{
public void connect()
{
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:dsn");
Statement st= con.createStatement();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}
calling programs
class
{
public static void main(String args[])
{
//supose i have to call connect methods thousands of times then what is the solution
connectdemo demo= new connectdemo();
dem0.connect();
}
}