Code: Select all
PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource();
pds.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource");
pds.set(url);
pds.setUser(null); // for krb5 auth
pds.setPassword(null); // for krb5 auth
pds.setInitializePoolSize(3); // failed with ORA-12631
pds.setMinPoolSize(3);
pds.setMaxPoolSize(20);
pds.setTimeoutCheckInterval(120);
pds.setInactiveConnectionTimeout(300);
pds.setConnectionProperties(krbProperties); // krb5 properties like KRB5_CC_NAME
Wenn ich initialPoolSize auf 1 oder 2 setze, könnte ich die Verbindung herstellen und die Datenbank abfragen. Es hat auch funktioniert, wenn ich die krb5-Authentifizierung ausgeschaltet habe.