2009-11-13 13 views

답변

1

이 작동합니다 :

Properties p = new Properties(); 
p.setProperty("user", userid); 
p.setProperty("password", password); 
p.setProperty("MaxPooledStatements", "200"); 
// set other properties 
Connection conn = driver.connect(url, p); // can also use DriverManager but no real benefit 
0

난 당신이 오라클과 풀링 문에 대한 자세한 읽어 좋을 것.

오라클 JDBC 드라이버가 암시 적 캐싱이 활성화되어 있다는 가정하에 설계 을하지만 예를 here를 들어,이 기능은 기본적으로 켜져 있지 않습니다. 는 true로 OracleConnection 객체 를 해당 의 implicitCachingEnabled 속성을 설정할 수 있으며, 연결에서 암시 적 캐싱을 활성화하고 양의 정수로 statementCacheSize 속성을 설정합니다. 다음과 같이 수행 할 수 있습니다 :

conn.setImplicitCachingEnabled(true); 
    conn.setStatementCacheSize(10); 
aUCP JDBC 연결 풀을 사용하는 경우, 당신은 양의 정수에 maxStatements 속성을 설정하여 문 캐싱 을 활성화 할 수 있습니다

:

pds.setMaxStatements(10);