-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Trouble setting debugUnreturnedConnectionStackTraces on c3p0
PostPosted: Mon Jul 20, 2009 4:11 am 
Newbie

Joined: Mon Jul 20, 2009 4:05 am
Posts: 1
Hi,
We currently use hibernate (3.2.0.cr5) which in turn uses c3p0 to create a connection pool(c3p0-0.9.1-pre9). We have a connection leak and i tried to track it by setting the c3p0 variable debugUnreturnedConnectionStackTraces to true. I see the following in the hibernate log,

20 Jul 2009 13:18:55,137 DEBUG main org.hibernate.cfg.Configuration - c3p0.unreturnedConnectionTimeout=5
20 Jul 2009 13:18:55,137 DEBUG main org.hibernate.cfg.Configuration - c3p0.debugUnreturnedConnectionStackTraces=true

but the c3p0 still has variable set to false. Can someone help me?

20 Jul 2009 13:18:56,443 INFO main com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@a100a15a [ connectionPoolDataSource -
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@fd03835c [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> nu
ll, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, debugUnreturnedC
onnectionStackTraces -> false,
factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 3c520, idleConnectionTestPeriod -> 10, initialPoolSize -> 10, maxAdminist
rativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 125, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, nes
tedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@9ac911cb [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 8e2fb5, jdbcUrl -> jdbc:mysql://lo
calhost:3306/infibeam_old, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unr
eturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, factoryClassLocation -> null, identityToken -> 624a40, numHelperThreads -> 3
]


thanks
Vijay


Top
 Profile  
 
 Post subject: Re: Trouble setting debugUnreturnedConnectionStackTraces on c3p0
PostPosted: Fri Aug 07, 2009 3:17 pm 
Newbie

Joined: Fri Apr 13, 2007 12:25 pm
Posts: 17
You should set the property in your code before you instantiate the SessionFactory object.

Code:
System.setProperty("c3p0.debugUnreturnedConnectionStackTraces", "true");
Configuration configuration = new Configuration().configure(HIBERNATE_CONFIG_FILE);
SessionFactory sessionFactory = configuration.buildSessionFactory();


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.