Java ry 15复制到tmp表从条目中选择e.*作为e左连接更正作为e.id=c.entry上的c,其中e.type=1按e.id分组 1857 govolable localhost:2794中国人学习睡眠23 1858 Govolable localhost
ry 15复制到tmp表从条目中选择e.*作为e左连接更正作为e.id=c.entry上的c,其中e.type=1按e.id分组 1857 govolable localhost:2794中国人学习睡眠23Java ry 15复制到tmp表从条目中选择e.*作为e左连接更正作为e.id=c.entry上的c,其中e.type=1按e.id分组 1857 govolable localhost:2794中国人学习睡眠23 1858 Govolable localhost,java,mysql,tomcat,Java,Mysql,Tomcat,ry 15复制到tmp表从条目中选择e.*作为e左连接更正作为e.id=c.entry上的c,其中e.type=1按e.id分组 1857 govolable localhost:2794中国人学习睡眠23 1858 Govolable localhost:2796 chineselearning查询23复制到tmp表从条目中选择e.*作为e left join更正为c on e.id=c.entry其中e.type=1按e.id分组 1859 govolable localhost:2809
1858 Govolable localhost:2796 chineselearning查询23复制到tmp表从条目中选择e.*作为e left join更正为c on e.id=c.entry其中e.type=1按e.id分组 1859 govolable localhost:2809 chineselearning查询0显示进程列表
我认为你的部分问题是你没有关闭所有打开的东西。你可能想看看这个:嗨,詹姆斯,谢谢你的回复,但是close方法在finally块中被显式调用了?如果你看一下我给出的链接,close被调用了三次。
private static Logger log = Logger.getLogger(DB.class.getName());
private static DataSource ds = null;
private static Context initCtx = null;
static {
try {
initCtx = new InitialContext();
ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/ens");
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
log.error(e);
}
}
public static Connection getConnection() throws SQLException {
Connection con = ds.getConnection();
return con;
}
public static QueryRunner getRunner() {
return new QueryRunner();
}
protected Connection conn;
protected void getConnection() throws SQLException {
this.conn = DB.getConnection();
}
protected void close() {
DbUtils.closeQuietly(this.conn);
}
protected <T> List<T> selectList(String sql, Class<T> c, Page p,
Object... params) throws SQLException {
try {
this.getConnection();
QueryRunner runner = DB.getRunner();
sql = sql + this.getLimitClause(p);
log.debug("selectList - " +sql);
return runner.query(this.conn, sql,
new BeanListHandler<T>(c), params);
} catch (SQLException e) {
// TODO: handle exception
throw e;
} finally {
this.close();
}
}
<Resource name="jdbc/ens"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
testWhileIdle="true"
testOnBorrow="true"
testOnReturn="false"
validationQuery="SELECT 1"
validationInterval="30000"
timeBetweenEvictionRunsMillis="30000"
maxActive="270"
minIdle="10"
maxWait="10000"
initialSize="20"
removeAbandonedTimeout="60"
removeAbandoned="true"
logAbandoned="true"
minEvictableIdleTimeMillis="30000"
jmxEnabled="true"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
username="root"
password="root"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/chineselearning?useUnicode=true&characterEncoding=utf-8"/>