[jira] [Commented] (POOL-409) BasicDataSource should support GenericObjectPool->getStatsString()

2022-10-05 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/POOL-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17612890#comment-17612890
 ] 

Thomas Freller commented on POOL-409:
-

Tested your Snapshot and it 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.(BaseGenericObjectPool.java:415)
        at 
org.apache.commons.pool2.impl.GenericObjectPool.(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.(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=***=true,
 MariaDB Connector/J]=Object: 189706321, 
URL=jdbc:mariadb://localhost/data?user=ssl_worker=***=true,
 MariaDB Connector/J, State: IDLE}, createCount=1, idleObjects=[Object: 
189706321, 
URL=jdbc:mariadb://localhost/data?user=ssl_worker=***=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.

 

> BasicDataSource should support GenericObjectPool->getStatsString()
> --
>
> Key: POOL-409
> URL: https://issues.apache.org/jira/browse/POOL-409
> Project: Commons Pool
>  Issue Type: Improvement
>Affects Versions: 2.11.1
>Reporter: Thomas Freller
>Priority: Major
>  Labels: improvement
>   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 

[jira] (DBCP-586) Make BasicDataSource.getConnectionPool() public to access GenericObjectPool.toString()/getStatsString()

2022-10-05 Thread Thomas Freller (Jira)


[ 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.(BaseGenericObjectPool.java:415)
        at 
org.apache.commons.pool2.impl.GenericObjectPool.(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.(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=***=true,
 MariaDB Connector/J]=Object: 189706321, 
URL=jdbc:mariadb://localhost/data?user=ssl_worker=***=true,
 MariaDB Connector/J, State: IDLE}, createCount=1, idleObjects=[Object: 
189706321, 
URL=jdbc:mariadb://localhost/data?user=ssl_worker=***=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 

[jira] [Commented] (DBCP-586) Make BasicDataSource.getConnectionPool() public to access GenericObjectPool.toString()/getStatsString()

2022-10-05 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/DBCP-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17612889#comment-17612889
 ] 

Thomas Freller commented on DBCP-586:
-

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.(BaseGenericObjectPool.java:415)
        at 
org.apache.commons.pool2.impl.GenericObjectPool.(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.(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=***=true,
 MariaDB Connector/J]=Object: 189706321, 
URL=jdbc:mariadb://localhost/data?user=ssl_worker=***=true,
 MariaDB Connector/J, State: IDLE}, createCount=1, idleObjects=[Object: 
189706321, 
URL=jdbc:mariadb://localhost/data?user=ssl_worker=***=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 

[jira] [Created] (POOL-410) EHN Max Concurrent Connections in Stats

2022-09-30 Thread Thomas Freller (Jira)
Thomas Freller created POOL-410:
---

 Summary: EHN Max Concurrent Connections in Stats
 Key: POOL-410
 URL: https://issues.apache.org/jira/browse/POOL-410
 Project: Commons Pool
  Issue Type: Improvement
Reporter: Thomas Freller


For tuning the Database the max concurrent used connections wold be relay great.

 

So I could monitor the max concurrent connections of my pool and could see if I 
have to size up/down the max database connections (that can me memory 
intensive) or if I could downsize the Pool and also the Database i could save 
Memory and costs.  At the Moment the only Indicator is 

maxBorrowWaitDuration=PT3.016S,

 

But this can only tell me hat at the Moment the pool reached its max (because I 
set maxTotal to 1) my normal Case is to have up to 20 Pools of different 
Applications that connect to one instance of MariaDB and the output of 
maxBorrowWaitDuration is 0. So I only know I would be able to downsize the pool 
but I have no hint how to size the pool best.

This Statistical Data should be also printed in the toString() Method.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (POOL-409) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-28 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/POOL-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17610518#comment-17610518
 ] 

Thomas Freller commented on POOL-409:
-

Would it be possible to build a Snapshot? This would be very easy for me to 
test the changes. 

I'm with you we should make a less as possible public and i think the current 
set of available methods should be enough.

I ask as I don't use a maven compiler suite and the packages have dependencies 
so it's not quite easily for me to compile the pool lib on my own.

If a snapshot is not possible may be you could provide a compiled jar here to 
me. After that i do a testing as soon as possible.

> BasicDataSource should support GenericObjectPool->getStatsString()
> --
>
> Key: POOL-409
> URL: https://issues.apache.org/jira/browse/POOL-409
> Project: Commons Pool
>  Issue Type: Improvement
>Affects Versions: 2.11.1
>Reporter: Thomas Freller
>Priority: Major
>  Labels: improvement
>   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)


[jira] [Commented] (POOL-409) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-27 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/POOL-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17610101#comment-17610101
 ] 

