我正在通过 JAVA 程序创建 JDBC ODBC 连接。我不得不多次建立这种联系。一段时间后,程序会抛出 Too Many Client Task Exception 。怎么可能解决这个问题。我正在粘贴我的要求的示例
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();
   }
  }