package com.cockpit.util; import java.sql.Connection; import com.sinosoft.cm.DBUtils; public class ConnUtil{ private static ConnUtil cu = null ; private static Connection conn = null ; private ConnUtil(){ conn = DBUtils.getConnection(); } public static Connection getConn(){ if(conn == null){ cu = new ConnUtil(); } return conn ; } }