svn commit: r719194 - in /tomcat/trunk/java/org/apache: catalina/connector/ tomcat/util/ tomcat/util/buf/ tomcat/util/digester/ tomcat/util/http/ tomcat/util/modeler/ tomcat/util/modeler/modules/ tomc
Author: markt Date: Thu Nov 20 00:19:23 2008 New Revision: 719194 URL: http://svn.apache.org/viewvc?rev=719194&view=rev Log: Revert r718819 that completely broke Tomcat. Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java tomcat/trunk/java/org/apache/tomcat/util/digester/CallMethodRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/Rule.java tomcat/trunk/java/org/apache/tomcat/util/digester/Rules.java tomcat/trunk/java/org/apache/tomcat/util/digester/RulesBase.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetNextRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetRootRule.java tomcat/trunk/java/org/apache/tomcat/util/digester/SetTopRule.java tomcat/trunk/java/org/apache/tomcat/util/http/ServerCookie.java tomcat/trunk/java/org/apache/tomcat/util/modeler/BaseNotificationBroadcaster.java tomcat/trunk/java/org/apache/tomcat/util/modeler/Registry.java tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java tomcat/trunk/java/org/apache/tomcat/util/modeler/modules/MbeansSource.java tomcat/trunk/java/org/apache/tomcat/util/net/TcpConnectionHandler.java tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPool.java 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=719194&r1=719193&r2=719194&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Nov 20 00:19:23 2008 @@ -626,7 +626,7 @@ } if (conv != null) { try { -conv.convert(bc, cc, cc.getBuffer().length - cc.getEnd()); +conv.convert(bc, cc); uri.setChars(cc.getBuffer(), cc.getStart(), cc.getLength()); return; Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=719194&r1=719193&r2=719194&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Thu Nov 20 00:19:23 2008 @@ -470,9 +470,25 @@ /** * Replace ${NAME} with the property value + * + * @deprecated Use the explicit method + */ +public static String replaceProperties(String value, Object getter) { +if (getter instanceof Hashtable) +return replaceProperties(value, (Hashtable) getter, null); + +if (getter instanceof PropertySource) { +PropertySource src[] = new PropertySource[] { (PropertySource) getter }; +return replaceProperties(value, null, src); +} +return value; +} + +/** + * Replace ${NAME} with the property value */ -public static String replaceProperties(String value, -Hashtable staticProp, PropertySource dynamicProp[]) { +public static String replaceProperties(String value, Hashtable staticProp, +PropertySource dynamicProp[]) { if (value.indexOf("$") < 0) { return value; } Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=719194&r1=719193&r2=719194&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Thu Nov 20 00:19:23 2008 @@ -67,6 +67,16 @@ static final int BUFFER_SIZE=8192;
Re: trunk broken
Filip Hanik - Dev Lists wrote: > r718796 seems to work fine for me > > in r718819 tomcat wont even startup I have reverted that specific check in (it was removing deprecated code). Trunk builds - and starts :) - without error now. > I think we need to roll back the mass checkins done lately, please don't > roll my checkins back, they are simple but important bug fixes No need - svn up and you'll be good to go. Shout if you see anything else. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trunk broken
Filip Hanik - Dev Lists wrote: r718796 seems to work fine for me in r718819 tomcat wont even startup Well r719198 works on my machine F9 Sun JVM. Cheers Jean-Frederic I think we need to roll back the mass checkins done lately, please don't roll my checkins back, they are simple but important bug fixes Filipz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tomcat Wiki] Update of "SupportAndTraining" by PetraUnnuetzer
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The following page has been changed by PetraUnnuetzer: http://wiki.apache.org/tomcat/SupportAndTraining -- If you would like to add your company to this page, feel free to do so. You will need to create a wiki account to do so. There aren't any hard and fast rules about what is acceptable but please keep your entry to a few lines, a link and a small logo. Excessive entries will be edited. Remember to add you company to both sections if you provide support and training. = Support = + + [http://www.kippdata.de http://www.kippdata.de/site/themes/kippdata/img/elements/kippdata_logo.gif] + + Kippdata's [https://www.kippdata.de/tomcat/ eSupport for Apache Tomcat] features several eSupport packages starting from basic support levels up to mission critical enterprise support. We actively contribute to the Apache Tomcat project, so that our bug fixes and other code enhancements become part of the standard Apache Tomcat code. Kippdata is located in Bonn, Germany. + + Kippdatas [https://www.kippdata.de/tomcat/ eSupport für Apache Tomcat] bietet von Basis Level Support bis hin zu Support für unternehmenskritische Anwendungen verschiedene eSupport-Pakete. Wir beteiligen uns aktiv am Apache Tomcat Projekt, so dass unsere Fehlerbeseitigungen und andere Erweiterungen des Codes in den Standard Apache Tomcat Code einfliessen. Kippdata ist in Bonn, Deutschland, ansässig. [http://www.springsource.com http://www.springframework.org/sites/all/themes/zen/framework/logo.png] @@ -18, +24 @@ = Training = + [http://www.kippdata.de http://www.kippdata.de/site/themes/kippdata/img/elements/kippdata_logo.gif] + + kippdata offers a [http://www.kippdata.de/red/workshops/opensource/ selection of trainings for Apache Tomcat]. We focus on single day trainings like âApache Tomcat Best Practicesâ, âJava Memory Sizing and Garbage Collection Tuningâ. Kippdata is located in Bonn, Germany. + + Kippdata bietet eine [http://www.kippdata.de/red/workshops/opensource/ Auswahl an Schulungen für Apache Tomcat] an. Wir haben uns auf Ein-Tages-Schulungen zu Themen wie âApache Tomcat Best Practicesâ, âJava Memory Sizing and Garbage Collection Tuningâ spezialisiert. Kippdata ist in Bonn, Deutschland, ansässig. + [http://www.springsource.com http://www.springframework.org/sites/all/themes/zen/framework/logo.png] !SpringSource provides comprehensive [http://www.springsource.com/training?aw education] on enterprise Java with specific [http://springsource.com/training/apa001/syllabus?aw training] for Apache Tomcat. The four-day, intensive instructor-led training provides practical, hands-on knowledge about installation, configuration, deployment, load balancing and troubleshooting for production systems using Apache Tomcat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 46249] New: "stream closed" problem
https://issues.apache.org/bugzilla/show_bug.cgi?id=46249 Summary: "stream closed" problem Product: Tomcat 5 Version: 5.5.27 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Jasper AssignedTo: dev@tomcat.apache.org ReportedBy: [EMAIL PROTECTED] Tag handler Class: import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; public class sayHello extends BodyTagSupport{ private String name = null; private String value = null; private JspWriter out = null; public void setName(String name){ this.name = name; } public int doStartTag(){ try { getOut(); // out.close(); value += "v"; out.println("hello:" + getName()); out.println(":" + getValue()); } catch (IOException e) { e.printStackTrace(); } return 0; } public int doEndTag(){ try{ getOut(); out.print(""); }catch(IOException e){ e.printStackTrace(); return 1; } return 0; } public JspWriter getOut() { if (out == null) { System.out.println("get out.."); out = pageContext.getOut(); } return out; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getName() { return name; } } a jsp: <%@ page contentType="text/html; charset=GBK" %> <%@ taglib uri="/WEB-INF/mytld.tld" prefix="aa" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> access this jsp page ,might be thrown "Stream closed" Excepetion. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
POST request.ContentLength() is 0 when using NTLM
When it is not your application, when it is not the HTTP server, it is the BROWSER!!! The following explains what the IE optimization I was not aware of: http://lists.samba.org/archive/jcifs/2006-September/006554.html http://dreamweaverforum.info/flex/118349-ntlm-filereference.html The following explains two different solutions: http://lists.samba.org/archive/jcifs/2004-December/004459.html (Solution 2 but in our case no need for a filter: the proposed logic will perfectly fit in the NTLM Authenticator) I will program and test them next week. Patches will be republished after few weeks of testing: current one support "GET" correctly and "POST" if the Registry of each user is modified (HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings/DisableNTLMPreAuth to be set to 1). Wishing you a very nice day, Christophe Dupriez Centre Antipoisons-Antigifcentrum C/o Hôpital Central de la Base Reine Astrid Rue Bruyn 1120 Bruxelles Belgique tel 32-(0)2.264.96.36 fax 32-(0)2.264.96.46 - Original Message - From: Christophe Dupriez [mailto:[EMAIL PROTECTED] To: dev@tomcat.apache.org [mailto:[EMAIL PROTECTED] Subject: Tomcat 6.0.18, POST request.ContentLength() is 0 when entering the Authenticator > Hi Tomcat Developpers! > > Few days ago I provided an NTLM Authenticator. My users reported that their > POST requests are now without content. > I traced and I can confirm that, when entering the > NtlmAuthenticator.authenticate method, request.ContentLength() is -1 for GET > transactions (and it works) but it is 0 for POST. > At the very entrance of BasicAuthenticator.authenticate, > request.ContentLength() is -1 for GET transactions (and it works) but the > real length is there for POST. > > So I can have 50 GET transactions without any problems : the NTLM > authentication is done once with the first transaction. Then, if a POST > comes, it will be 0 length. > > Any idea of what may be happening? As I did not found any real dependency on > the word "BASIC" within Tomcat source, I am wondering if lower level Java > Run Time could test explicitely the authentication method and "forget" to > manage the ContentLength? It seems that some people have problem with FORM > authentication. Could it be a similar problem? > > The patch file is accessible: > http://www.destin.be/tomcat/NtlmAuthentication.patch > > The new authenticator class is accessible: > http://www.destin.be/tomcat/NtlmAuthenticator.java > > Wishing you a very nice week, > > Christophe Dupriez > Centre Antipoisons - Antigifcentrum > C/o Hôpital Central de la Base Reine Astrid >Rue Bruyn - 1120 Bruxelles - Belgique > tel 32-(0)2.264.96.36 fax 32-(0)2.264.96.46 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r719093 - /tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
This doesn't make sense to me. The Javadoc and the code check for null to allow the use of the default value in the JVM. This patch makes all of that invalid and sets it to true. So either 1) this would need reverted -or- 2) Or the if (tcpNoDelay != null) needs removed - or - 3) The comments get updated (not sure if there associated docs too) But by defaulting the value to Boolean.TRUE - it does eliminate the chance of a NPE here: public boolean getTcpNoDelay() { return tcpNoDelay.booleanValue(); } I'm indifferent on the fix. (Just the code comment VS code inconsistency) -Tim [EMAIL PROTECTED] wrote: Author: fhanik Date: Wed Nov 19 14:14:57 2008 New Revision: 719093 URL: http://svn.apache.org/viewvc?rev=719093&view=rev Log: keep the correct default value Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=719093&r1=719092&r2=719093&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Wed Nov 19 14:14:57 2008 @@ -104,7 +104,7 @@ /** * TCP_NO_DELAY option. JVM default used if not set. */ -protected Boolean tcpNoDelay = null; +protected Boolean tcpNoDelay = Boolean.TRUE; /** * SO_KEEPALIVE option. JVM default used if not set. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r719093 - /tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html look for tcpNoDelay there has been a default for years Filip Tim Funk wrote: This doesn't make sense to me. The Javadoc and the code check for null to allow the use of the default value in the JVM. This patch makes all of that invalid and sets it to true. So either 1) this would need reverted -or- 2) Or the if (tcpNoDelay != null) needs removed - or - 3) The comments get updated (not sure if there associated docs too) But by defaulting the value to Boolean.TRUE - it does eliminate the chance of a NPE here: public boolean getTcpNoDelay() { return tcpNoDelay.booleanValue(); } I'm indifferent on the fix. (Just the code comment VS code inconsistency) -Tim [EMAIL PROTECTED] wrote: Author: fhanik Date: Wed Nov 19 14:14:57 2008 New Revision: 719093 URL: http://svn.apache.org/viewvc?rev=719093&view=rev Log: keep the correct default value Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=719093&r1=719092&r2=719093&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Wed Nov 19 14:14:57 2008 @@ -104,7 +104,7 @@ /** * TCP_NO_DELAY option. JVM default used if not set. */ -protected Boolean tcpNoDelay = null; +protected Boolean tcpNoDelay = Boolean.TRUE; /** * SO_KEEPALIVE option. JVM default used if not set. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trunk broken
all good now, thanks Mark Filip Mark Thomas wrote: Filip Hanik - Dev Lists wrote: r718796 seems to work fine for me in r718819 tomcat wont even startup I have reverted that specific check in (it was removing deprecated code). Trunk builds - and starts :) - without error now. I think we need to roll back the mass checkins done lately, please don't roll my checkins back, they are simple but important bug fixes No need - svn up and you'll be good to go. Shout if you see anything else. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trunk broken
jean-frederic clere wrote: Filip Hanik - Dev Lists wrote: r718796 seems to work fine for me in r718819 tomcat wont even startup Well r719198 works on my machine F9 Sun JVM. :) you prolly didn't clean out output/classes before the build, that will do it Mark took care of it Filip Cheers Jean-Frederic I think we need to roll back the mass checkins done lately, please don't roll my checkins back, they are simple but important bug fixes Filipz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r719262 - in /tomcat/tc6.0.x/trunk/java/org/apache: catalina/connector/ coyote/ coyote/http11/ tomcat/util/net/
Author: fhanik Date: Thu Nov 20 08:04:55 2008 New Revision: 719262 URL: http://svn.apache.org/viewvc?rev=719262&view=rev Log: port of http://svn.apache.org/viewvc?view=rev&revision=645175 Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/ActionCode.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java?rev=719262&r1=719261&r2=719262&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CometEventImpl.java Thu Nov 20 08:04:55 2008 @@ -26,6 +26,7 @@ import org.apache.catalina.CometEvent; import org.apache.catalina.util.StringManager; +import org.apache.coyote.ActionCode; public class CometEventImpl implements CometEvent { @@ -92,8 +93,10 @@ if (request == null) { throw new IllegalStateException(sm.getString("cometEvent.nullRequest")); } +boolean iscomet = request.isComet(); request.setComet(false); response.finishResponse(); +if (iscomet) request.cometClose(); } public EventSubType getEventSubType() { @@ -116,6 +119,7 @@ UnsupportedOperationException { if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) { request.setAttribute("org.apache.tomcat.comet.timeout", new Integer(timeout)); +if (request.isComet()) request.setCometTimeout((long)timeout); } else { throw new UnsupportedOperationException(); } Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=719262&r1=719261&r2=719262&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java Thu Nov 20 08:04:55 2008 @@ -2262,6 +2262,13 @@ return (inputBuffer.available() > 0); } +public void cometClose() { +coyoteRequest.action(ActionCode.ACTION_COMET_CLOSE,getEvent()); +} + +public void setCometTimeout(long timeout) { +coyoteRequest.action(ActionCode.ACTION_COMET_SETTIMEOUT,new Long(timeout)); +} // -- Protected Methods Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ActionCode.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ActionCode.java?rev=719262&r1=719261&r2=719262&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ActionCode.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ActionCode.java Thu Nov 20 08:04:55 2008 @@ -141,7 +141,7 @@ /** - * Callback for begin Comet processing + * Callback for end Comet processing */ public static final ActionCode ACTION_COMET_END = new ActionCode(22); @@ -151,7 +151,16 @@ */ public static final ActionCode ACTION_AVAILABLE = new ActionCode(23); +/** + * Callback for an asynchronous close of the Comet event + */ +public static final ActionCode ACTION_COMET_CLOSE = new ActionCode(24); +/** + * Callback for setting the timeout asynchronously + */ +public static final ActionCode ACTION_COMET_SETTIMEOUT = new ActionCode(25); + // --- Constructors int code; Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=719262&r1=719261&r2=719262&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Thu Nov 20 08:04:55 2008 @@ -1211,6 +1211,10 @@ comet = true; } else if (actionCode == ActionCode.ACTION_COMET_END) { comet = false; +} else if (actionCode == ActionCode.ACTION_COMET_CLOSE) { +//no op +
svn commit: r719263 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Author: fhanik Date: Thu Nov 20 08:07:18 2008 New Revision: 719263 URL: http://svn.apache.org/viewvc?rev=719263&view=rev Log: update changelog with latest comet fixes Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=719263&r1=719262&r2=719263&view=diff == --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Nov 20 08:07:18 2008 @@ -35,6 +35,11 @@ + +Implement async close behaviour for Comet/NIO. +No-op for APR (same behavior as before) +(r719262) + Default thread count for HTTP connectors is 200. (r713186) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r719264 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
Author: fhanik Date: Thu Nov 20 08:13:02 2008 New Revision: 719264 URL: http://svn.apache.org/viewvc?rev=719264&view=rev Log: Fixed read/write timeouts - backport of http://svn.apache.org/viewvc?view=rev&revision=707670 Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=719264&r1=719263&r2=719264&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Thu Nov 20 08:13:02 2008 @@ -81,6 +81,7 @@ public int write(ByteBuffer buf, NioChannel socket, long writeTimeout,MutableInteger lastWrite) throws IOException { SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector()); if ( key == null ) throw new IOException("Key no longer registered"); +KeyReference reference = new KeyReference(); KeyAttachment att = (KeyAttachment) key.attachment(); int written = 0; boolean timedout = false; @@ -101,7 +102,7 @@ } try { if ( att.getWriteLatch()==null || att.getWriteLatch().getCount()==0) att.startWriteLatch(1); -poller.add(att,SelectionKey.OP_WRITE); +poller.add(att,SelectionKey.OP_WRITE,reference); att.awaitWriteLatch(writeTimeout,TimeUnit.MILLISECONDS); }catch (InterruptedException ignore) { Thread.interrupted(); @@ -122,9 +123,10 @@ throw new SocketTimeoutException(); } finally { poller.remove(att,SelectionKey.OP_WRITE); -if (timedout && key != null) { -poller.cancelKey(socket, key); +if (timedout && reference.key!=null) { +poller.cancelKey(reference.key); } +reference.key = null; } return written; } @@ -145,6 +147,7 @@ public int read(ByteBuffer buf, NioChannel socket, long readTimeout) throws IOException { SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector()); if ( key == null ) throw new IOException("Key no longer registered"); +KeyReference reference = new KeyReference(); KeyAttachment att = (KeyAttachment) key.attachment(); int read = 0; boolean timedout = false; @@ -162,7 +165,7 @@ } try { if ( att.getReadLatch()==null || att.getReadLatch().getCount()==0) att.startReadLatch(1); -poller.add(att,SelectionKey.OP_READ); +poller.add(att,SelectionKey.OP_READ, reference); att.awaitReadLatch(readTimeout,TimeUnit.MILLISECONDS); }catch (InterruptedException ignore) { Thread.interrupted(); @@ -182,9 +185,10 @@ throw new SocketTimeoutException(); } finally { poller.remove(att,SelectionKey.OP_READ); -if (timedout && key != null) { -poller.cancelKey(socket,key); +if (timedout && reference.key!=null) { +poller.cancelKey(reference.key); } +reference.key = null; } return read; } @@ -193,10 +197,10 @@ protected class BlockPoller extends Thread { protected boolean run = true; protected Selector selector = null; -protected ConcurrentLinkedQueue events = new ConcurrentLinkedQueue(); +protected ConcurrentLinkedQueue events = new ConcurrentLinkedQueue(); public void disable() { run = false; selector.wakeup();} protected AtomicInteger wakeupCounter = new AtomicInteger(0); -public void cancelKey(final NioChannel socket, final SelectionKey key) { +public void cancelKey(final SelectionKey key) { Runnable r = new Runnable() { public void run() { key.cancel(); @@ -219,7 +223,7 @@ } } -public void add(final KeyAttachment key, final int ops) { +public void add(final KeyAttachment key, final int ops, final KeyReference ref) { Runnable r = new Runnable() { public void run() { if ( key == null ) return; @@ -231,6 +235,9 @@ try { if (sk == null) { sk = ch.register(selector, ops, key); +ref.key = sk; +} else if (!sk.isValid()) { +cancel(sk,key,ops);
svn commit: r719265 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Author: fhanik Date: Thu Nov 20 08:13:40 2008 New Revision: 719265 URL: http://svn.apache.org/viewvc?rev=719265&view=rev Log: update changelog Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=719265&r1=719264&r2=719265&view=diff == --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Nov 20 08:13:40 2008 @@ -35,6 +35,10 @@ + +Fix read/write timeout of async comet operations +(r719264) + Implement async close behaviour for Comet/NIO. No-op for APR (same behavior as before) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r719268 - in /tomcat/tc6.0.x/trunk: STATUS.txt webapps/docs/changelog.xml
Author: fhanik Date: Thu Nov 20 08:16:12 2008 New Revision: 719268 URL: http://svn.apache.org/viewvc?rev=719268&view=rev Log: update Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=719268&r1=719267&r2=719268&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Nov 20 08:16:12 2008 @@ -94,12 +94,6 @@ rjung: slightly prefer enabled for 6.0.x because of increased security by default, but disabled for tc5.5.x because of the small risk of breaking existing apps. -* Allow asynchronous close() and setTimeout() on CometEvents - http://svn.apache.org/viewvc?view=rev&revision=645175 - +1: fhanik, pero, markt - 0: remm (maybe, don't know ...) - -1: - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45026 Never use empty reason phrase. http://svn.apache.org/viewvc?rev=697183&view=rev @@ -142,16 +136,6 @@ really old to me, so where would this come from ?) -1: -* Fix read/write timeout during async comet access - http://svn.apache.org/viewvc?rev=707670&view=rev - +1: fhanik, pero, markt - -1: - -* Start poller before acceptor in NIO, bug 43701 - http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&r1=618058&r2=618059 - +1: fhanik, pero, markt - -1: - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46105 Correctly set URI encoding when replaying a request after FORM auth http://svn.apache.org/viewvc?rev=709294&view=rev Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=719268&r1=719267&r2=719268&view=diff == --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Nov 20 08:16:12 2008 @@ -35,6 +35,7 @@ + 43071Start poller before acceptor (r719267) Fix read/write timeout of async comet operations (r719264) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r719267 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Author: fhanik Date: Thu Nov 20 08:15:52 2008 New Revision: 719267 URL: http://svn.apache.org/viewvc?rev=719267&view=rev Log: fix bug 43071 Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=719267&r1=719266&r2=719267&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Nov 20 08:15:52 2008 @@ -813,6 +813,13 @@ workers = new WorkerStack(maxThreads); } +// Start poller thread +poller = new Poller(); +Thread pollerThread = new Thread(poller, getName() + "-ClientPoller"); +pollerThread.setPriority(threadPriority); +pollerThread.setDaemon(true); +pollerThread.start(); + // Start acceptor threads for (int i = 0; i < acceptorThreadCount; i++) { Thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor-" + i); @@ -820,13 +827,6 @@ acceptorThread.setDaemon(daemon); acceptorThread.start(); } - -// Start poller thread -poller = new Poller(); -Thread pollerThread = new Thread(poller, getName() + "-ClientPoller"); -pollerThread.setPriority(threadPriority); -pollerThread.setDaemon(true); -pollerThread.start(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r719269 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: fhanik Date: Thu Nov 20 08:18:22 2008 New Revision: 719269 URL: http://svn.apache.org/viewvc?rev=719269&view=rev Log: update Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=719269&r1=719268&r2=719269&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Nov 20 08:18:22 2008 @@ -211,7 +211,7 @@ * Add Costin's DBCP check so you can build Tomcat 6 on a 1.6 JDK http://svn.apache.org/viewvc?view=rev&revision=652744 http://svn.apache.org/viewvc?view=rev&revision=653247 - +1: markt + +1: markt, fhanik -1: * Remove unnecessary commons-logging reference from manifest @@ -232,7 +232,7 @@ * Make sure DIR deployment with context.xml works when configBase does no exist. This is required as a result of my previous changes to HostConfig http://svn.apache.org/viewvc?rev=718436&view=rev - +1: markt + +1: markt, fhanik -1: * Fix possible NPE in NioEndpoint - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 46252] New: Tomcat access log doesn't support Unicode
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252 Summary: Tomcat access log doesn't support Unicode Product: Tomcat 5 Version: 5.5.17 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: [EMAIL PROTECTED] AccessLogValve, which is responsible for handling the access log uses FileWriter (that doesn't support Unicode). I guess that instantiating the writer like this would solve the case: writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(pathname), "UTF-8"), true); -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DeltaManager initialization delay
This message is targeted at Filip Hanik, Craig R. McClanahan, Jean-Francois Arcand, Peter Rossbach or anyone with a direct interest in the DeltaManager implementation in Tomcat 6. A vendor (who will remain nameless) whose product I support for a client recently gave me an idea for a patch to DeltaManager to address what the vendor claims is a Tomcat specific issue related to session replication. I'm wondering if it would be of value to the community or if the "problem" it is trying to remedy is an intentional "feature". The primary issue is that, according to vendor engineering support, the other application containers the vendor supports deploying their product on, including WebSphere, WebLogic, et al, wait until after local applications have been initialized before processing incoming messages from the cluster that could include deserializing remote sessions and the objects therein. I have not confirmed this by examining the other containers mind you, but am pretty confident that this is an accurate statement in so far that vendor's product works in those environments but does not work in a clustered tomcat environment. The reason it fails in tomcat is that some of the objects in the serialized session make calls at construction time to the vendor's (archaic) preferences API's static methods, which are not initialized properly until the web application itself is started. The result is that the first node in the cluster starts up fine, but the 2nd-Nth nodes die a horrible death trying to deserialize remote sessions populated by the first node. The workaround we've implemented locally is a simple one: we extend the DeltaManager with a custom class. Therein, we create a latch (java.util.concurrent.CountDownLatch, to be specific) and save it in the ServletContext. The only overridden method is messageDataReceived(), which uses the latch.await() method to block before calling the original implementation of the parent messageDataReceived() method. The vendor's application (or, more properly, the custom extensions we've built on their platform) looks at the ServletContext for a latch after the preferences have been initialized locally, and calls latch.countDown(), allowing any blocked calls to messageDataReceived() to start executing as normally. Without breaking the current sequence of initializing the session replication code before local applications that Tomcat developers may have come to expect, it seems like there is a potential solution here that might enable applications like the one I've got to support to choose to configure the session replication to wait to process incoming messages until after the application has started. I think it would be pretty trivial for me to offer a patch to DeltaManager that created a latch based on a configuration element. One could imagine an automatic mechanism for toggling the latch by the container after the application initialization, or deferring to the application to deactivate. The question is, does anybody want such functionality besides me? The corollary is, if being able to choose when session replication begins is a desirable feature, is this the right tactic to implement it? Sincerely, - Jason Lunn "That's the problem. He's a brilliant lunatic and you can't tell which way he'll jump -- like his game he's impossible to analyse -- you can't dissect him, predict him -- which of course means he's not a lunatic at all."
Re: DeltaManager initialization delay
patches are always welcome, shoot it over and we can review it Filip Jason wrote: This message is targeted at Filip Hanik, Craig R. McClanahan, Jean-Francois Arcand, Peter Rossbach or anyone with a direct interest in the DeltaManager implementation in Tomcat 6. A vendor (who will remain nameless) whose product I support for a client recently gave me an idea for a patch to DeltaManager to address what the vendor claims is a Tomcat specific issue related to session replication. I'm wondering if it would be of value to the community or if the "problem" it is trying to remedy is an intentional "feature". The primary issue is that, according to vendor engineering support, the other application containers the vendor supports deploying their product on, including WebSphere, WebLogic, et al, wait until after local applications have been initialized before processing incoming messages from the cluster that could include deserializing remote sessions and the objects therein. I have not confirmed this by examining the other containers mind you, but am pretty confident that this is an accurate statement in so far that vendor's product works in those environments but does not work in a clustered tomcat environment. The reason it fails in tomcat is that some of the objects in the serialized session make calls at construction time to the vendor's (archaic) preferences API's static methods, which are not initialized properly until the web application itself is started. The result is that the first node in the cluster starts up fine, but the 2nd-Nth nodes die a horrible death trying to deserialize remote sessions populated by the first node. The workaround we've implemented locally is a simple one: we extend the DeltaManager with a custom class. Therein, we create a latch (java.util.concurrent.CountDownLatch, to be specific) and save it in the ServletContext. The only overridden method is messageDataReceived(), which uses the latch.await() method to block before calling the original implementation of the parent messageDataReceived() method. The vendor's application (or, more properly, the custom extensions we've built on their platform) looks at the ServletContext for a latch after the preferences have been initialized locally, and calls latch.countDown(), allowing any blocked calls to messageDataReceived() to start executing as normally. Without breaking the current sequence of initializing the session replication code before local applications that Tomcat developers may have come to expect, it seems like there is a potential solution here that might enable applications like the one I've got to support to choose to configure the session replication to wait to process incoming messages until after the application has started. I think it would be pretty trivial for me to offer a patch to DeltaManager that created a latch based on a configuration element. One could imagine an automatic mechanism for toggling the latch by the container after the application initialization, or deferring to the application to deactivate. The question is, does anybody want such functionality besides me? The corollary is, if being able to choose when session replication begins is a desirable feature, is this the right tactic to implement it? Sincerely, - Jason Lunn "That's the problem. He's a brilliant lunatic and you can't tell which way he'll jump -- like his game he's impossible to analyse -- you can't dissect him, predict him -- which of course means he's not a lunatic at all." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r719481 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java
Author: fhanik Date: Thu Nov 20 21:22:14 2008 New Revision: 719481 URL: http://svn.apache.org/viewvc?rev=719481&view=rev Log: timeout of 0 means we return right away Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java Modified: tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java?rev=719481&r1=719480&r2=719481&view=diff == --- tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java (original) +++ tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/FairBlockingQueue.java Thu Nov 20 21:22:14 2008 @@ -76,7 +76,7 @@ lock.lock(); try { result = items.poll(); -if (result==null) { +if (result==null && timeout>0) { ExchangeCountDownLatch c = new ExchangeCountDownLatch(1); waiters.addLast(c); lock.unlock(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]