Thomas Freller commented on POOL-409:
-

Thank you for your enh. in dbcp2. I can confirm, that getConnection pool is now 
callable.

If I use toString() i get the following output
{code:java}
16:35:02.593 [main] INFO  ssl_worker.SSL_Worker - Current DBPool Stats Active 
(current/max): 0/5 Idle (min/current/max): 0/0/0
GenericObjectPool [maxTotal=5, blockWhenExhausted=true, 
maxWaitDuration=PT-0.001S, lifo=true, fairness=false, testOnCreate=false, 
testOnBorrow=true, testOnReturn=false, testWhileIdle=false, 
durationBetweenEvictionRuns=PT10S, numTestsPerEvictionRun=3, 
minEvictableIdleTimeDuration=PT30S, softMinEvictableIdleTimeDuration=PT-0.001S, 
evictionPolicy=org.apache.commons.pool2.impl.DefaultEvictionPolicy@df6620a, 
closeLock=java.lang.Object@4e31276e, closed=false, 
evictionLock=java.lang.Object@1a72a540, 
evictor=org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor@27d5a580, 
evictionIterator=null, factoryClassLoader=java.lang.ref.WeakReference@198d6542, 
oname=null, creationStackTrace=java.lang.Exception
        at 
org.apache.commons.pool2.impl.BaseGenericObjectPool.(BaseGenericObjectPool.java:409)
        at 
org.apache.commons.pool2.impl.GenericObjectPool.(GenericObjectPool.java:147)
        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.(MySQLConPool.java:56)
        at ssl_worker.SSL_Worker.main(SSL_Worker.java:177)
, borrowedCount=44, returnedCount=44, createdCount=44, destroyedCount=44, 
destroyedByEvictorCount=0, destroyedByBorrowValidationCount=0, 
activeTimes=StatsStore [[30, 40, 18, 8, 14, 21, 15, 15, 11, 13, 9, 11, 14, 12, 
13, 17, 12, 14, 14, 13, 14, 25, 25, 13, 12, 11, 12, 12, 13, 16, 15, 10, 19, 9, 
15, 13, 18, 14, 12, 16, 14039, 14025, 1, 5]], size=100, index=44], 
idleTimes=StatsStore [[1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 4]], 
size=100, index=44], waitTimes=StatsStore [[13, 13, 3, 4, 5, 5, 2, 7, 2, 2, 3, 
3, 2, 2, 2, 12, 1, 2, 1, 1, 2, 3, 2, 3, 2, 3, 2, 2, 2, 2, 2, 6, 14, 15, 6, 2, 
9, 2, 3, 1, 3, 4, 4, 7]], size=100, index=44], maxBorrowWaitDuration=PT0.015S, 
swallowedExceptionListener=org.apache.commons.dbcp2.SwallowedExceptionLogger@5e403b4a,
 factoryType=null, maxIdle=0, minIdle=0, 
factory=org.apache.commons.dbcp2.PoolableConnectionFactory@5117dd67, 
allObjects={}, createCount=0, idleObjects=[], abandonedConfig=null]
 {code}
Including a StackTrace in the Output. 

 

getStatsString() is protected and not callable but I could use the getters.

 

Should we fix the toString or should I better use the getters and build my own 
string out of them?

 

 

> BasicDataSource should support GenericObjectPool->getStatsString()
> --
>
> Key: POOL-409
> URL: https://issues.apache.org/jira/browse/POOL-409
> Project: Commons Pool
>  Issue Type: Improvement
>Affects Versions: 2.11.1
>Reporter: Thomas Freller
>Priority: Major
>  Labels: improvement
>   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)


[jira] [Commented] (DBCP-586) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-24 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/DBCP-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17609015#comment-17609015
 ] 

Thomas Freller commented on DBCP-586:
-

Yes this would be great

