svn commit: r1459671 - /tomcat/trunk/java/javax/websocket/HandshakeResponse.java
Author: markt Date: Fri Mar 22 08:55:39 2013 New Revision: 1459671 URL: http://svn.apache.org/r1459671 Log: Fix constant Modified: tomcat/trunk/java/javax/websocket/HandshakeResponse.java Modified: tomcat/trunk/java/javax/websocket/HandshakeResponse.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/HandshakeResponse.java?rev=1459671&r1=1459670&r2=1459671&view=diff == --- tomcat/trunk/java/javax/websocket/HandshakeResponse.java (original) +++ tomcat/trunk/java/javax/websocket/HandshakeResponse.java Fri Mar 22 08:55:39 2013 @@ -21,8 +21,10 @@ import java.util.Map; public interface HandshakeResponse { -public static final String SEC_WEBSOCKET_ACCEPT = -"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; +/** + * Name of the WebSocket accept HTTP header. + */ +public static final String SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept"; Map> getHeaders(); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459672 - /tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServlet.java
Author: markt Date: Fri Mar 22 08:55:56 2013 New Revision: 1459672 URL: http://svn.apache.org/r1459672 Log: Use constant Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServlet.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServlet.java?rev=1459672&r1=1459671&r2=1459672&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServlet.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServlet.java Fri Mar 22 08:55:56 2013 @@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletReq import javax.servlet.http.HttpServletResponse; import javax.websocket.Endpoint; import javax.websocket.Extension; +import javax.websocket.HandshakeResponse; import javax.websocket.server.ServerEndpointConfig; import org.apache.tomcat.util.codec.binary.Base64; @@ -114,7 +115,8 @@ public class WsServlet extends HttpServl Constants.UPGRADE_HEADER_VALUE); resp.setHeader(Constants.CONNECTION_HEADER_NAME, Constants.CONNECTION_HEADER_VALUE); -resp.setHeader("Sec-WebSocket-Accept", getWebSocketAccept(key)); +resp.setHeader(HandshakeResponse.SEC_WEBSOCKET_ACCEPT, +getWebSocketAccept(key)); if (subProtocol != null) { resp.setHeader("Sec-WebSocket-Protocol", subProtocol); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459673 - in /tomcat/trunk: build.properties.default modules/jdbc-pool/build.properties.default
Author: kkolinko Date: Fri Mar 22 08:58:12 2013 New Revision: 1459673 URL: http://svn.apache.org/r1459673 Log: jdbc-pool tests need JUnit 4. Use the same version of junit as used by Tomcat. Modified: tomcat/trunk/build.properties.default tomcat/trunk/modules/jdbc-pool/build.properties.default Modified: tomcat/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1459673&r1=1459672&r2=1459673&view=diff == --- tomcat/trunk/build.properties.default (original) +++ tomcat/trunk/build.properties.default Fri Mar 22 08:58:12 2013 @@ -181,7 +181,7 @@ commons-daemon.native.src.loc.2=${base-c commons-daemon.native.win.loc.1=${base-commons.loc.1}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip commons-daemon.native.win.loc.2=${base-commons.loc.2}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip -# - JUnit Unit Test Suite, version 3.7 or later - +# - JUnit Unit Test Suite, version 4.8 or later - junit.home=${base.path}/junit4.8.2 junit.lib=${junit.home} junit.jar=${junit.lib}/junit-4.8.2.jar Modified: tomcat/trunk/modules/jdbc-pool/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.properties.default?rev=1459673&r1=1459672&r2=1459673&view=diff == --- tomcat/trunk/modules/jdbc-pool/build.properties.default (original) +++ tomcat/trunk/modules/jdbc-pool/build.properties.default Fri Mar 22 08:58:12 2013 @@ -62,11 +62,11 @@ testdb.validationQuery=SELECT 1 #testdb.driverClassName=org.apache.derby.jdbc.EmbeddedDriver #testdb.validationQuery=VALUES 1 -# - JUnit Unit Test Suite, version 3.7 or later - -junit.home=${base.path}/junit3.8.2 +# - JUnit Unit Test Suite, version 4.8 or later - +junit.home=${base.path}/junit4.8.2 junit.lib=${junit.home} -junit.jar=${junit.lib}/junit.jar -junit.loc=http://downloads.sourceforge.net/junit/junit3.8.2.zip +junit.jar=${junit.lib}/junit-4.8.2.jar +junit.loc=http://cloud.github.com/downloads/KentBeck/junit/junit4.8.2.zip c3p0.home=${base.path}/c3p0-0.9.1.2 c3p0.jar=${c3p0.home}/lib/c3p0-0.9.1.2.jar - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459674 - in /tomcat/tc7.0.x/trunk: ./ build.properties.default modules/jdbc-pool/build.properties.default
Author: kkolinko Date: Fri Mar 22 08:59:57 2013 New Revision: 1459674 URL: http://svn.apache.org/r1459674 Log: Merged revision 1459673 from tomcat/trunk: jdbc-pool tests need JUnit 4. Use the same version of junit as used by Tomcat. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/build.properties.default tomcat/tc7.0.x/trunk/modules/jdbc-pool/build.properties.default Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1459673 Modified: tomcat/tc7.0.x/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.properties.default?rev=1459674&r1=1459673&r2=1459674&view=diff == --- tomcat/tc7.0.x/trunk/build.properties.default (original) +++ tomcat/tc7.0.x/trunk/build.properties.default Fri Mar 22 08:59:57 2013 @@ -175,7 +175,7 @@ commons-daemon.native.src.loc.2=${base-c commons-daemon.native.win.loc.1=${base-commons.loc.1}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip commons-daemon.native.win.loc.2=${base-commons.loc.2}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip -# - JUnit Unit Test Suite, version 3.7 or later - +# - JUnit Unit Test Suite, version 4.8 or later - junit.home=${base.path}/junit4.8.2 junit.lib=${junit.home} junit.jar=${junit.lib}/junit-4.8.2.jar Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/build.properties.default?rev=1459674&r1=1459673&r2=1459674&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/build.properties.default (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/build.properties.default Fri Mar 22 08:59:57 2013 @@ -62,11 +62,11 @@ testdb.validationQuery=SELECT 1 #testdb.driverClassName=org.apache.derby.jdbc.EmbeddedDriver #testdb.validationQuery=VALUES 1 -# - JUnit Unit Test Suite, version 3.7 or later - -junit.home=${base.path}/junit3.8.2 +# - JUnit Unit Test Suite, version 4.8 or later - +junit.home=${base.path}/junit4.8.2 junit.lib=${junit.home} -junit.jar=${junit.lib}/junit.jar -junit.loc=http://downloads.sourceforge.net/junit/junit3.8.2.zip +junit.jar=${junit.lib}/junit-4.8.2.jar +junit.loc=http://cloud.github.com/downloads/KentBeck/junit/junit4.8.2.zip c3p0.home=${base.path}/c3p0-0.9.1.2 c3p0.jar=${c3p0.home}/lib/c3p0-0.9.1.2.jar - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459677 - /tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java
Author: markt Date: Fri Mar 22 09:06:38 2013 New Revision: 1459677 URL: http://svn.apache.org/r1459677 Log: Add NPE protection and add missing filtering of POJOs. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java?rev=1459677&r1=1459676&r2=1459677&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java Fri Mar 22 09:06:38 2013 @@ -92,8 +92,17 @@ public class WsSci implements ServletCon filteredPojoEndpoints.addAll(scannedPojoEndpoints); } else { for (ServerApplicationConfig config : serverApplicationConfigs) { -filteredEndpointConfigs.addAll( -config.getEndpointConfigs(scannedEndpointClazzes)); +Set configFilteredEndpoints = +config.getEndpointConfigs(scannedEndpointClazzes); +if (configFilteredEndpoints != null) { +filteredEndpointConfigs.addAll(configFilteredEndpoints); +} +Set> configFilteredPojos = +config.getAnnotatedEndpointClasses( +scannedPojoEndpoints); +if (configFilteredPojos != null) { +filteredPojoEndpoints.addAll(configFilteredPojos); +} } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459680 - /tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Author: markt Date: Fri Mar 22 09:13:26 2013 New Revision: 1459680 URL: http://svn.apache.org/r1459680 Log: Make error messages rather more useful Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=1459680&r1=1459679&r2=1459680&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Fri Mar 22 09:13:26 2013 @@ -212,7 +212,7 @@ public class PojoMethodMapping { if (isOnError && !foundThrowable) { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.onErrorNoThrowable", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } return result; } @@ -314,7 +314,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicateMessageParam", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } } else if (types[i] == Reader.class) { if (indexReader == -1) { @@ -322,7 +322,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicateMessageParam", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } } else if (types[i] == boolean.class) { if (indexBoolean == -1) { @@ -330,7 +330,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicateLastParam", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } } else if (types[i] == ByteBuffer.class) { if (indexByteBuffer == -1) { @@ -338,7 +338,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicateMessageParam", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } } else if (types[i] == byte[].class) { if (indexByteArray == -1) { @@ -346,7 +346,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicateMessageParam", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } } else if (types[i] == InputStream.class) { if (indexInputStream == -1) { @@ -354,7 +354,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicateMessageParam", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } } else if (types[i] == Session.class) { if (indexSession == -1) { @@ -362,7 +362,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicateSessionParam", -m.getName(), m.getClass().getName())); +m.getName(), m.getDeclaringClass().getName())); } } else if (types[i] == PongMessage.class) { if (indexPong == -1) { @@ -370,7 +370,7 @@ public class PojoMethodMapping { } else { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.duplicatePongMessageParam", -
svn commit: r1459681 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
Author: kkolinko Date: Fri Mar 22 09:16:06 2013 New Revision: 1459681 URL: http://svn.apache.org/r1459681 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54599 jdbc-pool: Do not expose connection password via DataSource.toString(). Based on a patch by Daniel Mikusa Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java?rev=1459681&r1=1459680&r2=1459681&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java Fri Mar 22 09:16:06 2013 @@ -802,28 +802,33 @@ public class PoolProperties implements P StringBuilder buf = new StringBuilder("ConnectionPool["); try { String[] fields = DataSourceFactory.ALL_PROPERTIES; -for (int i=0; i
svn commit: r1459683 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java webapps/docs/changelog.xml
Author: kkolinko Date: Fri Mar 22 09:22:55 2013 New Revision: 1459683 URL: http://svn.apache.org/r1459683 Log: Merged revision 1459681 from tomcat/trunk: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54599 jdbc-pool: Do not expose connection password via DataSource.toString(). Based on a patch by Daniel Mikusa Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1459681 Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java?rev=1459683&r1=1459682&r2=1459683&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java Fri Mar 22 09:22:55 2013 @@ -802,28 +802,33 @@ public class PoolProperties implements P StringBuilder buf = new StringBuilder("ConnectionPool["); try { String[] fields = DataSourceFactory.ALL_PROPERTIES; -for (int i=0; ihttp://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1459683&r1=1459682&r2=1459683&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Mar 22 09:22:55 2013 @@ -134,6 +134,11 @@ Patch provided by Martin Lichtin. (violetagg) +54599: Do not print connection password in +PoolProperties.toString(). Based on a patch by +Daniel Mikusa. (kkolinko) + + 54684: Add javax.naming.spi to Import-Package header in MANIFEST.MF in order to resolve ClassNotFoundException when running in OSGi environment. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1459681 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
On 22/03/2013 09:16, kkoli...@apache.org wrote: > Author: kkolinko > Date: Fri Mar 22 09:16:06 2013 > New Revision: 1459681 > > URL: http://svn.apache.org/r1459681 > Log: > Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54599 > jdbc-pool: Do not expose connection password via DataSource.toString(). > Based on a patch by Daniel Mikusa I don't like the precedent this sets. JMX is an admin interface. Admins have access to passwords. There is a whole bunch of similar information exposed via JMX and I don't think we should start down the road of trying to hide it all. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54599] DataSource password is exposed to applications via toString method
https://issues.apache.org/bugzilla/show_bug.cgi?id=54599 Konstantin Kolinko changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Konstantin Kolinko --- Thank you for the patch. Fixed by r1459683 and will be in 7.0.39. -- 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
Re: svn commit: r1459681 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
2013/3/22 Mark Thomas : > On 22/03/2013 09:16, kkoli...@apache.org wrote: >> Author: kkolinko >> Date: Fri Mar 22 09:16:06 2013 >> New Revision: 1459681 >> >> URL: http://svn.apache.org/r1459681 >> Log: >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54599 >> jdbc-pool: Do not expose connection password via DataSource.toString(). >> Based on a patch by Daniel Mikusa > > I don't like the precedent this sets. > > JMX is an admin interface. Admins have access to passwords. There is a > whole bunch of similar information exposed via JMX and I don't think we > should start down the road of trying to hide it all. > This is about toString() method. JMX is a different issue with its own bug report which, I agree, has to be closed as WONTFIX. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1459681 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
On 22/03/2013 09:26, Konstantin Kolinko wrote: > 2013/3/22 Mark Thomas : >> On 22/03/2013 09:16, kkoli...@apache.org wrote: >>> Author: kkolinko >>> Date: Fri Mar 22 09:16:06 2013 >>> New Revision: 1459681 >>> >>> URL: http://svn.apache.org/r1459681 >>> Log: >>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54599 >>> jdbc-pool: Do not expose connection password via DataSource.toString(). >>> Based on a patch by Daniel Mikusa >> >> I don't like the precedent this sets. >> >> JMX is an admin interface. Admins have access to passwords. There is a >> whole bunch of similar information exposed via JMX and I don't think we >> should start down the road of trying to hide it all. >> > > This is about toString() method. > > JMX is a different issue with its own bug report which, I agree, has > to be closed as WONTFIX. Sorry - read it too fast while I had my mind on something else. Thanks for putting me right. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Time for 7.0.39
On 21/03/2013 22:34, Mark Thomas wrote: > On 20/03/2013 20:55, Mark Thomas wrote: >> I plan to get the most recent FileUpload changes (if any), run the unit >> tests, run the TCKs and then tag 7.0.39 so that should happen some time >> early tomorrow if all goes well. > > Second attempt. > > Unit tests for 7.0.x/trunk both passed. Running the TCKs now. Tag early > tomorrow barring problems / objections. TCKs passed overnight. I'll tag 7.0.39 in a couple of hours time to give folks a chance to get any final changes in. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53968] Database password is exposed via JMX in getDbProperties() method
https://issues.apache.org/bugzilla/show_bug.cgi?id=53968 Konstantin Kolinko changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #1 from Konstantin Kolinko --- JMX is a tool for low-level administrative access, it has to be appropriate secured (like root on unixes). It exposes a lot, including passwords. They might be used by tools to write out configuration files for Tomcat. > public String getPassword() { > return "Password not available as DataSource/JMX operation."; > } The above implementation (introduced in r793732 ) is, in my opinion, wrong. It would be OK to expose the password there. I will leave the above method as is for now, as nobody asked for it to be implemented. (I'd be afraid of surprises such as a) some 3-rd party MBeans implementations that blindly enumerate and expose properties of an object, b) lazy toString() implementations, such as one fixed by bug 54599 ). Closing as WONTFIX. -- 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
[Tomcat Wiki] Trivial Update of "LillyHadl" by LillyHadl
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "LillyHadl" page has been changed by LillyHadl: http://wiki.apache.org/tomcat/LillyHadl New page: Senior account executive Gunnro Blixt is enthusiastic about fit training basketball, tombstone rubbing.<> Last of all he is get his drive from going on a vacation and checking out different places and in particular to Bangladesh.<> [[http://www.newmichaelkorsclubs.com/|michael kors bags]] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459741 - in /tomcat/tc7.0.x/tags/TOMCAT_7_0_39: ./ build.properties.default
Author: markt Date: Fri Mar 22 12:32:01 2013 New Revision: 1459741 URL: http://svn.apache.org/r1459741 Log: Tag 7.0.39 Added: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ (props changed) - copied from r1459740, tomcat/tc7.0.x/trunk/ Modified: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/build.properties.default Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- bugtraq:append = false Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- --- bugtraq:message (added) +++ bugtraq:message Fri Mar 22 12:32:01 2013 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- bugtraq:number = true Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- bugtraq:warnifnoissue = false Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- --- svn:ignore (added) +++ svn:ignore Fri Mar 22 12:32:01 2013 @@ -0,0 +1,7 @@ +.* +build.properties +logs +nbproject +output +work +*.iml Propchange: tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Fri Mar 22 12:32:01 2013 @@ -0,0 +1 @@ +/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222328,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112 ,1240114,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342 320,1342476,1342498,1342503,1342717,1342795,1342805,1343044-1343046,1343335,1343394,1343400,1343629,1343708,1343718,1343895,1344063,1344068,1344250,1344266,1344515,1344528,1344612,1344629,1344725,1344868,1344890,1344893,1344896,1344901,1345020,1345029,1345039,1345287-1345290,1345294,1345309,1345325,1345357,1345367,1345579-1345580,1345582,1345688,1345699,1345704,1345731-1345732,1345737,1345744,1345752,1345754,1345779,1345781,1345846,1346107,1346376,1346404,1346510,1346514,1346519,1346581,1346635,1346644,1346683,1346794,1346885,1346932,1347034,1347047,1347087,1347108-1347109,1347583,1347737,1348105,1348357,1348398,1348425,1348461-1348495,1348498,1348752,1348762,1348772,1348776,1348859,1348968,1348973,1348989,1349007,1349237,1349298,1349317,1349410,1349473,1349539,1349879,1349887,1349893,1349922,1349984,1350124,1350241,1350243,1350294-1350295,1350299,1350864,1350900,1351010,1351054,1351056,1351068,1351134-1351135,1351148,1351259,1351604,1351636-1351640,1351991,1351993,1352011,1 352056,1352059,1352661,1352663,1352788,1352799,1353087,1353125,1353240,1353261,1353414,1353468,1353501,1353581,13537
svn commit: r1459742 - in /tomcat/tc7.0.x/trunk: build.properties.default res/maven/mvn.properties.default
Author: markt Date: Fri Mar 22 12:33:12 2013 New Revision: 1459742 URL: http://svn.apache.org/r1459742 Log: Prep for next release Modified: tomcat/tc7.0.x/trunk/build.properties.default tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Modified: tomcat/tc7.0.x/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.properties.default?rev=1459742&r1=1459741&r2=1459742&view=diff == --- tomcat/tc7.0.x/trunk/build.properties.default (original) +++ tomcat/tc7.0.x/trunk/build.properties.default Fri Mar 22 12:33:12 2013 @@ -27,7 +27,7 @@ # - Version Control Flags - version.major=7 version.minor=0 -version.build=39 +version.build=40 version.patch=0 version.suffix=-dev Modified: tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default?rev=1459742&r1=1459741&r2=1459742&view=diff == --- tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default (original) +++ tomcat/tc7.0.x/trunk/res/maven/mvn.properties.default Fri Mar 22 12:33:12 2013 @@ -35,7 +35,7 @@ maven.asf.release.repo.url=https://repos maven.asf.release.repo.repositoryId=apache.releases # Release version info -maven.asf.release.deploy.version=7.0.39 +maven.asf.release.deploy.version=7.0.40 #Where do we load the libraries from tomcat.lib.path=../../output/build/lib - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Unable to generate thread dumps with Tomcat service
Before I raise this as a DAEMON bug could someone else on Windows confirm that triggering a thread dump doesn't work. I get: [2013-03-22 12:54:04] [error] [ 3408] The handle is invalid. whenever I try. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "LocalBadContent" by ChuckCaldarale
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "LocalBadContent" page has been changed by ChuckCaldarale: http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=100&rev2=101 myteethadvisor\.com najem-avtodoma\.info nekoo\.cn + newmichaelkorsclubs\.com ningen\.sakura\.ne\.jp nofaxpayday nordenpark\.com - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1146 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1459742 Blamelist: markt Build succeeded! sincerely, -The Buildbot
svn commit: r1459761 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java
Author: kkolinko Date: Fri Mar 22 13:34:41 2013 New Revision: 1459761 URL: http://svn.apache.org/r1459761 Log: Remove stray obsolete comment. This method has been already implemented. Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java?rev=1459761&r1=1459760&r2=1459761&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java Fri Mar 22 13:34:41 2013 @@ -38,7 +38,6 @@ public class StatementFinalizer extends @Override public Object createStatement(Object proxy, Method method, Object[] args, Object statement, long time) { -// TODO Auto-generated method stub try { if (statement instanceof Statement) statements.add(new WeakReference<>((Statement)statement)); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459769 - in /tomcat/trunk/modules/jdbc-pool/src: main/java/org/apache/tomcat/jdbc/pool/interceptor/ test/java/org/apache/tomcat/jdbc/pool/interceptor/ test/java/org/apache/tomcat/jdbc/te
Author: kkolinko Date: Fri Mar 22 13:44:00 2013 New Revision: 1459769 URL: http://svn.apache.org/r1459769 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54732 Fix leak of statements in StatementCache interceptor. Added: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java (with props) Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestStatementCache.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java?rev=1459769&r1=1459768&r2=1459769&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java Fri Mar 22 13:44:00 2013 @@ -242,11 +242,11 @@ public class StatementCache extends Stat removeStatement(proxy); } } -closed = true; -delegate = null; if (shouldClose) { super.closeInvoked(); } +closed = true; +delegate = null; } Added: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java?rev=1459769&view=auto == --- tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java (added) +++ tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java Fri Mar 22 13:44:00 2013 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.tomcat.jdbc.pool.interceptor; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.sql.Statement; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * Interceptor that counts opened Statements. Is used by tests. + */ +public class StatementCounterInterceptor extends StatementDecoratorInterceptor { + +private final AtomicInteger countOpen = new AtomicInteger(); +private final AtomicInteger countClosed = new AtomicInteger(); + +public int getActiveCount() { +return countOpen.get() - countClosed.get(); +} + +@Override +protected Object createDecorator(Object proxy, Method method, +Object[] args, Object statement, Constructor constructor, +String sql) throws InstantiationException, IllegalAccessException, +InvocationTargetException { +Object result; +StatementProxy statementProxy = new StatementProxy( +(Statement) statement, sql); +result = constructor.newInstance(new Object[] { statementProxy }); +statementProxy.setActualProxy(result); +statementProxy.setConnection(proxy); +statementProxy.setConstructor(constructor); +countOpen.incrementAndGet(); +return result; +} + +private class StatementProxy extends +StatementDecoratorInterceptor.StatementProxy { +public StatementProxy(Statement delegate, String sql) { +super(delegate, sql); +} + +@Override +public void closeInvoked() { +countClosed.incrementAndGet(); +super.closeInvoked(); +} +} +} Propchange: tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java --
[Bug 54732] StatementCache interceptor does not forward calls to Statement.close() which causes memory leaks
https://issues.apache.org/bugzilla/show_bug.cgi?id=54732 --- Comment #1 from Konstantin Kolinko --- Confirmed. The leak happens when the cache is full, so the statement that is being closed cannot be returned to the cache but has to be closed right away. Fixed in trunk with r1459769 -- 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 53952] Add support for TLS 1.1 and 1.2
https://issues.apache.org/bugzilla/show_bug.cgi?id=53952 --- Comment #12 from Marcel Ĺ ebek --- Now when there is a known practical attack against RC4 in SSL, we have no secure ciphersuite in TLS 1.0, and this issue has probably higher priority than before. What is the reason for not applying this patch for half a year? Is there anything I can do to have this patch merged? -- 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: r1459838 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
Author: markt Date: Fri Mar 22 15:17:51 2013 New Revision: 1459838 URL: http://svn.apache.org/r1459838 Log: Client needs to send request sub-protocols Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1459838&r1=1459837&r2=1459838&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Fri Mar 22 15:17:51 2013 @@ -166,7 +166,8 @@ public class WsWebSocketContainer sm.getString("wsWebSocketContainer.pathNoHost")); } int port = path.getPort(); -Map> reqHeaders = createRequestHeaders(host, port); +Map> reqHeaders = createRequestHeaders(host, port, +clientEndpointConfiguration.getPreferredSubprotocols()); clientEndpointConfiguration.getConfigurator(). beforeRequest(reqHeaders); @@ -304,7 +305,7 @@ public class WsWebSocketContainer } private Map> createRequestHeaders(String host, -int port) { +int port, List subProtocols) { Map> headers = new HashMap<>(); @@ -338,6 +339,10 @@ public class WsWebSocketContainer wsKeyValues.add(generateWsKeyValue()); headers.put(Constants.WS_KEY_HEADER_NAME, wsKeyValues); +// WebSocket sub-protocols +if (subProtocols != null && subProtocols.size() > 0) { +headers.put(Constants.WS_PROTOCOL_HEADER_NAME, subProtocols); +} return headers; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Missing Classes in latest tomcat-embed-logging-log4j snapshot
In the latest snapshot (3/21) of tomcat-embed-logging-log4j, all of the classes in org.apache.juli.logging.* are missing. They are there in the 3/14 snapshot, and they are there in the 3/21 SOURCES snapshot, but they are not there in the 3/21 binaries snapshot. Something foobar happened here. They are there in the 7.0.37 artifact, but the 7.0.39 artifact has not published yet, so I don't know if they're there. https://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/embed/tomcat-embed-logging-log4j/8.0-SNAPSHOT/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[VOTE] Release Apache Tomcat 7.0.39
The proposed Apache Tomcat 7.0.39 release is now available for voting. It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.39/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-015/ The svn tag is: http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_39/ The proposed 7.0.39 release is: [ ] Broken - do not release [ ] Stable - go ahead and release as 7.0.39 Stable Cheers, Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Missing Classes in latest tomcat-embed-logging-log4j snapshot
On Mar 22, 2013, at 11:28 AM, Nick Williams wrote: > In the latest snapshot (3/21) of tomcat-embed-logging-log4j, all of the > classes in org.apache.juli.logging.* are missing. They are there in the 3/14 > snapshot, and they are there in the 3/21 SOURCES snapshot, but they are not > there in the 3/21 binaries snapshot. Something foobar happened here. They are > there in the 7.0.37 artifact, but the 7.0.39 artifact has not published yet, > so I don't know if they're there. > > https://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/embed/tomcat-embed-logging-log4j/8.0-SNAPSHOT/ Now that 7.0.39 is in Maven staging, I can confirm that 7.0.39 artifact DOES have these classes. So it's only the latest 8.0 snapshot, and only the binary artifact (not sources), that's missing these classes. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459896 - /tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Author: markt Date: Fri Mar 22 17:02:00 2013 New Revision: 1459896 URL: http://svn.apache.org/r1459896 Log: Add support for primitive messages (and their object equivalents) Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=1459896&r1=1459895&r2=1459896&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Fri Mar 22 17:02:00 2013 @@ -282,6 +282,7 @@ public class PojoMethodMapping { private int indexSession = -1; private int indexInputStream = -1; private int indexReader = -1; +private int indexPrimitive = -1; private Map indexPathParams = new HashMap<>(); private int indexPayload = -1; @@ -356,6 +357,14 @@ public class PojoMethodMapping { "pojoMethodMapping.duplicateMessageParam", m.getName(), m.getDeclaringClass().getName())); } +} else if (isPrimitive(types[i])) { +if (indexPrimitive == -1) { +indexPrimitive = i; +} else { +throw new IllegalArgumentException(sm.getString( +"pojoMethodMapping.duplicateMessageParam", +m.getName(), m.getDeclaringClass().getName())); +} } else if (types[i] == Session.class) { if (indexSession == -1) { indexSession = i; @@ -441,6 +450,15 @@ public class PojoMethodMapping { indexPayload = indexInputStream; } } +if (indexPrimitive != -1) { +if (indexPayload != -1) { +throw new IllegalArgumentException(sm.getString( +"pojoMethodMapping.duplicateMessageParam", +m.getName(), m.getDeclaringClass().getName())); +} else { +indexPayload = indexPrimitive; +} +} if (indexPong != -1) { if (indexPayload != -1) { throw new IllegalArgumentException(sm.getString( @@ -450,6 +468,12 @@ public class PojoMethodMapping { indexPayload = indexPong; } } +if (indexPayload == -1 && indexPrimitive == -1 && +indexBoolean != -1) { +// The boolean we found is a payload, not an last flag +indexPayload = indexBoolean; +indexBoolean = -1; +} if (indexPayload == -1) { throw new IllegalArgumentException(sm.getString( "pojoMethodMapping.noPayload", @@ -473,6 +497,23 @@ public class PojoMethodMapping { } +private boolean isPrimitive(Class clazz) { +if (clazz.isPrimitive()) { +return true; +} else if(clazz.equals(Boolean.class) || +clazz.equals(Byte.class) || +clazz.equals(Character.class) || +clazz.equals(Double.class) || +clazz.equals(Float.class) || +clazz.equals(Integer.class) || +clazz.equals(Long.class) || +clazz.equals(Short.class)) { +return true; +} +return false; +} + + public MessageHandler getMessageHandler(Object pojo, Map pathParameters, Session session, EndpointConfig config) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54337] StatementCache leaks statements/cursors
https://issues.apache.org/bugzilla/show_bug.cgi?id=54337 Konstantin Kolinko changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE OS||All --- Comment #1 from Konstantin Kolinko --- (In reply to comment #0) > 1. > The AtomicInteger field > org.apache.tomcat.jdbc.pool.interceptor.StatementCache.cacheSize > which seems to be not in sync with the real size of the cache Map. > (..) You are wrong: Map is per-connection. Size is per-pool. > 2. > When the capacity seems (or really is) exceeded, statement.close() will not > causing to close the wrapped statement causing the cursor to leak. Yes, it is a bug. Duplicate of 54732. *** This bug has been marked as a duplicate of bug 54732 *** -- 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 54732] StatementCache interceptor does not forward calls to Statement.close() which causes memory leaks
https://issues.apache.org/bugzilla/show_bug.cgi?id=54732 Konstantin Kolinko changed: What|Removed |Added CC||pat...@rufflar.com --- Comment #2 from Konstantin Kolinko --- *** Bug 54337 has been marked as a duplicate of this bug. *** -- 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
Re: Unable to generate thread dumps with Tomcat service
On 03/22/2013 01:55 PM, Mark Thomas wrote: Before I raise this as a DAEMON bug could someone else on Windows confirm that triggering a thread dump doesn't work. I get: [2013-03-22 12:54:04] [error] [ 3408] The handle is invalid. whenever I try. Seems it doesn't work. I have the same log. File a bug. Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459933 - in /tomcat/trunk/modules/jdbc-pool: doc/jdbc-pool.xml src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
Author: kkolinko Date: Fri Mar 22 19:13:21 2013 New Revision: 1459933 URL: http://svn.apache.org/r1459933 Log: Documentation for StatementCache interceptor. Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml?rev=1459933&r1=1459932&r2=1459933&view=diff == --- tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original) +++ tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Fri Mar 22 19:13:21 2013 @@ -568,6 +568,36 @@ + +Caches PreparedStatement and/or CallableStatement + instances on a connection. + +The statements are cached per connection. + The count limit is counted globally for all connections that belong to + the same pool. Once the count reaches max, subsequent + statements are not returned to the cache and are closed immediately. + + + +(boolean as String) Enable caching of PreparedStatement + instances created using prepareStatement calls. + The default value is true. + + + +(boolean as String) Enable caching of CallableStatement + instances created using prepareCall calls. + The default value is false. + + + +(int as String) Limit on the count of cached statements across + the connection pool. + The default value is 50. + + + + See 48392. Interceptor to wrap statements and result sets in order to prevent access to the actual connection using the methods ResultSet.getStatement().getConnection() and Statement.getConnection() Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java?rev=1459933&r1=1459932&r2=1459933&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java Fri Mar 22 19:13:21 2013 @@ -27,6 +27,10 @@ import org.apache.tomcat.jdbc.pool.Conne import org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty; import org.apache.tomcat.jdbc.pool.PooledConnection; +/** + * Interceptor that caches {@code PreparedStatement} and/or + * {@code CallableStatement} instances on a connection. + */ public class StatementCache extends StatementDecoratorInterceptor { protected static final String[] ALL_TYPES = new String[] {PREPARE_STATEMENT,PREPARE_CALL}; protected static final String[] CALLABLE_TYPE = new String[] {PREPARE_CALL}; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459943 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/doc/jdbc-pool.xml modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
Author: kkolinko Date: Fri Mar 22 19:28:22 2013 New Revision: 1459943 URL: http://svn.apache.org/r1459943 Log: Merged revision 1459933 from tomcat/trunk: Documentation for StatementCache interceptor. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/jdbc-pool.xml tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1459933 Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/jdbc-pool.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/jdbc-pool.xml?rev=1459943&r1=1459942&r2=1459943&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Fri Mar 22 19:28:22 2013 @@ -568,6 +568,36 @@ + +Caches PreparedStatement and/or CallableStatement + instances on a connection. + +The statements are cached per connection. + The count limit is counted globally for all connections that belong to + the same pool. Once the count reaches max, subsequent + statements are not returned to the cache and are closed immediately. + + + +(boolean as String) Enable caching of PreparedStatement + instances created using prepareStatement calls. + The default value is true. + + + +(boolean as String) Enable caching of CallableStatement + instances created using prepareCall calls. + The default value is false. + + + +(int as String) Limit on the count of cached statements across + the connection pool. + The default value is 50. + + + + See 48392. Interceptor to wrap statements and result sets in order to prevent access to the actual connection using the methods ResultSet.getStatement().getConnection() and Statement.getConnection() Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java?rev=1459943&r1=1459942&r2=1459943&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java Fri Mar 22 19:28:22 2013 @@ -27,6 +27,10 @@ import org.apache.tomcat.jdbc.pool.Conne import org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorProperty; import org.apache.tomcat.jdbc.pool.PooledConnection; +/** + * Interceptor that caches {@code PreparedStatement} and/or + * {@code CallableStatement} instances on a connection. + */ public class StatementCache extends StatementDecoratorInterceptor { protected static final String[] ALL_TYPES = new String[] {PREPARE_STATEMENT,PREPARE_CALL}; protected static final String[] CALLABLE_TYPE = new String[] {PREPARE_CALL}; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459946 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java
Author: kkolinko Date: Fri Mar 22 19:33:15 2013 New Revision: 1459946 URL: http://svn.apache.org/r1459946 Log: Merged revision 1459761 from tomcat/trunk: Remove stray obsolete comment. This method has been already implemented. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1459761 Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java?rev=1459946&r1=1459945&r2=1459946&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementFinalizer.java Fri Mar 22 19:33:15 2013 @@ -38,7 +38,6 @@ public class StatementFinalizer extends @Override public Object createStatement(Object proxy, Method method, Object[] args, Object statement, long time) { -// TODO Auto-generated method stub try { if (statement instanceof Statement) statements.add(new WeakReference((Statement)statement)); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459952 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java
Author: kkolinko Date: Fri Mar 22 19:45:06 2013 New Revision: 1459952 URL: http://svn.apache.org/r1459952 Log: Merged revision 1432517 from tomcat/trunk: Fix threading issue reported by FindBugs - in a test class in jdbc-pool Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1432517 Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java?rev=1459952&r1=1459951&r2=1459952&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java Fri Mar 22 19:45:06 2013 @@ -23,6 +23,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import javax.management.AttributeChangeNotification; import javax.management.Notification; @@ -122,7 +123,7 @@ public class TestSlowQueryReport extends st.close(); } System.out.println("Stats:"+stats); -assertEquals("Expecting to have received "+(2*count)+" notifications.",2*count, listener.notificationCount); +assertEquals("Expecting to have received "+(2*count)+" notifications.",2*count, listener.notificationCount.get()); con.close(); tearDown(); //make sure we actually did clean up when the pool closed @@ -184,11 +185,11 @@ public class TestSlowQueryReport extends public class ClientListener implements NotificationListener { -volatile int notificationCount = 0; +AtomicInteger notificationCount = new AtomicInteger(0); @Override public void handleNotification(Notification notification, Object handback) { -notificationCount++; +notificationCount.incrementAndGet(); System.out.println("\nReceived notification:"); System.out.println("\tClassName: " + notification.getClass().getName()); System.out.println("\tSource: " + notification.getSource()); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459959 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
Author: kkolinko Date: Fri Mar 22 19:59:02 2013 New Revision: 1459959 URL: http://svn.apache.org/r1459959 Log: Merged revision 1434757 from tomcat/trunk: Make sure changes to result are visible to all threads currently calling get() Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1434757 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=1459959&r1=1459958&r2=1459959&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 Fri Mar 22 19:59:02 2013 @@ -1171,7 +1171,7 @@ public class ConnectionPool { Future pcFuture = null; AtomicBoolean configured = new AtomicBoolean(false); CountDownLatch latch = new CountDownLatch(1); -Connection result = null; +volatile Connection result = null; SQLException cause = null; AtomicBoolean cancelled = new AtomicBoolean(false); volatile PooledConnection pc = null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459965 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/core/TestAsyncContextImpl.java test/org/apache/tomcat/util/http/parser/TestMediaType.java
Author: kkolinko Date: Fri Mar 22 20:10:56 2013 New Revision: 1459965 URL: http://svn.apache.org/r1459965 Log: Merged revisions r1435126 r1435600 from tomcat/trunk: Use JUnit4 methods Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestMediaType.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1435126,1435600 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1459965&r1=1459964&r2=1459965&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Fri Mar 22 20:10:56 2013 @@ -39,13 +39,12 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import junit.framework.Assert; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.junit.Assert; import org.junit.Test; import org.apache.catalina.Context; Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestMediaType.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestMediaType.java?rev=1459965&r1=1459964&r2=1459965&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestMediaType.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/parser/TestMediaType.java Fri Mar 22 20:10:56 2013 @@ -19,12 +19,11 @@ package org.apache.tomcat.util.http.pars import java.io.IOException; import java.io.StringReader; -import junit.framework.Assert; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import org.junit.Assert; import org.junit.Test; /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459970 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/EqualsHashCodeTest.java
Author: kkolinko Date: Fri Mar 22 20:30:31 2013 New Revision: 1459970 URL: http://svn.apache.org/r1459970 Log: Merged revision 1380376 from tomcat/trunk: Clean-up - unused code - autoboxing Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/EqualsHashCodeTest.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1380376 Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/EqualsHashCodeTest.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/EqualsHashCodeTest.java?rev=1459970&r1=1459969&r2=1459970&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/EqualsHashCodeTest.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/EqualsHashCodeTest.java Fri Mar 22 20:30:31 2013 @@ -20,7 +20,6 @@ import java.sql.Connection; import javax.sql.PooledConnection; -import org.apache.tomcat.jdbc.pool.ConnectionPool; import org.apache.tomcat.jdbc.test.driver.Driver; public class EqualsHashCodeTest extends DefaultTestCase{ @@ -42,7 +41,7 @@ public class EqualsHashCodeTest extends this.datasource.setMaxIdle(datasource.getMaxActive()); this.datasource.setUsername(username); this.datasource.getConnection().close(); -ConnectionPool pool = datasource.createPool(); +datasource.createPool(); } public void testEquals() throws Exception { @@ -67,7 +66,7 @@ public class EqualsHashCodeTest extends assertEquals(con1.hashCode(), con1.hashCode()); Connection con2 = datasource.getConnection(); assertEquals(con2.hashCode(), con2.hashCode()); -assertNotSame(con1.hashCode(), con2.hashCode()); +assertTrue(con1.hashCode() != con2.hashCode()); con2.close(); assertEquals(con2.hashCode(), con2.hashCode()); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459971 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
Author: markt Date: Fri Mar 22 20:30:49 2013 New Revision: 1459971 URL: http://svn.apache.org/r1459971 Log: Hack to get the TCK to work Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1459971&r1=1459970&r2=1459971&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Fri Mar 22 20:30:49 2013 @@ -40,6 +40,7 @@ import java.util.concurrent.Future; import javax.websocket.ClientEndpoint; import javax.websocket.ClientEndpointConfig; +import javax.websocket.ClientEndpointConfig.Builder; import javax.websocket.DeploymentException; import javax.websocket.Endpoint; import javax.websocket.Extension; @@ -114,10 +115,24 @@ public class WsWebSocketContainer } +@SuppressWarnings("unchecked") @Override public Session connectToServer(Class annotatedEndpointClass, URI path) throws DeploymentException { +// TODO: Remove this before release +/* + * This is a temporary hack to allow the WebSocket EA TCK to work. This + * has been confirmed as non-compliant with the EG lead so the TCK will + * have to change. For now, we need the TCK to work. + */ +if (Endpoint.class.isAssignableFrom(annotatedEndpointClass)) { +return connectToServer( +(Class) annotatedEndpointClass, +Builder.create().build(), path); +} +// End of TCK hack + Object pojo; try { pojo = annotatedEndpointClass.newInstance(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54740] Aggressive scan for ServerEndpointConfig
https://issues.apache.org/bugzilla/show_bug.cgi?id=54740 --- Comment #2 from rstoyanc...@yahoo.com --- I posted questions on the EG list (http://java.net/projects/websocket-spec/lists/jsr356-experts/archive/2013-03/message/41). Hopefully this get clarified in the spec. Either way it makes sense that ServerEndpointConfig types that are not public, concrete or have no public no-arg constructor should be ignored. -- 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: r1459972 - in /tomcat/trunk/java/org/apache/tomcat/websocket: Util.java WsRemoteEndpointImplBase.java pojo/PojoMethodMapping.java
Author: markt Date: Fri Mar 22 20:31:29 2013 New Revision: 1459972 URL: http://svn.apache.org/r1459972 Log: Automatically encode primitives and their object equivalents. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Util.java tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Util.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Util.java?rev=1459972&r1=1459971&r2=1459972&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/Util.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/Util.java Fri Mar 22 20:31:29 2013 @@ -217,4 +217,21 @@ public class Util { return null; } } + + +public static boolean isPrimitive(Class clazz) { +if (clazz.isPrimitive()) { +return true; +} else if(clazz.equals(Boolean.class) || +clazz.equals(Byte.class) || +clazz.equals(Character.class) || +clazz.equals(Double.class) || +clazz.equals(Float.class) || +clazz.equals(Integer.class) || +clazz.equals(Long.class) || +clazz.equals(Short.class)) { +return true; +} +return false; +} } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1459972&r1=1459971&r2=1459972&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Fri Mar 22 20:31:29 2013 @@ -419,6 +419,12 @@ public abstract class WsRemoteEndpointIm @SuppressWarnings({"unchecked", "rawtypes"}) public void sendObjectByCompletion(Object obj, SendHandler completion) { +if (Util.isPrimitive(obj.getClass())) { +String msg = obj.toString(); +sendStringByCompletion(msg, completion); +return; +} + Encoder encoder = findEncoder(obj); try { Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=1459972&r1=1459971&r2=1459972&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Fri Mar 22 20:31:29 2013 @@ -357,7 +357,7 @@ public class PojoMethodMapping { "pojoMethodMapping.duplicateMessageParam", m.getName(), m.getDeclaringClass().getName())); } -} else if (isPrimitive(types[i])) { +} else if (Util.isPrimitive(types[i])) { if (indexPrimitive == -1) { indexPrimitive = i; } else { @@ -497,23 +497,6 @@ public class PojoMethodMapping { } -private boolean isPrimitive(Class clazz) { -if (clazz.isPrimitive()) { -return true; -} else if(clazz.equals(Boolean.class) || -clazz.equals(Byte.class) || -clazz.equals(Character.class) || -clazz.equals(Double.class) || -clazz.equals(Float.class) || -clazz.equals(Integer.class) || -clazz.equals(Long.class) || -clazz.equals(Short.class)) { -return true; -} -return false; -} - - public MessageHandler getMessageHandler(Object pojo, Map pathParameters, Session session, EndpointConfig config) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1147 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1459946 Blamelist: kkolinko BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1459975 [2/2] - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/
Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestQueryTimeoutInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestQueryTimeoutInterceptor.java?rev=1459975&r1=1459974&r2=1459975&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestQueryTimeoutInterceptor.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestQueryTimeoutInterceptor.java Fri Mar 22 20:41:46 2013 @@ -14,40 +14,37 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.tomcat.jdbc.test; import java.sql.Connection; import java.sql.Statement; +import org.junit.Assert; +import org.junit.Test; + import org.apache.tomcat.jdbc.pool.interceptor.QueryTimeoutInterceptor; import org.apache.tomcat.jdbc.test.driver.Driver; - public class TestQueryTimeoutInterceptor extends DefaultTestCase { -public TestQueryTimeoutInterceptor(String name) { -super(name); -} - +@Test public void testTimeout() throws Exception { int timeout = 10; int withoutuser =10; int withuser = withoutuser; -this.init(); this.datasource.setMaxActive(withuser+withoutuser); this.datasource.setJdbcInterceptors(QueryTimeoutInterceptor.class.getName()+"(queryTimeout="+timeout+")"); this.datasource.setDriverClassName(Driver.class.getName()); this.datasource.setUrl("jdbc:tomcat:test"); Connection con = this.datasource.getConnection(); Statement st = con.createStatement(); -assertEquals(st.getClass().getName(),timeout,st.getQueryTimeout()); + Assert.assertEquals(st.getClass().getName(),timeout,st.getQueryTimeout()); st.close(); st = con.prepareStatement(""); -assertEquals(st.getClass().getName(),timeout,st.getQueryTimeout()); + Assert.assertEquals(st.getClass().getName(),timeout,st.getQueryTimeout()); st.close(); st = con.prepareCall(""); -assertEquals(st.getClass().getName(),timeout,st.getQueryTimeout()); + Assert.assertEquals(st.getClass().getName(),timeout,st.getQueryTimeout()); st.close(); con.close(); } Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java?rev=1459975&r1=1459974&r2=1459975&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSizePreservation.java Fri Mar 22 20:41:46 2013 @@ -19,24 +19,20 @@ package org.apache.tomcat.jdbc.test; import java.sql.Connection; import java.util.concurrent.atomic.AtomicInteger; -import junit.framework.TestCase; +import org.junit.Assert; +import org.junit.Test; import org.apache.tomcat.jdbc.pool.DataSource; import org.apache.tomcat.jdbc.pool.PoolConfiguration; import org.apache.tomcat.jdbc.test.driver.Driver; + /** - * - * @author Jeremy Norris * https://issues.apache.org/bugzilla/show_bug.cgi?id=50613 - * */ -public class TestSizePreservation extends TestCase { +public class TestSizePreservation { protected volatile DataSource ds = null; -public TestSizePreservation() { -} - private void initSimplePoolProperties() { PoolConfiguration p = new DefaultProperties(); ds = new org.apache.tomcat.jdbc.pool.DataSource(); @@ -71,6 +67,7 @@ public class TestSizePreservation extend ds.getPoolProperties().setRemoveAbandonedTimeout(1); } +@Test public void testSimple() throws Exception { initSimplePoolProperties(); common(); @@ -78,6 +75,7 @@ public class TestSizePreservation extend Driver.reset(); } +@Test public void testEvicting() throws Exception { initEvictingPool(); common(); @@ -122,7 +120,7 @@ public class TestSizePreservation extend threads[i].join(); } System.out.println("Pool size:"+ds.getPool().getSize()); -assertTrue("Size validity check: ", ds.getPool().getSize() >= 0); +Assert.assertTrue("Size validity check: ", ds.getPool().getSize() >= 0); } } Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryR
svn commit: r1459979 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TwoDataSources.java
Author: kkolinko Date: Fri Mar 22 20:47:21 2013 New Revision: 1459979 URL: http://svn.apache.org/r1459979 Log: Merged revision 1435760 from tomcat/trunk: Fix broken test (it has been broken for a long time) The timeout needs to be shorter than the sleep time so the connection is abandoned Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TwoDataSources.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1435760 Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TwoDataSources.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TwoDataSources.java?rev=1459979&r1=1459978&r2=1459979&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TwoDataSources.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TwoDataSources.java Fri Mar 22 20:47:21 2013 @@ -28,7 +28,7 @@ public class TwoDataSources extends Defa org.apache.tomcat.jdbc.pool.DataSource d1 = this.createDefaultDataSource(); org.apache.tomcat.jdbc.pool.DataSource d2 = this.createDefaultDataSource(); d1.setRemoveAbandoned(true); -d1.setRemoveAbandonedTimeout(10); +d1.setRemoveAbandonedTimeout(2); d1.setTimeBetweenEvictionRunsMillis(1000); d2.setRemoveAbandoned(false); Connection c1 = d1.getConnection(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459987 - in /tomcat/tc7.0.x/trunk: ./ test/javax/el/ test/org/apache/catalina/comet/ test/org/apache/catalina/filters/ test/org/apache/catalina/loader/ test/org/apache/jasper/runtime/ te
Author: kkolinko Date: Fri Mar 22 21:01:52 2013 New Revision: 1459987 URL: http://svn.apache.org/r1459987 Log: Merged revision 1402683 from tomcat/trunk: Use methods from JUnit 4 Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java tomcat/tc7.0.x/trunk/test/org/apache/jasper/runtime/TestPageContextImpl.java tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestNamingContext.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1402683 Modified: tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java?rev=1459987&r1=1459986&r2=1459987&view=diff == --- tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java (original) +++ tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java Fri Mar 22 21:01:52 2013 @@ -16,7 +16,7 @@ */ package javax.el; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1459987&r1=1459986&r2=1459987&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Fri Mar 22 21:01:52 2013 @@ -28,12 +28,11 @@ import javax.servlet.http.HttpServletReq import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import junit.framework.Assert; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.junit.Assert; import org.junit.Test; import org.apache.catalina.Context; Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java?rev=1459987&r1=1459986&r2=1459987&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java Fri Mar 22 21:01:52 2013 @@ -31,7 +31,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java?rev=1459987&r1=1459986&r2=1459987&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java Fri Mar 22 21:01:52 2013 @@ -37,12 +37,11 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import junit.framework.Assert; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; +import org.junit.Assert; import org.junit.Test; import org.apache.catalina.AccessLog; Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java?rev=1459987&r1=1459986&r2=1459987&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java Fri Mar 22 21:01:52 2013 @@ -26,7 +26,7 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import junit.framework.Assert; +import org.junit.Assert; imp
svn commit: r1459988 - in /tomcat/tc7.0.x/trunk: ./ res/checkstyle/checkstyle.xml
Author: kkolinko Date: Fri Mar 22 21:05:47 2013 New Revision: 1459988 URL: http://svn.apache.org/r1459988 Log: Merged revision 1435765 from tomcat/trunk: Enable checkstyle check that forbids use of JUnit 3 methods Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/res/checkstyle/checkstyle.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1435765 Modified: tomcat/tc7.0.x/trunk/res/checkstyle/checkstyle.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/checkstyle/checkstyle.xml?rev=1459988&r1=1459987&r2=1459988&view=diff == --- tomcat/tc7.0.x/trunk/res/checkstyle/checkstyle.xml (original) +++ tomcat/tc7.0.x/trunk/res/checkstyle/checkstyle.xml Fri Mar 22 21:05:47 2013 @@ -53,7 +53,9 @@ value="org.apache.catalina.startup.SimpleHttpClient.CRLF"/> - + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459996 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Author: kkolinko Date: Fri Mar 22 21:22:54 2013 New Revision: 1459996 URL: http://svn.apache.org/r1459996 Log: Changelog update for recent commits Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1459996&r1=1459995&r2=1459996&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Mar 22 21:22:54 2013 @@ -55,6 +55,27 @@ They eventually become mixed with the numbered issues. (I.e., numbered issues to not "pop up" wrt. others). --> + + + + +Document StatementCache interceptor. (kkolinko) + + +Fix minor threading issue in ConnectionPool. +(markt/kkolinko) + + + + + + +Convert remaining unit tests to JUnit 4 and enable Checkstyle rule +that forbids use of methods from JUnit 3. (markt/kkolinko) + + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1459999 - /tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Author: markt Date: Fri Mar 22 21:24:02 2013 New Revision: 145 URL: http://svn.apache.org/r145 Log: Need to generate a MessageHandler for primitives Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=145&r1=1459998&r2=145&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Fri Mar 22 21:24:02 2013 @@ -519,6 +519,10 @@ public class PojoMethodMapping { if (indexString != -1) { mh = new PojoMessageHandlerWholeText(pojo, m, session, config, params, indexString, false, indexSession); +} else if (indexPrimitive != -1) { +mh = new PojoMessageHandlerWholeText(pojo, m, session, +config, params, indexPrimitive, false, +indexSession); } else if (indexByteArray != -1) { mh = new PojoMessageHandlerWholeBinary(pojo, m, session, config, params, indexByteArray, true, indexSession, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1460004 - /tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Author: markt Date: Fri Mar 22 21:30:55 2013 New Revision: 1460004 URL: http://svn.apache.org/r1460004 Log: Need to set indexPrimitive for MessageHandler to be picked up Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=1460004&r1=1460003&r2=1460004&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Fri Mar 22 21:30:55 2013 @@ -472,6 +472,7 @@ public class PojoMethodMapping { indexBoolean != -1) { // The boolean we found is a payload, not an last flag indexPayload = indexBoolean; +indexPrimitive = indexBoolean; indexBoolean = -1; } if (indexPayload == -1) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1460006 - in /tomcat/tc7.0.x/trunk: ./ modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/ mo
Author: kkolinko Date: Fri Mar 22 21:33:35 2013 New Revision: 1460006 URL: http://svn.apache.org/r1460006 Log: Merged revision 1459769 from tomcat/trunk: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54732 Fix leak of statements in StatementCache interceptor. Based on patch by Bertrand Guay-Paquet (BZ 54732) / Patric Rufflar (BZ 54337) Added: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java - copied unchanged from r1459769, tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCounterInterceptor.java Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestStatementCache.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1459769 Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java?rev=1460006&r1=1460005&r2=1460006&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java Fri Mar 22 21:33:35 2013 @@ -245,11 +245,11 @@ public class StatementCache extends Stat removeStatement(proxy); } } -closed = true; -delegate = null; if (shouldClose) { super.closeInvoked(); } +closed = true; +delegate = null; } Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestStatementCache.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestStatementCache.java?rev=1460006&r1=1460005&r2=1460006&view=diff == --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestStatementCache.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestStatementCache.java Fri Mar 22 21:33:35 2013 @@ -16,6 +16,7 @@ */ package org.apache.tomcat.jdbc.test; +import java.lang.reflect.Proxy; import java.sql.Connection; import java.sql.PreparedStatement; @@ -23,7 +24,9 @@ import org.junit.After; import org.junit.Assert; import org.junit.Test; +import org.apache.tomcat.jdbc.pool.JdbcInterceptor; import org.apache.tomcat.jdbc.pool.interceptor.StatementCache; +import org.apache.tomcat.jdbc.pool.interceptor.StatementCounterInterceptor; public class TestStatementCache extends DefaultTestCase { @@ -108,6 +111,55 @@ public class TestStatementCache extends } @Test +public void testStatementClose1() throws Exception { +init(); +datasource.setJdbcInterceptors( +TestStatementCacheInterceptor.class.getName() ++ "(prepared=true,callable=false,max=1);" ++ StatementCounterInterceptor.class.getName()); +Connection con = datasource.getConnection(); +StatementCounterInterceptor counter = findInterceptor(con, StatementCounterInterceptor.class); +PreparedStatement ps1, ps2; + +ps1 = con.prepareStatement("select 1"); +Assert.assertEquals(1, counter.getActiveCount()); +ps1.close(); +Assert.assertEquals("Statement goes into cache, not closed", 1, counter.getActiveCount()); + +ps1 = con.prepareStatement("select 1"); +Assert.assertEquals("Reusing statement from cache", 1, counter.getActiveCount()); +ps2 = con.prepareStatement("select 1"); +Assert.assertEquals("Reusing statement from cache", 2, counter.getActiveCount()); + +ps2.close(); +Assert.assertEquals("Statement goes into cache, not closed", 2, counter.getActiveCount()); +ps1.close(); +// Cache has "max=1". The following tests BZ 54732. +Assert.assertEquals("Statement does not go into cache, closed", 1, counter.getActiveCount()); + +con.close(); +Assert.assertEquals("Connection returned to the pool. Statement is in cache", 1, counter.getActiveCount()); + +datasource.close(); +Assert.assertEquals("Pool cleared. All statements in cache are closed", 0, counter.getActiveCount()
[Bug 54732] StatementCache interceptor does not forward calls to Statement.close() which causes memory leaks
https://issues.apache.org/bugzilla/show_bug.cgi?id=54732 Konstantin Kolinko changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Konstantin Kolinko --- Fixed in Tomcat 7 by r1460006 and will be in 7.0.40. -- 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: r1460021 - /tomcat/trunk/build.xml
Author: markt Date: Fri Mar 22 22:00:30 2013 New Revision: 1460021 URL: http://svn.apache.org/r1460021 Log: Need additional packages to be in util JAR for websocket Modified: tomcat/trunk/build.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1460021&r1=1460020&r2=1460021&view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Fri Mar 22 22:00:30 2013 @@ -315,6 +315,8 @@ + + @@ -358,7 +360,10 @@ - + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1460023 - in /tomcat/trunk/java/org/apache/tomcat/websocket: LocalStrings.properties Util.java pojo/LocalStrings.properties pojo/PojoMessageHandlerWholeText.java pojo/PojoMethodMapping.ja
Author: markt Date: Fri Mar 22 22:01:21 2013 New Revision: 1460023 URL: http://svn.apache.org/r1460023 Log: More plumbing for handling primitives. Still some bits missing. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/Util.java tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerWholeText.java tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1460023&r1=1460022&r2=1460023&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Fri Mar 22 22:01:21 2013 @@ -15,6 +15,8 @@ backgroundProcessManager.processFailed=A background process failed +util.invalidType=Unable to coerce value [{0}] to type [{1}]. That type is not supported. + # Note the wsFrame.* messages are used as close reasons in WebSocket control # frames and therefore must be 123 bytes (not characters) or less in length. # Messages are encoded using UTF-8 where a single character may be encoded in Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Util.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Util.java?rev=1460023&r1=1460022&r2=1460023&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/Util.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/Util.java Fri Mar 22 22:01:21 2013 @@ -30,12 +30,16 @@ import javax.websocket.Decoder; import javax.websocket.Encoder; import javax.websocket.MessageHandler; +import org.apache.tomcat.util.res.StringManager; + /** * Utility class for internal use only within the * {@link org.apache.tomcat.websocket} package. */ public class Util { +private static final StringManager sm = +StringManager.getManager(Constants.PACKAGE_NAME); private static final Queue randoms = new ConcurrentLinkedQueue<>(); @@ -234,4 +238,31 @@ public class Util { } return false; } + + +public static Object coerceToType(Class type, String value) { +if (type.equals(String.class)) { +return value; +} else if (type.equals(boolean.class) || type.equals(Boolean.class)) { +return Boolean.valueOf(value); +} else if (type.equals(byte.class) || type.equals(Byte.class)) { +return Byte.valueOf(value); +} else if (value.length() == 1 && +(type.equals(char.class) || type.equals(Character.class))) { +return Character.valueOf(value.charAt(0)); +} else if (type.equals(double.class) || type.equals(Double.class)) { +return Double.valueOf(value); +} else if (type.equals(float.class) || type.equals(Float.class)) { +return Float.valueOf(value); +} else if (type.equals(int.class) || type.equals(Integer.class)) { +return Integer.valueOf(value); +} else if (type.equals(long.class) || type.equals(Long.class)) { +return Long.valueOf(value); +} else if (type.equals(short.class) || type.equals(Short.class)) { +return Short.valueOf(value); +} else { +throw new IllegalArgumentException(sm.getString( +"util.invalidType", value, type.getName())); +} +} } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties?rev=1460023&r1=1460022&r2=1460023&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/LocalStrings.properties Fri Mar 22 22:01:21 2013 @@ -22,7 +22,6 @@ pojoMethodMapping.duplicateLastParam=Mul pojoMethodMapping.duplicateMessageParam=Multiple message parameters present on the method [{0}] of class [{1}] that was annotated with OnMessage pojoMethodMapping.duplicatePongMessageParam=Multiple PongMessage parameters present on the method [{0}] of class [{1}] that was annotated with OnMessage pojoMethodMapping.duplicateSessionParam=Multiple session parameters present on the method [{0}] of class [{1}] that was annotated with OnMessage -pojoMethodMapping.invalidType=Unable to coerce value [{0}] to type [{1}]. That type is not supported. pojoMethodMapping.noPayload=No payload parameter p
[Bug 54745] New: Tomcat JarScanning does not work when Tomcat started with Java Web Start
https://issues.apache.org/bugzilla/show_bug.cgi?id=54745 Bug ID: 54745 Summary: Tomcat JarScanning does not work when Tomcat started with Java Web Start Product: Tomcat 8 Version: trunk Hardware: All OS: All Status: NEW Severity: major Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: nicho...@nicholaswilliams.net Classification: Unclassified Created attachment 30097 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30097&action=edit Patch to resolve issue As long as you correctly structure your JARs and call setParentClassLoader() with the current thread class loader on the Engine, Host, Server and Service, you can run Embedded Tomcat using Java Web Start. It's actually pretty neat. The only problem is that JarScanning doesn't work. In Java Web Start, all JAR URLs obtained from the class loader are the full http(s) URLs from where they were downloaded. Java has them cached locally, so accessing them is just as efficient because they're really coming from the local file system. However, the StandardJarScanner ignores JAR URLs that don't start with "file:" or "jndi:". This was an easy patch and everything else appears to still work normally. I propose that the patch be applied to trunk AND 7.0. -- 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 54745] Tomcat JarScanning does not work when Tomcat started with Java Web Start
https://issues.apache.org/bugzilla/show_bug.cgi?id=54745 Nick Williams changed: What|Removed |Added Attachment #30097|0 |1 is patch|| Attachment #30097|application/octet-stream|text/plain mime type|| -- 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 54740] Aggressive scan for ServerEndpointConfig
https://issues.apache.org/bugzilla/show_bug.cgi?id=54740 --- Comment #3 from rstoyanc...@yahoo.com --- Actually it appears that ServerEndpointConfig types should not be scanned at all. Here is an explanation by Danny on the EG: http://java.net/projects/websocket-spec/lists/jsr356-experts/archive/2013-03/message/14. So it can be considered a bug then in WsSci, which should check for Endpoint instead of ServerEndpointConfig as it does now. -- 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