惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
C
Check Point Blog
J
Java Code Geeks
腾讯CDC
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
罗磊的独立博客
Last Week in AI
Last Week in AI
B
Blog
IT之家
IT之家
S
SegmentFault 最新的问题
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
博客园 - 聂微东
U
Unit 42
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
MyScale Blog
MyScale Blog

博客园 - L.Zhang

.Net Remoting RMI框架 JDBC访问数据库 MyEclipse下开发Web Service 使用传统的XMLHttpRequest发出Ajax请求 XML CDATA XPath 数据库操作的sql脚本 直接选择排序 直接插入排序 气泡排序 Builder 生成器模式(创建型模式) Abstract Factory 抽象工厂模式(创建型模式) Factory Method 工厂方法模式(创建型模式) Singleton单件模式(创建型模式) 使用Profile Service 服务端如何使用Session 让服务端返回xml 用Get方式访问
自己开发连接池
L.Zhang · 2008-01-24 · via 博客园 - L.Zhang

自己开发连接池

Posted on 2008-01-24 09:53  L.Zhang  阅读(171)  评论(0)    收藏  举报

1,定义连接池接口

import java.sql.*;
public interface ConnectionPool{
  
/** 从连接池中取出连接 */
  
public Connection getConnection()throws SQLException; 
    
  
/** 把连接返回连接池 */
  
public void releaseConnection(Connection con)throws SQLException;/** 关闭连接池*/    
  
public void close();
}

2,定义连接池的实现

刷新页面返回顶部