Hi,
thanks for your answer.
Sorry but I don't understand what you mean.
I tried to replace login and password parameters with the following jndi.datasource option:
Code:
<property name="hibernate.connection.jndi.datasource" value="java:testDS" />
I'm getting this log, but c3pO doesn't succeed with connexion.
Code:
14:36:45,099 INFO [hibernate.connection.ConnectionProviderFactory] Initializing connection provider: org.hibernate.connection.C3P0ConnectionProvider
14:36:45,108 INFO [hibernate.connection.C3P0ConnectionProvider] C3P0 using driver: null at URL: null
14:36:45,109 INFO [hibernate.connection.C3P0ConnectionProvider] Connection properties: {jndi.datasource=java:testDS, autocommit=true, release_mode=auto}
14:36:45,109 INFO [hibernate.connection.C3P0ConnectionProvider] autocommit mode: true
14:36:45,109 WARN [hibernate.connection.C3P0ConnectionProvider] No JDBC Driver class was specified by property hibernate.connection.driver_class
14:36:45,162 INFO [v2.log.MLog] MLog clients using log4j logging.
14:36:45,785 INFO [v2.c3p0.C3P0Registry] Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
14:36:45,925 INFO [c3p0.impl.AbstractPoolBackedDataSource] Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@297bd5a1 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@39ce5024 [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge13g7y1emj9cbhsk98d|113727f, idleConnectionTestPeriod -> 0, initialPoolSize -> 1, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 10, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@34a3aa3d [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 1hge13g7y1emj9cbhsk98d|1441e32, jdbcUrl -> null, properties -> {jndi.datasource=java:testDS, autocommit=true, release_mode=auto} ], preferredTestQuery -> null, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, factoryClassLocation -> null, identityToken -> 1hge13g7y1emj9cbhsk98d|19bf480, numHelperThreads -> 3 ]
We can see datasource is used by c3po, but it fails => "14:36:45,109 INFO [hibernate.connection.C3P0ConnectionProvider] Connection properties: {
jndi.datasource=java:testDS, autocommit=true, release_mode=auto}"