大伙帮忙看看我的oracle连接为什么这么慢

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

每测试一次都要花40秒左右  
  不知道怎么回事  
  大伙帮忙看看  
   
   
  import   java.sql.*;  
   
   
  public   class   dbconnectioncommon   extends   dbconnection{  
   
  private   connection   conn   =   null;  
   
  private   static   dbconnectioncommon   connection  
  =   new   dbconnectioncommon();  
   
   
  private   dbconnectioncommon()   {  
   
  }  
   
  public   dbconnectioncommon   getinstance()   {  
  return   connection;  
  }  
  public     connection   getconnection()   throws   exception   {  
  return   connection();  
  }  
   
  public     connection   connection()   throws   exception   {  
  string   error   =   "";    
  try  
            {  
                    class.forname("oracle.jdbc.driver.oracledriver");  
                    conn   =   drivermanager.getconnection("jdbc:oracle:thin:@184.144.33.99"   +  
                    ":1521:lzoa",   "zbxx",   "zbxx");  
            }  
            catch(classnotfoundexception   cnfe)  
            {  
                    error   =   "classnotfoundexception:could   not   locate   db   driver";  
                    throw   new   classnotfoundexception(error);  
            }  
            catch(sqlexception   cnfe)  
            {  
                    error   =   "sqlexception:could   not   connect   to   db.";  
                    throw   new   sqlexception(error);  
            }  
            return   conn;  
  }  
   
   
  }  
 

.

· 网友精彩回答:

处理 SSI 文件时出错
© 2006-2008 All Rights Reserved