例子
package net
import java
import java
import java
public class ConnectionBean
{
private static Connection conn = null;
public static Connection getConnection()
{
if (conn == null)
{
try
{
DriverManager
conn = DriverManager
} catch(SQLException e)
{
e
}
// if(conn == null)
// System
}
return conn;
}
}
From:http://tw.wingwit.com/Article/program/Oracle/201311/18550.html