2013-10-08 1 views
-1

웹 응용 프로그램 (QTI 기반 온라인 검사 시스템)에서 c3p0 연결 풀링을 사용하고 있습니다. 문제는 우리가 18 명 이상의 동시 사용자를 지원할 수 없다는 것입니다. 응답 할 시간.c3p0 연결 풀링이 20 명의 사용자를 지원하지 않습니다

DBCP 및 TOMCAT JDBC 풀을 사용해 보았지만 여전히 동일한 결과가 나타납니다.

우리는 JDK 7, MYSQL v5.5.8 및 apache tomcat 7.0.42를 사용하고 있습니다. "Helper.getConnection를();"

나는 싱글 톤 클래스 여기

의 코드

public class Helper { 
    private static ComboPooledDataSource dataSource; 
    private static ResourceBundle bundle; 

static { 
    try { 

     String bundleName2 = "Conf/db"; 
     bundle = ResourceBundle.getBundle(bundleName2); 
     String db_name = bundle.getString("DB_NAME"); 
     String db_user = bundle.getString("DB_USER"); 
     String db_pass = bundle.getString("DB_PASS");  

     dataSource = new ComboPooledDataSource();    
     dataSource.setDriverClass("com.mysql.jdbc.Driver"); 
     dataSource.setJdbcUrl("jdbc:mysql://localhost:3306/"+db_name); 
     dataSource.setMaxPoolSize(150); 
     dataSource.setInitialPoolSize(30); 
     dataSource.setMinPoolSize(30); 
     dataSource.setMaxStatements(180); 
     dataSource.setUser(db_user);      
     dataSource.setPassword(db_pass); 
     System.out.println("-------------data scource created------------"); 


    } catch (PropertyVetoException ex) { 
     Logger.getLogger(Helper.class.getName()).log(Level.SEVERE, null, ex); 
    } 
} 
public static Connection getConnection() throws SQLException { 
    System.out.println("================================================="); 
    System.out.println("Num Connections"+dataSource.getNumConnections()); 
    System.out.println("Num Buzy Connections"+dataSource.getNumBusyConnections()); 
    System.out.println("max pool size"+dataSource.getMaxPoolSize()); 
    System.out.println("idle connection"+dataSource.getNumIdleConnections()); 
    System.out.println("================================================"); 

    return dataSource.getConnection(); 
} 

을 데이터 소스입니다 만드는 오전 내가 부르고 연결 객체를 가져 오는 메소드.

아무도 이유를 설명 할 수 있습니까?

답변

-1

c3po 대신 BoneCP를 시도하십시오. 내가 아는 한, c3po는 더 이상 지원되지 않습니다