But do you relay want to grant access to the ConnecitonPool or would it be 
better to implement
{code:java}
public String getStatsString(){
   return this.getConnecitonPool().getStatsString();
   // or
   // return this.getConnectionPool().toString();
}{code}
I address this because I want to keep the security of the Lib as high as 
possible and don't want do open any issues. If getConnecitonPool() as public is 
no problem, then I'm fine with this solution.

> BasicDataSource should support GenericObjectPool->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
>   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)


[jira] [Commented] (POOL-409) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-24 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/POOL-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17609014#comment-17609014
 ] 

Thomas Freller commented on POOL-409:
-

I've done a bit of testing and built a own class in my package called 
BasicDataSourceEnh. This Class inherit BasicDataSource and looks like the 
following Code

 
{code:java}
public class BasicDataSourceEnh extends BasicDataSource{   
   public BasicDataSourceEnh(){
      super();
   }
   
   public String getInfo(){
      return super.getConnectionPool().toString();
   }
}{code}
 

So I'm able to use the Hint you gave to me. The Output is very interesting and 
cause even a Exception so something is going wrong in pool2 

Here is the output.

 
{code:java}
17:28:29.552 [main] INFO  myClass.Worker - Current DBPool Stats Active 
(current/max): 0/5 Idle (min/current/max): 0/0/0
< Output of getInfo() >
GenericObjectPool [maxTotal=5, blockWhenExhausted=true, 
maxWaitDuration=PT-0.001S, lifo=true, fairness=false, testOnCreate=false, 
testOnBorrow=true, testOnReturn=false, testWhileIdle=false, 
durationBetweenEvictionRuns=PT10S, numTestsPerEvictionRun=3, 
minEvictableIdleTimeDuration=PT30S, softMinEvictableIdleTimeDuration=PT-0.001S, 
evictionPolicy=org.apache.commons.pool2.impl.DefaultEvictionPolicy@6d026701, 
closeLock=java.lang.Object@78aa1f72, closed=false, 
evictionLock=java.lang.Object@1f75a668, 
evictor=org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor@35399441, 
evictionIterator=null, factoryClassLoader=java.lang.ref.WeakReference@4b7dc788, 
oname=null, creationStackTrace=java.lang.Exception
        at 
org.apache.commons.pool2.impl.BaseGenericObjectPool.(BaseGenericObjectPool.java:407)
        at 
org.apache.commons.pool2.impl.GenericObjectPool.(GenericObjectPool.java:147)
        at 
org.apache.commons.dbcp2.BasicDataSource.createObjectPool(BasicDataSource.java:611)
        at 
org.apache.commons.dbcp2.BasicDataSource.createConnectionPool(BasicDataSource.java:480)
        at 
org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:543)
        at 
org.apache.commons.dbcp2.BasicDataSource.setLogWriter(BasicDataSource.java:2055)
        at db_pool.MySQLConPool.(MySQLConPool.java:55)
        at ssl_worker.SSL_Worker.main(Worker.java:177)
, borrowedCount=38, returnedCount=38, createdCount=38, destroyedCount=38, 
destroyedByEvictorCount=0, destroyedByBorrowValidationCount=0, 
activeTimes=StatsStore [[24, 9, 10, 12, 9, 10, 9, 10, 10, 11, 11, 10, 12, 14, 
15, 20, 11, 1003, 0, 26, 7, 15, 15, 11, 21, 11, 11, 11, 11, 12, 13, 10, 11, 13, 
12, 13, 1004, 1]], size=100, index=38], idleTimes=StatsStore [[4, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0]], size=100, index=38], waitTimes=StatsStore [[8, 5, 3, 8, 
2, 3, 4, 3, 5, 3, 2, 2, 2, 1, 8, 2, 4, 3, 3, 3, 10, 4, 3, 5, 7, 2, 3, 2, 4, 2, 
1, 3, 3, 2, 2, 5, 2, 3]], size=100, index=38], maxBorrowWaitDuration=PT0.01S, 
swallowedExceptionListener=org.apache.commons.dbcp2.SwallowedExceptionLogger@6304101a,
 factoryType=null, maxIdle=0, minIdle=0, 
