科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网软件频道Java模拟.NET的连接池

Java模拟.NET的连接池

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

.NET的ADO.NET的本身包含连接池功能,而java是在第三方开发包中提高的连接池功能因此,需要去下载第三方的连接池包,但是java的连接池一般都是在EJB或者B/S系统中使用的。

作者:我就喜欢 来源:CSDN 2008年3月3日

关键字: 连接池 java

  • 评论
  • 分享微博
  • 分享邮件

在本页阅读全文(共5页)

public void setAutoCommit(boolean autoCommit) throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method setAutoCommit() not yet implemented.");
  aCon.setAutoCommit(autoCommit);
 }

 public boolean getAutoCommit() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method getAutoCommit() not yet implemented.");
  return aCon.getAutoCommit();
 }

 public void commit() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method commit() not yet implemented.");
  aCon.commit();
 }

 public void rollback() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  //throw new java.lang.UnsupportedOperationException("Method rollback() not yet implemented.");
  aCon.rollback();
 }

 public void close() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  //throw new java.lang.UnsupportedOperationException("Method close() not yet implemented.");
  if(DBConnectionPool.getCout()<=DBConnectionPool.getMinCount())
  {
  inUse = false;
  }else
  {
  closeConnection();
  }


 }

 public boolean isClosed() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  //throw new java.lang.UnsupportedOperationException("Method isClosed() not yet implemented.");
  return closed;
 }

 public DatabaseMetaData getMetaData() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method getMetaData() not yet implemented.");
  return aCon.getMetaData();
 }

 public void setReadOnly(boolean readOnly) throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method setReadOnly() not yet implemented.");
  aCon.setReadOnly(readOnly);
 }

 public boolean isReadOnly() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method isReadOnly() not yet implemented.");
  return isReadOnly();
 }

 public void setCatalog(String catalog) throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method setCatalog() not yet implemented.");
  aCon.setCatalog(catalog);
 }

 public String getCatalog() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  //throw new java.lang.UnsupportedOperationException("Method getCatalog() not yet implemented.");
  return aCon.getCatalog();
 }

 public void setTransactionIsolation(int level) throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method setTransactionIsolation() not yet implemented.");
  aCon.setTransactionIsolation(level);
 }

 public int getTransactionIsolation() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method getTransactionIsolation() not yet implemented.");
  return aCon.getTransactionIsolation();
 }

 public SQLWarning getWarnings() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method getWarnings() not yet implemented.");
  return aCon.getWarnings();
 }

 public void clearWarnings() throws SQLException {
  /**@todo Implement this java.sql.Connection method*/
  //throw new java.lang.UnsupportedOperationException("Method clearWarnings() not yet implemented.");
  aCon.clearWarnings();
 }

 public Statement createStatement(int resultSetType, int resultSetConcurrency) throws
   SQLException {
  /**@todo Implement this java.sql.Connection method*/
  // throw new java.lang.UnsupportedOperationException("Method createStatement() not yet implemented.");
  return aCon.createStatement(resultSetType, resultSetConcurrency);
 }
    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章