svn commit: r1144785 - in /tomcat/trunk: java/org/apache/coyote/AbstractProtocol.java test/org/apache/catalina/mbeans/TestRegistration.java webapps/docs/changelog.xml
Author: rjung Date: Sun Jul 10 06:53:36 2011 New Revision: 1144785 URL: http://svn.apache.org/viewvc?rev=1144785view=rev Log: Fix regression producing invalid MBean names when using IPV6 addresses for connectors. - revert r1135088 - remove the surrounding quotes only when passing the name to the endpoint, so they don't end up in the middle of thread names. The thread names are used as MBean attribute values, but not in MBean names. Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1144785r1=1144784r2=1144785view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Sun Jul 10 06:53:36 2011 @@ -233,8 +233,7 @@ public abstract class AbstractProtocol i name.append('-'); } name.append(endpoint.getPort()); -String quotedName = ObjectName.quote(name.toString()); -return quotedName.substring(1, quotedName.length()-1); +return ObjectName.quote(name.toString()); } @@ -363,7 +362,8 @@ public abstract class AbstractProtocol i getHandler().getGlobal(), rgOname, null ); } -endpoint.setName(getName()); +String endpointName = getName(); +endpoint.setName(endpointName.substring(1, endpointName.length()-1)); try { endpoint.init(); Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=1144785r1=1144784r2=1144785view=diff == --- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java (original) +++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Sun Jul 10 06:53:36 2011 @@ -80,10 +80,10 @@ public class TestRegistration extends To private static String[] connectorMBeanNames(String port, String type) { return new String[] { Tomcat:type=Connector,port= + port, -Tomcat:type=GlobalRequestProcessor,name=http- + type + - + port, +Tomcat:type=GlobalRequestProcessor,name=\http- + type + - + port + \, Tomcat:type=Mapper,port= + port, Tomcat:type=ProtocolHandler,port= + port, -Tomcat:type=ThreadPool,name=http- + type + - + port, +Tomcat:type=ThreadPool,name=\http- + type + - + port + \, }; } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144785r1=1144784r2=1144785view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 06:53:36 2011 @@ -64,6 +64,10 @@ Correct regression introduced in 7.0.17 that triggered 400 entries in the AccessLog when using the AJP/BIO connector. (markt) /fix + fix +Fix regression producing invalid MBean names when using IPV6 +addresses for connectors. (rjung) + /fix /changelog /subsection subsection name=Cluster - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat Connectors [2011/07/10]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |34526|Opn|Nor|2005-04-19|Truncated content in decompressed requests from mo| |35959|Opn|Enh|2005-08-01|mod_jk not independant of UseCanonicalName| |39967|Inf|Nor|2006-07-05|mod_jk gives segmentation fault when apache is sta| |40208|Inf|Nor|2006-08-08|Request-Dump when ErrorDocument in httpd.conf is a| |42366|Inf|Nor|2007-05-09|Memory leak in newer mod_jk version when connectio| |43303|New|Enh|2007-09-04|Versioning under Windows not reported by many conn| |43968|New|Enh|2007-11-26|[patch] support ipv6 with mod_jk | |44290|New|Nor|2008-01-24|mod_jk/1.2.26: retry is not useful for an importan| |44349|New|Maj|2008-02-04|mod_jk/1.2.26 module does not read worker.status.s| |44379|New|Enh|2008-02-07|convert the output of strftime into UTF-8 | |44454|New|Nor|2008-02-19|busy count reported in mod_jk inflated, causes inc| |44571|New|Enh|2008-03-10|Limits busy per worker to a threshold | |45063|New|Nor|2008-05-22|JK-1.2.26 IIS ISAPI filter issue when running diff| |45313|New|Nor|2008-06-30|mod_jk 1.2.26 apache 2.2.9 static compiled on so| |45395|New|Min|2008-07-14|MsgAjp dump method does not dump packet when being| |46337|New|Nor|2008-12-04|real worker name is wrong | |46406|New|Enh|2008-12-16|Supporting relative paths in isapi_redirect.proper| |46676|New|Enh|2009-02-09|Configurable test request for Watchdog thread | |46767|New|Enh|2009-02-25|mod_jk to send DECLINED in case no fail-over tomca| |47038|New|Enh|2009-04-15|USE_FLOCK_LK redefined compiler warning when using| |47327|New|Enh|2009-06-07|remote_user not logged in apache logfile | |47617|New|Enh|2009-07-31|include time spent doing ajp_get_endpoint() in err| |47678|New|Cri|2009-08-11|Unable to allocate shared memory when using isapi_| |47714|New|Cri|2009-08-20|Reponse mixed between users | |47750|New|Maj|2009-08-27|Loss of worker settings when changing via jkstatus| |47795|New|Maj|2009-09-07|service sticky_session not being set correctly wit| |47840|Inf|Min|2009-09-14|A broken worker name is written in the log file. | |48191|New|Maj|2009-11-13|Problem with mod_jk 1.2.28 - Can not render up the| |48460|New|Nor|2009-12-30|mod_proxy_ajp document has three misleading portio| |48490|New|Nor|2010-01-05|Changing a node to stopped in uriworkermap.propert| |48513|New|Enh|2010-01-09|IIS Quick setup instructions | |48564|New|Nor|2010-01-18|Unable to turn off retries for LB worker | |48830|New|Nor|2010-03-01|IIS shutdown blocked in endpoint service when serv| |48891|Opn|Enh|2010-03-11|Missing EOL-style settings in tomcat/jk/trunk | |49035|New|Maj|2010-04-01|data lost when post a multipart/form-data form| |49048|New|Nor|2010-04-05|ACL not applied to redirect URLs | |49063|New|Enh|2010-04-07|Please add JkStripSession status in jk-status work| |49135|New|Enh|2010-04-16|SPDY Connector for The Tomcat | |49413|Opn|Reg|2010-06-09|Apache Mod_jk 1.2.30 is shutting down communicatio| |49469|New|Enh|2010-06-19|Workers status page has negative number of connect| |49732|Opn|Nor|2010-08-10|reply_timeout can't wait forever. | |49822|New|Enh|2010-08-25|Add hash lb worker method | |49903|New|Enh|2010-09-09|Make workers file reloadable | |50186|New|Nor|2010-10-31|Wrong documentation of connection_pool_timeout / c| |50233|New|Cri|2010-11-08|support long URLs (more than 2048)| |50385|New|Trv|2010-11-30|There's a Spanish Inquisition error in the documen| |50511|Inf|Nor|2010-12-22|WARNING about Internal Dummy Connection of Apache | |50694|New|Nor|2011-01-31|ModJK NSAPI inserted headers case sensitivity issu| |51235|Inf|Maj|2011-05-20|Access Violation in httpd.exe originating in mod_j| |51253|New|Nor|2011-05-24|use_server_errors for status 401 does not forward | |51261|New|Nor|2011-05-25|JK cannt support ipv6 |
Bug report for Tomcat 6 [2011/07/10]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |41679|New|Enh|2007-02-22|SemaphoreValve should be able to filter on url pat| |41883|Ass|Enh|2007-03-18|use abstract wrapper instead of plain X509Certific| |43001|New|Enh|2007-07-30|JspC lacks setMappedFile and setDie for use in Ant| |43400|New|Enh|2007-09-14|enum support for tag libs | |43548|Opn|Enh|2007-10-04|xml schema for tomcat-users.xml | |43682|New|Enh|2007-10-23|JULI: web-inf/classes/logging.properties to suppor| |43742|New|Enh|2007-10-30|.tag compiles performed one at a time -- extremel| |43979|New|Enh|2007-11-27|Add abstraction for Java and Classfile output | |44199|New|Enh|2008-01-10|expose current backlog queue size | |44225|New|Enh|2008-01-14|SSL connector tries to load the private keystore f| |44264|New|Enh|2008-01-18|Clustering - Support for disabling multicasting an| |44284|New|Enh|2008-01-23|Support java.lang.Iterable in c:forEach tag | |44294|New|Enh|2008-01-25|Support for EL functions with varargs | |44312|New|Enh|2008-01-28|Warn when overwritting docBase of the default Host| |44645|New|Enh|2008-03-20|[Patch] JNDIRealm - Doesn't support JNDI java.nam| |44787|New|Enh|2008-04-09|provide more error context on java.lang.IllegalSt| |44818|New|Enh|2008-04-13|tomcat hangs with GET when content-length is defin| |45014|New|Enh|2008-05-15|Request and Response classes should have wrappers | |45282|New|Enh|2008-06-25|NioReceiver doesn't close cleanly, leaving sockets| |45283|Opn|Enh|2008-06-25|Provide a JSR196 implementation | |45428|New|Enh|2008-07-18|warn if the tomcat stop doesn't complete | |45832|New|Enh|2008-09-18|add DIGEST authentication support to Ant tasks| |45871|New|Enh|2008-09-23|Support for salted and digested patches in DataSou| |45878|New|Enh|2008-09-24|Generated jars do not contain proper manifests or | |45879|Opn|Enh|2008-09-24|Windows installer fails to install NOTICE and RELE| |45931|Opn|Enh|2008-10-01|trimSpaces incorrectly modifies output| |45995|New|Enh|2008-10-13|RFE - MIME type extension not case sensitive | |46173|New|Enh|2008-11-09|Small patch for manager app: Setting an optional c| |46263|New|Enh|2008-11-21|Tomcat reloading of context does not update contex| |46264|New|Enh|2008-11-21|Shutting down tomcat with large number of contexts| |46284|New|Enh|2008-11-24|Add flag to DeltaManager that blocks processing cl| |46350|New|Enh|2008-12-05|Maven repository should contain source bundles| |46497|New|Enh|2009-01-08|Install Tomcat Deployer/ANT on Windows Platform | |46655|New|Enh|2009-02-03|keystore's password handler | |46727|New|Enh|2009-02-17|DefaultServlet - serving multiple encodings | |46902|New|Enh|2009-03-24|LoginValve to bypass restrictions of j_security_ch| |47214|New|Enh|2009-05-17|Inner classes that are explicitly referenced - sho| |47230|New|Enh|2009-05-21|Include sample cert attributes for SSL connectors | |47242|New|Enh|2009-05-22|request for AJP command line client | |47281|New|Enh|2009-05-28|Efficiency of the JDBCStore | |47407|New|Enh|2009-06-23|HttpSessionListener doesn't operate in the session| |47467|New|Enh|2009-07-02|Deployment of the war file by URL when contextpath| |47785|Opn|Enh|2009-09-04|Cluster MBean not registered | |47834|New|Enh|2009-09-14|TldConfig throws Exception when exploring unpacked| |47880|New|Enh|2009-09-20|Lack of +x permissions on script files results cry| |47919|New|Enh|2009-09-30|Log Tomcat Java environment variables in additio| |48543|New|Enh|2010-01-14|[Patch] More flexibility in specifying -Dcatalina.| |48600|Opn|Enh|2010-01-22|Performance issue with tags | |48672|New|Enh|2010-02-03|Tomcat Virtual Host Manager (/host-manager) have b| |48674|New|Enh|2010-02-03|Tomcat Virtual Host Manager application doesn't pe| |48743|New|Enh|2010-02-15|Make the SLEEP variable in catalina.sh settable fr|
Bug report for Tomcat 5 [2011/07/10]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |28039|Opn|Enh|2004-03-30|Cluster Support for SingleSignOn | |33262|Opn|Enh|2005-01-27|Service Manager autostart should check for adminis| |36362|New|Nor|2005-08-25|missing check for Java reserved keywords in tag fi| |36837|Inf|Enh|2005-09-28|Looking for ProxyHandler implementation of Http re| |38216|Inf|Enh|2006-01-10|Extend Jmxproxy to allow call of MBean Operations | |40402|New|Enh|2006-09-03|Manager should display Exceptions | |40510|New|Enh|2006-09-14|installer does not create shortcuts for all users | |40728|New|Enh|2006-10-11|Catalina MBeans use non-serializable classes | |40766|New|Enh|2006-10-16|Using an unsecure jsessionid with mod_proxy_ajp ov| |40881|Opn|Enh|2006-11-02|Unable to receive message through TCP channel - | |41007|Opn|Enh|2006-11-20|Can't define customized 503 error page| |41179|New|Enh|2006-12-15|400 Bad Request response during auto re-deployment| |41227|Opn|Enh|2006-12-21|When the jasper compiler fails to compile a JSP, i| |41498|New|Enh|2007-01-30|allRolesMode Realm configuration option not docume| |41673|New|Enh|2007-02-21|Jasper output the message of compiling error using| |41697|Ver|Enh|2007-02-25|make visible in debug output if charset from brows| |41709|Inf|Enh|2007-02-26|When calling the API that relates to the buffer af| |41718|New|Enh|2007-02-27|Status 302 response to GET request has no body whe| |43866|New|Enh|2007-11-14|add support for session attribute propagation with| |43925|Opn|Enh|2007-11-21|org.apache.jasper.runtime.BodyContentImpl causing | |43991|New|Enh|2007-11-29|Contributing a URLResourceFactory | |44216|New|Enh|2008-01-11|Don't reuse session ID even if emptySessionPath=tr| |44904|New|Enh|2008-04-29|Provide warning message when DataSource's maxActiv| |45052|New|Enh|2008-05-21|Provide read only access for certain role in Manag| |45882|New|Enh|2008-09-24|Ensure all jars have full manifests and N L file| |46252|New|Enh|2008-11-20|Tomcat access log doesn't support Unicode | |47203|New|Enh|2009-05-15|Make JMXAdaptorLifecycleListener Java 1.4 compatib| |48717|Opn|Reg|2010-02-09|Session listeners not called on cluster node start| |48997|New|Enh|2010-03-26|enhance ssl-howto documentation | |50744|Opn|Maj|2011-02-09|When Tomcat was updated from version 5.5.27 to 5.5| |51042|New|Nor|2011-04-08|HttpSessionListener.sessionCreated() is called a s| |51073|New|Maj|2011-04-16|Misconfigured SSLProtocol with an AprEndpoint sile| |51473|New|Nor|2011-07-05|SecurityConfig?set package.definition security p| +-+---+---+--+--+ | Total 33 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Taglibs [2011/07/10]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |38193|Ass|Enh|2006-01-09|[RDC] BuiltIn Grammar support for Field | |38600|Ass|Enh|2006-02-10|[RDC] Enable RDCs to be used in X+V markup (X+RDC)| |42413|New|Enh|2007-05-14|[PATCH] Log Taglib enhancements | |46052|New|Nor|2008-10-21|SetLocaleSupport is slow to initialize when many l| |48333|New|Enh|2009-12-02|TLD generator | |50825|New|Nor|2011-02-24|Site still has links to Jakarta for mailing lists | |51234|New|Nor|2011-05-20|NumberFormatException in fmt:formatNumber tag | |51382|New|Maj|2011-06-15|Link to download pages are broken | +-+---+---+--+--+ | Total8 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat 7 [2011/07/10]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |10021|New|Enh|2002-06-19|Include upgrade option in installer | |16579|New|Enh|2003-01-30|documentation page layout/style breaks wrapping to| |18500|New|Enh|2003-03-30|Host aliases to match by regular expression (trivi| |39740|Opn|Enh|2006-06-07|semi-colon ; isn't allowed as a query argument sep| |48358|Opn|Enh|2009-12-09|JSP-unloading reloaded| |48550|Inf|Enh|2010-01-14|Update examples and default server.xml to use UTF-| |48892|New|Enh|2010-03-11|Use URIEncoding from server.xml for decoding post | |49122|Opn|Enh|2010-04-14|Update of ROOT application index.html | |49290|New|Enh|2010-05-14|Using a JarScanner with scanAllDirectories=true ca| |49395|New|Enh|2010-06-06|manager.findLeaks : display the date when the leak| |49589|New|Enh|2010-07-12|Tag handlers with constant attribute values are al| |49591|New|Enh|2010-07-13|Custom error page always uses Transfer-Encoding: c| |49683|New|Enh|2010-08-01|Separate keep-alive and connection timeout with AP| |49785|New|Enh|2010-08-19|Enabling TLS for JNDIRealm| |49821|New|Enh|2010-08-25|Tomcat CLI| |50019|New|Enh|2010-09-28|Adding JNDI lookup-name support In XML and Resou| |50175|New|Enh|2010-10-28|Enhance memory leak detection by selectively apply| |50234|New|Enh|2010-11-08|JspC use servlet 3.0 features | |50504|New|Enh|2010-12-21|Allow setting query string character set trough re| |50570|New|Enh|2011-01-11|Allow explicit use of FIPS mode in APR lifecycle l| |50670|New|Enh|2011-01-27|Tribes | RpcChannel | Add option to specify extern| |50923|New|Enh|2011-03-13|Difficult to pick out valid values from config des| |50949|New|Enh|2011-03-20|Allow configuration of service name, AJP port, ser| |51181|New|Enh|2011-05-10|Add support for Web Sockets | |51195|New|Enh|2011-05-13|Find leaks reports a false positive memory/class| |51334|New|Enh|2011-06-07|Web SSO support based on WS-Federation Passive Req| |51408|Opn|Enh|2011-06-21|String.getBytes() and new String(byte[]) use defau| |51423|Inf|Enh|2011-06-23|[Patch] to add a path and a version parameters to | |51463|New|Enh|2011-07-01|Tomcat.setBaseDir (package org.apache.catalina.st| |51477|Opn|Enh|2011-07-05|Support all protocol combinations in SSLProtocol o| |51490|New|Min|2011-07-08|if.jsp has many bugs and c:if example not useful | |51494|New|Min|2011-07-10|NPE in StandardContextValve.invoke() when a webapp| +-+---+---+--+--+ | Total 32 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat Native [2011/07/10]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |45392|New|Nor|2008-07-14|No OCSP support for client SSL verification | |46179|Opn|Maj|2008-11-10|apr ssl client authentication | |48655|Inf|Nor|2010-02-02|Active multipart downloads prevent tomcat shutdown| |49038|Inf|Nor|2010-04-02|Crash in tcnative | |49595|New|Cri|2010-07-15|Tomcat crashes in tcnative-1.dll frequently | |50394|Opn|Nor|2010-12-01|InternalAprInputBuffer.fill() doesn't deal correct| |51056|New|Nor|2011-04-13|Disable / drop support for SSLv2 | +-+---+---+--+--+ | Total7 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Bug report for Tomcat Modules [2011/07/10]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=Critical REG=Regression MAJ=Major | | | | MIN=Minor NOR=NormalENH=Enhancement TRV=Trivial | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | |48240|New|Nor|2009-11-19|Tomcat-Lite missing @Override markers | |48268|New|Nor|2009-11-23|Patch to fix generics in tomcat-lite | |48861|New|Nor|2010-03-04|Files without AL headers | |49685|New|Nor|2010-08-02|Unsafe synchronization in class ManagedBean | |49686|New|Nor|2010-08-02|Using an instance lock to protect static shared da| |49953|Opn|Nor|2010-09-17|Missing @Override annotations | |50565|New|Min|2011-01-10|Static variables should be accessed in a static wa| |50566|New|Nor|2011-01-10|Duplicate assignment to connection variable | |50571|Inf|Nor|2011-01-11|Tomcat 7 JDBC connection pool exception enhancemen| |50660|New|Min|2011-01-26|Improve validationQuery error handling| |50860|New|Nor|2011-03-03|In case of invalid or empty slqQuery connection ar| |50864|New|Nor|2011-03-03|Reconfigure pool on the fly using JMX | |51139|New|Nor|2011-05-01|Possible bug in code related to validatorClassNam| |51198|New|Nor|2011-05-13|Trunk Version : Performance enhancement in Connect| |51237|New|Nor|2011-05-20|SlowQueryReport interceptor does not log anything | |51388|New|Enh|2011-06-16|SlowQueryReport should respect Statement.getQueryT| +-+---+---+--+--+ | Total 16 bugs | +---+ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.18
On 07.07.2011 12:10, Mark Thomas wrote: The proposed Apache Tomcat 7.0.18 release is now available for voting. It can be obtained from: http://people.apache.org/~markt/dev/tomcat-7/v7.0.18/ The svn tag is: http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_18/ The proposed 7.0.18 release is: [X] Broken - do not release [ ] Alpha - go ahead and release as 7.0.18 Alpha [ ] Beta - go ahead and release as 7.0.18 Beta [ ] Stable - go ahead and release as 7.0.18 Stable Broken for three resons: - regression introduced by me (r1135088) as noted by Konstantin. Happens when IPV6 address attributes are used in Connectors. Sorry about that. Should be fixed in r1144785 - AJP connection reuse is broken. I do no longer see persistent AJP connections being used for BIO and NIO. IMHO it is a critical feature. - the problem with the additional 400 entries in the AccessLog for each AJP request. Happens only for BIO. IMHO it is also not acceptable. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1135088 - in /tomcat/trunk: java/org/apache/coyote/AbstractProtocol.java webapps/docs/changelog.xml
On 06.07.2011 10:07, Konstantin Kolinko wrote: 2011/7/6 Rainer Jung rainer.j...@kippdata.de: Hi Konstantin, On 06.07.2011 08:03, Konstantin Kolinko wrote: 1. JavaDoc for the method has to be updated. It still says that the name is quoted. Will fix. 2. If I understand correctly, the name _is_ used directly, in AbstractConnectionHandler.register(): ... ,worker= + getProtocol().getName() + ,name= ... It is used in ObjectNames, but only as a substring, not as a *full* Objectname. That's why I left the quoting in the sense of ObjectName.quote() in there, which might replace some special characters, and only stripped the surrounding quotes from the result. An exaple for the resultig ObjectName is: Catalina:type=RequestProcessor,worker=http-bio-8080,name=HttpRequest1 instead of Catalina:type=RequestProcessor,worker=http-bio-8080,name=HttpRequest1 and MBeanUtils.destroyMBean(Connector,Service) worker = ((**Protocol)*).getName() new ObjectName(domain + :type=RequestProcessor,worker= + worker + ,*) So if quotes are to be removed, let's do before appending the -exec- suffix to them. That's what should already happen. From JMX: workerThreadName: http-bio-8080-exec-1 Thread names from thread dump: ajp-bio-8009-AsyncTimeout ajp-bio-8009-Acceptor-0 http-bio-8080-AsyncTimeout http-bio-8080-Acceptor-0 etc. The name is passed to Endpoint (AbstractEndpoint.setName()) and the -exec- suffix is added in AbstractEndpoint.createExecutor(). There are also other suffixes elsewhere (-Poller-, -CometPoller-), ... Maybe you misinterpreted the multiple use of the word quote. We still quote in the sense of escaping some chars in the name if it wouldn't be allowed in an ObjectName. We no longer quote in the sense of surrounding the name with quotes. So all names derived from getName() should be fine now. Thank you for the explanation. From ObjectName javadoc: http://download.oracle.com/javase/1.5.0/docs/api/javax/management/ObjectName.html [[[ Each value associated with a key is a string of characters that is either unquoted or quoted. An unquoted value is a possibly empty string of characters which may not contain any of the characters comma, equals, colon, quote, asterisk, or question mark. A quoted value consists of a quote (), followed by a possibly empty string of characters, followed by another quote.(...) ]]] So it looks like the quotes should be used when building a name from parts. Regarding the name itself - it may contains address, and address may contain a colon (':') if it is an ip6 address. That will require quoting as a colon cannot be present in an unquoted name. To complete this discussion in case someone reads the thread in the future: yes you were right. The change broke use of IPV6 addresses in the Connector. I reverted r1135088 and only removed the surrounding quotes from the endpoint name in r1144785. This will also remove them from the thread names, were they were annoying because of there placement in the middle of the names. Thread names are up to now not part of MBean names, only MBean attribute values, so this should be save. Sorry for not having checked this more carefully. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Sporadic failures in TestCometProcessor
I get sporadic failures in TestCometProcessor for NIO. They are due to the Servlet reading two or more of the PING tokens during a single read event call. The loop while (is.available() 0) { is.read(); count ++; } then e.g. consumes PINGPING instead of PING and writes back READ: 8 bytes. Is this an error in the test case, e.g. if the chunks come in quickly enough is it OK, that they might get combined into a single read event? If so, we might want to add a little sleep in between sending the PING lines. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144802 - in /tomcat/trunk: build.properties.default build.xml test/org/apache/catalina/mbeans/TestRegistration.java test/org/apache/catalina/startup/TomcatBaseTest.java webapps/docs/chan
Author: rjung Date: Sun Jul 10 10:10:33 2011 New Revision: 1144802 URL: http://svn.apache.org/viewvc?rev=1144802view=rev Log: Add option test.accesslog to activate AccessLog for unit tests. Modified: tomcat/trunk/build.properties.default tomcat/trunk/build.xml tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1144802r1=1144801r2=1144802view=diff == --- tomcat/trunk/build.properties.default (original) +++ tomcat/trunk/build.properties.default Sun Jul 10 10:10:33 2011 @@ -38,7 +38,10 @@ execute.test.bio=true execute.test.nio=true # Still requires APR/native library to be present execute.test.apr=true +# Stop testing if a failure occurs test.haltonfailure=false +# Activate AccessLog during testing +test.accesslog=false # Workaround against http://bugs.sun.com/view_bug.do?bug_id=6202721 test.jvmarg.egd=-Djava.security.egd=file:/dev/./urandom Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1144802r1=1144801r2=1144802view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Sun Jul 10 10:10:33 2011 @@ -1102,6 +1102,7 @@ sysproperty key=tomcat.test.temp value=${test.temp} / sysproperty key=tomcat.test.tomcatbuild value=${tomcat.build} / sysproperty key=tomcat.test.protocol value=@{protocol} / +sysproperty key=tomcat.test.accesslog value=${test.accesslog} / formatter type=plain usefile=true extension=@{extension}/ Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=1144802r1=1144801r2=1144802view=diff == --- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java (original) +++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Sun Jul 10 10:10:33 2011 @@ -59,6 +59,16 @@ public class TestRegistration extends To }; } +private String[] optionalMBeanNames(String host, String context) { +if (isAccessLogEnabled()) { +return new String[] { +Tomcat:type=Valve,host= + host + ,name=AccessLogValve, +}; +} else { +return new String[] { }; +} +} + private static String[] contextMBeanNames(String host, String context) { return new String[] { Tomcat:j2eeType=WebModule,name=// + host + context + @@ -131,6 +141,7 @@ public class TestRegistration extends To expected.addAll(Arrays.asList(hostMBeanNames(localhost))); expected.addAll(Arrays.asList(contextMBeanNames(localhost, contextName))); expected.addAll(Arrays.asList(connectorMBeanNames(Integer.toString(getPort()), protocol))); +expected.addAll(Arrays.asList(optionalMBeanNames(localhost, contextName))); // Did we find all expected MBeans? ArrayListString missing = new ArrayListString(expected); Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1144802r1=1144801r2=1144802view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Sun Jul 10 10:10:33 2011 @@ -38,6 +38,7 @@ import org.apache.catalina.LifecycleStat import org.apache.catalina.connector.Connector; import org.apache.catalina.core.AprLifecycleListener; import org.apache.catalina.core.StandardServer; +import org.apache.catalina.valves.AccessLogValve; import org.apache.tomcat.util.buf.ByteChunk; /** @@ -47,6 +48,7 @@ import org.apache.tomcat.util.buf.ByteCh public abstract class TomcatBaseTest extends TestCase { private Tomcat tomcat; private File tempDir; +private boolean accessLogEnabled = false; private static int port = 8000; public static final String TEMP_DIR = System.getProperty(java.io.tmpdir); @@ -92,6 +94,13 @@ public abstract class TomcatBaseTest ext output/build)); } +/** + * Sub-classes may want to check, whether an AccessLogValve is active + */ +public boolean isAccessLogEnabled() { +return accessLogEnabled; +} + @Override public void setUp() throws Exception { // Need to use JULI so log messages from the tests are visible @@ -144,6 +153,15 @@
Re: Sporadic failures in TestCometProcessor
On 10/07/2011 10:28, Rainer Jung wrote: I get sporadic failures in TestCometProcessor for NIO. They are due to the Servlet reading two or more of the PING tokens during a single read event call. The loop while (is.available() 0) { is.read(); count ++; } then e.g. consumes PINGPING instead of PING and writes back READ: 8 bytes. Is this an error in the test case, e.g. if the chunks come in quickly enough is it OK, that they might get combined into a single read event? If so, we might want to add a little sleep in between sending the PING lines. There is already a 1000ms sleep between sending the PINGs. That should be enough to keep them separate. Have you always seen these since that test was introduced or is this something new? As an aside, I have noticed that running the unit tests on a heavily loaded box can trigger various timing related failures. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51494] NPE in StandardContextValve.invoke() when a webapp is redeployed while a request is still being processed
https://issues.apache.org/bugzilla/show_bug.cgi?id=51494 Mark Thomas ma...@apache.org changed: What|Removed |Added Version|7.0.16 |trunk OS/Version||All --- Comment #1 from Mark Thomas ma...@apache.org 2011-07-10 10:46:54 UTC --- 7.0.18 hasn't been released so set version to trunk. -- 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
[RESULT][VOTE] Release Apache Tomcat 7.0.18
The result of the vote was BROKEN due to several serious regressions identified during testing. The release is therefore cancelled. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144817 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt Date: Sun Jul 10 10:53:51 2011 New Revision: 1144817 URL: http://svn.apache.org/viewvc?rev=1144817view=rev Log: 7.0.18 not released Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144817r1=1144816r2=1144817view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 10:53:51 2011 @@ -92,7 +92,7 @@ /changelog /subsection /section -section name=Tomcat 7.0.18 (markt) rtext=TBD +section name=Tomcat 7.0.18 (markt) rtext=not released subsection name=Catalina changelog fix - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Preparing for a 7.0.19 tag
Just a quick summary of the regressions reported against 7.0.18 and other issues that need to be fixed before 7.0.19 is tagged. 7.0.17 / 7.0.18 regressions - IPv6 broken - fixed - no test case (nice to have but not essential for 7.0.19) - AJP 400 errors - fixed - no test case (nice to have but not essential for 7.0.19) - AJP keep-alive broken - not fixed - no test case (nice to have but not essential for 7.0.19) - Open bugs - 51490 - 51494 - Unit tests - Comet failures - Need more info from Rainer to determine if this is a regression - TCK - Servlet TCK failure - I saw a failure with mod_proxy_ajp NIO yesterday need to investigate Didn't appear to be related to AJP issues above Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144818 - in /tomcat/trunk/webapps/docs: changelog.xml security-howto.xml
Author: markt Date: Sun Jul 10 10:59:45 2011 New Revision: 1144818 URL: http://svn.apache.org/viewvc?rev=1144818view=rev Log: 7.0.18 not released Modified: tomcat/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/docs/security-howto.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144818r1=1144817r2=1144818view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 10:59:45 2011 @@ -81,6 +81,15 @@ /update /changelog /subsection + subsection name=Web applications +changelog + add +Add additional information to the documentation web application on the +benefits and remaining risks when running under a security manager. +(markt) + /add +/changelog + /subsection subsection name=Other changelog update Modified: tomcat/trunk/webapps/docs/security-howto.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/security-howto.xml?rev=1144818r1=1144817r2=1144818view=diff == --- tomcat/trunk/webapps/docs/security-howto.xml (original) +++ tomcat/trunk/webapps/docs/security-howto.xml Sun Jul 10 10:59:45 2011 @@ -83,7 +83,20 @@ sandbox, significantly limiting a web application's ability to perform malicious actions such as calling System.exit(), establishing network connections or accessing the file system outside of the web application's -root and temporary directories./p +root and temporary directories. However, it should be noted that there are +some malicious actions, such as triggering high CPU consumption via an +infinite loop, that the security manager cannot prevent./p + +pEnabling the security manager is usually done to limit the potential +impact, should an attacker find a way to compromise a trusted web +application . A security manager may also be used to reduce the risks of +running untrusted web applications (e.g. in hosting environments) but it +should be noted that the security manager only reduces the risks of +running untrusted web applications, it does not eliminate them. If running +multiple untrusted web applications, it is recommended that each web +application is deployed to a separate Tomcat instance (and ideally separate +hosts) to reduce the ability of a malicious web application impacting the +availability of other applications./p pTomcat is tested with the security manager enabled; but the majority of Tomcat users do not run with a security manager, so Tomcat is not as well - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144823 - /tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
Author: markt Date: Sun Jul 10 11:02:22 2011 New Revision: 1144823 URL: http://svn.apache.org/viewvc?rev=1144823view=rev Log: Remove unused code. Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=1144823r1=1144822r2=1144823view=diff == --- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java (original) +++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Sun Jul 10 11:02:22 2011 @@ -59,7 +59,7 @@ public class TestRegistration extends To }; } -private String[] optionalMBeanNames(String host, String context) { +private String[] optionalMBeanNames(String host) { if (isAccessLogEnabled()) { return new String[] { Tomcat:type=Valve,host= + host + ,name=AccessLogValve, @@ -141,7 +141,7 @@ public class TestRegistration extends To expected.addAll(Arrays.asList(hostMBeanNames(localhost))); expected.addAll(Arrays.asList(contextMBeanNames(localhost, contextName))); expected.addAll(Arrays.asList(connectorMBeanNames(Integer.toString(getPort()), protocol))); -expected.addAll(Arrays.asList(optionalMBeanNames(localhost, contextName))); +expected.addAll(Arrays.asList(optionalMBeanNames(localhost))); // Did we find all expected MBeans? ArrayListString missing = new ArrayListString(expected); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Sporadic failures in TestCometProcessor
On 10.07.2011 12:13, Mark Thomas wrote: On 10/07/2011 10:28, Rainer Jung wrote: I get sporadic failures in TestCometProcessor for NIO. They are due to the Servlet reading two or more of the PING tokens during a single read event call. The loop while (is.available() 0) { is.read(); count ++; } then e.g. consumes PINGPING instead of PING and writes back READ: 8 bytes. Is this an error in the test case, e.g. if the chunks come in quickly enough is it OK, that they might get combined into a single read event? If so, we might want to add a little sleep in between sending the PING lines. There is already a 1000ms sleep between sending the PINGs. That should be enough to keep them separate. Sorry I was so convinced it's a timing issue, that I didn't check that. Have you always seen these since that test was introduced or is this something new? I added the test to 7.0.16 and ran it there and again it fails with the same symptom every now and then. As an aside, I have noticed that running the unit tests on a heavily loaded box can trigger various timing related failures. The system is mainly idle. It has two CPUs, so it should be able to handle the sending and the servlet in parallel. *Important*: One more observation, that always happens: the test doesn't write anything to the access log. None of the two public log messages of the AccessLogValve are called. I thought you added access log messages for comet and async not to far in the past, but I might be wrong about comet. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144833 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml
Author: rjung Date: Sun Jul 10 11:22:40 2011 New Revision: 1144833 URL: http://svn.apache.org/viewvc?rev=1144833view=rev Log: Another regression in 7.0.18: year number formatting in AccessLogValve is broken due to type yyy instead of . Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1144833r1=1144832r2=1144833view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Sun Jul 10 11:22:40 2011 @@ -263,7 +263,7 @@ public class AccessLogValve extends Valv private class Cache { /* CLF log format */ -private static final String cLFFormat = dd/MMM/yyy:HH:mm:ss; +private static final String cLFFormat = dd/MMM/:HH:mm:ss; /* Second used to retrieve CLF format in most recent invocation */ private long previousSeconds = 0L; Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144833r1=1144832r2=1144833view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 11:22:40 2011 @@ -71,6 +71,9 @@ add Add option to activate AccessLog for unit tests. (rjung) /add + fix +Fix regression in year number formatting for AccessLogValve. (rjung) + /fix /changelog /subsection subsection name=Cluster - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Preparing for a 7.0.19 tag
On 10.07.2011 12:56, Mark Thomas wrote: Just a quick summary of the regressions reported against 7.0.18 and other issues that need to be fixed before 7.0.19 is tagged. 7.0.17 / 7.0.18 regressions - IPv6 broken - fixed - no test case (nice to have but not essential for 7.0.19) - AJP 400 errors - fixed - no test case (nice to have but not essential for 7.0.19) - AJP keep-alive broken - not fixed Hmmm, I can't reproduce this on trunk. Just for 7.0.18. - no test case (nice to have but not essential for 7.0.19) - Open bugs - 51490 - 51494 - Unit tests - Comet failures - Need more info from Rainer to determine if this is a regression *Not* a regression. - TCK - Servlet TCK failure - I saw a failure with mod_proxy_ajp NIO yesterday need to investigate Didn't appear to be related to AJP issues above - Wrong year formatting when using CLF (default) timestamp format in AccessLogValve (2 instead of 4 digits). - No access log entry for TestCometProcessor. Tested using trunk with NIO and APR. Is it expected to produce one? - TestAsyncContextImpl fails for BIO, NIO and APR: Testcase: testTimeoutListenerCompleteDispatch took 6.074 sec FAILED expected:1 but was:0 junit.framework.AssertionFailedError: expected:1 but was:0 at org.apache.catalina.core.TestAsyncContextImpl.validateAccessLog(TestAsyncContextImpl.java:1077) at org.apache.catalina.core.TestAsyncContextImpl.doTestTimeout(TestAsyncContextImpl.java:455) at org.apache.catalina.core.TestAsyncContextImpl.testTimeoutListenerCompleteDispatch(TestAsyncContextImpl.java:380) Probably due to the following exception: 10-Jul-2011 13:56:35.846 SEVERE org.apache.catalina.connector.CoyoteAdapter.asyncDispatch An exception or error occurred in the container during the request processing java.lang.IllegalStateException: Calling [asyncDispatch()] is not valid for a request with Async state [MUST_COMPLETE] at org.apache.coyote.AsyncStateMachine.asyncDispatch(AsyncStateMachine.java:256) at org.apache.coyote.http11.Http11Processor.actionInternal(Http11Processor.java:535) at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:773) at org.apache.coyote.Request.action(Request.java:344) at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:184) at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:145) at org.apache.catalina.core.TestAsyncContextImpl$TrackingListener.onTimeout(TestAsyncContextImpl.java:730) at org.apache.catalina.core.AsyncListenerWrapper.fireOnTimeout(AsyncListenerWrapper.java:45) at org.apache.catalina.core.AsyncContextImpl.timeout(AsyncContextImpl.java:117) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:289) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1220) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:511) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Stack for NIO: 10-Jul-2011 13:50:15.394 SEVERE org.apache.catalina.connector.CoyoteAdapter.asyncDispatch An exception or error occurred in the container during the request processing java.lang.IllegalStateException: Calling [asyncDispatch()] is not valid for a request with Async state [MUST_COMPLETE] at org.apache.coyote.AsyncStateMachine.asyncDispatch(AsyncStateMachine.java:256) at org.apache.coyote.http11.Http11NioProcessor.actionInternal(Http11NioProcessor.java:611) at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:773) at org.apache.coyote.Request.action(Request.java:344) at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:184) at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:145) at org.apache.catalina.core.TestAsyncContextImpl$TrackingListener.onTimeout(TestAsyncContextImpl.java:730) at org.apache.catalina.core.AsyncListenerWrapper.fireOnTimeout(AsyncListenerWrapper.java:45) at org.apache.catalina.core.AsyncContextImpl.timeout(AsyncContextImpl.java:117) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:289) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1220) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:511) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1540)
Re: Preparing for a 7.0.19 tag
On 10.07.2011 13:58, Rainer Jung wrote: - TestAsyncContextImpl fails for BIO, NIO and APR: Testcase: testTimeoutListenerCompleteDispatch took 6.074 sec FAILED expected:1 but was:0 junit.framework.AssertionFailedError: expected:1 but was:0 at org.apache.catalina.core.TestAsyncContextImpl.validateAccessLog(TestAsyncContextImpl.java:1077) at org.apache.catalina.core.TestAsyncContextImpl.doTestTimeout(TestAsyncContextImpl.java:455) at org.apache.catalina.core.TestAsyncContextImpl.testTimeoutListenerCompleteDispatch(TestAsyncContextImpl.java:380) Sorry, this is due to my adding an optional AccessLogValve to the test suite today. It is off by default, and the failure only happens if I switch it on. I'll investigate, but it is not a show-stopper, because by default everything is fine. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1144061 - in /tomcat/trunk: build.xml modules/jdbc-pool/build.xml res/maven/mvn-pub.xml res/maven/tomcat-jdbc.pom webapps/docs/project.xml
Hi Filip, On 07.07.2011 23:40, fha...@apache.org wrote: Author: fhanik Date: Thu Jul 7 21:40:05 2011 New Revision: 1144061 URL: http://svn.apache.org/viewvc?rev=1144061view=rev Log: Include jdbc-pool into tomcat release. Added: tomcat/trunk/res/maven/tomcat-jdbc.pom Modified: tomcat/trunk/build.xml tomcat/trunk/modules/jdbc-pool/build.xml tomcat/trunk/res/maven/mvn-pub.xml tomcat/trunk/webapps/docs/project.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1144061r1=1144060r2=1144061view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Thu Jul 7 21:40:05 2011 ... @@ -680,6 +689,12 @@ mkdir dir=${tomcat.build}/webapps/docs/funcspecs / !-- XSL processing -- +copy tofile=webapps/docs/jdbc-pool.xml file=${tomcat.jdbc.dir}/doc/jdbc-pool.xml overwrite=true + !-- jdbc-pool documentation -- + filterset +filter token=TOMCAT_PROJECT_DEST value=project.xml/ + /filterset +/copy xslt basedir=webapps/docs destdir=${tomcat.build}/webapps/docs extension=.html @@ -691,6 +706,8 @@ param name=build-date expression=${today}/ param name=year expression=${year}/ /xslt +!-- remove jdbc-pool documentation -- +delete file=webapps/docs/jdbc-pool.xml/ xslt basedir=webapps/docs/appdev destdir=${tomcat.build}/webapps/docs/appdev extension=.html Removing the file directly after generating the docs means the docs for jdbc-pool are build every time, even if they are still up to date. @@ -840,8 +857,16 @@ failonerror=false/ copy file=${jdt.jar} todir=${tomcat.build}/lib / - /target +!-- build the jdbc-pool jar and source jar-- +echo message=Building Tomcat JDBC pool libraries/ +ant antfile=${tomcat.jdbc.dir}/build.xml dir=${tomcat.jdbc.dir} inheritall=false target=clean-and-build + property name=tomcat.juli.jar value=${tomcat-juli.jar}/property + property name=skip.download value=set/ +/ant +copy file=${tomcat-jdbc.jar} todir=${tomcat.build}/lib overwrite=true/ + /target + Again, since you are calling clean-and-build, we will always rebuild jdbc-pool. Wouldn't it suffice to remove the copied docs file and to clean jdbc-pool during the clean target? Something along the lines of: http://people.apache.org/~rjung/patches/tomcat-jdbc-pool-build-clean.patch Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144854 - /tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
Author: rjung Date: Sun Jul 10 13:03:49 2011 New Revision: 1144854 URL: http://svn.apache.org/viewvc?rev=1144854view=rev Log: Disable one test validation in TestAsyncContextImpl if an AccessLogValve has been activated. The test relies on receiving data via StandardEngine.logAccess() which is already handled by the other AccessLog. By default no AccessLogValve is activated, so the validation is still done. Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1144854r1=1144853r2=1144854view=diff == --- tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java (original) +++ tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Sun Jul 10 13:03:49 2011 @@ -452,8 +452,10 @@ public class TestAsyncContextImpl extend // Check the access log if (completeOnTimeout dispatchUrl != null) { -validateAccessLog(alv, 1, 500, 0, TimeoutServlet.ASYNC_TIMEOUT + -TIMEOUT_MARGIN + REQUEST_TIME); +if (!isAccessLogEnabled()) { +validateAccessLog(alv, 1, 500, 0, TimeoutServlet.ASYNC_TIMEOUT + +TIMEOUT_MARGIN + REQUEST_TIME); +} } else { validateAccessLog(alv, 1, 200, TimeoutServlet.ASYNC_TIMEOUT, TimeoutServlet.ASYNC_TIMEOUT + TIMEOUT_MARGIN + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Missing thread name in requestProcessor when handling Async
Using an AccessLogValve during the unit tests reveals, that the thread name in the request processor is often not set when handliung async requests. To reproduce run TestAsyncContextImpl for trunk with test.accesslog=true and have a look at the access log in output/build/logs. The only requests logged wit a thread name are 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-bio-8030-exec-1 8 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-nio-8030-exec-1 9 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-apr-8030-exec-2 8 All other requests have null as the thread name. The following patch fixes most of the cases, but I'm not sure that it is the right place to fix it: http://people.apache.org/~rjung/patches/tomcat-async-threadname.patch The only entries which still have a null thread name are then: 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /async HTTP/1.1 500 53 null 0 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /async HTTP/1.1 500 53 null 0 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /async HTTP/1.1 500 53 null 0 Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Sporadic failures in TestCometProcessor
On 10/07/2011 12:19, Rainer Jung wrote: On 10.07.2011 12:13, Mark Thomas wrote: On 10/07/2011 10:28, Rainer Jung wrote: I get sporadic failures in TestCometProcessor for NIO. They are due to the Servlet reading two or more of the PING tokens during a single read event call. The loop while (is.available() 0) { is.read(); count ++; } then e.g. consumes PINGPING instead of PING and writes back READ: 8 bytes. Is this an error in the test case, e.g. if the chunks come in quickly enough is it OK, that they might get combined into a single read event? If so, we might want to add a little sleep in between sending the PING lines. There is already a 1000ms sleep between sending the PINGs. That should be enough to keep them separate. Sorry I was so convinced it's a timing issue, that I didn't check that. Have you always seen these since that test was introduced or is this something new? I added the test to 7.0.16 and ran it there and again it fails with the same symptom every now and then. OK, so not a regression. As an aside, I have noticed that running the unit tests on a heavily loaded box can trigger various timing related failures. The system is mainly idle. It has two CPUs, so it should be able to handle the sending and the servlet in parallel. *Important*: One more observation, that always happens: the test doesn't write anything to the access log. None of the two public log messages of the AccessLogValve are called. I thought you added access log messages for comet and async not to far in the past, but I might be wrong about comet. I'd expect there to be something, but I don't recall adding something specifically. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Preparing for a 7.0.19 tag
On 10/07/2011 12:58, Rainer Jung wrote: On 10.07.2011 12:56, Mark Thomas wrote: Just a quick summary of the regressions reported against 7.0.18 and other issues that need to be fixed before 7.0.19 is tagged. 7.0.17 / 7.0.18 regressions - IPv6 broken - fixed - no test case (nice to have but not essential for 7.0.19) - AJP 400 errors - fixed - no test case (nice to have but not essential for 7.0.19) - AJP keep-alive broken - not fixed Hmmm, I can't reproduce this on trunk. Just for 7.0.18. This may be the same problem as the 400 error. The connection was certainly being closed after the error so that would explain it. - no test case (nice to have but not essential for 7.0.19) - Open bugs - 51490 - 51494 - Unit tests - Comet failures - Need more info from Rainer to determine if this is a regression *Not* a regression. OK. The end result is OK, just not what the test expects. There probably is a subtle bug here but one that has been around for a while. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Missing thread name in requestProcessor when handling Async
On 10/07/2011 14:53, Rainer Jung wrote: Using an AccessLogValve during the unit tests reveals, that the thread name in the request processor is often not set when handliung async requests. To reproduce run TestAsyncContextImpl for trunk with test.accesslog=true and have a look at the access log in output/build/logs. The only requests logged wit a thread name are 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-bio-8030-exec-1 8 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-nio-8030-exec-1 9 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-apr-8030-exec-2 8 All other requests have null as the thread name. The following patch fixes most of the cases, but I'm not sure that it is the right place to fix it: http://people.apache.org/~rjung/patches/tomcat-async-threadname.patch Looks good to me. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144865 - in /tomcat/trunk: java/org/apache/catalina/connector/CoyoteAdapter.java webapps/docs/changelog.xml
Author: rjung Date: Sun Jul 10 14:33:12 2011 New Revision: 1144865 URL: http://svn.apache.org/viewvc?rev=1144865view=rev Log: Add missing thread name in RequestProcessor when Servlet 3 Async is used. Fixes null thread name in access log and probably JMX MBean. Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1144865r1=1144864r2=1144865view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Sun Jul 10 14:33:12 2011 @@ -269,6 +269,7 @@ public class CoyoteAdapter implements Ad boolean comet = false; boolean success = true; AsyncContextImpl asyncConImpl = (AsyncContextImpl)request.getAsyncContext(); + req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName()); try { if (!request.isAsync() !comet) { // Error or timeout - need to tell listeners the request is over Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144865r1=1144864r2=1144865view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 14:33:12 2011 @@ -74,6 +74,10 @@ fix Fix regression in year number formatting for AccessLogValve. (rjung) /fix + fix +Add missing thread name in RequestProcessor when Servlet 3 Async +is used. Fixes null thread name in access log and JMX MBean. (rjung) + /fix /changelog /subsection subsection name=Cluster - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Missing thread name in requestProcessor when handling Async
On 10.07.2011 16:07, Mark Thomas wrote: On 10/07/2011 14:53, Rainer Jung wrote: Using an AccessLogValve during the unit tests reveals, that the thread name in the request processor is often not set when handliung async requests. To reproduce run TestAsyncContextImpl for trunk with test.accesslog=true and have a look at the access log in output/build/logs. The only requests logged wit a thread name are 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-bio-8030-exec-1 8 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-nio-8030-exec-1 9 127.0.0.1 - - [10/Jul/2011:15:..:.. +0200] GET /error HTTP/1.1 500 1332 http-apr-8030-exec-2 8 All other requests have null as the thread name. The following patch fixes most of the cases, but I'm not sure that it is the right place to fix it: http://people.apache.org/~rjung/patches/tomcat-async-threadname.patch Looks good to me. Committed in r1144865. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144868 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
Author: markt Date: Sun Jul 10 14:40:00 2011 New Revision: 1144868 URL: http://svn.apache.org/viewvc?rev=1144868view=rev Log: Make it easier for tests to override the protocol (e.g. to test AJP) Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1144868r1=1144867r2=1144868view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Sun Jul 10 14:40:00 2011 @@ -125,14 +125,7 @@ public abstract class TomcatBaseTest ext tomcat = new Tomcat(); -// Has a protocol been specified -String protocol = System.getProperty(tomcat.test.protocol); - -// Use BIO by default -if (protocol == null) { -protocol = org.apache.coyote.http11.Http11Protocol; -} - +String protocol = getProtocol(); Connector connector = new Connector(protocol); // If each test is running on same port - they // may interfere with each other @@ -164,6 +157,18 @@ public abstract class TomcatBaseTest ext } } +protected String getProtocol() { +// Has a protocol been specified +String protocol = System.getProperty(tomcat.test.protocol); + +// Use BIO by default +if (protocol == null) { +protocol = org.apache.coyote.http11.Http11Protocol; +} + +return protocol; +} + @Override public void tearDown() throws Exception { // Some tests may call tomcat.destroy(), some tests may just call - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51477] Support all protocol combinations in SSLProtocol of APR Connector
https://issues.apache.org/bugzilla/show_bug.cgi?id=51477 --- Comment #16 from Rainer Jung rainer.j...@kippdata.de 2011-07-10 15:04:12 UTC --- I tested it now myself and it *does* work for me with all 8 possible combinations, each only allowing the configured protocol set. Maybe your OpenSSL client doesn't allow SSLv2? What happens if you set the SSLProtocol in the connector to SSLv2? -- 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: r1144875 - /tomcat/native/trunk/native/src/sslcontext.c
Author: rjung Date: Sun Jul 10 15:10:35 2011 New Revision: 1144875 URL: http://svn.apache.org/viewvc?rev=1144875view=rev Log: Correct protocol mapping for SSL. Modified: tomcat/native/trunk/native/src/sslcontext.c Modified: tomcat/native/trunk/native/src/sslcontext.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslcontext.c?rev=1144875r1=1144874r2=1144875view=diff == --- tomcat/native/trunk/native/src/sslcontext.c (original) +++ tomcat/native/trunk/native/src/sslcontext.c Sun Jul 10 15:10:35 2011 @@ -73,7 +73,6 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, ma switch (protocol) { case SSL_PROTOCOL_SSLV2: -case SSL_PROTOCOL_SSLV2 | SSL_PROTOCOL_TLSV1: if (mode == SSL_MODE_CLIENT) ctx = SSL_CTX_new(SSLv2_client_method()); else if (mode == SSL_MODE_SERVER) @@ -82,7 +81,6 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, ma ctx = SSL_CTX_new(SSLv2_method()); break; case SSL_PROTOCOL_SSLV3: -case SSL_PROTOCOL_SSLV3 | SSL_PROTOCOL_TLSV1: if (mode == SSL_MODE_CLIENT) ctx = SSL_CTX_new(SSLv3_client_method()); else if (mode == SSL_MODE_SERVER) @@ -91,6 +89,8 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, ma ctx = SSL_CTX_new(SSLv3_method()); break; case SSL_PROTOCOL_SSLV2 | SSL_PROTOCOL_SSLV3: +case SSL_PROTOCOL_SSLV2 | SSL_PROTOCOL_TLSV1: +case SSL_PROTOCOL_SSLV3 | SSL_PROTOCOL_TLSV1: case SSL_PROTOCOL_ALL: if (mode == SSL_MODE_CLIENT) ctx = SSL_CTX_new(SSLv23_client_method()); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144876 - /tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml
Author: rjung Date: Sun Jul 10 15:15:27 2011 New Revision: 1144876 URL: http://svn.apache.org/viewvc?rev=1144876view=rev Log: Oups, forgot changelog: Support arbitrary protocol combinations of SSLv2, SSLv3 and TLSv1. Modified: tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Modified: tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml?rev=1144876r1=1144875r2=1144876view=diff == --- tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Sun Jul 10 15:15:27 2011 @@ -39,6 +39,9 @@ section name=Changes between 1.1.20 and 1.1.21 changelog fix + Support arbitrary protocol combinations of SSLv2, SSLv3 and TLSv1. (rjung) +/fix +fix bug51437/bug: Try loading certificate in DER format if PEM was invalid. (mturk) /fix fix - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144877 - /tomcat/native/trunk/native/src/ssl.c
Author: rjung Date: Sun Jul 10 15:26:58 2011 New Revision: 1144877 URL: http://svn.apache.org/viewvc?rev=1144877view=rev Log: Forward port of r1055907 from tcnative trunk: Fix for bug 48253. Modified: tomcat/native/trunk/native/src/ssl.c Modified: tomcat/native/trunk/native/src/ssl.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1144877r1=1144876r2=1144877view=diff == --- tomcat/native/trunk/native/src/ssl.c (original) +++ tomcat/native/trunk/native/src/ssl.c Sun Jul 10 15:26:58 2011 @@ -37,6 +37,18 @@ ENGINE *tcn_ssl_engine = NULL; void *SSL_temp_keys[SSL_TMP_KEY_MAX]; tcn_pass_cb_t tcn_password_callback; +/* Global reference to the pool used by the dynamic mutexes */ +static apr_pool_t *dynlockpool = NULL; + +/* Dynamic lock structure */ +struct CRYPTO_dynlock_value { +apr_pool_t *pool; +const char* file; +int line; +apr_thread_mutex_t *mutex; +}; + + /* * Handle the Temporary RSA Keys and DH Params */ @@ -215,11 +227,94 @@ static apr_status_t ssl_thread_cleanup(v UNREFERENCED(data); CRYPTO_set_locking_callback(NULL); CRYPTO_set_id_callback(NULL); +CRYPTO_set_dynlock_create_callback(NULL); +CRYPTO_set_dynlock_lock_callback(NULL); +CRYPTO_set_dynlock_destroy_callback(NULL); + +dynlockpool = NULL; + /* Let the registered mutex cleanups do their own thing */ return APR_SUCCESS; } +/* + * Dynamic lock creation callback + */ +static struct CRYPTO_dynlock_value *ssl_dyn_create_function(const char *file, + int line) +{ +struct CRYPTO_dynlock_value *value; +apr_pool_t *p; +apr_status_t rv; + +/* + * We need a pool to allocate our mutex. Since we can't clear + * allocated memory from a pool, create a subpool that we can blow + * away in the destruction callback. + */ +rv = apr_pool_create(p, dynlockpool); +if (rv != APR_SUCCESS) { +/* TODO log that fprintf(stderr, Failed to create subpool for dynamic lock); */ +return NULL; +} + +value = (struct CRYPTO_dynlock_value *)apr_palloc(p, + sizeof(struct CRYPTO_dynlock_value)); +if (!value) { +/* TODO log that fprintf(stderr, Failed to allocate dynamic lock structure); */ +return NULL; +} + +value-pool = p; +/* Keep our own copy of the place from which we were created, + using our own pool. */ +value-file = apr_pstrdup(p, file); +value-line = line; +rv = apr_thread_mutex_create((value-mutex), APR_THREAD_MUTEX_DEFAULT, +p); +if (rv != APR_SUCCESS) { +/* TODO log that fprintf(stderr, Failed to create thread mutex for dynamic lock); */ +apr_pool_destroy(p); +return NULL; +} +return value; +} + +/* + * Dynamic locking and unlocking function + */ + +static void ssl_dyn_lock_function(int mode, struct CRYPTO_dynlock_value *l, + const char *file, int line) +{ +apr_status_t rv; + +if (mode CRYPTO_LOCK) { +rv = apr_thread_mutex_lock(l-mutex); +} +else { +rv = apr_thread_mutex_unlock(l-mutex); +} +} + +/* + * Dynamic lock destruction callback + */ +static void ssl_dyn_destroy_function(struct CRYPTO_dynlock_value *l, + const char *file, int line) +{ +apr_status_t rv; +rv = apr_thread_mutex_destroy(l-mutex); +if (rv != APR_SUCCESS) { +/* TODO log that fprintf(stderr, Failed to destroy mutex for dynamic lock %s:%d, l-file, l-line); */ +} + +/* Trust that whomever owned the CRYPTO_dynlock_value we were + * passed has no future use for it... + */ +apr_pool_destroy(l-pool); +} static void ssl_thread_setup(apr_pool_t *p) { int i; @@ -235,6 +330,14 @@ static void ssl_thread_setup(apr_pool_t CRYPTO_set_id_callback(ssl_thread_id); CRYPTO_set_locking_callback(ssl_thread_lock); +/* Set up dynamic locking scaffolding for OpenSSL to use at its + * convenience. + */ +dynlockpool = p; +CRYPTO_set_dynlock_create_callback(ssl_dyn_create_function); +CRYPTO_set_dynlock_lock_callback(ssl_dyn_lock_function); +CRYPTO_set_dynlock_destroy_callback(ssl_dyn_destroy_function); + apr_pool_cleanup_register(p, NULL, ssl_thread_cleanup, apr_pool_cleanup_null); } @@ -404,6 +507,9 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize OPENSSL_load_builtin_modules(); #endif +/* Initialize thread support */ +ssl_thread_setup(tcn_global_pool); + #ifndef OPENSSL_NO_ENGINE if (J2S(engine)) { ENGINE *ee = NULL; @@ -457,8 +563,6 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize apr_pool_cleanup_register(tcn_global_pool, NULL, ssl_init_cleanup,
svn commit: r1144878 - /tomcat/native/trunk/native/os/win32/registry.c
Author: rjung Date: Sun Jul 10 15:28:40 2011 New Revision: 1144878 URL: http://svn.apache.org/viewvc?rev=1144878view=rev Log: Forward port of r1055943 to tcnative trunk: Fix for 49851. Modified: tomcat/native/trunk/native/os/win32/registry.c Modified: tomcat/native/trunk/native/os/win32/registry.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/os/win32/registry.c?rev=1144878r1=1144877r2=1144878view=diff == --- tomcat/native/trunk/native/os/win32/registry.c (original) +++ tomcat/native/trunk/native/os/win32/registry.c Sun Jul 10 15:28:40 2011 @@ -767,6 +767,7 @@ TCN_IMPLEMENT_CALL(jint, Registry, delet rv = EBADF; goto cleanup; } +TCN_INIT_WSTRING(name); if (only_if_empty) rv = SHDeleteEmptyKeyW(TCN_KEYS[root].k, J2W(name)); else @@ -784,6 +785,7 @@ TCN_IMPLEMENT_CALL(jint, Registry, delet tcn_nt_registry_t *k = J2P(key, tcn_nt_registry_t *); UNREFERENCED(o); +TCN_INIT_WSTRING(name); rv = RegDeleteValueW(k-key, J2W(name)); TCN_FREE_WSTRING(name); return (jint)rv; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144879 - /tomcat/native/trunk/native/src/proc.c
Author: rjung Date: Sun Jul 10 15:30:20 2011 New Revision: 1144879 URL: http://svn.apache.org/viewvc?rev=1144879view=rev Log: Forward port of r1056218 to tcnative trunk. Fix for 49557. Modified: tomcat/native/trunk/native/src/proc.c Modified: tomcat/native/trunk/native/src/proc.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/proc.c?rev=1144879r1=1144878r2=1144879view=diff == --- tomcat/native/trunk/native/src/proc.c (original) +++ tomcat/native/trunk/native/src/proc.c Sun Jul 10 15:30:20 2011 @@ -211,7 +211,7 @@ TCN_IMPLEMENT_CALL(jint, Proc, create)(T if (args) as = (*e)-GetArrayLength(e, args); if (env) -es = (*e)-GetArrayLength(e, args); +es = (*e)-GetArrayLength(e, env); if (as (MAX_ARGS_SIZE - 1) || es (MAX_ENV_SIZE - 2)) { TCN_FREE_CSTRING(progname); return APR_EINVAL; @@ -228,7 +228,7 @@ TCN_IMPLEMENT_CALL(jint, Proc, create)(T if (es) { for (i = 0; i es; i++) { jstring str = (*e)-GetObjectArrayElement(e, env, i); -s_env[i+1] = tcn_get_string(e, str); +s_env[i] = tcn_get_string(e, str); (*e)-DeleteLocalRef(e, str); } #ifdef WIN32 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144880 - /tomcat/native/trunk/native/src/sslcontext.c
Author: rjung Date: Sun Jul 10 15:31:36 2011 New Revision: 1144880 URL: http://svn.apache.org/viewvc?rev=1144880view=rev Log: Forward port of r1099730 for tcnative trunk. Add the openssl error message to thrown error message. Modified: tomcat/native/trunk/native/src/sslcontext.c Modified: tomcat/native/trunk/native/src/sslcontext.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslcontext.c?rev=1144880r1=1144879r2=1144880view=diff == --- tomcat/native/trunk/native/src/sslcontext.c (original) +++ tomcat/native/trunk/native/src/sslcontext.c Sun Jul 10 15:31:36 2011 @@ -109,7 +109,9 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, ma break; } if (!ctx) { -tcn_ThrowException(e, Invalid Server SSL Protocol); +char err[256]; +ERR_error_string(ERR_get_error(), err); +tcn_Throw(e, Invalid Server SSL Protocol (%s), err); goto init_failed; } if ((c = apr_pcalloc(p, sizeof(tcn_ssl_ctxt_t))) == NULL) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144886 - /tomcat/native/branches/1.1.x/KEYS
Author: rjung Date: Sun Jul 10 16:04:20 2011 New Revision: 1144886 URL: http://svn.apache.org/viewvc?rev=1144886view=rev Log: Sync tcnative 1.1.x and trunk: Part 1: add missing key from trunk to branch Modified: tomcat/native/branches/1.1.x/KEYS Modified: tomcat/native/branches/1.1.x/KEYS URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/KEYS?rev=1144886r1=1144885r2=1144886view=diff == --- tomcat/native/branches/1.1.x/KEYS (original) +++ tomcat/native/branches/1.1.x/KEYS Sun Jul 10 16:04:20 2011 @@ -277,3 +277,62 @@ WJa6Z44l5e3utyi66D1sbdv0ITL58VKTjoQGBsct uqXsrZkxnIfKHT2LqDQ= =Panx -END PGP PUBLIC KEY BLOCK- + +pub 4096R/BD0A8037 2009-12-04 +Empreinte de la clé = 1473 7EB2 565F E85D B941 6210 42AE CE61 BD0A 8037 +uid Henri Gomez henri.go...@gmail.com +sig 3BD0A8037 2009-12-04 Henri Gomez henri.go...@gmail.com +sub 4096R/B24EED10 2009-12-04 +sig BD0A8037 2009-12-04 Henri Gomez henri.go...@gmail.com + +-BEGIN PGP PUBLIC KEY BLOCK- +Version: GnuPG/MacGPG2 v2.0.12 (Darwin) + +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 +=rvjp +-END PGP PUBLIC KEY BLOCK- - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144891 - /tomcat/native/trunk/KEYS
Author: rjung Date: Sun Jul 10 16:06:48 2011 New Revision: 1144891 URL: http://svn.apache.org/viewvc?rev=1144891view=rev Log: Sync tcnative 1.1.x and trunk: Part 2: replace trunk KEYS with better maintained one form branch. Modified: tomcat/native/trunk/KEYS Modified: tomcat/native/trunk/KEYS URL: http://svn.apache.org/viewvc/tomcat/native/trunk/KEYS?rev=1144891r1=1144890r2=1144891view=diff == --- tomcat/native/trunk/KEYS (original) +++ tomcat/native/trunk/KEYS Sun Jul 10 16:06:48 2011 @@ -47,284 +47,235 @@ RheITAQYEQIADAUCPh/BhgUJEs/3gAAKCRAcUGQH =MWUr -END PGP PUBLIC KEY BLOCK- +Type Bits/KeyID Date User ID pub 1024D/6210BFC0 2007-03-01 Key fingerprint = 3A6F 081D DFD3 DE93 02C3 1329 0F45 0A26 6210 BFC0 uid Jean-Frederic Clere jfcl...@apache.org -BEGIN PGP PUBLIC KEY BLOCK- -Version: GnuPG v1.4.6 (FreeBSD) +Version: GnuPG v1.4.9 (GNU/Linux) -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
Re: svn commit: r1141392 - in /tomcat/native/branches/1.1.x: native/src/sslcontext.c xdocs/miscellaneous/changelog.xml
Hi Mladen, On 30.06.2011 06:26, mt...@apache.org wrote: Author: mturk Date: Thu Jun 30 04:26:36 2011 New Revision: 1141392 URL: http://svn.apache.org/viewvc?rev=1141392view=rev Log: Fix BZ51437 by trying to load the DER cerificate if pem load error was PEM_R_NO_START_LINE Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/sslcontext.c?rev=1141392r1=1141391r2=1141392view=diff == --- tomcat/native/branches/1.1.x/native/src/sslcontext.c (original) +++ tomcat/native/branches/1.1.x/native/src/sslcontext.c Thu Jun 30 04:26:36 2011 @@ -447,7 +447,6 @@ static EVP_PKEY *load_pem_key(tcn_ssl_ct BIO *bio = NULL; EVP_PKEY *key = NULL; tcn_pass_cb_t *cb_data = c-cb_data; -int i; if ((bio = BIO_new(BIO_s_file())) == NULL) { return NULL; @@ -458,14 +457,14 @@ static EVP_PKEY *load_pem_key(tcn_ssl_ct } if (!cb_data) cb_data = tcn_password_callback; -for (i = 0; i 3; i++) { -key = PEM_read_bio_PrivateKey(bio, NULL, -(pem_password_cb *)SSL_password_callback, -(void *)cb_data); -if (key) -break; -cb_data-password[0] = '\0'; +cert = PEM_read_bio_X509_AUX(bio, NULL, +(pem_password_cb *)SSL_password_callback, +(void *)cb_data); +if (cert == NULL + (ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE)) { +ERR_clear_error(); BIO_ctrl(bio, BIO_CTRL_RESET, 0, NULL); +cert = d2i_X509_bio(bio, NULL); } BIO_free(bio); return key; I was checking turnk and 1.1.x for differences and I think this backport of 1141388 is wrong. In trunk you patched the function load_pem_cert(), in 1.1.x the function load_pem_key(), therefore replacing key with cert etc. I guess you want to revert the change to load_pem_key() and instead apply the patch to load_pem_cert(). Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144897 - in /tomcat/native/trunk/native: build/tcnative.m4 buildconf srclib/VERSIONS
Author: rjung Date: Sun Jul 10 16:33:59 2011 New Revision: 1144897 URL: http://svn.apache.org/viewvc?rev=1144897view=rev Log: We need at least APR 1.4.3 for tcnative trunk. Modified: tomcat/native/trunk/native/build/tcnative.m4 tomcat/native/trunk/native/buildconf tomcat/native/trunk/native/srclib/VERSIONS Modified: tomcat/native/trunk/native/build/tcnative.m4 URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/build/tcnative.m4?rev=1144897r1=1144896r2=1144897view=diff == --- tomcat/native/trunk/native/build/tcnative.m4 (original) +++ tomcat/native/trunk/native/build/tcnative.m4 Sun Jul 10 16:33:59 2011 @@ -33,12 +33,10 @@ AC_DEFUN(TCN_FIND_APR,[ sapr_version=`echo $sapr_pversion|sed -e 's/\([a-z]*\)$/.\1/'` tc_save_IFS=$IFS; IFS=.; set $sapr_version; IFS=$tc_save_IFS decimal_apr_version=`printf %02d%02d%03d ${1} ${2} ${3}` - if test ${decimal_apr_version} -lt 0102000; then -AC_MSG_ERROR(Found APR $sapr_version. You need version 1.2 or newer installed.) - fi - if test ${decimal_apr_version} -lt 0104000; then -AC_MSG_NOTICE(APR $sapr_version detected.) + if test ${decimal_apr_version} -lt 0104003; then +AC_MSG_ERROR(Found APR $sapr_version. You need version 1.4.3 or newer installed.) fi + AC_MSG_NOTICE(APR $sapr_version detected.) APR_BUILD_DIR=`$apr_config --installbuilddir` Modified: tomcat/native/trunk/native/buildconf URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/buildconf?rev=1144897r1=1144896r2=1144897view=diff == --- tomcat/native/trunk/native/buildconf (original) +++ tomcat/native/trunk/native/buildconf Sun Jul 10 16:33:59 2011 @@ -19,7 +19,7 @@ # Default place to look for apr source. Can be overridden with # --with-apr=[directory] -apr_src_dir=`pwd`/srclib/apr-1.3.3 +apr_src_dir=`pwd`/srclib/apr-1.4.3 while test $# -gt 0 do Modified: tomcat/native/trunk/native/srclib/VERSIONS URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/srclib/VERSIONS?rev=1144897r1=1144896r2=1144897view=diff == --- tomcat/native/trunk/native/srclib/VERSIONS (original) +++ tomcat/native/trunk/native/srclib/VERSIONS Sun Jul 10 16:33:59 2011 @@ -1,4 +1,4 @@ Use the following version of the libraries -- APR 1.3.3, http://apr.apache.org +- APR 1.4.3, http://apr.apache.org - OpenSSL 0.9.8k, http://www.openssl.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144898 - /tomcat/native/trunk/native/build/rpm/tcnative.spec.in
Author: rjung Date: Sun Jul 10 16:35:11 2011 New Revision: 1144898 URL: http://svn.apache.org/viewvc?rev=1144898view=rev Log: Looks like we test APR version against tcnative version. Modified: tomcat/native/trunk/native/build/rpm/tcnative.spec.in Modified: tomcat/native/trunk/native/build/rpm/tcnative.spec.in URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/build/rpm/tcnative.spec.in?rev=1144898r1=1144897r2=1144898view=diff == --- tomcat/native/trunk/native/build/rpm/tcnative.spec.in (original) +++ tomcat/native/trunk/native/build/rpm/tcnative.spec.in Sun Jul 10 16:35:11 2011 @@ -27,6 +27,7 @@ Group: System Environment/Libraries URL: http://apr.apache.org/ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +# XXX The part apr-devel = 0:{version}-{release} is probably wrong BuildPrereq: autoconf, libtool, doxygen, apr-devel = 0:{version}-{release}, openssl = 0.9.8 %description @@ -37,6 +38,7 @@ contains additional utility interfaces f %package devel Group: Development/Libraries Summary: Tomcat Native development kit +# XXX The part apr-devel = 0:{version}-{release} is probably wrong Requires: tcnative = %{version}-%{release}, apr-devel = 0:{version}-{release}, openssl-devel = 0.9.8 %description devel - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144899 - /tomcat/native/branches/1.1.x/native/src/sslcontext.c
Author: rjung Date: Sun Jul 10 16:40:31 2011 New Revision: 1144899 URL: http://svn.apache.org/viewvc?rev=1144899view=rev Log: Revert r1141392 which seems to be a bad backport of r114138. Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/sslcontext.c?rev=1144899r1=1144898r2=1144899view=diff == --- tomcat/native/branches/1.1.x/native/src/sslcontext.c (original) +++ tomcat/native/branches/1.1.x/native/src/sslcontext.c Sun Jul 10 16:40:31 2011 @@ -447,6 +447,7 @@ static EVP_PKEY *load_pem_key(tcn_ssl_ct BIO *bio = NULL; EVP_PKEY *key = NULL; tcn_pass_cb_t *cb_data = c-cb_data; +int i; if ((bio = BIO_new(BIO_s_file())) == NULL) { return NULL; @@ -457,14 +458,14 @@ static EVP_PKEY *load_pem_key(tcn_ssl_ct } if (!cb_data) cb_data = tcn_password_callback; -cert = PEM_read_bio_X509_AUX(bio, NULL, -(pem_password_cb *)SSL_password_callback, -(void *)cb_data); -if (cert == NULL - (ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE)) { -ERR_clear_error(); +for (i = 0; i 3; i++) { +key = PEM_read_bio_PrivateKey(bio, NULL, +(pem_password_cb *)SSL_password_callback, +(void *)cb_data); +if (key) +break; +cb_data-password[0] = '\0'; BIO_ctrl(bio, BIO_CTRL_RESET, 0, NULL); -cert = d2i_X509_bio(bio, NULL); } BIO_free(bio); return key; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144900 - /tomcat/native/branches/1.1.x/native/src/sslcontext.c
Author: rjung Date: Sun Jul 10 16:41:15 2011 New Revision: 1144900 URL: http://svn.apache.org/viewvc?rev=1144900view=rev Log: Backport of r114138. Replaces r1141392. Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c Modified: tomcat/native/branches/1.1.x/native/src/sslcontext.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/sslcontext.c?rev=1144900r1=1144899r2=1144900view=diff == --- tomcat/native/branches/1.1.x/native/src/sslcontext.c (original) +++ tomcat/native/branches/1.1.x/native/src/sslcontext.c Sun Jul 10 16:41:15 2011 @@ -476,7 +476,6 @@ static X509 *load_pem_cert(tcn_ssl_ctxt_ BIO *bio = NULL; X509 *cert = NULL; tcn_pass_cb_t *cb_data = c-cb_data; -int i; if ((bio = BIO_new(BIO_s_file())) == NULL) { return NULL; @@ -485,14 +484,14 @@ static X509 *load_pem_cert(tcn_ssl_ctxt_ BIO_free(bio); return NULL; } -for (i = 0; i 3; i++) { -cert = PEM_read_bio_X509_AUX(bio, NULL, -(pem_password_cb *)SSL_password_callback, -(void *)cb_data); -if (cert) -break; -cb_data-password[0] = '\0'; +cert = PEM_read_bio_X509_AUX(bio, NULL, +(pem_password_cb *)SSL_password_callback, +(void *)cb_data); +if (cert == NULL + (ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE)) { +ERR_clear_error(); BIO_ctrl(bio, BIO_CTRL_RESET, 0, NULL); +cert = d2i_X509_bio(bio, NULL); } BIO_free(bio); return cert; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1141392 - in /tomcat/native/branches/1.1.x: native/src/sslcontext.c xdocs/miscellaneous/changelog.xml
I was checking trunk and 1.1.x for differences and I think this backport of 1141388 is wrong. In trunk you patched the function load_pem_cert(), in 1.1.x the function load_pem_key(), therefore replacing key with cert etc. I guess you want to revert the change to load_pem_key() and instead apply the patch to load_pem_cert(). I reverted it in 1144899 and hopefully applied the correct backport in 1144900. It would be nice, if you could check it. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144901 - /tomcat/native/trunk/xdocs/miscellaneous/changelog-1.1.x.xml
Author: rjung Date: Sun Jul 10 16:49:31 2011 New Revision: 1144901 URL: http://svn.apache.org/viewvc?rev=1144901view=rev Log: Sync tcnative trunk from 1.1.x: Part 3: changelog for 1.1. Modified: tomcat/native/trunk/xdocs/miscellaneous/changelog-1.1.x.xml Modified: tomcat/native/trunk/xdocs/miscellaneous/changelog-1.1.x.xml URL: http://svn.apache.org/viewvc/tomcat/native/trunk/xdocs/miscellaneous/changelog-1.1.x.xml?rev=1144901r1=1144900r2=1144901view=diff == --- tomcat/native/trunk/xdocs/miscellaneous/changelog-1.1.x.xml (original) +++ tomcat/native/trunk/xdocs/miscellaneous/changelog-1.1.x.xml Sun Jul 10 16:49:31 2011 @@ -36,6 +36,31 @@ new documentation project for Tomcat Native was started. /p /section +section name=Changes between 1.1.20 and 1.1.21 + changelog +fix + Support arbitrary protocol combinations of SSLv2, SSLv3 and TLSv1. (rjung) +/fix +fix + bug51437/bug: Try loading certificate in DER format if PEM was invalid. (mturk) +/fix +fix + bug49557/bug: index erro in the loop to get the env info in the proc.create function. (kkolinko, jfclere) +/fix +fix + bug49851/bug: JNI Registry.deleteKey and Registry.deleteValue corrupt Windows registry. (jfclere) +/fix +fix + bug48253/bug: adding dynamic locking callbacks for openssl engines. (jfclere) +/fix +update + Make the non blocking write really no blocking. (jfclere) +/update +update + Add support for unsafe legacy renegotiation. (mturk) +/update + /changelog +/section section name=Changes between 1.1.19 and 1.1.20 changelog fix - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144906 - in /tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni: Address.java BIOCallback.java Directory.java File.java Local.java OS.java Poll.java Pool.java Proc.java Shm.java Soc
Author: rjung Date: Sun Jul 10 17:12:19 2011 New Revision: 1144906 URL: http://svn.apache.org/viewvc?rev=1144906view=rev Log: Sync tcnative 1.1.x Java classes with TC 7: - only JavaDoc, no functional change. Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Address.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/BIOCallback.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Directory.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Local.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/OS.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Poll.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Pool.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Proc.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Shm.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Socket.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Time.java tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/User.java Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Address.java URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Address.java?rev=1144906r1=1144905r2=1144906view=diff == --- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Address.java (original) +++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Address.java Sun Jul 10 17:12:19 2011 @@ -25,7 +25,7 @@ package org.apache.tomcat.jni; public class Address { -static public final String APR_ANYADDR = 0.0.0.0; +public static final String APR_ANYADDR = 0.0.0.0; /** * Fill the Sockaddr class from apr_sockaddr_t * @param info Sockaddr class to fill Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/BIOCallback.java URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/BIOCallback.java?rev=1144906r1=1144905r2=1144906view=diff == --- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/BIOCallback.java (original) +++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/BIOCallback.java Sun Jul 10 17:12:19 2011 @@ -27,7 +27,7 @@ public interface BIOCallback { /** * Write data - * @param buf containg the bytes to write. + * @param buf containing the bytes to write. * @return Number of characters written. */ public int write(byte [] buf); @@ -49,7 +49,7 @@ public interface BIOCallback { /** * Read string up to the len or CLRLF * @param len Maximum number of characters to read - * @return String with up to len bytes readed + * @return String with up to len bytes read */ public String gets(int len); Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Directory.java URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Directory.java?rev=1144906r1=1144905r2=1144906view=diff == --- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Directory.java (original) +++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Directory.java Sun Jul 10 17:12:19 2011 @@ -28,7 +28,7 @@ public class Directory { /** * Create a new directory on the file system. * @param path the path for the directory to be created. (use / on all systems) - * @param perm Permissions for the new direcoty. + * @param perm Permissions for the new directory. * @param pool the pool to use. */ public static native int make(String path, int perm, long pool); @@ -37,7 +37,7 @@ public class Directory { * 'mkdir -p'. Creates intermediate directories as required. No error * will be reported if PATH already exists. * @param path the path for the directory to be created. (use / on all systems) - * @param perm Permissions for the new direcoty. + * @param perm Permissions for the new directory. * @param pool the pool to use. */ public static native int makeRecursive(String path, int perm, long pool); Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java?rev=1144906r1=1144905r2=1144906view=diff == --- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java (original) +++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java Sun Jul 10 17:12:19 2011 @@ -419,7 +419,7 @@ public class File { public static native int writeFullb(long thefile, ByteBuffer buf, int offset, int
Re: svn commit: r1144061 - in /tomcat/trunk: build.xml modules/jdbc-pool/build.xml res/maven/mvn-pub.xml res/maven/tomcat-jdbc.pom webapps/docs/project.xml
On 7/10/2011 6:59 AM, Rainer Jung wrote: Hi Filip, On 07.07.2011 23:40, fha...@apache.org wrote: Author: fhanik Date: Thu Jul 7 21:40:05 2011 New Revision: 1144061 URL: http://svn.apache.org/viewvc?rev=1144061view=rev Log: Include jdbc-pool into tomcat release. Added: tomcat/trunk/res/maven/tomcat-jdbc.pom Modified: tomcat/trunk/build.xml tomcat/trunk/modules/jdbc-pool/build.xml tomcat/trunk/res/maven/mvn-pub.xml tomcat/trunk/webapps/docs/project.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1144061r1=1144060r2=1144061view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Thu Jul 7 21:40:05 2011 ... @@ -680,6 +689,12 @@ mkdir dir=${tomcat.build}/webapps/docs/funcspecs / !-- XSL processing -- +copy tofile=webapps/docs/jdbc-pool.xml file=${tomcat.jdbc.dir}/doc/jdbc-pool.xml overwrite=true +!-- jdbc-pool documentation -- +filterset +filter token=TOMCAT_PROJECT_DEST value=project.xml/ +/filterset +/copy xslt basedir=webapps/docs destdir=${tomcat.build}/webapps/docs extension=.html @@ -691,6 +706,8 @@ param name=build-date expression=${today}/ param name=year expression=${year}/ /xslt +!-- remove jdbc-pool documentation -- +delete file=webapps/docs/jdbc-pool.xml/ xslt basedir=webapps/docs/appdev destdir=${tomcat.build}/webapps/docs/appdev extension=.html Removing the file directly after generating the docs means the docs for jdbc-pool are build every time, even if they are still up to date. @@ -840,8 +857,16 @@ failonerror=false/ copy file=${jdt.jar} todir=${tomcat.build}/lib / -/target +!-- build the jdbc-pool jar and source jar-- +echo message=Building Tomcat JDBC pool libraries/ +ant antfile=${tomcat.jdbc.dir}/build.xml dir=${tomcat.jdbc.dir} inheritall=false target=clean-and-build +property name=tomcat.juli.jar value=${tomcat-juli.jar}/property +property name=skip.download value=set/ +/ant +copy file=${tomcat-jdbc.jar} todir=${tomcat.build}/lib overwrite=true/ +/target + Again, since you are calling clean-and-build, we will always rebuild jdbc-pool. Wouldn't it suffice to remove the copied docs file and to clean jdbc-pool during the clean target? Something along the lines of: http://people.apache.org/~rjung/patches/tomcat-jdbc-pool-build-clean.patch you can commit, no need to ask :) trunk is still CTR Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Distributable contexts and non-serializable session attributes
I implemented an addition to DeltaManager which allows to filter which session attributes actually get replicated (not yet committed). This is useful, because many applications - use non-serializable session attributes, so it is not possible to simply replicate everything - do not actually need everything replicated, because they can bootstrap all they need from a login context if a filter detects, that a failover has happened. In these cases it can also help to reduce replication traffic a lot. Unfortunately I stu,bled into some code in StandardSession: public void setAttribute(String name, Object value, boolean notify) { ... if ((manager != null) manager.getDistributable() !(value instanceof Serializable)) throw new IllegalArgumentException (sm.getString(standardSession.setAttribute.iae, name)); ... } This means if you enable distributable, then you can no longer set any non-serializable session attribute. The code is not recent, it goes back to at least TC 3.3. I understand, that it is helpful to devs being informed about serialization/replication problems. But I think it is too strict to enforce this in StandardSession whch is the base class of all our cluster sessions and we always delegate to StandardSession.setAttribute() after some cluster specific handling. The SPEC says: The container must accept objects that implement the Serializable interface. - The container may choose to support storage of other designated objects in the HttpSession, such as references to Enterprise JavaBeans components and transactions. - Migration of sessions will be handled by container-specific facilities. The distributed servlet container must throw an IllegalArgumentException for objects where the container cannot support the mechanism necessary for migration of the session storing them. (and some more in 7.7.2). I think checking for serializability in StandardSession isn't good, because AFAIK StandardSession isn't used by any mechanism Tomcat supports to implement distributable. And in DeltaSession I would like to have the check optional, i.e. only check if the configuration wants the attribute to be replicated. By default all attributes will be replicated as is today, but by configuration one will be able to choose attributes to replicate using a regexp against the attribute name. Any remarks? Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1144061 - in /tomcat/trunk: build.xml modules/jdbc-pool/build.xml res/maven/mvn-pub.xml res/maven/tomcat-jdbc.pom webapps/docs/project.xml
On 10.07.2011 21:05, Filip Hanik - Dev Lists wrote: On 7/10/2011 6:59 AM, Rainer Jung wrote: Wouldn't it suffice to remove the copied docs file and to clean jdbc-pool during the clean target? Something along the lines of: http://people.apache.org/~rjung/patches/tomcat-jdbc-pool-build-clean.patch you can commit, no need to ask :) trunk is still CTR I know, will do. Just wanted to check, whether there was a specific reason to use clean-and-build. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144948 - /tomcat/trunk/webapps/docs/changelog.xml
Author: rjung Date: Sun Jul 10 20:04:28 2011 New Revision: 1144948 URL: http://svn.apache.org/viewvc?rev=1144948view=rev Log: Move new changelog entries to correct subsection. Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144948r1=1144947r2=1144948view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 20:04:28 2011 @@ -54,6 +54,16 @@ issues to not pop up wrt. others). -- section name=Tomcat 7.0.19 (markt) + subsection name=Catalina +changelog + add +Add option to activate AccessLog for unit tests. (rjung) + /add + fix +Fix regression in year number formatting for AccessLogValve. (rjung) + /fix +/changelog + /subsection subsection name=Coyote changelog update @@ -68,12 +78,6 @@ Fix regression producing invalid MBean names when using IPV6 addresses for connectors. (rjung) /fix - add -Add option to activate AccessLog for unit tests. (rjung) - /add - fix -Fix regression in year number formatting for AccessLogValve. (rjung) - /fix fix Add missing thread name in RequestProcessor when Servlet 3 Async is used. Fixes null thread name in access log and JMX MBean. (rjung) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144950 - /tomcat/trunk/webapps/docs/changelog.xml
Author: rjung Date: Sun Jul 10 20:07:26 2011 New Revision: 1144950 URL: http://svn.apache.org/viewvc?rev=1144950view=rev Log: Add changelog entry for Filip's inclusion of jdbc-pool in releases. Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144950r1=1144949r2=1144950view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 20:07:26 2011 @@ -109,6 +109,9 @@ update Update to Eclipse JDT Compiler 3.7. (markt) /update + add +Include jdbc-pool into tomcat release. (fhanik) + /add /changelog /subsection /section - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144951 - /tomcat/trunk/build.xml
Author: rjung Date: Sun Jul 10 20:08:26 2011 New Revision: 1144951 URL: http://svn.apache.org/viewvc?rev=1144951view=rev Log: Reorganize jdbc-pool inclusion in releases. Split build (code and docs) from clean. Modified: tomcat/trunk/build.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1144951r1=1144950r2=1144951view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Sun Jul 10 20:08:26 2011 @@ -689,7 +689,7 @@ mkdir dir=${tomcat.build}/webapps/docs/funcspecs / !-- XSL processing -- -copy tofile=webapps/docs/jdbc-pool.xml file=${tomcat.jdbc.dir}/doc/jdbc-pool.xml overwrite=true +copy tofile=webapps/docs/jdbc-pool.xml file=${tomcat.jdbc.dir}/doc/jdbc-pool.xml !-- jdbc-pool documentation -- filterset filter token=TOMCAT_PROJECT_DEST value=project.xml/ @@ -706,8 +706,6 @@ param name=build-date expression=${today}/ param name=year expression=${year}/ /xslt -!-- remove jdbc-pool documentation -- -delete file=webapps/docs/jdbc-pool.xml/ xslt basedir=webapps/docs/appdev destdir=${tomcat.build}/webapps/docs/appdev extension=.html @@ -859,11 +857,11 @@ !-- build the jdbc-pool jar and source jar-- echo message=Building Tomcat JDBC pool libraries/ -ant antfile=${tomcat.jdbc.dir}/build.xml dir=${tomcat.jdbc.dir} inheritall=false target=clean-and-build +ant antfile=${tomcat.jdbc.dir}/build.xml dir=${tomcat.jdbc.dir} inheritall=false target=build property name=tomcat.juli.jar value=${tomcat-juli.jar}/property property name=skip.download value=set/ /ant -copy file=${tomcat-jdbc.jar} todir=${tomcat.build}/lib overwrite=true/ +copy file=${tomcat-jdbc.jar} todir=${tomcat.build}/lib/ /target @@ -2146,6 +2144,10 @@ Apache Tomcat ${version} native binaries delete dir=${tomcat.output} / !-- Remove the copied catalina.properties -- delete file=java/org/apache/catalina/startup/catalina.properties / +ant antfile=${tomcat.jdbc.dir}/build.xml dir=${tomcat.jdbc.dir} inheritall=false target=clean +/ant +!-- remove jdbc-pool documentation -- +delete file=webapps/docs/jdbc-pool.xml/ /target - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144955 - /tomcat/trunk/conf/catalina.properties
Author: rjung Date: Sun Jul 10 20:29:30 2011 New Revision: 1144955 URL: http://svn.apache.org/viewvc?rev=1144955view=rev Log: Add jdbc-pool to jarsToSkip. Modified: tomcat/trunk/conf/catalina.properties Modified: tomcat/trunk/conf/catalina.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/catalina.properties?rev=1144955r1=1144954r2=1144955view=diff == --- tomcat/trunk/conf/catalina.properties (original) +++ tomcat/trunk/conf/catalina.properties Sun Jul 10 20:29:30 2011 @@ -93,6 +93,7 @@ jasper.jar,jasper-el.jar,ecj-*.jar,\ tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\ tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\ tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\ +tomcat-jdbc.jar\ commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\ commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\ commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jdbc-pool] AT sign in manifest (filtered version strings)
I tested the jdbc-pool building, which is part of the release right now. The manifest contains patterns of the form @@VERSION@@, e.g. org.apache.tomcat.jdbc.pool;version=@@VERSION@@; org.apache.tomcat.jdbc.pool.interceptor;version=@@VERSION@@; org.apache.tomcat.jdbc.pool.jmx;version=@@VERSION@@; Bundle-Version: @@VERSION@@ which result in @1.1.0.1@ after filtering. Full Manifest: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.0 Created-By: 11.0-b16 (Sun Microsystems Inc.) Export-Package: org.apache.tomcat.jdbc.pool;version=@1.1.0.1@; uses :=javax.management,javax.naming,javax.naming.spi,javax.sql, org.apac he.tomcat.jdbc.pool.jmx, org.apache.tomcat.jdbc.pool.interceptor;ver sion=@1.1.0.1@; uses:=javax.management.openmbean,org.apache.tomcat .jdbc.pool, org.apache.tomcat.jdbc.pool.jmx;version=@1.1.0.1@; use s:=javax.management,org.apache.tomcat.jdbc.pool Bundle-Vendor: Apache Software Foundation Bundle-Version: @1.1.0.1@ Bundle-Name: Apache Tomcat JDBC Connection Pool Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.apache.tomcat.jdbc Import-Package: javax.management;version=0, javax.management.openmb ean;version=0, javax.naming;version=0, javax.sql;version=0, org .apache.juli.logging;version=[6.0.18, 7.0.0) I guess it should only be single at signs, like @VERSION@? Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [jdbc-pool] AT sign in manifest (filtered version strings)
feel free to commit the fix On 7/10/2011 2:38 PM, Rainer Jung wrote: I tested the jdbc-pool building, which is part of the release right now. The manifest contains patterns of the form @@VERSION@@, e.g. org.apache.tomcat.jdbc.pool;version=@@VERSION@@; org.apache.tomcat.jdbc.pool.interceptor;version=@@VERSION@@; org.apache.tomcat.jdbc.pool.jmx;version=@@VERSION@@; Bundle-Version: @@VERSION@@ which result in @1.1.0.1@ after filtering. Full Manifest: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.0 Created-By: 11.0-b16 (Sun Microsystems Inc.) Export-Package: org.apache.tomcat.jdbc.pool;version=@1.1.0.1@; uses :=javax.management,javax.naming,javax.naming.spi,javax.sql, org.apac he.tomcat.jdbc.pool.jmx, org.apache.tomcat.jdbc.pool.interceptor;ver sion=@1.1.0.1@; uses:=javax.management.openmbean,org.apache.tomcat .jdbc.pool, org.apache.tomcat.jdbc.pool.jmx;version=@1.1.0.1@; use s:=javax.management,org.apache.tomcat.jdbc.pool Bundle-Vendor: Apache Software Foundation Bundle-Version: @1.1.0.1@ Bundle-Name: Apache Tomcat JDBC Connection Pool Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.apache.tomcat.jdbc Import-Package: javax.management;version=0, javax.management.openmb ean;version=0, javax.naming;version=0, javax.sql;version=0, org .apache.juli.logging;version=[6.0.18, 7.0.0) I guess it should only be single at signs, like @VERSION@? Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Distributable contexts and non-serializable session attributes
go ahead add it in, if you add in a flag to toggle the behavior, and the flag is defaulted to today's behavior. you're safe, and you give users an option Filip On 7/10/2011 1:38 PM, Rainer Jung wrote: I implemented an addition to DeltaManager which allows to filter which session attributes actually get replicated (not yet committed). This is useful, because many applications - use non-serializable session attributes, so it is not possible to simply replicate everything - do not actually need everything replicated, because they can bootstrap all they need from a login context if a filter detects, that a failover has happened. In these cases it can also help to reduce replication traffic a lot. Unfortunately I stu,bled into some code in StandardSession: public void setAttribute(String name, Object value, boolean notify) { ... if ((manager != null) manager.getDistributable() !(value instanceof Serializable)) throw new IllegalArgumentException (sm.getString(standardSession.setAttribute.iae, name)); ... } This means if you enable distributable, then you can no longer set any non-serializable session attribute. The code is not recent, it goes back to at least TC 3.3. I understand, that it is helpful to devs being informed about serialization/replication problems. But I think it is too strict to enforce this in StandardSession whch is the base class of all our cluster sessions and we always delegate to StandardSession.setAttribute() after some cluster specific handling. The SPEC says: The container must accept objects that implement the Serializable interface. - The container may choose to support storage of other designated objects in the HttpSession, such as references to Enterprise JavaBeans components and transactions. - Migration of sessions will be handled by container-specific facilities. The distributed servlet container must throw an IllegalArgumentException for objects where the container cannot support the mechanism necessary for migration of the session storing them. (and some more in 7.7.2). I think checking for serializability in StandardSession isn't good, because AFAIK StandardSession isn't used by any mechanism Tomcat supports to implement distributable. And in DeltaSession I would like to have the check optional, i.e. only check if the configuration wants the attribute to be replicated. By default all attributes will be replicated as is today, but by configuration one will be able to choose attributes to replicate using a regexp against the attribute name. Any remarks? Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144964 - /tomcat/trunk/modules/jdbc-pool/resources/MANIFEST.MF
Author: rjung Date: Sun Jul 10 21:23:33 2011 New Revision: 1144964 URL: http://svn.apache.org/viewvc?rev=1144964view=rev Log: Fix version pattern in jdbc-pool manifest. Modified: tomcat/trunk/modules/jdbc-pool/resources/MANIFEST.MF Modified: tomcat/trunk/modules/jdbc-pool/resources/MANIFEST.MF URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/resources/MANIFEST.MF?rev=1144964r1=1144963r2=1144964view=diff == --- tomcat/trunk/modules/jdbc-pool/resources/MANIFEST.MF (original) +++ tomcat/trunk/modules/jdbc-pool/resources/MANIFEST.MF Sun Jul 10 21:23:33 2011 @@ -1,15 +1,15 @@ Manifest-Version: 1.0 Export-Package: - org.apache.tomcat.jdbc.pool;version=@@VERSION@@; + org.apache.tomcat.jdbc.pool;version=@VERSION@; uses:=javax.management,javax.naming,javax.naming.spi,javax.sql, org.apache.tomcat.jdbc.pool.jmx, - org.apache.tomcat.jdbc.pool.interceptor;version=@@VERSION@@; + org.apache.tomcat.jdbc.pool.interceptor;version=@VERSION@; uses:=javax.management.openmbean,org.apache.tomcat.jdbc.pool, - org.apache.tomcat.jdbc.pool.jmx;version=@@VERSION@@; + org.apache.tomcat.jdbc.pool.jmx;version=@VERSION@; uses:=javax.management,org.apache.tomcat.jdbc.pool Ant-Version: Apache Ant 1.7.0 Bundle-Vendor: Apache Software Foundation -Bundle-Version: @@VERSION@@ +Bundle-Version: @VERSION@ Bundle-Name: Apache Tomcat JDBC Connection Pool Bundle-ManifestVersion: 2 Created-By: 11.0-b16 (Sun Microsystems Inc.) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144966 - /tomcat/trunk/modules/jdbc-pool/build.xml
Author: rjung Date: Sun Jul 10 21:24:15 2011 New Revision: 1144966 URL: http://svn.apache.org/viewvc?rev=1144966view=rev Log: Set includeantruntime in jdbc-pool javac build tasks. Modified: tomcat/trunk/modules/jdbc-pool/build.xml Modified: tomcat/trunk/modules/jdbc-pool/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.xml?rev=1144966r1=1144965r2=1144966view=diff == --- tomcat/trunk/modules/jdbc-pool/build.xml (original) +++ tomcat/trunk/modules/jdbc-pool/build.xml Sun Jul 10 21:24:15 2011 @@ -145,7 +145,8 @@ source=${compile.source} target=${compile.target} optimize=${compile.optimize} - encoding=ISO-8859-1 + encoding=ISO-8859-1 + includeantruntime=false classpath refid=tomcat.jdbc.classpath/ include name=org/apache/tomcat/jdbc/** / /javac @@ -179,7 +180,8 @@ source=${compile.source} target=${compile.target} optimize=${compile.optimize} - encoding=ISO-8859-1 + encoding=ISO-8859-1 + includeantruntime=false classpath refid=tomcat.jdbc.classpath/ classpath refid=test.classpath/ include name=org/apache/tomcat/jdbc/** / - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144972 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
Author: markt Date: Sun Jul 10 21:59:51 2011 New Revision: 1144972 URL: http://svn.apache.org/viewvc?rev=1144972view=rev Log: Make it easier to test that the right response was returned Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1144972r1=1144971r2=1144972view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Sun Jul 10 21:59:51 2011 @@ -191,11 +191,14 @@ public abstract class TomcatBaseTest ext private static final long serialVersionUID = 1L; +public static final String RESPONSE_TEXT = +htmlbodypHello World/p/body/html; + @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { PrintWriter out = resp.getWriter(); -out.print(htmlbodypHello World/p/body/html); +out.print(RESPONSE_TEXT); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144976 - in /tomcat/trunk/test/org/apache/coyote/ajp: ./ SimpleAjpClient.java TestAbstractAjpProcessor.java TesterAjpMessage.java
Author: markt Date: Sun Jul 10 22:05:01 2011 New Revision: 1144976 URL: http://svn.apache.org/viewvc?rev=1144976view=rev Log: Add a simple AJP test. Added: tomcat/trunk/test/org/apache/coyote/ajp/ tomcat/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java tomcat/trunk/test/org/apache/coyote/ajp/TestAbstractAjpProcessor.java tomcat/trunk/test/org/apache/coyote/ajp/TesterAjpMessage.java Added: tomcat/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java?rev=1144976view=auto == --- tomcat/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java (added) +++ tomcat/trunk/test/org/apache/coyote/ajp/SimpleAjpClient.java Sun Jul 10 22:05:01 2011 @@ -0,0 +1,184 @@ +/* + * 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.coyote.ajp; + +import java.io.IOException; +import java.io.InputStream; +import java.net.Socket; + +import javax.net.SocketFactory; + +/** + * AJP client that is not (yet) a full AJP client implementation as it just + * provides the functionality required for the unit tests. The client uses + * blocking IO throughout. + */ +public class SimpleAjpClient { + +private static final int AJP_PACKET_SIZE = 8192; +private static final byte[] AJP_CPING; + +static { +TesterAjpMessage ajpCping = new TesterAjpMessage(16); +ajpCping.reset(); +ajpCping.appendByte(Constants.JK_AJP13_CPING_REQUEST); +ajpCping.end(); +AJP_CPING = new byte[ajpCping.getLen()]; +System.arraycopy(ajpCping.getBuffer(), 0, AJP_CPING, 0, +ajpCping.getLen()); +} + +private String host = localhost; +private int port = -1; +private Socket socket = null; + +public void setPort(int port) { +this.port = port; +} + +public int getPort() { +return port; +} + +public void connect() throws IOException { +socket = SocketFactory.getDefault().createSocket(host, port); +} + +public void disconnect() throws IOException { +socket.close(); +socket = null; +} + +/** + * Create a message to request the given URL. + */ +public TesterAjpMessage createForwardMessage(String url) { +TesterAjpMessage message = new TesterAjpMessage(AJP_PACKET_SIZE); +message.reset(); + +// Set the header bytes +message.getBuffer()[0] = 0x12; +message.getBuffer()[1] = 0x34; + +// Code 2 for forward request +message.appendByte(Constants.JK_AJP13_FORWARD_REQUEST); + +// HTTP method, GET = 2 +message.appendByte(0x02); + +// Protocol +message.appendString(http); + +// Request URI +message.appendString(url); + +// Remote address +message.appendString(10.0.0.1); + +// Remote host +message.appendString(client.dev.local); + +// Server name +message.appendString(host); + +// Port +message.appendInt(port); + +// Is ssl +message.appendByte(0x00); + +// No other headers or attributes +message.appendInt(0); + +// Terminator +message.appendByte(0xFF); + +// End the message and set the length +message.end(); + +return message; +} + +/** + * Sends an TesterAjpMessage to the server and returns the response message. + */ +public TesterAjpMessage sendMessage(TesterAjpMessage message) +throws IOException { +// Send the message +socket.getOutputStream().write( +message.getBuffer(), 0, message.getLen()); +// Read the response +return readMessage(); +} + +/** + * Tests the connection to the server and returns the CPONG response. + */ +public TesterAjpMessage cping() throws IOException { +// Send the ping message +socket.getOutputStream().write(AJP_CPING); +// Read the response +return readMessage(); +} + +/** + *
Re: svn commit: r1144833 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml
2011/7/10 rj...@apache.org: Author: rjung Date: Sun Jul 10 11:22:40 2011 New Revision: 1144833 URL: http://svn.apache.org/viewvc?rev=1144833view=rev Log: Another regression in 7.0.18: year number formatting in AccessLogValve is broken due to type yyy instead of . Nice catch. There is one more regression there: month names are now localized and may be printed not in English, but in other languages. 127.0.0.1 - - [09/июл/11:00:48:22 +0400] GET /examples/ HTTP/1.1 200 1156 Best regards, Konstantin Kolinko Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1144833r1=1144832r2=1144833view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Sun Jul 10 11:22:40 2011 @@ -263,7 +263,7 @@ public class AccessLogValve extends Valv private class Cache { /* CLF log format */ - private static final String cLFFormat = dd/MMM/yyy:HH:mm:ss; + private static final String cLFFormat = dd/MMM/:HH:mm:ss; /* Second used to retrieve CLF format in most recent invocation */ private long previousSeconds = 0L; Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144833r1=1144832r2=1144833view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul 10 11:22:40 2011 @@ -71,6 +71,9 @@ add Add option to activate AccessLog for unit tests. (rjung) /add + fix + Fix regression in year number formatting for AccessLogValve. (rjung) + /fix /changelog /subsection subsection name=Cluster - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [taglibs] Time to release 1.2.0?
+1 again.. how is the release going? 2011/3/27 Jeremy Boynes jboy...@apache.org On Mar 25, 2011, at 2:15 AM, Mark Thomas wrote: On 23/01/2011 20:41, Jeremy Boynes wrote: The only bug remaining that impact the JSTL libraries is #46052 (locale performance on 1.6). Henri suggested releasing in its current form which sounds reasonable. Should we release this as 1.2.0? Is this a good version number - should we use something like 1.2.0-beta? This will be the first release in a long time and the first since the switch to a Maven based build. The process is described here http://www.apache.org/dev/publishing-maven-artifacts.html I think we need to release the parent POM first to get it in the central repo, and then the artifacts that depend on it. I'd volunteer to RM this but: 1) I'm not a PMC member (which I don't think matters if we get enough votes from PMC members) 2) I'd need to update my PGP key in the WoT (somehow) 3) I've not done the above process before so will likely mess things up. If we're ready to do this I'd suggest going for it this week. Thoughts? +1 Ping. What happened to this? From my side, Olivier's patch for Maven 3 looked good and then my personal life got in the way. I'll get it applied and tested and then publish a candidate. -- Jeremy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org -- Lei Wang (Rex) rwonly AT apache.org