factory=org.apache.commons.dbcp2.PoolableConniectionFactory@5170bcf4, 
allObjects={}, createCount=0, idleObjects=[], abandonedConfig=null]{code}
As you can see there are a few problems:

 
 * org.apache.commons.pool2.impl.DefaultEvictionPolicy@6d026701   => consider 
to implement toString()   => not Critical to me (only hint)
 * org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor@35399441 
=>consider to implement toString()   => not Critical to me (only hint)
 * java.lang.ref.WeakReference@4b7dc788 =>Problem of Java not yours   => not 
Critical to me#
 * (!){color:#de350b} *Im worry about the Stack Trace*  {color:#172b4d}is this 
something critical or a problem of the Class loader or is there a Exception 
printed? This is confusing to me.{color}{color}

> BasicDataSource should support GenericObjectPool->getStatsString()
> --
>
> Key: POOL-409
> URL: https://issues.apache.org/jira/browse/POOL-409
> Project: Commons Pool
>  Issue Type: Improvement
>Affects Versions: 2.11.1
>Reporter: Thomas Freller
>Priority: Major
>  Labels: improvement
>   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 
> 

[jira] [Commented] (DBCP-586) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-24 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/DBCP-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17609010#comment-17609010
 ] 

Thomas Freller commented on DBCP-586:
-

As far as I've seen currently 

BasicDataSource.getConnectionPool() is protected and so not callable outside of 
the org.apache.commons.dbcp2 package. 

Please check if this would be a good solution if this method would be public 
because then this object could be modified. 

For me a getter to getStatsString() would be enough.

> BasicDataSource should support GenericObjectPool->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
>   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)


[jira] [Reopened] (DBCP-586) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-24 Thread Thomas Freller (Jira)


 [ 
https://issues.apache.org/jira/browse/DBCP-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Freller reopened DBCP-586:
-

> BasicDataSource should support GenericObjectPool->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
>   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)


[jira] [Resolved] (DBCP-586) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-23 Thread Thomas Freller (Jira)


 [ 
https://issues.apache.org/jira/browse/DBCP-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Freller resolved DBCP-586.
-
Resolution: Fixed

> BasicDataSource should support GenericObjectPool->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
>   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)


[jira] [Commented] (DBCP-586) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-23 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/DBCP-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17608893#comment-17608893
 ] 

Thomas Freller commented on DBCP-586:
-

Oh that's great then we can close this issue and I access the public Method 
with the way you described 

> BasicDataSource should support GenericObjectPool->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
>   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)


[jira] [Commented] (DBCP-586) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-23 Thread Thomas Freller (Jira)


[ 
https://issues.apache.org/jira/browse/DBCP-586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17608700#comment-17608700
 ] 

Thomas Freller commented on DBCP-586:
-

This Ticket is to get a method in the BasicDataSource to have access to the 
GenericObjectPool->getStatsString() ** if this is public in the Pool ** 

> BasicDataSource should support GenericObjectPool->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
>   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)


[jira] [Created] (DBCP-586) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-22 Thread Thomas Freller (Jira)
Thomas Freller created DBCP-586:
---

 Summary: BasicDataSource should support 
GenericObjectPool->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


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)


[jira] [Updated] (POOL-409) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-22 Thread Thomas Freller (Jira)


 [ 
https://issues.apache.org/jira/browse/POOL-409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Freller updated POOL-409:

 External issue ID: https://issues.apache.org/jira/browse/DBCP-586
Remaining Estimate: 2h  (was: 4h)
 Original Estimate: 2h  (was: 4h)

> BasicDataSource should support GenericObjectPool->getStatsString()
> --
>
> Key: POOL-409
> URL: https://issues.apache.org/jira/browse/POOL-409
> Project: Commons Pool
>  Issue Type: Improvement
>Affects Versions: 2.11.1
>Reporter: Thomas Freller
>Priority: Major
>  Labels: improvement
>   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)


[jira] [Created] (POOL-409) BasicDataSource should support GenericObjectPool->getStatsString()

2022-09-22 Thread Thomas Freller (Jira)
Thomas Freller created POOL-409:
---

 Summary: BasicDataSource should support 
GenericObjectPool->getStatsString()
 Key: POOL-409
 URL: https://issues.apache.org/jira/browse/POOL-409
 Project: Commons Pool
  Issue Type: Improvement
Affects Versions: 2.11.1
Reporter: Thomas Freller


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)