DO NOT REPLY [Bug 47124] New: Run the unit tests as part of the build!!!
https://issues.apache.org/bugzilla/show_bug.cgi?id=47124 Summary: Run the unit tests as part of the build!!! Product: Tomcat 6 Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: mguille...@yahoo.fr Created an attachment (id=23565) -- (https://issues.apache.org/bugzilla/attachment.cgi?id=23565) Patch running the unit tests as part of the build The lack of unit tests is really a shame for a project like Tomcat! A few unit tests are available in the source code but first they are not run as part of the build process and second many of them fail. I've attached a patch to this issue that: - runs the existing unit tests as integral part of the build - renames some of the unit tests to have a consistent naming pattern for the unit tests (ie XTest) - makes a minimal cleanup The consequence is that the build fails with this patch as 11 of the 51 unit tests fail. My current knowledge of Tomcat doesn't allow me to decide if the failing tests should be simply removed or adapted. With feedback on this, I can provide a modified version of the patch. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: r769734 - /tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java
Filip Hanik - Dev Lists wrote: Mark Thomas wrote: Filip Hanik - Dev Lists wrote: As I mentioned in the bug report, what is the benefit of this? General best practise - no particular bug. Note the full proposed patch was bad. Bad practice would be to change an API, based on a report for general practice. It doesn't nothing but clutter the the SVN history for real bugs next time I will veto changes like this since what one considers best practice really merits to nothing, as it is a personal opinion and nothing technical. Then we disagree. I think encapsulation is a key element of good, modular software design with many technical arguments for its benefits. Whilst patches for bugs do have more immediate and obvious benefit, I don't think we should reject patches that improve the overall quality of the code, even if they don't fix actual bugs. I agree than when best practice gets as far as naming conventions, use of whitespace for indenting, line length and other coding style issues then you are into the realm of personal opinion and with a few notable exceptions (such as converting tabs to spaces) then there is little to be gained. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47059] Rewrite to use Enum
https://issues.apache.org/bugzilla/show_bug.cgi?id=47059 --- Comment #2 from Jens Kapitza j.kapi...@schwarze-allianz.de 2009-04-30 02:34:50 PST --- I think good points are: - make an easier switch - an enum is type secure -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: r770147 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: pero Date: Thu Apr 30 10:23:15 2009 New Revision: 770147 URL: http://svn.apache.org/viewvc?rev=770147view=rev Log: Cast my vote Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=770147r1=770146r2=770147view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Apr 30 10:23:15 2009 @@ -60,7 +60,7 @@ http://svn.apache.org/viewvc?rev=751289view=rev http://svn.apache.org/viewvc?rev=753039view=rev Make MemoryUserDatabase read-only by default - +1: markt, rjung + +1: markt, rjung, pero -1: * Backport cleanup of semantics of thisAccessedTime and @@ -115,14 +115,14 @@ * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46985 Clean up timeout handling http://svn.apache.org/viewvc?rev=763262view=rev - +1: markt + +1: markt, pero -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46990 Correct various sync issues reported by FindBugs Patch provided by s...@a.o http://svn.apache.org/viewvc?rev=763298view=rev - +1: markt, rjung + +1: markt, rjung, pero 0: remm (zzz) -1: @@ -130,20 +130,20 @@ Use correct link on error page in JSP security example Patch provided by Michael Moody http://svn.apache.org/viewvc?rev=763325view=rev - +1: markt, rjung + +1: markt, rjung, pero -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46909 Only include ';' in type attribute if there is a parameter http://svn.apache.org/viewvc?rev=763611view=rev - +1: markt, rjung + +1: markt, rjung, pero 0: remm (zzz) -1: * https://issues.apache.org/bugzilla/show_bug.cgi?id=46984 Invalid characters in HTTP request method should result in a 400 http://svn.apache.org/viewvc?rev=763654view=rev - +1: markt, rjung + +1: markt, rjung, pero -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42390 @@ -158,7 +158,7 @@ Use system property rather than hard code default http://svn.apache.org/viewvc?rev=764985view=rev http://svn.apache.org/viewvc?rev=764997view=rev - +1: markt, rjung + +1: markt, rjung, pero -0: remm: Why should this be backported ? -1: @@ -173,5 +173,5 @@ * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47046 Deregister all MBeans when the server is stopped http://svn.apache.org/viewvc?rev=769979view=rev - +1: markt + +1: markt, pero -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47059] Rewrite to use Enum
https://issues.apache.org/bugzilla/show_bug.cgi?id=47059 Mark Thomas ma...@apache.org changed: What|Removed |Added Severity|normal |enhancement --- Comment #1 from Mark Thomas ma...@apache.org 2009-04-30 02:21:28 PST --- Switching this to enhancement and I'm leaning towards a resolution of WONTFIX as I can't see any obvious benefits of this. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: r770169 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Author: markt Date: Thu Apr 30 11:29:03 2009 New Revision: 770169 URL: http://svn.apache.org/viewvc?rev=770169view=rev Log: JMX expects service name and engine name to be the same. Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=770169r1=770168r2=770169view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Thu Apr 30 11:29:03 2009 @@ -359,7 +359,7 @@ if(engine == null ) { getServer(); engine = new StandardEngine(); -engine.setName( default ); +engine.setName( Tomcat ); engine.setDefaultHost(hostname); service.setContainer(engine); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r770171 - /tomcat/trunk/build.xml
Author: markt Date: Thu Apr 30 11:38:25 2009 New Revision: 770171 URL: http://svn.apache.org/viewvc?rev=770171view=rev Log: Add an experimental embedded build target to use with o.a.c.startup.Tomcat Modified: tomcat/trunk/build.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=770171r1=770170r2=770171view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Thu Apr 30 11:38:25 2009 @@ -48,6 +48,7 @@ property name=tomcat.build value=${basedir}/output/build/ property name=tomcat.classesvalue=${basedir}/output/classes/ property name=tomcat.dist value=${basedir}/output/dist/ + property name=tomcat.embed value=${basedir}/output/embed/ property name=test.failonerror value=true/ property name=test.runner value=junit.textui.TestRunner/ @@ -81,6 +82,9 @@ property name=tomcat-dbcp.jar value=${tomcat-dbcp.home}/tomcat-dbcp.jar/ property name=jasper-jdt.jar value=${jasper-jdt.home}/jasper-jdt.jar/ + property name=tomcat-embed-core.jar value=${tomcat.embed}/tomcat-core.jar/ + property name=tomcat-embed-jasper.jar value=${tomcat.embed}/tomcat-jasper.jar/ + !-- Classpath -- path id=tomcat.classpath pathelement location=${ant.jar}/ @@ -242,7 +246,29 @@ include name=org/apache/el/** / /patternset - + !-- Pattern sets for embedded JARs -- + patternset id=files.tomcat-embed-core + patternset refid=files.annotations-api / +patternset refid=files.servlet-api / +patternset refid=files.el-api / +patternset refid=files.bootstrap / +patternset refid=files.tomcat-juli / +patternset refid=files.tomcat-api / +patternset refid=files.catalina / +patternset refid=files.tomcat-coyote / + /patternset + + patternset id=files.tomcat-embed-jasper +patternset refid=files.jsp-api / +patternset refid=files.jasper / +patternset refid=files.jasper-el / + /patternset + + !-- Pattern sets not included in embedded -- +!--patternset refid=files.catalina-tribes /-- +!--patternset refid=files.catalina-ha /-- +!--patternset refid=files.catalina-ant /-- + macrodef name=jarIt description=utility macro for standard JAR packaging attribute name=jarfile description=the name of the JAR file to create/ attribute name=filesId description=the patternset id of the files to use/ @@ -609,6 +635,24 @@ /target + target name=embed description=Create experimental embedded jars +depends=build-prepare,compile + +mkdir dir=${tomcat.embed} / + + copy file=${basedir}/LICENSE todir=${tomcat.embed} / +copy file=${basedir}/NOTICE todir=${tomcat.embed} / +copy file=${tomcat-dbcp.jar} todir=${tomcat.embed} + failonerror=false/ +copy file=${jasper-jdt.jar} todir=${tomcat.embed} / + + jarIt jarfile=${tomcat-embed-core.jar} + filesId=files.tomcat-embed-core/ +jarIt jarfile=${tomcat-embed-jasper.jar} + filesId=files.tomcat-embed-jasper/ + + /target + target name=clean-depend description=Clean depend src components delete dir=${tomcat-dbcp.home}/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 47131] New: Tomcat 5.5.23 stops listening to requests on SSL port
https://issues.apache.org/bugzilla/show_bug.cgi?id=47131 Summary: Tomcat 5.5.23 stops listening to requests on SSL port Product: Tomcat 5 Version: 5.5.23 Platform: PC OS/Version: Windows Server 2003 Status: NEW Severity: major Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: aki...@yahoo.co.uk The Tomcat connector is configured as below !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxHttpHeaderSize=8192 maxThreads=350 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / !-- Define a SSL HTTP/1.1 Connector on port 8443 -- Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true connectionTimeout=2 acceptCount=100 scheme=https secure=false proxyPort=443/ !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / The issue is that Tomcat stops listening on port 8443 after a while of running. This means no HTML is returned to end users browsers. I know this as I am getting a HTTP error code 502 from the apache 2.2.4 webserver that is proxying the request to Tomcat. The setup I have is that SSL is terminated at a load balancer and forwards the request to port 8443 to apache, which then proxy passes the request to Tomcat to port 8443 and then Tomcat passes this request to the content server on port 443 (as this is a secure request). One theory is that end users are abruptly terminating their session with Tomcat (by cancelling their secure requests or closing their browsers) and Tomcat is not closing the thread when this happens. Therefore running out of threads. I am not sure about this and need some way to prove it. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- 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: r770411 - in /tomcat/trunk/modules/jdbc-pool: doc/ java/org/apache/tomcat/jdbc/pool/ java/org/apache/tomcat/jdbc/pool/jmx/ test/org/apache/tomcat/jdbc/test/
Author: fhanik Date: Thu Apr 30 19:41:07 2009 New Revision: 770411 URL: http://svn.apache.org/viewvc?rev=770411view=rev Log: Add the following features - max age for a connection kept alive - an ability to reset the abandon timer when queries are executed - an abandoned test, abandon when a percentage of the pool has been utilized Added: tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/AbandonPercentageTest.java (with props) Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSource.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceFactory.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPoolMBean.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=770411r1=770410r2=770411view=diff == --- tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original) +++ tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Thu Apr 30 19:41:07 2009 @@ -73,6 +73,15 @@ that has over 200 source files(last time we checked), Tomcat jdbc has a core of 8 files, the connection pool itself is about half that. As bugs may occur, they will be faster to track down, and easier to fix. Complexity reduction has been a focus from inception./li liAsynchronous connection retrieval - you can queue your request for a connection and receive a Futurelt;Connectiongt; back./li + liBetter idle connection handling. Instead of closing connections directly, it can still pool connections and sizes the idle pool with a smarter algorithm./li + liYou can decide at what moment connections are considered abandoned, is it when the pool is full, or directly at a timeout + by specifying a threshold. + /li + liThe abandon connection timer will reset upon a statement/query activity. Allowing a connections that is in use for a long time to not timeout. + This is achieved using the ResetAbandonedTimer + /li + liClose connections after they have been connected for a certain time. Age based close upon return to the pool. + /li /ol /p @@ -338,6 +347,14 @@ as coderemoveAbandonedTimeout/code has been reached./p /attribute +attribute name=maxAge required=false + p(long) Time in milliseconds to keep this connection. When a connection is returned to the pool, + the pool will check to see if the codenow - time-when-connected maxAge/code has been reached, + and if so, it closes the connection rather than returning it to the pool. + The default value is code0/code, which implies that connections will be left open and no age check + will be done upon returning the connection to the pool./p +/attribute + attribute name=useEquals required=false p(boolean) Set to true if you wish the codeProxyConnection/code class to use codeString.equals/code instead of code==/code when comparing method names. This property does not apply to added interceptors as those are configured individually. Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=770411r1=770410r2=770411view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Thu Apr 30 19:41:07 2009 @@ -609,6 +609,17 @@ } } +protected boolean shouldClose(PooledConnection con, int action) { +if (con.isDiscarded()) return true; +if (isClosed()) return true; +if (!con.validate(action)) return true; +if (getPoolProperties().getMaxAge()0 ) { +return (System.currentTimeMillis()-con.getLastConnected()) getPoolProperties().getMaxAge(); +} else { +return false; +} +} + /** * Returns a connection to the pool * @param con PooledConnection @@ -626,8 +637,8 @@ con.lock(); if (busy.remove(con)) { -if ((!con.isDiscarded()) (!isClosed()) -
svn commit: r770514 - /tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml
Author: fhanik Date: Fri May 1 02:02:04 2009 New Revision: 770514 URL: http://svn.apache.org/viewvc?rev=770514view=rev Log: doco Modified: tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml 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=770514r1=770513r2=770514view=diff == --- tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml (original) +++ tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml Fri May 1 02:02:04 2009 @@ -52,6 +52,9 @@ liTomcat jdbc pool implements a fairness option not available in commons-dbcp and still performs faster than commons-dbcp/li liTomcat jdbc pool implements the ability retrieve a connection asynchronously, without adding additional threads to the library itself/li liTomcat jdbc pool is a Tomcat module, it depends on Tomcat JULI, a simplified logging framework used in Tomcat./li + liRetrieve the underlying connection using the javax.sql.PooledConnection interface./li + liStarvation proof. If a pool is empty, and threads are waiting for a connection, when a connection is returned, + the pool will awake the correct thread waiting. Most pools will simply starve./li /ol /p - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r770525 - in /tomcat/trunk/modules/jdbc-pool: build.xml sign.sh
Author: fhanik Date: Fri May 1 03:40:28 2009 New Revision: 770525 URL: http://svn.apache.org/viewvc?rev=770525view=rev Log: Prepare for next build Modified: tomcat/trunk/modules/jdbc-pool/build.xml tomcat/trunk/modules/jdbc-pool/sign.sh Modified: tomcat/trunk/modules/jdbc-pool/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.xml?rev=770525r1=770524r2=770525view=diff == --- tomcat/trunk/modules/jdbc-pool/build.xml (original) +++ tomcat/trunk/modules/jdbc-pool/build.xml Fri May 1 03:40:28 2009 @@ -23,7 +23,7 @@ !-- See build.properties.sample in the top level directory for all -- property name=version.major value=1 / property name=version.minor value=0 / - property name=version.build value=1 / + property name=version.build value=2 / property name=version.patch value= / property name=version value=${version.major}.${version.minor}.${version.build}${version.patch} / !-- property values you must customize for successful building!!!-- Modified: tomcat/trunk/modules/jdbc-pool/sign.sh URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/sign.sh?rev=770525r1=770524r2=770525view=diff == --- tomcat/trunk/modules/jdbc-pool/sign.sh (original) +++ tomcat/trunk/modules/jdbc-pool/sign.sh Fri May 1 03:40:28 2009 @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION=v1.0.1 +VERSION=v1.0.2 for i in $(find output/release/$VERSION -name *.zip -o -name *.tar.gz); do echo Signing $i echo $1|gpg --passphrase-fd 0 -a -b $i - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r770526 - /tomcat/tags/JDBC_POOL_1_0_2/
Author: fhanik Date: Fri May 1 03:42:59 2009 New Revision: 770526 URL: http://svn.apache.org/viewvc?rev=770526view=rev Log: 2nd tag for the pool code Added: tomcat/tags/JDBC_POOL_1_0_2/ (props changed) - copied from r770525, tomcat/trunk/modules/jdbc-pool/ Propchange: tomcat/tags/JDBC_POOL_1_0_2/ -- svn:mergeinfo = /tomcat/tc6.0.x/trunk/modules/jdbc-pool:742915 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org