Connection conn = null;
public Connection getConnection(){
conn = null;
this.getSession().close();
this.getSession().flush();
this.getSession().clear();
this.getSession().doWork(new Work(){
@Override
public void execute(Connection connection)
throws SQLException {
conn =connection;
}
});
return conn;
}
hibernate获取connection连接
最新推荐文章于 2019-01-08 10:56:03 发布