package com.test;import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class VoteDbHelper {
public static Connection con = null; public static Statement stmt = null; public static ResultSet rs = null; private int dbUpdate(String sql) {
try {
con = DbConnectionManager.getConnection("jdbc/SiteDb");
stmt = con.createStatement();
int temp = stmt.executeUpdate(sql);
                            return temp;
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
stmt.close();
con.close();
} catch (SQLException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
}
return -1;
}
}
我的意思是如果一个获得数据库连接的类,他的成员connection,statement,resultSet如果设为静态的,会不会造成程序的安全问题??