日期:2014-05-18 浏览次数:20643 次
public void test(){
Configuration cfg = new Configuration().configure();
ArrayList<SessionFactory> al = new ArrayList<SessionFactory>();
for (int i = 0; i < 3000; i++) {
SessionFactory sf = cfg.buildSessionFactory();
}
public void test(){
Configuration cfg = new Configuration().configure();
ArrayList<SessionFactory> al = new ArrayList<SessionFactory>();
for (int i = 0; i < 3000; i++) {
SessionFactory sf = cfg.buildSessionFactory();
sf.close();
}
public void test(){
Configuration cfg = new Configuration().configure();
ArrayList<SessionFactory> al = new ArrayList<SessionFactory>();
for (int i = 0; i < 3000; i++) {
SessionFactory sf = cfg.buildSessionFactory();
sf.close();
al.add(sf);
}
public void test(){
Configuration cfg = new Configuration().configure();
ArrayList<SessionFactory> al = new ArrayList<SessionFactory>();
for (int i = 0; i < 3000; i++) {
SessionFactory sf = cfg.buildSessionFactory();
sf.close();
System.out.println(i+":"+sf);
}