日期:2014-05-16 浏览次数:20377 次
public class DBConnection{ private DBConnection{} /** *数据库链接 */ private volatile static Connection conn=null; public static Connection getConnection(){ if(conn==null){ synchronized (PMSServerContext.class) { if(conn == null) conn = DBConnection.getImplementation().getConnection(); } } } }