[Bug 60380] HttpServletRequest#logout() never calls TomcatPrincipal#logout()
https://bz.apache.org/bugzilla/show_bug.cgi?id=60380 --- Comment #1 from Michael Osipov <1983-01...@gmx.net> --- Created attachment 34462 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34462&action=edit Patch calling TomcatPrincipal#logout() -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60380] HttpServletRequest#logout() never calls TomcatPrincipal#logout()
https://bz.apache.org/bugzilla/show_bug.cgi?id=60380 Michael Osipov <1983-01...@gmx.net> changed: What|Removed |Added Attachment #34462|0 |1 is obsolete|| --- Comment #2 from Michael Osipov <1983-01...@gmx.net> --- Created attachment 34463 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34463&action=edit Patch calling TomcatPrincipal#logout() -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60393] New: Inconsistent parameter naming between Realm interface and implementations
https://bz.apache.org/bugzilla/show_bug.cgi?id=60393 Bug ID: 60393 Summary: Inconsistent parameter naming between Realm interface and implementations Product: Tomcat 8 Version: 8.5.x-trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: 1983-01...@gmx.net Target Milestone: the method #authenticate(GSSContext, boolean) has the boolean variable named "storeCreds", some implementations have "storeCred". It spreads inconsistently. Given that the GSSCredential is singular, the boolean variable should be too. Attached is a patch to fix this inconsistency. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60393] Inconsistent parameter naming between Realm interface and implementations
https://bz.apache.org/bugzilla/show_bug.cgi?id=60393 --- Comment #1 from Michael Osipov <1983-01...@gmx.net> --- Created attachment 34464 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34464&action=edit Fix inconsistency between interface and implemenations -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60381] Inconsistent toString() in ValveBase and RealmBase
https://bz.apache.org/bugzilla/show_bug.cgi?id=60381 --- Comment #1 from Michael Osipov <1983-01...@gmx.net> --- I am willing to provide a patch if we agree on one approach. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60394] New: Unreliable
https://bz.apache.org/bugzilla/show_bug.cgi?id=60394 Bug ID: 60394 Summary: Unreliable Product: Tomcat 8 Version: 8.5.x-trunk Hardware: All OS: All Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: 1983-01...@gmx.net Target Milestone: -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60394] Unreliable 'ant test' on Oracle JDK 7 due to certificate error
https://bz.apache.org/bugzilla/show_bug.cgi?id=60394 Michael Osipov <1983-01...@gmx.net> changed: What|Removed |Added Summary|Unreliable |Unreliable 'ant test' on ||Oracle JDK 7 due to ||certificate error -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60394] Unreliable 'ant test' on Oracle JDK 7 due to certificate error
https://bz.apache.org/bugzilla/show_bug.cgi?id=60394 --- Comment #1 from Michael Osipov <1983-01...@gmx.net> --- Running 'ant test' on 8.5.x trunk with > java version "1.7.0_80" > Java(TM) SE Runtime Environment (build 1.7.0_80-b15) > Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) fails sometimes due to: > downloadzip: > [get] Getting: > http://downloads.sourceforge.net/easymock/easymock-3.2.zip > [get] To: C:\Users\mosipov\tomcat-build-libs\download-1532555207.zip > [get] http://downloads.sourceforge.net/easymock/easymock-3.2.zip > permanently moved to > http://downloads.sourceforge.net/project/easymock/EasyMock/3.2/easymock-3.2.zip > [get] > http://downloads.sourceforge.net/project/easymock/EasyMock/3.2/easymock-3.2.zip > moved to > https://freefr.dl.sourceforge.net/project/easymock/EasyMock/3.2/easymock-3.2.zip > [get] Error getting > http://downloads.sourceforge.net/easymock/easymock-3.2.zip to > C:\Users\mosipov\tomcat-build-libs\download-1532555207.zip > > BUILD FAILED > D:\Entwicklung\Projekte\tomcat-8.5.x\build.xml:2630: The following error > occurred while executing this line: > D:\Entwicklung\Projekte\tomcat-8.5.x\build.xml:2746: > javax.net.ssl.SSLHandshakeException: > sun.security.validator.ValidatorException: PKIX path building failed: > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > valid certification path to requested target > at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) > at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904) > at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279) > at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273) > at > sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446) > at > sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209) > at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913) > at sun.security.ssl.Handshaker.process_record(Handshaker.java:849) > at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023) > at > sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) > at > sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) > at > sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) > at > sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) > at > sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) > at > sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) > at > org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:728) > at > org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:748) > at > org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:748) > at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:641) > at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:631) > Caused by: sun.security.validator.ValidatorException: PKIX path building > failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to > find valid certification path to requested target > at > sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385) > at > sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) > at sun.security.validator.Validator.validate(Validator.java:260) > at > sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326) > at > sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231) > at > sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126) > at > sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428) > ... 15 more > Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable > to find valid certification path to requested target > at > sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196) > at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268) > at > sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380) > ... 21 more > This happens for all artifacts downloaded from the assigned SF.net mirror. The issue is: > $ curl -I --verbose > https://freefr.dl.sourceforge.net/project/cglib/cglib2/2.2.3/cglib-nodep-2.2.3.jar > > * Connected to freefr.dl.sourceforge.net (88.191.250.136) port 443 (#0) > ... > * TLSv1.2 (IN), TLS handshake, Finished (20): > { [16 bytes data] > * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 > * ALPN, server accepted to use http/1.1 > * Server certificate: > * subject: CN=freefr.dl.sourcef
[Bug 60395] New: Log if passed GSSContext to RealmBase#authenticate(GSSContext, boolean) is not fully established
https://bz.apache.org/bugzilla/show_bug.cgi?id=60395 Bug ID: 60395 Summary: Log if passed GSSContext to RealmBase#authenticate(GSSContext, boolean) is not fully established Product: Tomcat 8 Version: 8.5.x-trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: 1983-01...@gmx.net Target Milestone: org.apache.catalina.realm.RealmBase.authenticate(GSSContext, boolean) does not log when an incomplete GSS context is passed, it simply returns null. Given that an authenticator is incorrectly implemented, this would be unnnoticed. Many resources on the net never care about context completion and think pass token and this is it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60395] Log if passed GSSContext to RealmBase#authenticate(GSSContext, boolean) is not fully established
https://bz.apache.org/bugzilla/show_bug.cgi?id=60395 --- Comment #1 from Michael Osipov <1983-01...@gmx.net> --- Created attachment 34465 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34465&action=edit Log incomplete context -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60395] Log if GSSContext passed to RealmBase#authenticate(GSSContext, boolean) is not fully established
https://bz.apache.org/bugzilla/show_bug.cgi?id=60395 Michael Osipov <1983-01...@gmx.net> changed: What|Removed |Added Summary|Log if passed GSSContext to |Log if GSSContext passed to |RealmBase#authenticate(GSSC |RealmBase#authenticate(GSSC |ontext, boolean) is not |ontext, boolean) is not |fully established |fully established -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1770601 - in /tomcat/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ webapps/docs/
Author: kfujino Date: Mon Nov 21 02:19:24 2016 New Revision: 1770601 URL: http://svn.apache.org/viewvc?rev=1770601&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58816 Implement the statistics of jdbc-pool. The stats infos are borrowedCount, returnedCount, createdCount and releasedCount. Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/mbeans-descriptors.xml tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1770601&r1=1770600&r2=1770601&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Mon Nov 21 02:19:24 2016 @@ -128,6 +128,14 @@ public class ConnectionPool { private AtomicLong poolVersion = new AtomicLong(Long.MIN_VALUE); +/** + * The counters for statistics of the pool. + */ +private final AtomicLong borrowedCount = new AtomicLong(0); +private final AtomicLong returnedCount = new AtomicLong(0); +private final AtomicLong createdCount = new AtomicLong(0); +private final AtomicLong releasedCount = new AtomicLong(0); + //=== // PUBLIC METHODS //=== @@ -598,6 +606,7 @@ public class ConnectionPool { size.addAndGet(-1); con.setHandler(null); } +releasedCount.incrementAndGet(); } finally { con.unlock(); } @@ -633,6 +642,7 @@ public class ConnectionPool { if (con!=null) { //configure the connection and return it PooledConnection result = borrowConnection(now, con, username, password); +borrowedCount.incrementAndGet(); if (result!=null) return result; } @@ -725,6 +735,7 @@ public class ConnectionPool { if (!busy.offer(con)) { log.debug("Connection doesn't fit into busy array, connection will not be traceable."); } +createdCount.incrementAndGet(); return con; } else { //validation failed, make sure we disconnect @@ -896,6 +907,7 @@ public class ConnectionPool { if (con != null) { try { +returnedCount.incrementAndGet(); con.lock(); if (con.isSuspect()) { if (poolProperties.isLogAbandoned() && log.isInfoEnabled()) { @@ -1177,6 +1189,38 @@ public class ConnectionPool { } /** + * The total number of connections borrowed from this pool. + * @return the borrowed connection count + */ +public long getBorrowedCount() { +return borrowedCount.get(); +} + +/** + * The total number of connections returned to this pool. + * @return the returned connection count + */ +public long getReturnedCount() { +return returnedCount.get(); +} + +/** + * The total number of connections created by this pool. + * @return the created connection count + */ +public long getCreatedCount() { +return createdCount.get(); +} + +/** + * The total number of connections released from this pool. + * @return the released connection count + */ +public long getReleasedCount() { +return releasedCount.get(); +} + +/** * Tread safe wrapper around a future for the regular queue * This one retrieves the pooled connection object * and performs the initialization according to Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=1770601&r1=1770600&r2=1770601&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/mai
svn commit: r1770602 - in /tomcat/tc8.5.x/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ webapps/docs/
Author: kfujino Date: Mon Nov 21 02:25:39 2016 New Revision: 1770602 URL: http://svn.apache.org/viewvc?rev=1770602&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58816 Implement the statistics of jdbc-pool. The stats infos are borrowedCount, returnedCount, createdCount and releasedCount. Modified: tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/mbeans-descriptors.xml tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1770602&r1=1770601&r2=1770602&view=diff == --- tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Mon Nov 21 02:25:39 2016 @@ -128,6 +128,14 @@ public class ConnectionPool { private AtomicLong poolVersion = new AtomicLong(Long.MIN_VALUE); +/** + * The counters for statistics of the pool. + */ +private final AtomicLong borrowedCount = new AtomicLong(0); +private final AtomicLong returnedCount = new AtomicLong(0); +private final AtomicLong createdCount = new AtomicLong(0); +private final AtomicLong releasedCount = new AtomicLong(0); + //=== // PUBLIC METHODS //=== @@ -598,6 +606,7 @@ public class ConnectionPool { size.addAndGet(-1); con.setHandler(null); } +releasedCount.incrementAndGet(); } finally { con.unlock(); } @@ -633,6 +642,7 @@ public class ConnectionPool { if (con!=null) { //configure the connection and return it PooledConnection result = borrowConnection(now, con, username, password); +borrowedCount.incrementAndGet(); if (result!=null) return result; } @@ -725,6 +735,7 @@ public class ConnectionPool { if (!busy.offer(con)) { log.debug("Connection doesn't fit into busy array, connection will not be traceable."); } +createdCount.incrementAndGet(); return con; } else { //validation failed, make sure we disconnect @@ -896,6 +907,7 @@ public class ConnectionPool { if (con != null) { try { +returnedCount.incrementAndGet(); con.lock(); if (con.isSuspect()) { if (poolProperties.isLogAbandoned() && log.isInfoEnabled()) { @@ -1177,6 +1189,38 @@ public class ConnectionPool { } /** + * The total number of connections borrowed from this pool. + * @return the borrowed connection count + */ +public long getBorrowedCount() { +return borrowedCount.get(); +} + +/** + * The total number of connections returned to this pool. + * @return the returned connection count + */ +public long getReturnedCount() { +return returnedCount.get(); +} + +/** + * The total number of connections created by this pool. + * @return the created connection count + */ +public long getCreatedCount() { +return createdCount.get(); +} + +/** + * The total number of connections released from this pool. + * @return the released connection count + */ +public long getReleasedCount() { +return releasedCount.get(); +} + +/** * Tread safe wrapper around a future for the regular queue * This one retrieves the pooled connection object * and performs the initialization according to Modified: tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=1770602&r1=1770601&r2=1770602&view=diff == --- tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/
svn commit: r1770603 - in /tomcat/tc8.0.x/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ webapps/docs/
Author: kfujino Date: Mon Nov 21 02:27:27 2016 New Revision: 1770603 URL: http://svn.apache.org/viewvc?rev=1770603&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58816 Implement the statistics of jdbc-pool. The stats infos are borrowedCount, returnedCount, createdCount and releasedCount. Modified: tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/mbeans-descriptors.xml tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1770603&r1=1770602&r2=1770603&view=diff == --- tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Mon Nov 21 02:27:27 2016 @@ -128,6 +128,14 @@ public class ConnectionPool { private AtomicLong poolVersion = new AtomicLong(Long.MIN_VALUE); +/** + * The counters for statistics of the pool. + */ +private final AtomicLong borrowedCount = new AtomicLong(0); +private final AtomicLong returnedCount = new AtomicLong(0); +private final AtomicLong createdCount = new AtomicLong(0); +private final AtomicLong releasedCount = new AtomicLong(0); + //=== // PUBLIC METHODS //=== @@ -595,6 +603,7 @@ public class ConnectionPool { size.addAndGet(-1); con.setHandler(null); } +releasedCount.incrementAndGet(); } finally { con.unlock(); } @@ -628,6 +637,7 @@ public class ConnectionPool { if (con!=null) { //configure the connection and return it PooledConnection result = borrowConnection(now, con, username, password); +borrowedCount.incrementAndGet(); if (result!=null) return result; } @@ -718,6 +728,7 @@ public class ConnectionPool { if (!busy.offer(con)) { log.debug("Connection doesn't fit into busy array, connection will not be traceable."); } +createdCount.incrementAndGet(); return con; } else { //validation failed, make sure we disconnect @@ -887,6 +898,7 @@ public class ConnectionPool { if (con != null) { try { +returnedCount.incrementAndGet(); con.lock(); if (con.isSuspect()) { if (poolProperties.isLogAbandoned() && log.isInfoEnabled()) { @@ -1166,6 +1178,38 @@ public class ConnectionPool { } /** + * The total number of connections borrowed from this pool. + * @return the borrowed connection count + */ +public long getBorrowedCount() { +return borrowedCount.get(); +} + +/** + * The total number of connections returned to this pool. + * @return the returned connection count + */ +public long getReturnedCount() { +return returnedCount.get(); +} + +/** + * The total number of connections created by this pool. + * @return the created connection count + */ +public long getCreatedCount() { +return createdCount.get(); +} + +/** + * The total number of connections released from this pool. + * @return the released connection count + */ +public long getReleasedCount() { +return releasedCount.get(); +} + +/** * Tread safe wrapper around a future for the regular queue * This one retrieves the pooled connection object * and performs the initialization according to Modified: tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=1770603&r1=1770602&r2=1770603&view=diff == --- tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/
svn commit: r1770604 - in /tomcat/tc7.0.x/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ webapps/docs/
Author: kfujino Date: Mon Nov 21 02:28:42 2016 New Revision: 1770604 URL: http://svn.apache.org/viewvc?rev=1770604&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58816 Implement the statistics of jdbc-pool. The stats infos are borrowedCount, returnedCount, createdCount and releasedCount. Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/mbeans-descriptors.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=1770604&r1=1770603&r2=1770604&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java Mon Nov 21 02:28:42 2016 @@ -712,6 +712,55 @@ public class DataSourceProxy implements throw new RuntimeException(x); } } + +/** + * The total number of connections borrowed from this pool. + * @return the borrowed connection count + */ +public long getBorrowedCount() { +try { +return createPool().getBorrowedCount(); +} catch (SQLException x) { +throw new RuntimeException(x); +} +} + +/** + * The total number of connections returned to this pool. + * @return the returned connection count + */ +public long getReturnedCount() { +try { +return createPool().getReturnedCount(); +} catch (SQLException x) { +throw new RuntimeException(x); +} +} + +/** + * The total number of connections created by this pool. + * @return the created connection count + */ +public long getCreatedCount() { +try { +return createPool().getCreatedCount(); +} catch (SQLException x) { +throw new RuntimeException(x); +} +} + +/** + * The total number of connections released from this pool. + * @return the released connection count + */ +public long getReleasedCount() { +try { +return createPool().getReleasedCount(); +} catch (SQLException x) { +throw new RuntimeException(x); +} +} + //= // PROPERTIES / CONFIGURATION //= Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java?rev=1770604&r1=1770603&r2=1770604&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java Mon Nov 21 02:28:42 2016 @@ -167,6 +167,26 @@ public class ConnectionPool extends Noti return pool.getWaitCount(); } +@Override +public long getBorrowedCount() { +return pool.getBorrowedCount(); +} + +@Override +public long getReturnedCount() { +return pool.getReturnedCount(); +} + +@Override +public long getCreatedCount() { +return pool.getCreatedCount(); +} + +@Override +public long getReleasedCount() { +return pool.getReleasedCount(); +} + //= // POOL OPERATIONS //= Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java?rev=1770604&r1=1770603&r2=1770604&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jm
[Bug 58816] additional jdbc pool mbean attributes - CreatedCount, BorrowedCount
https://bz.apache.org/bugzilla/show_bug.cgi?id=58816 Keiichi Fujino changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Keiichi Fujino --- Thanks for the report. The fix will be in : - 9.0.x for 9.0.0.M14 onwards - 8.5.x for 8.5.9 onwards - 8.0.x for 8.0.40 onwards - 7.0.x for 7.0.74 onwards -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building . Full details are available at: https://ci.apache.org/builders/tomcat-7-trunk/builds/593 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' triggered this build Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1770604 Blamelist: kfujino BUILD FAILED: failed compile Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1770616 - /tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
Author: kfujino Date: Mon Nov 21 05:16:14 2016 New Revision: 1770616 URL: http://svn.apache.org/viewvc?rev=1770616&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58816 Implement the statistics of jdbc-pool. The stats infos are borrowedCount, returnedCount, createdCount and releasedCount. Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1770616&r1=1770615&r2=1770616&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Mon Nov 21 05:16:14 2016 @@ -130,6 +130,14 @@ public class ConnectionPool { private AtomicLong poolVersion = new AtomicLong(Long.MIN_VALUE); +/** + * The counters for statistics of the pool. + */ +private final AtomicLong borrowedCount = new AtomicLong(0); +private final AtomicLong returnedCount = new AtomicLong(0); +private final AtomicLong createdCount = new AtomicLong(0); +private final AtomicLong releasedCount = new AtomicLong(0); + //=== // PUBLIC METHODS //=== @@ -597,6 +605,7 @@ public class ConnectionPool { size.addAndGet(-1); con.setHandler(null); } +releasedCount.incrementAndGet(); } finally { con.unlock(); } @@ -630,6 +639,7 @@ public class ConnectionPool { if (con!=null) { //configure the connection and return it PooledConnection result = borrowConnection(now, con, username, password); +borrowedCount.incrementAndGet(); if (result!=null) return result; } @@ -720,6 +730,7 @@ public class ConnectionPool { if (!busy.offer(con)) { log.debug("Connection doesn't fit into busy array, connection will not be traceable."); } +createdCount.incrementAndGet(); return con; } else { //validation failed, make sure we disconnect @@ -890,6 +901,7 @@ public class ConnectionPool { if (con != null) { try { +returnedCount.incrementAndGet(); con.lock(); if (con.isSuspect()) { if (poolProperties.isLogAbandoned() && log.isInfoEnabled()) { @@ -1169,6 +1181,38 @@ public class ConnectionPool { } /** + * The total number of connections borrowed from this pool. + * @return the borrowed connection count + */ +public long getBorrowedCount() { +return borrowedCount.get(); +} + +/** + * The total number of connections returned to this pool. + * @return the returned connection count + */ +public long getReturnedCount() { +return returnedCount.get(); +} + +/** + * The total number of connections created by this pool. + * @return the created connection count + */ +public long getCreatedCount() { +return createdCount.get(); +} + +/** + * The total number of connections released from this pool. + * @return the released connection count + */ +public long getReleasedCount() { +return releasedCount.get(); +} + +/** * Tread safe wrapper around a future for the regular queue * This one retrieves the pooled connection object * and performs the initialization according to - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building . Full details are available at: https://ci.apache.org/builders/tomcat-7-trunk/builds/594 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' triggered this build Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1770616 Blamelist: kfujino Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 60398] New: unit test of TestSlowQueryReport is failed
https://bz.apache.org/bugzilla/show_bug.cgi?id=60398 Bug ID: 60398 Summary: unit test of TestSlowQueryReport is failed Product: Tomcat 8 Version: 8.5.x-trunk Hardware: All OS: All Status: NEW Severity: minor Priority: P2 Component: Packaging Assignee: dev@tomcat.apache.org Reporter: chinam...@gmail.com Target Milestone: the test case testFastSql is failed. the cause is SlowQueryReport add method reportQuery but not change the test case -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58660] Different redirect behaviour when accessing path without a /
https://bz.apache.org/bugzilla/show_bug.cgi?id=58660 --- Comment #23 from Isaac Wu --- Hi I saw the issue is marked as fixed in 7.0.67/8.0.30 changelog. However as I tried to set mapperContextRootRedirectEnabled=true (in the latest version 7, 8.0.73) to restore the behavior in the previous releases, the url without a trailing slash still doesn't work (404). So I would like to check if anyone find the parameter mapperContextRootRedirectEnabled really works. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org