[RESULTS][VOTE] Release Apache Tomcat Connectors 1.2.32
With my implicit +1 we have 4 binding votes (Henri, Jim, Tim and I) As such Tomcat Connectors 1.2.32 has been voted as stable. I'll copy the files to the dist, and make ANN later today when majority of mirrors pick the dist. Thanks to all who helped testing! Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51487] New: Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties
https://issues.apache.org/bugzilla/show_bug.cgi?id=51487 Bug #: 51487 Summary: Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties Product: Tomcat 7 Version: unspecified Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Packaging AssignedTo: dev@tomcat.apache.org ReportedBy: haunx@gmail.com Classification: Unclassified Dear Sir! I would like to send you bug of tomcat version 7. I search on google to find way to solve but not way to solve this. Currently, my project using tomcat 7. When i deploy project i grapple with difficult and show message bug with information below: INFO: No TLD files were found in [jndi:/localhost/cm/WEB-INF/lib/jakarta-oro-2.0.8.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties Jul 7, 2011 2:20:37 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar INFO: No TLD files were found in [jndi:/localhost/cm/WEB-INF/lib/ezmorph-1.0.6.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties Jul 7, 2011 2:20:37 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar INFO: No TLD files were found in [jndi:/localhost/cm/WEB-INF/lib/spring.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties Jul 7, 2011 2:20:37 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar INFO: No TLD files were found in [file:/C:/Program%20Files/Java/jre6/lib/ext/sunmscapi.jar]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties thank and best regards -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Blank extra access log entries with AJP connector in 7.0.18
wild-guess Could it be the cping/cpong? /wild-guess On 08.07.2011 05:41, Konstantin Kolinko wrote: Running 7.0.18 behind Apache HTTPD, using Ajp connector (Bio), for every actual request there are two records in the access log, one true record, followed by a blank one. E.g.: ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/html HTTP/1.1 200 24854 ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/images/asf-logo.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:06 +0400] GET /manager/images/tomcat.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:06 +0400] - 400 - These extra log entries are absent in Apache HTTPD logs. This issue is specific to AJP. When I tested with HTTP x Bio/Nio/Apr the logs were operating correctly. It is not pretty, but it does not look like a show stopper. This issue is observed with 7.0.17 as well. I have not tested 7.0.16 in this configuration. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Blank extra access log entries with AJP connector in 7.0.18
On 08.07.2011 09:18, Rainer Jung wrote: wild-guess Could it be the cping/cpong? /wild-guess Hmmm, doesn't make much sense, the additional line seems to be after the original request. Rainer On 08.07.2011 05:41, Konstantin Kolinko wrote: Running 7.0.18 behind Apache HTTPD, using Ajp connector (Bio), for every actual request there are two records in the access log, one true record, followed by a blank one. E.g.: ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/html HTTP/1.1 200 24854 ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/images/asf-logo.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:06 +0400] GET /manager/images/tomcat.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:06 +0400] - 400 - These extra log entries are absent in Apache HTTPD logs. This issue is specific to AJP. When I tested with HTTP x Bio/Nio/Apr the logs were operating correctly. It is not pretty, but it does not look like a show stopper. This issue is observed with 7.0.17 as well. I have not tested 7.0.16 in this configuration. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Blank extra access log entries with AJP connector in 7.0.18
No without wild guessing: AjpProcessor.recycle() now nulls input. On the next loop through processing the connection, trying to read from the nulled input will lead to an NPE, producing the 400 log entry. In 7.0.16 recycle was implemented in AbstractAjpProcessor.java and did not null input. Regards, Rainer On 08.07.2011 05:41, Konstantin Kolinko wrote: Running 7.0.18 behind Apache HTTPD, using Ajp connector (Bio), for every actual request there are two records in the access log, one true record, followed by a blank one. E.g.: ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/html HTTP/1.1 200 24854 ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/images/asf-logo.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:06 +0400] GET /manager/images/tomcat.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:06 +0400] - 400 - These extra log entries are absent in Apache HTTPD logs. This issue is specific to AJP. When I tested with HTTP x Bio/Nio/Apr the logs were operating correctly. It is not pretty, but it does not look like a show stopper. This issue is observed with 7.0.17 as well. I have not tested 7.0.16 in this configuration. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Blank extra access log entries with AJP connector in 7.0.18
On 08/07/2011 09:47, Rainer Jung wrote: No without wild guessing: AjpProcessor.recycle() now nulls input. On the next loop through processing the connection, trying to read from the nulled input will lead to an NPE, producing the 400 log entry. In 7.0.16 recycle was implemented in AbstractAjpProcessor.java and did not null input. Looks like another refactoring problem. I'll take a look. Mark Regards, Rainer On 08.07.2011 05:41, Konstantin Kolinko wrote: Running 7.0.18 behind Apache HTTPD, using Ajp connector (Bio), for every actual request there are two records in the access log, one true record, followed by a blank one. E.g.: ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/html HTTP/1.1 200 24854 ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:05 +0400] GET /manager/images/asf-logo.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:05 +0400] - 400 - ipaddress - username [08/Jul/11:07:16:06 +0400] GET /manager/images/tomcat.gif HTTP/1.1 304 - ipaddress - - [08/июл/11:07:16:06 +0400] - 400 - These extra log entries are absent in Apache HTTPD logs. This issue is specific to AJP. When I tested with HTTP x Bio/Nio/Apr the logs were operating correctly. It is not pretty, but it does not look like a show stopper. This issue is observed with 7.0.17 as well. I have not tested 7.0.16 in this configuration. Best regards, Konstantin Kolinko - 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: Blank extra access log entries with AJP connector in 7.0.18
On 08.07.2011 10:50, Mark Thomas wrote: On 08/07/2011 09:47, Rainer Jung wrote: No without wild guessing: AjpProcessor.recycle() now nulls input. On the next loop through processing the connection, trying to read from the nulled input will lead to an NPE, producing the 400 log entry. In 7.0.16 recycle was implemented in AbstractAjpProcessor.java and did not null input. Looks like another refactoring problem. I'll take a look. Index: java/org/apache/coyote/ajp/AjpProcessor.java === @@ -242,13 +242,6 @@ } -@Override -public void recycle() { -super.recycle(); -input = null; -output = null; -} - // - ActionHook Methods might do it. recycle() is only called once and at that place we don't want to null input (and output) except we break out from the loop. Directly below the loop we null input and output, except when we still need it. At least my interpretation of the code. The change fixes the issue, but I didn't extensively test it. Regards, Rainer - 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
The proposed 7.0.18 release is: [ ] Broken - do not release [ ] Alpha - go ahead and release as 7.0.18 Alpha [ ] Beta - go ahead and release as 7.0.18 Beta [X] Stable - go ahead and release as 7.0.18 Stable Tested on linux and windows. Love the new installer features! Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Blank extra access log entries with AJP connector in 7.0.18
On 08/07/2011 09:59, Rainer Jung wrote: On 08.07.2011 10:50, Mark Thomas wrote: On 08/07/2011 09:47, Rainer Jung wrote: No without wild guessing: AjpProcessor.recycle() now nulls input. On the next loop through processing the connection, trying to read from the nulled input will lead to an NPE, producing the 400 log entry. In 7.0.16 recycle was implemented in AbstractAjpProcessor.java and did not null input. Looks like another refactoring problem. I'll take a look. Index: java/org/apache/coyote/ajp/AjpProcessor.java === @@ -242,13 +242,6 @@ } -@Override -public void recycle() { -super.recycle(); -input = null; -output = null; -} - // - ActionHook Methods might do it. recycle() is only called once and at that place we don't want to null input (and output) except we break out from the loop. We also set those to null if the socket is closed in asyncDispatch(). That is what triggered that code appearing in the recycle method. Removing those calls will fix the issue but I need to think about what it might do to asyncDispatch(). We don't null out the socket when it is closed so I wonder if we really need to null these out. Looking at this has raised some more subtle differences between the AJP implementations. I'll work on this today. Hopefully, I'll fix this and further reduce the duplicate code at the same time. Mark Directly below the loop we null input and output, except when we still need it. At least my interpretation of the code. The change fixes the issue, but I didn't extensively test it. 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
svn commit: r1144225 - /tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
Author: markt Date: Fri Jul 8 09:50:02 2011 New Revision: 1144225 URL: http://svn.apache.org/viewvc?rev=1144225view=rev Log: Fix indentation Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1144225r1=1144224r2=1144225view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Fri Jul 8 09:50:02 2011 @@ -70,7 +70,7 @@ public abstract class AbstractAjpProcess * Flush message array. */ protected static final byte[] flushMessageArray; - + /** * Pong message array. @@ -88,7 +88,7 @@ public abstract class AbstractAjpProcess endMessageArray = new byte[endMessage.getLen()]; System.arraycopy(endMessage.getBuffer(), 0, endMessageArray, 0, endMessage.getLen()); - + // Allocate the flush message array AjpMessage flushMessage = new AjpMessage(16); flushMessage.reset(); @@ -99,7 +99,7 @@ public abstract class AbstractAjpProcess flushMessageArray = new byte[flushMessage.getLen()]; System.arraycopy(flushMessage.getBuffer(), 0, flushMessageArray, 0, flushMessage.getLen()); - + // Allocate the pong message array AjpMessage pongMessage = new AjpMessage(16); pongMessage.reset(); @@ -110,7 +110,7 @@ public abstract class AbstractAjpProcess 0, pongMessage.getLen()); } - + // - Instance Variables @@ -146,7 +146,7 @@ public abstract class AbstractAjpProcess */ protected AjpMessage bodyMessage = null; - + /** * Body message. */ @@ -205,28 +205,28 @@ public abstract class AbstractAjpProcess * Finished response. */ protected boolean finished = false; - - + + /** * Bytes written to client for the current request */ protected long byteCount = 0; - - + + // Constructor - + public AbstractAjpProcessor(int packetSize, AbstractEndpoint endpoint) { - + super(endpoint); this.packetSize = packetSize; request.setInputBuffer(new SocketInputBuffer()); - + requestHeaderMessage = new AjpMessage(packetSize); responseHeaderMessage = new AjpMessage(packetSize); bodyMessage = new AjpMessage(packetSize); - + // Set the getBody message buffer AjpMessage getBodyMessage = new AjpMessage(16); getBodyMessage.reset(); @@ -237,10 +237,10 @@ public abstract class AbstractAjpProcess getBodyMessage.end(); getBodyMessageArray = new byte[getBodyMessage.getLen()]; System.arraycopy(getBodyMessage.getBuffer(), 0, getBodyMessageArray, - 0, getBodyMessage.getLen()); +0, getBodyMessage.getLen()); } - + // - Properties @@ -289,648 +289,648 @@ public abstract class AbstractAjpProcess // - Public Methods - /** -* Send an action to the connector. -* -* @param actionCode Type of the action -* @param param Action parameter -*/ - @Override - public final void action(ActionCode actionCode, Object param) { - - if (actionCode == ActionCode.COMMIT) { - - if (response.isCommitted()) - return; - - // Validate and write response headers - try { - prepareResponse(); - } catch (IOException e) { - // Set error flag - error = true; - } - - try { - flush(false); - } catch (IOException e) { - // Set error flag - error = true; - } - - } else if (actionCode == ActionCode.CLIENT_FLUSH) { - - if (!response.isCommitted()) { - // Validate and write response headers - try { - prepareResponse(); - } catch (IOException e) { - // Set error flag - error = true; - return; - } - } - - try { - flush(true); - } catch (IOException e) { - // Set error flag - error = true; - } - - } else if (actionCode == ActionCode.DISABLE_SWALLOW_INPUT) { - // TODO: Do not swallow request input but - // make sure we are closing the
[ANN] Apache Tomcat Connectors 1.2.32 released
The Apache Tomcat Project is proud to announce the release of version 1.2.32 of Apache Tomcat Connectors. This release includes both bug fixes and new features compared to version 1.2.31. Full details of these changes and new features, are available in the Apache Tomcat Connectors changelog: http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html Downloads: http://tomcat.apache.org/download-connectors.cgi Note that it might take up to 48 hours until this release get available from the mirrors. Thank you, -- The Apache Tomcat Team - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat Connectors 1.2.32
I wish we break the practice of shipping the posix platform binaries. No problem. I could provide pre-built binary on my blog. Many many OS/X users are not confortable at all with configure/make :) This was never consistent in the past between releases, and it looks more like a junk yard. (basically, if it was there lucky you, if not, build it yourself) Anyhow, anything on dist/ site must be voted. Cheers -- ^TM - 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: r1144246 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AjpAprProcessor.java AjpAprProtocol.java AjpNioProcessor.java AjpNioProtocol.java AjpProcessor.java AjpPro
Author: markt Date: Fri Jul 8 10:45:19 2011 New Revision: 1144246 URL: http://svn.apache.org/viewvc?rev=1144246view=rev Log: Fix regression in connector re-factoring that was too aggressive cleaning up AJP/BIO between requests triggering 400 entries in the access log Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1144246r1=1144245r2=1144246view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Fri Jul 8 10:45:19 2011 @@ -494,7 +494,15 @@ public abstract class AbstractAjpProcess } -public void recycle() { +/** + * Recycle the processor, ready for the next request which may be on the + * same connection or a different connection. + * + * @param socketClosing Indicates if the socket is about to be closed + * allowing the processor to perform any additional + * clean-up that may be required + */ +public void recycle(boolean socketClosing) { asyncStateMachine.recycle(); // Recycle Request object Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1144246r1=1144245r2=1144246view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Fri Jul 8 10:45:19 2011 @@ -219,7 +219,7 @@ public class AjpAprProcessor extends Abs request.updateCounters(); rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE); -recycle(); +recycle(false); } rp.setStage(org.apache.coyote.Constants.STAGE_ENDED); @@ -487,8 +487,8 @@ public class AjpAprProcessor extends Abs * Recycle the processor. */ @Override -public void recycle() { -super.recycle(); +public void recycle(boolean socketClosing) { +super.recycle(socketClosing); inputBuffer.clear(); inputBuffer.limit(0); Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1144246r1=1144245r2=1144246view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Fri Jul 8 10:45:19 2011 @@ -165,12 +165,12 @@ public class AjpAprProtocol extends Abst } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. -processor.recycle(); +processor.recycle(false); recycledProcessors.offer(processor); ((AprEndpoint)proto.endpoint).getPoller().add( socket.getSocket().longValue()); } else { -processor.recycle(); +processor.recycle(true); recycledProcessors.offer(processor); } return state; @@ -194,7 +194,7 @@ public class AjpAprProtocol extends Abst // less-than-verbose logs. log.error(sm.getString(ajpprotocol.proto.error), e); } -processor.recycle(); +processor.recycle(true); recycledProcessors.offer(processor); return SocketState.CLOSED; } Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1144246r1=1144245r2=1144246view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Fri Jul 8 10:45:19 2011 @@ -127,14 +127,14 @@ public class AjpNioProcessor extends Abs
Deploying Emboss in Opal2
Hello I've installed Opal2 on my Tomcat 5.5.33 server and now I'd like to make th= e emboss programs available in this. I've been working on this for two days and I just seem to trample at the sa= me spot. Perhaps someone has the required files or could tell me how to deal with th= is specific case? I've tried compiling all the emboss programs and put them in a .war package= =2C but after uploading this to Tomcat I just keep getting 'The requested r= esource () is not available.' error messages. Yours Jeroen V.
svn commit: r1144264 - /tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java
Author: markt Date: Fri Jul 8 11:19:32 2011 New Revision: 1144264 URL: http://svn.apache.org/viewvc?rev=1144264view=rev Log: Improve comments Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1144264r1=1144263r2=1144264view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Fri Jul 8 11:19:32 2011 @@ -125,6 +125,10 @@ public class AjpNioProtocol extends Abst return null; } +/** + * Expected to be used by the Poller to release resources on socket + * close, errors etc. + */ @Override public void release(SocketChannel socket) { if (log.isDebugEnabled()) @@ -147,8 +151,8 @@ public class AjpNioProtocol extends Abst } /** - * Use this only if the processor is not available, otherwise use - * {@link #release(SocketWrapper, AjpNioProcessor, boolean)}. + * Expected to be used by the Poller to release resources on socket + * close, errors etc. */ @Override public void release(SocketWrapperNioChannel socket) { @@ -160,6 +164,10 @@ public class AjpNioProtocol extends Abst } +/** + * Expected to be used by the handler once the processor is no longer + * required. + */ public void release(SocketWrapperNioChannel socket, AjpNioProcessor processor, boolean isSocketClosing) { connections.remove(socket); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144266 - /tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java
Author: markt Date: Fri Jul 8 11:21:37 2011 New Revision: 1144266 URL: http://svn.apache.org/viewvc?rev=1144266view=rev Log: Remove unnecessary call. Socket can't be in connections at this point. Leave currently unused socket parameter in method - plan to use it in later re-factoring Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1144266r1=1144265r2=1144266view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Fri Jul 8 11:21:37 2011 @@ -170,7 +170,6 @@ public class AjpNioProtocol extends Abst */ public void release(SocketWrapperNioChannel socket, AjpNioProcessor processor, boolean isSocketClosing) { -connections.remove(socket); processor.recycle(isSocketClosing); recycledProcessors.offer(processor); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144271 - in /tomcat/trunk/java/org/apache: coyote/ajp/AjpAprProtocol.java coyote/ajp/AjpNioProtocol.java coyote/ajp/AjpProtocol.java tomcat/util/net/AbstractEndpoint.java
Author: markt Date: Fri Jul 8 11:40:36 2011 New Revision: 1144271 URL: http://svn.apache.org/viewvc?rev=1144271view=rev Log: Align the process methods some more. Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1144271r1=1144270r2=1144271view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Fri Jul 8 11:40:36 2011 @@ -174,7 +174,6 @@ public class AjpAprProtocol extends Abst recycledProcessors.offer(processor); } return state; - } catch(java.net.SocketException e) { // SocketExceptions are normal log.debug(sm.getString( Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1144271r1=1144270r2=1144271view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Fri Jul 8 11:40:36 2011 @@ -206,7 +206,6 @@ public class AjpNioProtocol extends Abst // In the middle of processing a request/response. Keep the // socket associated with the processor. connections.put(socket, processor); - socket.setAsync(true); } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle @@ -218,7 +217,6 @@ public class AjpNioProtocol extends Abst release(socket, processor, true); } return state; - } catch(java.net.SocketException e) { // SocketExceptions are normal log.debug(sm.getString( Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1144271r1=1144270r2=1144271view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Fri Jul 8 11:40:36 2011 @@ -125,8 +125,12 @@ public class AjpProtocol extends Abstrac } @Override -public SocketState process(SocketWrapperSocket socket, SocketStatus status) { +public SocketState process(SocketWrapperSocket socket, +SocketStatus status) { AjpProcessor processor = connections.remove(socket); + +socket.setAsync(false); + try { if (processor == null) { processor = recycledProcessors.poll(); @@ -147,12 +151,15 @@ public class AjpProtocol extends Abstrac state = processor.asyncPostProcess(); } } while (state == SocketState.ASYNC_END); -// TODO Better to add a new state to the AsyncStateMachine and -// remove ASYNC_END entirely if (state == SocketState.LONG) { +// In the middle of processing a request/response. Keep the +// socket associated with the processor. connections.put(socket, processor); +socket.setAsync(true); } else if (state == SocketState.OPEN){ +// In keep-alive but between requests. OK to recycle +// processor. Continue to poll for the next request. processor.recycle(false); recycledProcessors.offer(processor); } else { Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1144271r1=1144270r2=1144271view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Fri Jul 8 11:40:36 2011 @@ -52,6 +52,8 @@ public abstract class AbstractEndpoint { * Different types of socket states to react upon. */ public enum SocketState { +
Re: Deploying Emboss in Opal2
2011/7/8 jeroen vannevel jer_vanne...@hotmail.com: I've installed Opal2 on my Tomcat 5.5.33 server and now I'd like to make th= e emboss programs available in this. You are asking on a wrong mailing list. This is a question for the users@ list. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144272 - in /tomcat/trunk/java/org/apache/coyote/ajp: AjpAprProtocol.java AjpProtocol.java
Author: markt Date: Fri Jul 8 11:49:50 2011 New Revision: 1144272 URL: http://svn.apache.org/viewvc?rev=1144272view=rev Log: Align the process methods some more. Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1144272r1=1144271r2=1144272view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Fri Jul 8 11:49:50 2011 @@ -129,6 +129,17 @@ public class AjpAprProtocol extends Abst recycledProcessors.clear(); } +/** + * Expected to be used by the handler once the processor is no longer + * required. + */ +public void release(SocketWrapperLong socket, +AjpAprProcessor processor, boolean isSocketClosing) { +processor.recycle(isSocketClosing); +recycledProcessors.offer(processor); +} + + @Override public SocketState process(SocketWrapperLong socket, SocketStatus status) { @@ -165,13 +176,12 @@ public class AjpAprProtocol extends Abst } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. -processor.recycle(false); -recycledProcessors.offer(processor); +release(socket, processor, false); ((AprEndpoint)proto.endpoint).getPoller().add( socket.getSocket().longValue()); } else { -processor.recycle(true); -recycledProcessors.offer(processor); +// Connection closed. OK to recycle the processor. +release(socket, processor, true); } return state; } catch(java.net.SocketException e) { @@ -193,8 +203,7 @@ public class AjpAprProtocol extends Abst // less-than-verbose logs. log.error(sm.getString(ajpprotocol.proto.error), e); } -processor.recycle(true); -recycledProcessors.offer(processor); +release(socket, processor, true); return SocketState.CLOSED; } Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1144272r1=1144271r2=1144272view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Fri Jul 8 11:49:50 2011 @@ -123,7 +123,18 @@ public class AjpProtocol extends Abstrac public void recycle() { recycledProcessors.clear(); } - + +/** + * Expected to be used by the handler once the processor is no longer + * required. + */ +public void release(SocketWrapperSocket socket, +AjpProcessor processor, boolean isSocketClosing) { +processor.recycle(isSocketClosing); +recycledProcessors.offer(processor); +} + + @Override public SocketState process(SocketWrapperSocket socket, SocketStatus status) { @@ -160,11 +171,10 @@ public class AjpProtocol extends Abstrac } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. -processor.recycle(false); -recycledProcessors.offer(processor); +release(socket, processor, false); } else { -processor.recycle(true); -recycledProcessors.offer(processor); +// Connection closed. OK to recycle the processor. +release(socket, processor, true); } return state; } catch(java.net.SocketException e) { @@ -186,8 +196,7 @@ public class AjpProtocol extends Abstrac // less-than-verbose logs. log.error(sm.getString(ajpprotocol.proto.error), e); } -processor.recycle(true); -recycledProcessors.offer(processor); +release(socket, processor, true); return SocketState.CLOSED; } - To unsubscribe,
svn commit: r1144276 - in /tomcat/trunk/java/org/apache/coyote/ajp: AjpAprProtocol.java AjpNioProtocol.java AjpProtocol.java
Author: markt Date: Fri Jul 8 11:56:33 2011 New Revision: 1144276 URL: http://svn.apache.org/viewvc?rev=1144276view=rev Log: Completely align process methods Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1144276r1=1144275r2=1144276view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Fri Jul 8 11:56:33 2011 @@ -134,9 +134,14 @@ public class AjpAprProtocol extends Abst * required. */ public void release(SocketWrapperLong socket, -AjpAprProcessor processor, boolean isSocketClosing) { +AjpAprProcessor processor, boolean isSocketClosing, +boolean addToPoller) { processor.recycle(isSocketClosing); recycledProcessors.offer(processor); +if (addToPoller) { +((AprEndpoint)proto.endpoint).getPoller().add( +socket.getSocket().longValue()); +} } @@ -176,12 +181,10 @@ public class AjpAprProtocol extends Abst } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. -release(socket, processor, false); -((AprEndpoint)proto.endpoint).getPoller().add( -socket.getSocket().longValue()); +release(socket, processor, false, true); } else { // Connection closed. OK to recycle the processor. -release(socket, processor, true); +release(socket, processor, true, false); } return state; } catch(java.net.SocketException e) { @@ -203,7 +206,7 @@ public class AjpAprProtocol extends Abst // less-than-verbose logs. log.error(sm.getString(ajpprotocol.proto.error), e); } -release(socket, processor, true); +release(socket, processor, true, false); return SocketState.CLOSED; } Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1144276r1=1144275r2=1144276view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Fri Jul 8 11:56:33 2011 @@ -163,17 +163,21 @@ public class AjpNioProtocol extends Abst } } - /** * Expected to be used by the handler once the processor is no longer * required. */ public void release(SocketWrapperNioChannel socket, -AjpNioProcessor processor, boolean isSocketClosing) { +AjpNioProcessor processor, boolean isSocketClosing, +boolean addToPoller) { processor.recycle(isSocketClosing); recycledProcessors.offer(processor); +if (addToPoller) { +socket.getSocket().getPoller().add(socket.getSocket()); +} } + @Override public SocketState process(SocketWrapperNioChannel socket, SocketStatus status) { @@ -210,11 +214,10 @@ public class AjpNioProtocol extends Abst } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. -release(socket, processor, false); -socket.getSocket().getPoller().add(socket.getSocket()); +release(socket, processor, false, true); } else { // Connection closed. OK to recycle the processor. -release(socket, processor, true); +release(socket, processor, true, false); } return state; } catch(java.net.SocketException e) { @@ -236,7 +239,7 @@ public class AjpNioProtocol extends Abst // less-than-verbose logs. log.error(sm.getString(ajpprotocol.proto.error), e); } -release(socket, processor, true); +release(socket, processor, true, false); return SocketState.CLOSED; }
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 #14 from Marvin Addison marvin.addi...@gmail.com 2011-07-08 12:29:15 UTC --- There is no SSLCipherSuite attribute defined for the SSL connector. See attached server.xml file. -- 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
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 #15 from Marvin Addison marvin.addi...@gmail.com 2011-07-08 12:30:24 UTC --- Created attachment 27274 -- https://issues.apache.org/bugzilla/attachment.cgi?id=27274 Test server.xml -- 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: r1144317 - /tomcat/trunk/java/org/apache/coyote/http11/
Author: markt Date: Fri Jul 8 14:04:08 2011 New Revision: 1144317 URL: http://svn.apache.org/viewvc?rev=1144317view=rev Log: Bring the Http11 protocol implementations closer together. Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1144317r1=1144316r2=1144317view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Fri Jul 8 14:04:08 2011 @@ -104,6 +104,12 @@ public abstract class AbstractHttp11Proc /** + * Comet used. + */ +protected boolean comet = false; + + +/** * Regular expression that defines the restricted user agents. */ protected Pattern restrictedUserAgents = null; @@ -1242,6 +1248,9 @@ public abstract class AbstractHttp11Proc } +public abstract SocketState event(SocketStatus status) throws IOException; + + /** * Provides a mechanism for those connector implementations (currently only * NIO) that need to reset timeouts from Async timeouts to standard HTTP Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1144317r1=1144316r2=1144317view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Fri Jul 8 14:04:08 2011 @@ -94,12 +94,6 @@ public class Http11AprProcessor extends /** - * Comet used. - */ -protected boolean comet = false; - - -/** * Socket associated with the current connection. */ protected SocketWrapperLong socket = null; @@ -128,6 +122,7 @@ public class Http11AprProcessor extends * * @throws IOException error during an I/O operation */ +@Override public SocketState event(SocketStatus status) throws IOException { Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1144317r1=1144316r2=1144317view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Fri Jul 8 14:04:08 2011 @@ -214,8 +214,7 @@ public class Http11AprProtocol extends A @Override public SocketState process(SocketWrapperLong socket, SocketStatus status) { -Http11AprProcessor processor = -connections.remove(socket.getSocket()); +Http11AprProcessor processor = connections.remove(socket.getSocket()); socket.setAsync(false); @@ -227,6 +226,8 @@ public class Http11AprProtocol extends A processor = createProcessor(); } +initSsl(socket, processor); + SocketState state = SocketState.CLOSED; do { if (processor.isAsync() || state == SocketState.ASYNC_END) { @@ -266,7 +267,6 @@ public class Http11AprProtocol extends A recycledProcessors.offer(processor); } return state; - } catch (java.net.SocketException e) { // SocketExceptions are normal log.debug(sm.getString( @@ -292,6 +292,11 @@ public class Http11AprProtocol extends A return SocketState.CLOSED; } +private void initSsl(SocketWrapperLong socket, +Http11AprProcessor processor) { +// NOOP for APR +} + protected Http11AprProcessor createProcessor() { Http11AprProcessor processor = new Http11AprProcessor( proto.getMaxHttpHeaderSize(), (AprEndpoint)proto.endpoint, Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java URL:
svn commit: r1144349 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
Author: markt Date: Fri Jul 8 14:59:43 2011 New Revision: 1144349 URL: http://svn.apache.org/viewvc?rev=1144349view=rev Log: Protocol will call recycle Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1144349r1=1144348r2=1144349view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Fri Jul 8 14:59:43 2011 @@ -356,12 +356,10 @@ public class Http11Processor extends Abs rp.setStage(org.apache.coyote.Constants.STAGE_ENDED); if (error || endpoint.isPaused()) { -recycle(); return SocketState.CLOSED; } else if (isAsync()) { return SocketState.LONG; } else { -recycle(); if (!keepAlive) { return SocketState.CLOSED; } else { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144354 - in /tomcat/trunk/java/org/apache/coyote/http11: Http11AprProtocol.java Http11NioProtocol.java Http11Protocol.java
Author: markt Date: Fri Jul 8 15:10:01 2011 New Revision: 1144354 URL: http://svn.apache.org/viewvc?rev=1144354view=rev Log: More protocol alignment (with an eye to aligning with AJP) Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1144354r1=1144353r2=1144354view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Fri Jul 8 15:10:01 2011 @@ -210,7 +210,27 @@ public class Http11AprProtocol extends A public void recycle() { recycledProcessors.clear(); } - + +/** + * Expected to be used by the handler once the processor is no longer + * required. + * + * @param socket + * @param processor + * @param isSocketClosing Not used in HTTP + * @param addToPoller + */ +public void release(SocketWrapperLong socket, +Http11AprProcessor processor, boolean isSocketClosing, +boolean addToPoller) { +processor.recycle(); +recycledProcessors.offer(processor); +if (addToPoller) { +((AprEndpoint)proto.endpoint).getPoller().add( +socket.getSocket().longValue()); +} +} + @Override public SocketState process(SocketWrapperLong socket, SocketStatus status) { @@ -257,14 +277,10 @@ public class Http11AprProtocol extends A } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. -processor.recycle(); -recycledProcessors.offer(processor); -((AprEndpoint)proto.endpoint).getPoller().add( -socket.getSocket().longValue()); +release(socket, processor, false, true); } else { // Connection closed. OK to recycle the processor. -processor.recycle(); -recycledProcessors.offer(processor); +release(socket, processor, true, false); } return state; } catch (java.net.SocketException e) { @@ -287,11 +303,11 @@ public class Http11AprProtocol extends A Http11AprProtocol.log.error( sm.getString(http11protocol.proto.error), e); } -processor.recycle(); -recycledProcessors.offer(processor); +release(socket, processor, true, false); return SocketState.CLOSED; } +@SuppressWarnings(unused) private void initSsl(SocketWrapperLong socket, Http11AprProcessor processor) { // NOOP for APR Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1144354r1=1144353r2=1144354view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Fri Jul 8 15:10:01 2011 @@ -187,6 +187,10 @@ public class Http11NioProtocol extends A recycledProcessors.clear(); } +/** + * Expected to be used by the Poller to release resources on socket + * close, errors etc. + */ @Override public void release(SocketChannel socket) { if (log.isDebugEnabled()) @@ -209,8 +213,8 @@ public class Http11NioProtocol extends A } /** - * Use this only if the processor is not available, otherwise use - * {@link #release(SocketWrapper, Http11NioProcessor)}. + * Expected to be used by the Poller to release resources on socket + * close, errors etc. */ @Override public void release(SocketWrapperNioChannel socket) { @@ -222,11 +226,23 @@ public class Http11NioProtocol extends A } +/** + * Expected to be used by the handler once the processor is no longer + * required. + * + * @param socket + * @param processor + * @param isSocketClosing Not used in HTTP + * @param addToPoller + */
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/7/2011 5:55 PM, Konstantin Kolinko wrote: 2011/7/8fha...@apache.org: 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 1) svn:eol-style for 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 --- tomcat/trunk/webapps/docs/project.xml (original) +++ tomcat/trunk/webapps/docs/project.xml Thu Jul 7 21:40:05 2011 @@ -70,6 +70,8 @@ item name=29) Windows Servicehref=windows-service-howto.html/ item name=30) Windows Authentication href=windows-auth-howto.html/ +item name=31) Tomcat's JDBC Pool + href=jdbc-pool.html/ /menu menu name=Reference 2) Where jdbc-pool.html comes from? You forgot to commit it? Or is it supposed to be copied from elsewhere during build. it comes from modules/jdbc-pool/doc/jdbc-pool.xml and that gets built during the build process 3) The documentation pages are listed not only in the menu that you updated, but also on the index.html page. Please update that one as well. will do, thanks for the feedback Filip Best regards, Konstantin Kolinko - 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: r1144358 - in /tomcat/trunk: modules/jdbc-pool/pom.xml webapps/docs/index.xml
Author: fhanik Date: Fri Jul 8 15:34:18 2011 New Revision: 1144358 URL: http://svn.apache.org/viewvc?rev=1144358view=rev Log: Change eol-style and add link to jdbc-pool on the documentation home page Modified: tomcat/trunk/modules/jdbc-pool/pom.xml (contents, props changed) tomcat/trunk/webapps/docs/index.xml Modified: tomcat/trunk/modules/jdbc-pool/pom.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/pom.xml?rev=1144358r1=1144357r2=1144358view=diff == --- tomcat/trunk/modules/jdbc-pool/pom.xml (original) +++ tomcat/trunk/modules/jdbc-pool/pom.xml Fri Jul 8 15:34:18 2011 @@ -1,140 +1,140 @@ -project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; - modelVersion4.0.0/modelVersion - - parent -groupIdorg.apache/groupId -artifactIdapache/artifactId -version9/version - /parent - - groupIdorg.apache.tomcat/groupId - artifactIdjdbc-pool/artifactId - version1.2-SNAPSHOT/version - packagingjar/packaging - - namejdbc-pool/name - urlhttp://people.apache.org/~fhanik/jdbc-pool//url - - properties -project.build.sourceEncodingUTF-8/project.build.sourceEncoding - /properties - - mailingLists -mailingList - nameDevelopment List/name - subscribedev-subscr...@tomcat.apache.org/subscribe - unsubscribedev-unsubscr...@tomcat.apache.org/unsubscribe - postdev@tomcat.apache.org/post -/mailingList -mailingList - nameUsers List/name - subscribeusers-subscr...@tomcat.apache.org/subscribe - unsubscribeusers-unsubscr...@tomcat.apache.org/unsubscribe - postus...@tomcat.apache.org/post -/mailingList - /mailingLists - - scm - connectionscm:svn:https://svn.apache.org/repos/asf/tomcat/trunk/modules/jdbc-pool/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/trunk/modules/jdbc-pool/developerConnection -urlhttp://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/url - /scm - - dependencies -dependency - groupIdorg.apache.tomcat/groupId - artifactIdjuli/artifactId - version6.0.32/version -/dependency -dependency - groupIdjunit/groupId - artifactIdjunit/artifactId - version3.8.1/version - scopetest/scope -/dependency -dependency - groupIdorg.apache.tomcat/groupId - artifactIddbcp/artifactId - version6.0.32/version - scopetest/scope -/dependency -dependency - groupIdcom.h2database/groupId - artifactIdh2/artifactId - version1.3.152/version - scopetest/scope -/dependency - /dependencies - build -plugins - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-compiler-plugin/artifactId -configuration - source1.6/source - target1.6/target - optimizetrue/optimize - debugtrue/debug - showDeprecationtrue/showDeprecation - showWarningstrue/showWarnings -/configuration - /plugin - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-jar-plugin/artifactId -configuration -/configuration - /plugin - - - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-gpg-plugin/artifactId -version1.2/version -executions - execution -idsign-artifacts/id -phaseverify/phase -goals - goalsign/goal -/goals - /execution -/executions - /plugin - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-eclipse-plugin/artifactId -version2.5.1/version -configuration - downloadSourcestrue/downloadSources - downloadJavadocstrue/downloadJavadocs -/configuration - /plugin - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-source-plugin/artifactId -executions - execution -idattach-sources/id -goals - goaljar/goal -/goals - /execution -/executions - /plugin - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-javadoc-plugin/artifactId -executions - execution -idattach-javadocs/id -goals - goaljar/goal -/goals - /execution -/executions - /plugin -/plugins - /build -/project +project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; + modelVersion4.0.0/modelVersion + + parent +
7.0.18 installer does not work under windows with a custom service name
Hi, Sorry to bother you guys, I see you're voting to release 7.0.18 and I tried to install it with Windows installer on 2 machines. I must say I'm very interested by the new option to set a custom service name, but, alas, the installer failed with a custom name both times (no special chars in name), telling me to check my rights and privileges (I'm admin on both machines). Eventually, It worked when I reset the service name to its default value First machine is my workstation (windows XP), second is a Windows 2003 server machine; I had previously installed a T7 (.0.14 and .0.16) instance via installer on both machines that I uninstalled before running the T7.0.18 installer. Just to say. Regards, Etienne Massip
Re: 7.0.18 installer does not work under windows with a custom service name
On 08/07/2011 17:01, etienne massip wrote: Hi, Sorry to bother you guys, I see you're voting to release 7.0.18 and I tried to install it with Windows installer on 2 machines. I must say I'm very interested by the new option to set a custom service name, but, alas, the installer failed with a custom name both times (no special chars in name), telling me to check my rights and privileges (I'm admin on both machines). Eventually, It worked when I reset the service name to its default value First machine is my workstation (windows XP), second is a Windows 2003 server machine; I had previously installed a T7 (.0.14 and .0.16) instance via installer on both machines that I uninstalled before running the T7.0.18 installer. Just to say. Works for me. Looks like you do have a permissions problem. The users list is the place to get help. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: 7.0.18 installer does not work under windows with a custom service name
Not permissions, but I just figured out that the former tomcat service was still here with the name I failed to set during the installation process, I guess that's why it failed. My bad, sorry. On Fri, Jul 8, 2011 at 6:11 PM, Mark Thomas ma...@apache.org wrote: On 08/07/2011 17:01, etienne massip wrote: Hi, Sorry to bother you guys, I see you're voting to release 7.0.18 and I tried to install it with Windows installer on 2 machines. I must say I'm very interested by the new option to set a custom service name, but, alas, the installer failed with a custom name both times (no special chars in name), telling me to check my rights and privileges (I'm admin on both machines). Eventually, It worked when I reset the service name to its default value First machine is my workstation (windows XP), second is a Windows 2003 server machine; I had previously installed a T7 (.0.14 and .0.16) instance via installer on both machines that I uninstalled before running the T7.0.18 installer. Just to say. Works for me. Looks like you do have a permissions problem. The users list is the place to get help. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144375 - in /tomcat/trunk/java/org/apache/coyote/http11: Http11AprProtocol.java Http11NioProtocol.java Http11Protocol.java
Author: markt Date: Fri Jul 8 16:19:28 2011 New Revision: 1144375 URL: http://svn.apache.org/viewvc?rev=1144375view=rev Log: Yet more protocol alignment (with an eye to aligning with AJP) Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1144375r1=1144374r2=1144375view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Fri Jul 8 16:19:28 2011 @@ -265,15 +265,9 @@ public class Http11AprProtocol extends A if (state == SocketState.LONG) { // In the middle of processing a request/response. Keep the -// socket associated with the processor. -connections.put(socket.getSocket(), processor); - -if (processor.isAsync()) { -socket.setAsync(true); -} else if (processor.comet) { -((AprEndpoint) proto.endpoint).getCometPoller().add( -socket.getSocket().longValue()); -} +// socket associated with the processor. Exact requirements +// depend on type of long poll +longPoll(socket, processor); } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. @@ -300,8 +294,7 @@ public class Http11AprProtocol extends A // any other exception or error is odd. Here we log it // with ERROR level, so it will show up even on // less-than-verbose logs. -Http11AprProtocol.log.error( -sm.getString(http11protocol.proto.error), e); +log.error(sm.getString(http11protocol.proto.error), e); } release(socket, processor, true, false); return SocketState.CLOSED; @@ -313,6 +306,18 @@ public class Http11AprProtocol extends A // NOOP for APR } +private void longPoll(SocketWrapperLong socket, +Http11AprProcessor processor) { +connections.put(socket.getSocket(), processor); + +if (processor.isAsync()) { +socket.setAsync(true); +} else if (processor.comet) { +((AprEndpoint) proto.endpoint).getCometPoller().add( +socket.getSocket().longValue()); +} +} + protected Http11AprProcessor createProcessor() { Http11AprProcessor processor = new Http11AprProcessor( proto.getMaxHttpHeaderSize(), (AprEndpoint)proto.endpoint, Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1144375r1=1144374r2=1144375view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Fri Jul 8 16:19:28 2011 @@ -280,22 +280,9 @@ public class Http11NioProtocol extends A if (state == SocketState.LONG) { // In the middle of processing a request/response. Keep the -// socket associated with the processor. -connections.put(socket, processor); - -if (processor.isAsync()) { -socket.setAsync(true); -} else { -// Either: -// - this is comet request -// - the request line/headers have not been completely -//read -SelectionKey key = socket.getSocket().getIOChannel().keyFor( -socket.getSocket().getPoller().getSelector()); -key.interestOps(SelectionKey.OP_READ); -((KeyAttachment) socket).interestOps( -SelectionKey.OP_READ); -} +// socket associated with the processor. Exact requirements +// depend on type of long poll +longPoll(socket, processor); } else if (state == SocketState.OPEN){ // In
Re: 7.0.18 installer does not work under windows with a custom service name
Confirmed, it works better if the conflicting service is removed first =) On Fri, Jul 8, 2011 at 6:17 PM, etienne massip etienne.mas...@gmail.comwrote: Not permissions, but I just figured out that the former tomcat service was still here with the name I failed to set during the installation process, I guess that's why it failed. My bad, sorry. On Fri, Jul 8, 2011 at 6:11 PM, Mark Thomas ma...@apache.org wrote: On 08/07/2011 17:01, etienne massip wrote: Hi, Sorry to bother you guys, I see you're voting to release 7.0.18 and I tried to install it with Windows installer on 2 machines. I must say I'm very interested by the new option to set a custom service name, but, alas, the installer failed with a custom name both times (no special chars in name), telling me to check my rights and privileges (I'm admin on both machines). Eventually, It worked when I reset the service name to its default value First machine is my workstation (windows XP), second is a Windows 2003 server machine; I had previously installed a T7 (.0.14 and .0.16) instance via installer on both machines that I uninstalled before running the T7.0.18 installer. Just to say. Works for me. Looks like you do have a permissions problem. The users list is the place to get help. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: 7.0.18 installer does not work under windows with a custom service name
On 08/07/2011 17:22, etienne massip wrote: Confirmed, it works better if the conflicting service is removed first =) Great. Glad it is working for you. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144390 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AbstractAjpProtocol.java AjpAprProcessor.java AjpAprProtocol.java AjpNioProcessor.java AjpNioProtocol.java
Author: markt Date: Fri Jul 8 17:19:19 2011 New Revision: 1144390 URL: http://svn.apache.org/viewvc?rev=1144390view=rev Log: Pull up Handler.process for the Ajp Connectors. Note that this is an intermediate step. The aim is to pull this up to AbstractProtocol Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1144390r1=1144389r2=1144390view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Fri Jul 8 17:19:19 2011 @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.coyote.ajp; import java.io.ByteArrayInputStream; @@ -43,12 +42,13 @@ import org.apache.tomcat.util.net.Abstra import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState; import org.apache.tomcat.util.net.SSLSupport; import org.apache.tomcat.util.net.SocketStatus; +import org.apache.tomcat.util.net.SocketWrapper; import org.apache.tomcat.util.res.StringManager; /** * Base class for AJP Processor implementations. */ -public abstract class AbstractAjpProcessor extends AbstractProcessor { +public abstract class AbstractAjpProcessorS extends AbstractProcessor { protected abstract Log getLog(); @@ -454,6 +454,9 @@ public abstract class AbstractAjpProcess protected abstract void finish() throws IOException; +public abstract SocketState process(SocketWrapperS socket) +throws IOException; + public SocketState asyncDispatch(SocketStatus status) { RequestInfo rp = request.getRequestProcessor(); Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1144390r1=1144389r2=1144390view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Fri Jul 8 17:19:19 2011 @@ -16,7 +16,12 @@ */ package org.apache.coyote.ajp; +import java.util.concurrent.ConcurrentHashMap; + import org.apache.coyote.AbstractProtocol; +import org.apache.tomcat.util.ExceptionUtils; +import org.apache.tomcat.util.net.SocketStatus; +import org.apache.tomcat.util.net.SocketWrapper; import org.apache.tomcat.util.res.StringManager; public abstract class AbstractAjpProtocol extends AbstractProtocol { @@ -70,4 +75,87 @@ public abstract class AbstractAjpProtoco this.packetSize = packetSize; } } + +protected abstract static class AbstractAjpConnectionHandlerS,P extends AbstractAjpProcessorS +extends AbstractConnectionHandler { + +protected ConcurrentHashMapSocketWrapperS,P connections = +new ConcurrentHashMapSocketWrapperS,P(); + +protected RecycledProcessorsP recycledProcessors = +new RecycledProcessorsP(this); + +@Override +public void recycle() { +recycledProcessors.clear(); +} + +public SocketState process(SocketWrapperS socket, +SocketStatus status) { +P processor = connections.remove(socket); + +socket.setAsync(false); + +try { +if (processor == null) { +processor = recycledProcessors.poll(); +} +if (processor == null) { +processor = createProcessor(); +} + +SocketState state = SocketState.CLOSED; +do { +if (processor.isAsync() || state == SocketState.ASYNC_END) { +state = processor.asyncDispatch(status); +} else { +state = processor.process(socket); +} + +if (state != SocketState.CLOSED processor.isAsync()) { +state = processor.asyncPostProcess(); +} +} while (state == SocketState.ASYNC_END); + +if (state == SocketState.LONG) { +
svn commit: r1144391 - /tomcat/trunk/java/org/apache/coyote/http11/
Author: markt Date: Fri Jul 8 17:19:38 2011 New Revision: 1144391 URL: http://svn.apache.org/viewvc?rev=1144391view=rev Log: Pull up Handler.process for the Http11 connectors. Note that this is an intermediate step. The aim is to pull this up to AbstractProtocol Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1144391r1=1144390r2=1144391view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Fri Jul 8 17:19:38 2011 @@ -47,9 +47,10 @@ import org.apache.tomcat.util.http.MimeH import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState; import org.apache.tomcat.util.net.SocketStatus; +import org.apache.tomcat.util.net.SocketWrapper; import org.apache.tomcat.util.res.StringManager; -public abstract class AbstractHttp11Processor extends AbstractProcessor { +public abstract class AbstractHttp11ProcessorS extends AbstractProcessor { protected abstract Log getLog(); @@ -1211,6 +1212,9 @@ public abstract class AbstractHttp11Proc } +public abstract SocketState process(SocketWrapperS socket) +throws IOException; + public SocketState asyncDispatch(SocketStatus status) { RequestInfo rp = request.getRequestProcessor(); Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1144391r1=1144390r2=1144391view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Fri Jul 8 17:19:38 2011 @@ -16,7 +16,12 @@ */ package org.apache.coyote.http11; +import java.util.concurrent.ConcurrentHashMap; + import org.apache.coyote.AbstractProtocol; +import org.apache.tomcat.util.ExceptionUtils; +import org.apache.tomcat.util.net.SocketStatus; +import org.apache.tomcat.util.net.SocketWrapper; import org.apache.tomcat.util.res.StringManager; public abstract class AbstractHttp11Protocol extends AbstractProtocol { @@ -182,4 +187,94 @@ public abstract class AbstractHttp11Prot public void setMaxKeepAliveRequests(int mkar) { endpoint.setMaxKeepAliveRequests(mkar); } + + +protected abstract static class AbstractHttp11ConnectionHandlerS,P extends AbstractHttp11ProcessorS +extends AbstractConnectionHandler { + +protected ConcurrentHashMapSocketWrapperS,P connections = +new ConcurrentHashMapSocketWrapperS,P(); + +protected RecycledProcessorsP recycledProcessors = +new RecycledProcessorsP(this); + +@Override +public void recycle() { +recycledProcessors.clear(); +} + +public SocketState process(SocketWrapperS socket, +SocketStatus status) { +P processor = connections.remove(socket); + +socket.setAsync(false); //no longer check for timeout + +try { +if (processor == null) { +processor = recycledProcessors.poll(); +} +if (processor == null) { +processor = createProcessor(); +} + +initSsl(socket, processor); + +SocketState state = SocketState.CLOSED; +do { +if (processor.isAsync() || state == SocketState.ASYNC_END) { +state = processor.asyncDispatch(status); +} else if (processor.comet) { +state = processor.event(status); +} else { +state = processor.process(socket); +} + +if (state != SocketState.CLOSED processor.isAsync()) { +state = processor.asyncPostProcess(); +} +} while (state ==
svn commit: r1144393 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AbstractAjpProtocol.java LocalStrings.properties
Author: markt Date: Fri Jul 8 17:28:25 2011 New Revision: 1144393 URL: http://svn.apache.org/viewvc?rev=1144393view=rev Log: Align AJP and HTTP prior to pulling up Handler.process Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1144393r1=1144392r2=1144393view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Fri Jul 8 17:28:25 2011 @@ -213,6 +213,11 @@ public abstract class AbstractAjpProcess protected long byteCount = 0; +/** + * AJP does not support comet + */ +protected final boolean comet = false; + // Constructor public AbstractAjpProcessor(int packetSize, AbstractEndpoint endpoint) { @@ -497,6 +502,13 @@ public abstract class AbstractAjpProcess } +@SuppressWarnings(unused) +public SocketState event(SocketStatus status) throws IOException { +// Should never reach this code but in case we do... +throw new IOException( +sm.getString(ajpprocessor.comet.notsupported)); +} + /** * Recycle the processor, ready for the next request which may be on the * same connection or a different connection. Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1144393r1=1144392r2=1144393view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Fri Jul 8 17:28:25 2011 @@ -104,10 +104,14 @@ public abstract class AbstractAjpProtoco processor = createProcessor(); } +initSsl(socket, processor); + SocketState state = SocketState.CLOSED; do { if (processor.isAsync() || state == SocketState.ASYNC_END) { state = processor.asyncDispatch(status); +} else if (processor.comet) { +state = processor.event(status); } else { state = processor.process(socket); } @@ -119,9 +123,9 @@ public abstract class AbstractAjpProtoco if (state == SocketState.LONG) { // In the middle of processing a request/response. Keep the -// socket associated with the processor. -connections.put(socket, processor); -socket.setAsync(true); +// socket associated with the processor. Exact requirements +// depend on type of long poll +longPoll(socket, processor); } else if (state == SocketState.OPEN){ // In keep-alive but between requests. OK to recycle // processor. Continue to poll for the next request. @@ -155,6 +159,16 @@ public abstract class AbstractAjpProtoco } protected abstract P createProcessor(); +@SuppressWarnings(unused) +protected void initSsl(SocketWrapperS socket, P processor) { +// NOOP for AJP +} +protected void longPoll(SocketWrapperS socket, P processor) { +// Same requirements for all AJP connectors +connections.put(socket, processor); +socket.setAsync(true); + +} protected abstract void release(SocketWrapperS socket, P processor, boolean socketClosing, boolean addToPoller); } Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1144393r1=1144392r2=1144393view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Fri Jul 8 17:28:25 2011 @@ -39,6 +39,7 @@ ajpprocessor.request.prepare=Error prepa ajpprocessor.request.process=Error processing request ajpprocessor.certs.fail=Certificate conversion failed ajpprocessor.socket.info=Exception getting socket information +ajpprocessor.comet.notsupported=The Comet protocol is not supported by
svn commit: r1144405 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/
Author: markt Date: Fri Jul 8 18:01:30 2011 New Revision: 1144405 URL: http://svn.apache.org/viewvc?rev=1144405view=rev Log: Pull up Handler.process Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java?rev=1144405r1=1144404r2=1144405view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java Fri Jul 8 18:01:30 2011 @@ -16,16 +16,19 @@ */ package org.apache.coyote; +import java.io.IOException; import java.util.concurrent.Executor; import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState; +import org.apache.tomcat.util.net.SocketStatus; +import org.apache.tomcat.util.net.SocketWrapper; /** * Provides functionality and attributes common to all supported protocols * (currently HTTP and AJP). */ -public abstract class AbstractProcessor implements ActionHook, Processor { +public abstract class AbstractProcessorS implements ActionHook, Processor { protected Adapter adapter; protected final AsyncStateMachine asyncStateMachine; @@ -100,4 +103,25 @@ public abstract class AbstractProcessor public SocketState asyncPostProcess() { return asyncStateMachine.asyncPostProcess(); } + +protected abstract boolean isComet(); + +/** + * Process HTTP requests. All requests are treated as HTTP requests to start + * with although they may change type during processing. + */ +public abstract SocketState process(SocketWrapperS socket) +throws IOException; + + +/** + * Process in-progress Comet requests. These will start as HTTP requests. + */ +public abstract SocketState event(SocketStatus status) throws IOException; + +/** + * Process in-progress Servlet 3.0 Async requests. These will start as HTTP + * requests. + */ +public abstract SocketState asyncDispatch(SocketStatus status); } Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1144405r1=1144404r2=1144405view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Jul 8 18:01:30 2011 @@ -17,6 +17,7 @@ package org.apache.coyote; import java.net.InetAddress; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicInteger; @@ -28,9 +29,12 @@ import javax.management.MalformedObjectN import javax.management.ObjectName; import org.apache.juli.logging.Log; +import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.modeler.Registry; import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.AbstractEndpoint.Handler; +import org.apache.tomcat.util.net.SocketStatus; +import org.apache.tomcat.util.net.SocketWrapper; import org.apache.tomcat.util.res.StringManager; public abstract class AbstractProtocol implements ProtocolHandler, @@ -456,14 +460,22 @@ public abstract class AbstractProtocol i // --- Connection handler base class -protected abstract static class AbstractConnectionHandler +protected abstract static class AbstractConnectionHandlerS,P extends AbstractProcessorS implements AbstractEndpoint.Handler { +protected abstract Log getLog(); + protected RequestGroupInfo global = new RequestGroupInfo(); protected AtomicLong registerCount = new AtomicLong(0); +protected ConcurrentHashMapSocketWrapperS,P connections = +new ConcurrentHashMapSocketWrapperS,P(); + +protected RecycledProcessorsP,S recycledProcessors = +new RecycledProcessorsP,S(this); + + protected abstract AbstractProtocol getProtocol(); -protected abstract Log getLog(); @Override @@ -471,8 +483,88
Re: svn commit: r1144405 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/
On 08/07/2011 19:01, ma...@apache.org wrote: Author: markt Date: Fri Jul 8 18:01:30 2011 New Revision: 1144405 URL: http://svn.apache.org/viewvc?rev=1144405view=rev Log: Pull up Handler.process Everything looks OK with this commit but I've just kicked off a full unit test and TCK run to make sure. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51490] New: if.jsp has many bugs and c:if example not useful
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490 Bug #: 51490 Summary: if.jsp has many bugs and c:if example not useful Product: Tomcat 7 Version: 7.0.16 Platform: PC Status: NEW Severity: normal Priority: P2 Component: Examples AssignedTo: dev@tomcat.apache.org ReportedBy: char...@everspeech.com Classification: Unclassified Created attachment 27276 -- https://issues.apache.org/bugzilla/attachment.cgi?id=27276 Three versions of the if example, including a fix. See: apache-tomcat-7.0.16/webapps/examples/jsp/tagplugin/if.jsp Small things: * Has unclosed font tags and hr tags (old HTML) * Has doubled font tags: font font (broken) * Uses /br sometimes (broken) - should be br/ always Medium thing: * The content in the following prints even when it's not working! E.g., if the jstl.jar is not there! c:if test=${20} It's true that (20)! /c:if The User Agent simply prints the content of the unknown tag. Please add after this: br/ c:if test=${02} If you see this, then (02)! Fail! /c:if Major things: * Must use the old non-XML syntax with .jsp file suffix: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % * The scope for theTruth should be page to avoid testing issues. If the taglib line is removed and the following is added to the html tag: xmlns:c=http://java.sun.com/jsp/jstl/core; then the example does NOT work, even though it might look like it does! In this case, theTruth is still set from if.jsp (if scope=session) and the contents of the c:if tag still appear, even with no JSTL processing. To use xmlns:c rather than the taglib line, the developer must 1) Switch to the .jspx file suffix 2) Use the jsp:root element 3) Or configure Tomcat to treat .jsp as XML The above is not clear, especially when the example appears to work in many cases when it should not. I have attached: 1) A fixed if.jsp - please use this. 2) An if.jspx version - please include this for contrast. 3) An if-xmlns.jsp version that does NOT work, but appears to work if if.jsp is visited first. This is to test the example. Thanks! -- 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
DO NOT REPLY [Bug 51490] if.jsp has many bugs and c:if example not useful
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490 char...@everspeech.com changed: What|Removed |Added CC||char...@everspeech.com OS/Version||All -- 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
DO NOT REPLY [Bug 51490] if.jsp has many bugs and c:if example not useful
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490 Christopher Schultz ch...@christopherschultz.net changed: What|Removed |Added Severity|normal |minor --- Comment #1 from Christopher Schultz ch...@christopherschultz.net 2011-07-08 19:51:02 UTC --- A couple of notes: 1. It might be nice to clean-up the sloppy HTML. Patches, even (especially!) for documentation are always appreciated. 2. For your medium thing, you say neither what the output should be nor what the output actually is. Please be absolutely clear when filing a bug report. 3. Failure to use JSTL properly does not constitute a bug in Tomcat. For example, specifying xmlns:c=... in the html element of a .jsp file is not a valid way to reference a taglib and should not be expected to work. Nor is this something that Tomcat can reasonably detect and protect the user against. 4. For the if-xmlns-works-after-if-but-not-before problem, we'll have to look at that. -- 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
DO NOT REPLY [Bug 51490] if.jsp has many bugs and c:if example not useful
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490 --- Comment #2 from char...@everspeech.com 2011-07-08 20:25:21 UTC --- Created attachment 27277 -- https://issues.apache.org/bugzilla/attachment.cgi?id=27277 Modified example illustrating issues. -- 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: r1144501 - /tomcat/native/trunk/native/src/jnilib.c
Author: schultz Date: Fri Jul 8 20:42:45 2011 New Revision: 1144501 URL: http://svn.apache.org/viewvc?rev=1144501view=rev Log: Added required APR version number to unsupported APR version message. Fixed typos in comments and error messages. Modified: tomcat/native/trunk/native/src/jnilib.c Modified: tomcat/native/trunk/native/src/jnilib.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/jnilib.c?rev=1144501r1=1144500r2=1144501view=diff == --- tomcat/native/trunk/native/src/jnilib.c (original) +++ tomcat/native/trunk/native/src/jnilib.c Fri Jul 8 20:42:45 2011 @@ -70,17 +70,17 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM /* APR versions below 1.4.3 are known to have * faulty wakeup code on windows platform */ -tcn_Throw(env, Unupported APR version (%s), +tcn_Throw(env, Unsupported APR version %s: this tcnative requires at least 1.4.3, apr_version_string()); return JNI_ERR; } #if defined(HAVE_POOL_PRE_CLEANUP) defined(HAVE_POLLSET_WAKEUP) -/* Althugh not 1.4.x, APR has required functionality. +/* Although not 1.4.x, APR has required functionality. * Note that this is compile time definition, and we * presume the required API's are present in the custom APR. */ #else -tcn_Throw(env, Unupported APR version (%s), +tcn_Throw(env, Unsupported APR version %s: this tcnative requires at least 1.4.3, apr_version_string()); return JNI_ERR; #endif - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51490] if.jsp has many bugs and c:if example not useful
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490 --- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com 2011-07-08 20:53:56 UTC --- It would be nice if you were providing patches in svn diff (or diff -u) format, http://tomcat.apache.org/bugreport.html#Patches_and_enhancement_requests The source code for the examples in Tomcat 7 is http://svn.apache.org/repos/asf/tomcat/trunk/webapps/examples/ I would be -1 for any cleanup for if.jsp, foreach.jsp and choose.jsp. Those are examples not for the JSTL library but for Tomcat Tag Plugins. That is a different beast. I suspect that broken HTML code there is intended (to better test this feature), though I am a bit lazy to look up through the history of those files. -- 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
DO NOT REPLY [Bug 51490] if.jsp has many bugs and c:if example not useful
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490 --- Comment #4 from char...@everspeech.com 2011-07-08 21:00:56 UTC --- Hi Christopher, Thanks for looking at this! For (1), I hope that the example is updated at some point in the near future. For (2): = Begin Original if.jsp output === Tag Plugin Examples - c:if Plugin Introductory Notes Brief Instructions for Writing Plugins Set the test result to a variable The result of testing for (1==1) is: true Conditionally execute the body It's true that (20)! = End Original if.jsp output === Now we look on the web and see that the taglib line can be replaced with an xmlns:c attribute: xmlns:c=http://java.sun.com/jsp/jstl/core;. We delete the taglib line and add the attribute. See if-bogus.jsp attached (Modified example illustrating the issues). If we visit if-bogus.jsp, the output is exactly the same as above! If we restart Tomcat and visit if-bogus.jsp, then the output is exactly the same again! If we refresh the page, we finally get something slightly different (the true disappears, but the 20 line remains): = Begin if-bogus.jsp output = Tag Plugin Examples - c:if Plugin Introductory Notes Brief Instructions for Writing Plugins Set the test result to a variable The result of testing for (1==1) is: Conditionally execute the body It's true that (20)! = End if-bogus.jsp output = If we visit if.jsp again, it sets the theTruth session variable. Now if we go back to if-bogus.jsp and refresh, it looks exactly like the Original if.jsp output - it looks like it's working, but it's not. I sent an updated if.jsp in the first attachment. This fixes HTML issues and makes it clear when things are actually working: 1) Use scope=page to avoid side effects from other example pages 2) Use a c:if that actually depends on JSTL working. The output of the updated if.jsp example is exactly the same as before, but only if things are working. Here is the output from if-xmlns.jsp (same as if-bogus.jsp except based on the updated if.jsp example): = Begin if-xmlns.jsp output = Tag Plugin Examples - c:if Plugin Introductory Notes Brief Instructions for Writing Plugins Set the test result to a variable The result of testing for (1==1) is: Conditionally execute the body It's true that (20)! If you see this, then (02)! Fail! = Begin if-xmlns.jsp output = In the above output, note that 1) the true is not there (as expected) 2) the misleading (20) line is still there, but 3) a new line gets printed indicating that it's not actually working New note: Apparently, a scope=session variable will be used by a scope=page variable of the same name. After restarting Tomcat, then it's possible to switch between the updated if.jsp and if-xmlns.jsp and the output will not change (no side effects, but a restart is required as explained in new note above). I agree with your note on (3) regarding failure to use JSTL properly. Note that updating the example will help tremendously with (3)! Currently, people look at the web, create something like if-xmlns.jsp, and then think (at first) that it's working. (4) the if-xmlns-works-after-if-but-not-before problem This is just a scoping issue for theTruth as pointed out and as corrected in the updated if.jsp example. I hope that this helps. -- 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
DO NOT REPLY [Bug 51490] if.jsp has many bugs and c:if example not useful
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490 --- Comment #5 from char...@everspeech.com 2011-07-08 21:38:06 UTC --- (In reply to comment #4) = Begin if-xmlns.jsp output = Tag Plugin Examples - c:if Plugin Introductory Notes Brief Instructions for Writing Plugins Set the test result to a variable The result of testing for (1==1) is: Conditionally execute the body It's true that (20)! If you see this, then (02)! Fail! = End if-xmlns.jsp output = Should be End on the line above rather than Begin. After restarting Tomcat, then it's possible to switch between the updated if.jsp and if-xmlns.jsp and the output will not change (no side effects, but a restart is required as explained in new note above). Clarification: The output will not change for the *respective* updated if.jsp and if-xmlns.jsp examples. This is how it should be if there are no side effects between the two. -- 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
Blank Tomcat server for development and deployment
Hello there! We have just released a Tomcat server that runs Apache Tomcat applications and lets developers build and test apps in a Java environment. It is configured to quickly deploy on a variety of cloud providers (Rackspace, Amazon, GoGrid, SoftLayer, etc). We want it to be useful to the Tomcat community so are seeking feedback and suggestions. You can spin it up for free at http://www.standingcloud.com/network/tomcat by clicking the Use it Now! button. Any feedback would be greatly appreciated. -- View this message in context: http://old.nabble.com/Blank-Tomcat-server-for-development-and-deployment-tp32024936p32024936.html Sent from the Tomcat - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1144405 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/
On 08/07/2011 19:02, Mark Thomas wrote: On 08/07/2011 19:01, ma...@apache.org wrote: Author: markt Date: Fri Jul 8 18:01:30 2011 New Revision: 1144405 URL: http://svn.apache.org/viewvc?rev=1144405view=rev Log: Pull up Handler.process Everything looks OK with this commit but I've just kicked off a full unit test and TCK run to make sure. Brilliant. The VM running the TCKs randomly rebooted 5 mins after the tests started and about 30s after I left it to run. The unit tests hit a problem with Comet and APR. I have almost certainly overlooked something in the refactoring. It is getting late here so I'll probably re-run the TCKs and look at the unit test failure tomorrow. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1144557 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocol.java ajp/AbstractAjpProtocol.java ajp/AjpNioProtocol.java http11/Http11AprProtocol.java http11/Http11NioProtocol.java h
Author: markt Date: Sat Jul 9 00:28:44 2011 New Revision: 1144557 URL: http://svn.apache.org/viewvc?rev=1144557view=rev Log: Fix Comet with HTTP/APR connector r1144391 switched the key for the processor map for this connector from the socket to the socket wrapper. That prevented Comet from being able to retrieve the processor from the map when processing a comet event. This commit changes all the connectors to map the socket (or rather whatever the SocketWrapper wraps) to the processor rather than the SocketWrapper. Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1144557r1=1144556r2=1144557view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Sat Jul 9 00:28:44 2011 @@ -468,8 +468,8 @@ public abstract class AbstractProtocol i protected RequestGroupInfo global = new RequestGroupInfo(); protected AtomicLong registerCount = new AtomicLong(0); -protected ConcurrentHashMapSocketWrapperS,P connections = -new ConcurrentHashMapSocketWrapperS,P(); +protected ConcurrentHashMapS,P connections = +new ConcurrentHashMapS,P(); protected RecycledProcessorsP,S recycledProcessors = new RecycledProcessorsP,S(this); @@ -491,7 +491,7 @@ public abstract class AbstractProtocol i public SocketState process(SocketWrapperS socket, SocketStatus status) { -P processor = connections.remove(socket); +P processor = connections.remove(socket.getSocket()); socket.setAsync(false); Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1144557r1=1144556r2=1144557view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Sat Jul 9 00:28:44 2011 @@ -83,7 +83,7 @@ public abstract class AbstractAjpProtoco @Override protected void longPoll(SocketWrapperS socket, P processor) { // Same requirements for all AJP connectors -connections.put(socket, processor); +connections.put(socket.getSocket(), processor); socket.setAsync(true); } } Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1144557r1=1144556r2=1144557view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Sat Jul 9 00:28:44 2011 @@ -120,10 +120,10 @@ public class AjpNioProtocol extends Abst if (log.isDebugEnabled()) log.debug(Iterating through our connections to release a socket channel:+socket); boolean released = false; -Iteratorjava.util.Map.EntrySocketWrapperNioChannel, AjpNioProcessor it = connections.entrySet().iterator(); +Iteratorjava.util.Map.EntryNioChannel, AjpNioProcessor it = connections.entrySet().iterator(); while (it.hasNext()) { -java.util.Map.EntrySocketWrapperNioChannel, AjpNioProcessor entry = it.next(); -if (entry.getKey().getSocket().getIOChannel()==socket) { +java.util.Map.EntryNioChannel, AjpNioProcessor entry = it.next(); +if (entry.getKey().getIOChannel()==socket) { it.remove(); AjpNioProcessor result = entry.getValue(); result.recycle(true); Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1144557r1=1144556r2=1144557view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Sat Jul 9 00:28:44 2011 @@ -230,7 +230,7 @@ public class
svn commit: r1144573 - /tomcat/native/trunk/native/src/ssl.c
Author: schultz Date: Sat Jul 9 02:05:06 2011 New Revision: 1144573 URL: http://svn.apache.org/viewvc?rev=1144573view=rev Log: Added function to enter FIPS mode. 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=1144573r1=1144572r2=1144573view=diff == --- tomcat/native/trunk/native/src/ssl.c (original) +++ tomcat/native/trunk/native/src/ssl.c Sat Jul 9 02:05:06 2011 @@ -503,6 +503,32 @@ TCN_IMPLEMENT_CALL(void, SSL, randSet)(T } TCN_FREE_CSTRING(file); } + +TCN_IMPLEMENT_CALL(jint, SSL, fipsModeSet)(TCN_STDARGS, jint mode) +{ +int r = 0; +UNREFERENCED(o); + +#ifdef OPENSSL_FIPS +if(1 != (r = (jint)FIPS_mode_set((int)mode))) { + /* arrange to get a human-readable error message */ + unsigned long err = ERR_get_error(); + char msg[256]; + + /* ERR_load_crypto_strings() already called in initialize() */ + + ERR_error_string_n(err, msg, 256); + + tcn_ThrowException(e, msg); +} +#else +/* FIPS is unavailable */ +tcn_ThrowException(e, FIPS was not available to tcnative at build time. You will need to re-build tcnative against an OpenSSL with FIPS.); +#endif + +return r; +} + /* OpenSSL Java Stream BIO */ typedef struct { @@ -876,6 +902,14 @@ TCN_IMPLEMENT_CALL(void, SSL, randSet)(T UNREFERENCED(file); } +TCN_IMPLEMENT_CALL(jint, SSL, fipsModeSet)(TCN_STDARGS, jint mode) +{ +UNREFERENCED_STDARGS; +UNREFERENCED(mode); + +return 0; +} + TCN_IMPLEMENT_CALL(jlong, SSL, newBIO)(TCN_STDARGS, jlong pool, jobject callback) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Using reflection to call tcnative methods
All, I've been working in AprLifecycleListener to add FIPS support. I need to make an additional native method call in initializeSSL and I'm wondering why all of the native methods are called using reflection instead of direct method calls. The SSL class, for instance, and the AprLifecycleListener are both in the Tomcat source tree and so they should always be in sync. The only reason I can think of is that native methods can throw any exception they want even if they are not declared in the Java stub, and the InvocationTargetException that wraps any exception through a reflective call will help avoid any problems. Is that it? Is that the reason for the reflective calls? If not, is there another reason? If there's no good reason, then all the reflective-call clutter should be removed. Thanks, -chris signature.asc Description: OpenPGP digital signature
Re: Using reflection to call tcnative methods
On 07/09/2011 04:14 AM, Christopher Schultz wrote: All, I've been working in AprLifecycleListener to add FIPS support. I need to make an additional native method call in initializeSSL and I'm wondering why all of the native methods are called using reflection instead of direct method calls. Think that originates from the initial code when the java part of native was not part of tomcat code. We needed a way to make (at that time a separate .jar) tomcat uses it without run time dependency. If there's no good reason, then all the reflective-call clutter should be removed. +1. There is absolutely no reason to use the reflection any more. Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org