[ https://issues.apache.org/jira/browse/DBCP-586 ]
Thomas Freller deleted comment on DBCP-586: ------------------------------------- was (Author: JIRAUSER283078): Seams looking good. {code:java} 10:15:23.128 [main] INFO ssl_worker.SSL_Worker - Current ThreadPool ActiveCount: 0 / CorePoolSize: 2 / LargestPoolSize: 2 / MaximumPoolSize: 30 / PoolSize: 2 / TaskCount: 8 / QueueSize: 0 / QueueRemainingCapacity: 900 10:15:23.130 [main] INFO ssl_worker.SSL_Worker - Current DBPool Stats Active (current/max): 0/1 Idle (min/current/max): 1/1/1 GenericObjectPool [maxTotal=1, blockWhenExhausted=true, maxWaitDuration=PT1M30S, lifo=true, fairness=false, testOnCreate=false, testOnBorrow=true, testOnReturn=false, testWhileIdle=false, durationBetweenEvictionRuns=PT-0.001S, numTestsPerEvictionRun=3, minEvictableIdleTimeDuration=PT30M, softMinEvictableIdleTimeDuration=PT-0.001S, evictionPolicy=org.apache.commons.pool2.impl.DefaultEvictionPolicy@39d9314d, closeLock=java.lang.Object@b978d10, closed=false, evictionLock=java.lang.Object@5b7a8434, evictor=null, evictionIterator=null, factoryClassLoader=java.lang.ref.WeakReference@5c45d770, oname=null, creationStackTrace=java.lang.Exception at org.apache.commons.pool2.impl.BaseGenericObjectPool.<init>(BaseGenericObjectPool.java:415) at org.apache.commons.pool2.impl.GenericObjectPool.<init>(GenericObjectPool.java:146) at org.apache.commons.dbcp2.BasicDataSource.createObjectPool(BasicDataSource.java:588) at org.apache.commons.dbcp2.BasicDataSource.createConnectionPool(BasicDataSource.java:487) at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:539) at org.apache.commons.dbcp2.BasicDataSource.setLogWriter(BasicDataSource.java:2153) at db_pool.MySQLConPool.<init>(MySQLConPool.java:65) at ssl_worker.SSL_Worker.main(SSL_Worker.java:184) , borrowedCount=174, returnedCount=174, createdCount=3, destroyedCount=2, destroyedByEvictorCount=0, destroyedByBorrowValidationCount=0, activeTimes=StatsStore [[12, 15, 20, 15, 21, 14024, 2, 2, 3, 17, 0, 15, 13, 12, 15, 12, 13, 13, 12, 12, 11, 16, 12, 10, 9, 14, 10, 11, 1, 0, 22, 14, 0, 13, 1, 14, 16, 12, 17, 17, 15, 17, 16, 16, 19, 13, 11, 13, 15, 13, 11, 20, 12, 12, 12, 15, 15, 15, 13, 13, 14, 12, 12, 13, 16, 13, 15, 13, 13, 15, 14020, 1, 1, 1]], size=100, index=74], idleTimes=StatsStore [[0, 0, 0, 1, 0, 0, 0, 1, 1, 208524, 0, 1, 7, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 11, 4, 17, 2, 2, 76936, 0, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]], size=100, index=74], waitTimes=StatsStore [[11, 11, 30, 19, 12, 20, 14022, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 17, 15, 1, 16, 0, 12, 12, 12, 14, 27, 12, 16, 14, 14, 17, 12, 9, 11, 14, 11, 10, 18, 10, 10, 10, 14, 14, 13, 10, 11, 12, 8, 10, 12, 15, 11, 14, 11, 12, 13, 14018, 1, 1]], size=100, index=74], maxBorrowWaitDuration=PT14.032S, swallowedExceptionListener=org.apache.commons.dbcp2.SwallowedExceptionLogger@2ce6c6ec, factoryType=null, maxIdle=1, minIdle=1, factory=org.apache.commons.dbcp2.PoolableConnectionFactory@1bae316d, allObjects={IdentityWrapper [instance=189706321, URL=jdbc:mariadb://localhost/data?user=ssl_worker&password=***&autoReconnect=true, MariaDB Connector/J]=Object: 189706321, URL=jdbc:mariadb://localhost/data?user=ssl_worker&password=***&autoReconnect=true, MariaDB Connector/J, State: IDLE}, createCount=1, idleObjects=[Object: 189706321, URL=jdbc:mariadb://localhost/data?user=ssl_worker&password=***&autoReconnect=true, MariaDB Connector/J, State: IDLE], abandonedConfig=null] {code} The Stacktrace is as it should be or? because the Key-Field is creationStackTrace. So for me its okay. > Make BasicDataSource.getConnectionPool() public to access > GenericObjectPool.toString()/getStatsString() > ------------------------------------------------------------------------------------------------------- > > Key: DBCP-586 > URL: https://issues.apache.org/jira/browse/DBCP-586 > Project: Commons DBCP > Issue Type: Improvement > Affects Versions: 2.9.0 > Reporter: Thomas Freller > Priority: Major > Labels: improvement > Fix For: 2.10.0 > > Original Estimate: 2h > Remaining Estimate: 2h > > Hello, > I'm developing a Application that is running on a default JRE without an > Webserver/JMX. > For optimizing Database connections it would be very useful if i could access > > BasicDataSource->GenericObjectPool->{*}getStatsString(){*} > > I don't see any reason why this Method is protected and not public in > GenericObjectPool. > Then BasicDataSource shoud provide a method getStatsString() or the values > that represent the statistic data. > > If there is any other easy way to access this data within my Java Code I'll > implement this if you could give me an example how to get this working > easily. I don't want do configure any jmx stuff. > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)