Re: Executor is implemented

2007-03-22 Thread Remy Maucherat

Filip Hanik - Dev Lists wrote:

I took the liberty and added the  element to server.xml today.
It performs surprisingly well,


I don't see why it would perform worse than your internal connector 
executor :)



I tried to make the default implementation as basic as possible.
Let me know if you have any feedback.


It looks good. I find the connector rule trick a bit weird, but it works.

Rémy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521246 - in /tomcat/tc6.0.x/trunk/java/org/apache/coyote: ajp/AjpAprProcessor.java http11/Http11AprProcessor.java

2007-03-22 Thread remm
Author: remm
Date: Thu Mar 22 05:58:07 2007
New Revision: 521246

URL: http://svn.apache.org/viewvc?view=rev&rev=521246
Log:
- Fix problem with blocking reads for keepalive when using an executor (the 
number of busy threads is always 0).

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?view=diff&rev=521246&r1=521245&r2=521246
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Thu 
Mar 22 05:58:07 2007
@@ -385,7 +385,7 @@
 try {
 // Get first message of the request
 if (!readMessage(requestHeaderMessage, true,
-keptAlive && (endpoint.getCurrentThreadsBusy() > 
limit))) {
+keptAlive && (endpoint.getCurrentThreadsBusy() >= 
limit))) {
 // This means that no data is available right now
 // (long keepalive), so that the processor should be 
recycled
 // and the method should return true

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?view=diff&rev=521246&r1=521245&r2=521246
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
Thu Mar 22 05:58:07 2007
@@ -816,7 +816,7 @@
 Socket.timeoutSet(socket, soTimeout * 1000);
 }
 if (!inputBuffer.parseRequestLine
-(keptAlive && (endpoint.getCurrentThreadsBusy() > 
limit))) {
+(keptAlive && (endpoint.getCurrentThreadsBusy() >= 
limit))) {
 // This means that no data is available right now
 // (long keepalive), so that the processor should be 
recycled
 // and the method should return true



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521257 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/core: StandardService.java StandardThreadExecutor.java

2007-03-22 Thread remm
Author: remm
Date: Thu Mar 22 06:29:30 2007
New Revision: 521257

URL: http://svn.apache.org/viewvc?view=rev&rev=521257
Log:
- Expose executors in JMX (shouldn't hurt).

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardService.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardService.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardService.java?view=diff&rev=521257&r1=521256&r2=521257
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardService.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardService.java Thu 
Mar 22 06:29:30 2007
@@ -518,6 +518,12 @@
 }
 }
 
+synchronized (executors) {
+for ( int i=0; ihttp://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java?view=diff&rev=521257&r1=521256&r2=521257
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 
Thu Mar 22 06:29:30 2007
@@ -155,9 +155,26 @@
 lifecycle.removeLifecycleListener(listener);
 }
 
+// Statistics from the thread pool
+public int getActiveCount() {
+return (executor != null) ? executor.getActiveCount() : 0;
+}
 
-
+public long getCompletedTaskCount() {
+return (executor != null) ? executor.getCompletedTaskCount() : 0;
+}
 
+public int getCorePoolSize() {
+return (executor != null) ? executor.getCorePoolSize() : 0;
+}
+
+public int getLargestPoolSize() {
+return (executor != null) ? executor.getLargestPoolSize() : 0;
+}
+
+public int getPoolSize() {
+return (executor != null) ? executor.getPoolSize() : 0;
+}
 
 // -- TaskQueue Inner Class
 class TaskQueue extends LinkedBlockingQueue {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Executor is implemented

2007-03-22 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

Filip Hanik - Dev Lists wrote:

I took the liberty and added the  element to server.xml today.
It performs surprisingly well,


I don't see why it would perform worse than your internal connector 
executor :)

I was comparing to the existing stack thread pool, :)



I tried to make the default implementation as basic as possible.
Let me know if you have any feedback.


It looks good. I find the connector rule trick a bit weird, but it works.
Yeah, I wasn't sure what you had in mind, since the executor is a string 
in server.xml but has to reference an object inside the Service object, 
and on top of that, it can't be a part of the "setAllProperties" either.

Never really had a thing for the digester :)
Filip


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521284 - /tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

2007-03-22 Thread fhanik
Author: fhanik
Date: Thu Mar 22 07:22:00 2007
New Revision: 521284

URL: http://svn.apache.org/viewvc?view=rev&rev=521284
Log:
same fix as for APR, always try to do a non blocking read for the 2nd request, 
busy threads return 0 with the executor


Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=521284&r1=521283&r2=521284
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
Thu Mar 22 07:22:00 2007
@@ -832,7 +832,7 @@
 
socket.getIOChannel().socket().setSoTimeout((int)soTimeout);
 inputBuffer.readTimeout = soTimeout;
 }
-if (!inputBuffer.parseRequestLine(keptAlive && 
(endpoint.getCurrentThreadsBusy() > limit))) {
+if (!inputBuffer.parseRequestLine(keptAlive && 
(endpoint.getCurrentThreadsBusy() >= limit))) {
 // This means that no data is available right now
 // (long keepalive), so that the processor should be 
recycled
 // and the method should return true



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Executor is implemented

2007-03-22 Thread Filip Hanik - Dev Lists

Filip Hanik - Dev Lists wrote:

Remy Maucherat wrote:

Filip Hanik - Dev Lists wrote:
I took the liberty and added the  element to server.xml 
today.

It performs surprisingly well,


I don't see why it would perform worse than your internal connector 
executor :)

I was comparing to the existing stack thread pool, :)
for example, the JioEndpoint performs much better with the executor than 
the worker stack, surprisingly

Filip




I tried to make the default implementation as basic as possible.
Let me know if you have any feedback.


It looks good. I find the connector rule trick a bit weird, but it 
works.
Yeah, I wasn't sure what you had in mind, since the executor is a 
string in server.xml but has to reference an object inside the Service 
object, and on top of that, it can't be a part of the 
"setAllProperties" either.

Never really had a thing for the digester :)
Filip


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521342 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

2007-03-22 Thread fhanik
Author: fhanik
Date: Thu Mar 22 09:54:26 2007
New Revision: 521342

URL: http://svn.apache.org/viewvc?view=rev&rev=521342
Log:
Fix NPE when using Executor

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?view=diff&rev=521342&r1=521341&r2=521342
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Thu 
Mar 22 09:54:26 2007
@@ -261,7 +261,7 @@
 }
 
 public int getCurrentThreadsBusy() {
-return curThreads - workers.size();
+return workers!=null?curThreads - workers.size():0;
 }
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Executor is implemented

2007-03-22 Thread Remy Maucherat

Filip Hanik - Dev Lists wrote:

Filip Hanik - Dev Lists wrote:

Remy Maucherat wrote:

Filip Hanik - Dev Lists wrote:
I took the liberty and added the  element to server.xml 
today.

It performs surprisingly well,


I don't see why it would perform worse than your internal connector 
executor :)

I was comparing to the existing stack thread pool, :)
for example, the JioEndpoint performs much better with the executor than 
the worker stack, surprisingly


The results I see are average (a lot more memory, slower), but it has 
far more options obviously. In particular, the default maxThreads is way 
too high and blows up my poor laptop (it should be 150 IMO, like for the 
current connectors).


(the j.io will not perform better or worse: with ab -k, once it gets a 
thread it will never let it go away)


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Executor is implemented

2007-03-22 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

Filip Hanik - Dev Lists wrote:

Filip Hanik - Dev Lists wrote:

Remy Maucherat wrote:

Filip Hanik - Dev Lists wrote:
I took the liberty and added the  element to server.xml 
today.

It performs surprisingly well,


I don't see why it would perform worse than your internal connector 
executor :)

I was comparing to the existing stack thread pool, :)
for example, the JioEndpoint performs much better with the executor 
than the worker stack, surprisingly


The results I see are average (a lot more memory, slower), but it has 
far more options obviously. In particular, the default maxThreads is 
way too high and blows up my poor laptop (it should be 150 IMO, like 
for the current connectors).


(the j.io will not perform better or worse: with ab -k, once it gets a 
thread it will never let it go away)
that's what I tested, -c 100 -k (maxThreads=10) and somehow it still 
worked, and performed really well
not sure why that was, but I agree with your conclusion. for the j.io it 
should simply turn off keep alives when using an executor.


Filip


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41749] - Tomcat with APR using SSL spins CPU at 100%

2007-03-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41749





--- Additional Comments From [EMAIL PROTECTED]  2007-03-22 12:07 ---
I have managed to get gdb attached once or twice now. The loop appears to be in
the error condition in ssl_socket_recv . EAGAIN is being returned, and a tight
loop occurs when data never arrives. 

I'm not certain who makes the socket non-blocking, but ssl_socket_recv does not
appear to check for any sort of timeout conditions.

This seems to occur on large multi-packet POSTed SOAP requests. It looks like
only part of the SOAP request has been read. I'm not sure if there's some sort
of packet dropping going on in my network.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521416 - in /tomcat/connectors/trunk/jk/native/common: jk_map.c jk_map.h

2007-03-22 Thread mturk
Author: mturk
Date: Thu Mar 22 12:33:46 2007
New Revision: 521416

URL: http://svn.apache.org/viewvc?view=rev&rev=521416
Log:
Added function to read a simple name=value property file without the syntax 
checks.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_map.c
tomcat/connectors/trunk/jk/native/common/jk_map.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?view=diff&rev=521416&r1=521415&r2=521416
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.c Thu Mar 22 12:33:46 2007
@@ -674,7 +674,7 @@
 strncpy(to, m->names[i], remain);
 *(to+remain)   = '.';
 *(to+remain+1) = '\0';
-
+
 rc = jk_map_resolve_references(m, m->values[i], 0, 
depth+1, l);
 if (rc == JK_FALSE) {
 break;
@@ -757,3 +757,78 @@
 }
 return rc;
 }
+
+int jk_map_load_property(jk_map_t *m, const char *str, jk_logger_t *l)
+{
+int rc = JK_TRUE;
+char buf[LENGTH_OF_LINE + 1];
+char *prp = &buf[0];
+
+if (strlen(str) > LENGTH_OF_LINE) {
+jk_log(l, JK_LOG_WARNING,
+   "Line to long (%d > %d), ignoring entry",
+   strlen(str), LENGTH_OF_LINE);
+return JK_FALSE;
+}
+
+strcpy(prp, str);
+if (trim(prp)) {
+char *v = strchr(prp, '=');
+if (v) {
+*v = '\0';
+v++;
+trim(prp);
+trim(v);
+if (strlen(v) && strlen(prp)) {
+v = jk_pool_strdup(&m->p, v);
+if (v) {
+jk_map_put(m, prp, v, NULL);
+}
+else {
+JK_LOG_NULL_PARAMS(l);
+rc = JK_FALSE;
+}
+}
+}
+}
+return rc;
+}
+
+
+int jk_map_load_properties(jk_map_t *m, const char *f, time_t *modified, 
jk_logger_t *l)
+{
+int rc = JK_FALSE;
+
+if (m && f) {
+struct stat statbuf;
+FILE *fp;
+if ((rc = stat(f, &statbuf)) == -1)
+return JK_FALSE;
+#ifdef AS400
+fp = fopen(f, "r, o_ccsid=0");
+#else
+fp = fopen(f, "r");
+#endif
+
+if (fp) {
+char buf[LENGTH_OF_LINE + 1];
+char *prp;
+
+rc = JK_TRUE;
+
+while (NULL != (prp = fgets(buf, LENGTH_OF_LINE, fp))) {
+trim_prp_comment(prp);
+if (*prp) {
+if ((rc = jk_map_load_property(m, prp, l)) == JK_FALSE)
+break;
+}
+}
+fclose(fp);
+if (modified)
+*modified = statbuf.st_mtime;
+}
+}
+
+return rc;
+}
+

Modified: tomcat/connectors/trunk/jk/native/common/jk_map.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.h?view=diff&rev=521416&r1=521415&r2=521416
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.h Thu Mar 22 12:33:46 2007
@@ -72,9 +72,13 @@
 
 void *jk_map_value_at(jk_map_t *m, int idex);
 
+int jk_map_load_property(jk_map_t *m, const char *str, jk_logger_t *l);
+
+int jk_map_load_properties(jk_map_t *m, const char *f, time_t *modified, 
jk_logger_t *l);
+
 /**
  *  Replace $(property) in value.
- * 
+ *
  */
 char *jk_map_replace_properties(jk_map_t *m, const char *value);
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521417 - /tomcat/connectors/trunk/jk/native/common/jk_util.c

2007-03-22 Thread mturk
Author: mturk
Date: Thu Mar 22 12:35:34 2007
New Revision: 521417

URL: http://svn.apache.org/viewvc?view=rev&rev=521417
Log:
Fix windows logging. There is no need to add the extra \r, because windows by 
default adds them for any text files.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_util.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=521417&r1=521416&r2=521417
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Thu Mar 22 12:35:34 2007
@@ -397,18 +397,14 @@
 if (l &&
 (l->level <= level || level == JK_LOG_REQUEST_LEVEL) &&
 l->logger_private && what) {
-size_t sz = strlen(what);
-if (sz) {
-file_logger_t *p = l->logger_private;
-if (fwrite(what, 1, sz, p->logfile)) {
-/* [V] Flush the dam' thing! */
-fflush(p->logfile);
-}
+file_logger_t *p = l->logger_private;
+if (p->logfile) {
+fputs(what, p->logfile);
+/* [V] Flush the dam' thing! */
+fflush(p->logfile);
 }
-
 return JK_TRUE;
 }
-
 return JK_FALSE;
 }
 
@@ -444,6 +440,7 @@
 int jk_open_file_logger(jk_logger_t **l, const char *file, int level)
 {
 if (l && file) {
+
 jk_logger_t *rc = (jk_logger_t *)malloc(sizeof(jk_logger_t));
 file_logger_t *p = (file_logger_t *) malloc(sizeof(file_logger_t));
 if (rc && p) {
@@ -496,11 +493,7 @@
 {
 int rc = 0;
 /* Need to reserve space for newline and terminating zero byte. */
-#ifdef WIN32
-static int usable_size = HUGE_BUFFER_SIZE-3;
-#else
 static int usable_size = HUGE_BUFFER_SIZE-2;
-#endif
 if (!l || !file || !fmt) {
 return -1;
 }
@@ -577,17 +570,14 @@
 #else
 rc = vsnprintf(buf + used, usable_size - used, fmt, args);
 #endif
+va_end(args);
 if ( rc <= usable_size - used ) {
 used += rc;
 } else {
 used = usable_size;
 }
-#ifdef WIN32
-buf[used++] = '\r';
-#endif
-buf[used] = '\n';
-buf[used+1] = 0;
-va_end(args);
+buf[used++] = '\n';
+buf[used] = 0;
 l->log(l, level, buf);
 #ifdef NETWARE
 free(buf);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521419 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2007-03-22 Thread mturk
Author: mturk
Date: Thu Mar 22 12:38:19 2007
New Revision: 521419

URL: http://svn.apache.org/viewvc?view=rev&rev=521419
Log:
Fix regexp parsing and add error pages if extension fails instead sending empty 
page.

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?view=diff&rev=521419&r1=521418&r2=521419
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Thu Mar 22 12:38:19 
2007
@@ -109,17 +109,30 @@
 #define BAD_PATH-2
 #define MAX_SERVERNAME  128
 
-#define HTML_ERROR_400  ""  \
-"Bad 
request!"\
-"Bad request!\n"
 \
-"Your browser (or proxy) sent a request that " 
 \
-"this server could not 
understand."
-
-#define HTML_ERROR_404  ""  \
-"Object not 
found!"   \
-"The requested URL was not found on 
this server"  \
-"\nIf you entered the URL 
manually please check your"  \
-"spelling and try 
again."
+char HTML_ERROR_400[] = "\n"
+"Bad 
request!\n"
+"Bad request!\n"
+"Your browser (or proxy) sent a request that "
+"this server could not 
understand.";
+
+char HTML_ERROR_404[] = "\n"
+"Object not 
found!\n"
+"The requested URL was not found on 
this server"
+"\nIf you entered the URL manually 
please check your"
+"spelling and try again.";
+
+char HTML_ERROR_500[] = "\n"
+"Server 
error!\n"
+"Internal server error!\n"
+"The server encountered an internal error and 
was "
+"unable to complete your 
request.";
+
+char HTML_ERROR_503[] = "\n"
+"Service 
unavailable!\n"
+"Service temporary 
unavailable!\n"
+"The server is temporarily unable to service 
your "
+"request due to maintenance downtime or 
capacity problems. "
+"Please try again later.";
 
 
 #define JK_TOLOWER(x)   ((char)tolower((BYTE)(x)))
@@ -517,6 +530,34 @@
 pfc->WriteClient(pfc, msg, &len, 0);
 }
 
+static void write_error_message(LPEXTENSION_CONTROL_BLOCK lpEcb, int err)
+{
+DWORD len;
+if (err = 500) {
+lpEcb->ServerSupportFunction(lpEcb->ConnID,
+ HSE_REQ_SEND_RESPONSE_HEADER,
+ "500 Internal Server Error",
+ 0,
+ (LPDWORD)CONTENT_TYPE);
+len = (DWORD)(sizeof(HTML_ERROR_500) - 1);
+lpEcb->WriteClient(lpEcb->ConnID,
+   HTML_ERROR_503, &len, 0);
+}
+else if (err == 503) {
+lpEcb->ServerSupportFunction(lpEcb->ConnID,
+ HSE_REQ_SEND_RESPONSE_HEADER,
+ "503 Service Unavailable",
+ 0,
+ (LPDWORD)CONTENT_TYPE);
+len = (DWORD)(sizeof(HTML_ERROR_503) - 1);
+lpEcb->WriteClient(lpEcb->ConnID,
+   HTML_ERROR_503, &len, 0);
+}
+else {
+return;
+}
+}
+
 
 static int JK_METHOD start_response(jk_ws_service_t *s,
 int status,
@@ -778,6 +819,8 @@
 void *re_pcre;
 size_t re_nsub;
 size_t re_erroffset;
+const char *real;
+const char *fake;
 } ap_regex_t;
 
 /* The structure in which a captured offset is returned. */
@@ -915,8 +958,8 @@
 if (rc == 0)
 rc = nmatch;/* All captured slots were filled in */
 if (rc >= 0) {
-size_t i;
-for (i = 0; i < (size_t)rc; i++) {
+int i;
+for (i = 0; i < rc; i++) {
 pmatch[i].rm_so = ovector[i*2];
 pmatch[i].rm_eo = ovector[i*2+1];
 }
@@ -1058,20 +1101,17 @@
 if (rregexp_map) {
 int i;
 for (i = 0; i < jk_map_size(rregexp_map); i++) {
-const char *src = jk_map_name_at(rregexp_map, i);
 ap_regex_t *regexp = (ap_regex_t *)jk_map_value_at(rregexp_map, i);
-
 if 

svn commit: r521420 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

2007-03-22 Thread mturk
Author: mturk
Date: Thu Mar 22 12:40:11 2007
New Revision: 521420

URL: http://svn.apache.org/viewvc?view=rev&rev=521420
Log:
Note about regexp rewrite rules.

Modified:
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?view=diff&rev=521420&r1=521419&r2=521420
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Thu Mar 22 
12:40:11 2007
@@ -26,6 +26,9 @@
   
   
 
+  
+IIS. Added pcre like regular expressions for url rewrite rules. (mturk)
+  
   
 419222: Apache 1.3. Enable JkEnvVar. (mturk)
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521424 - in /tomcat/connectors/trunk/jk/native/iis: Makefile.amd64 Makefile.ia64 Makefile.x86 isapi.dsp

2007-03-22 Thread mturk
Author: mturk
Date: Thu Mar 22 12:52:51 2007
New Revision: 521424

URL: http://svn.apache.org/viewvc?view=rev&rev=521424
Log:
Add  /D "PCRE_STATIC" to build files

Modified:
tomcat/connectors/trunk/jk/native/iis/Makefile.amd64
tomcat/connectors/trunk/jk/native/iis/Makefile.ia64
tomcat/connectors/trunk/jk/native/iis/Makefile.x86
tomcat/connectors/trunk/jk/native/iis/isapi.dsp

Modified: tomcat/connectors/trunk/jk/native/iis/Makefile.amd64
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/Makefile.amd64?view=diff&rev=521424&r1=521423&r2=521424
==
--- tomcat/connectors/trunk/jk/native/iis/Makefile.amd64 (original)
+++ tomcat/connectors/trunk/jk/native/iis/Makefile.amd64 Thu Mar 22 12:52:51 
2007
@@ -101,7 +101,7 @@
IF EXIST $(OUTDIR)\isapi_redirect.manifest \
mt -nologo -manifest $(OUTDIR)\isapi_redirect.manifest 
-outputresource:$(OUTDIR)\isapi_redirect.dll;2
 
-CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "_AMD64_=1" -DWIN64 /D "_WIN64" /Wp64 /FIPRE64PRA.H /D 
"ISAPI_EXPORTS" /D "HAS_PCRE" /Fo"$(INTDIR)\\" 
/Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
+CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "_AMD64_=1" -DWIN64 /D "_WIN64" /Wp64 /FIPRE64PRA.H /D 
"ISAPI_EXPORTS" /D "HAS_PCRE" /D "PCRE_STATIC" /Fo"$(INTDIR)\\" 
/Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
 
 .c{$(INTDIR)}.obj::
$(CPP) @<<

Modified: tomcat/connectors/trunk/jk/native/iis/Makefile.ia64
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/Makefile.ia64?view=diff&rev=521424&r1=521423&r2=521424
==
--- tomcat/connectors/trunk/jk/native/iis/Makefile.ia64 (original)
+++ tomcat/connectors/trunk/jk/native/iis/Makefile.ia64 Thu Mar 22 12:52:51 2007
@@ -101,7 +101,7 @@
IF EXIST $(OUTDIR)\isapi_redirect.manifest \
mt -nologo -manifest $(OUTDIR)\isapi_redirect.manifest 
-outputresource:$(OUTDIR)\isapi_redirect.dll;2
 
-CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "_IA64_=1" -DWIN64 /D "_WIN64" /Wp64 /FIPRE64PRA.H /D 
"ISAPI_EXPORTS" /D "HAS_PCRE" /Fo"$(INTDIR)\\" 
/Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
+CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "_IA64_=1" -DWIN64 /D "_WIN64" /Wp64 /FIPRE64PRA.H /D 
"ISAPI_EXPORTS" /D "HAS_PCRE" /D "PCRE_STATIC" /Fo"$(INTDIR)\\" 
/Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
 
 .c{$(INTDIR)}.obj::
$(CPP) @<<

Modified: tomcat/connectors/trunk/jk/native/iis/Makefile.x86
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/Makefile.x86?view=diff&rev=521424&r1=521423&r2=521424
==
--- tomcat/connectors/trunk/jk/native/iis/Makefile.x86 (original)
+++ tomcat/connectors/trunk/jk/native/iis/Makefile.x86 Thu Mar 22 12:52:51 2007
@@ -94,7 +94,7 @@
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
 
-CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "ISAPI_EXPORTS" /D "HAS_PCRE" /Fo"$(INTDIR)\\" 
/Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
+CPP_PROJ=/nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "ISAPI_EXPORTS" /D "HAS_PCRE" /D "PCRE_STATIC" 
/Fo"$(INTDIR)\\" /Fd"$(INTDIR)\isapi_redirector_src" /FD /c 
 
 .c{$(INTDIR)}.obj::
$(CPP) @<<

Modified: tomcat/connectors/trunk/jk/native/iis/isapi.dsp
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/isapi.dsp?view=diff&rev=521424&r1=521423&r2=521424
==
--- tomcat/connectors/trunk/jk/native/iis/isapi.dsp (original)
+++ tomcat/connectors/trunk/jk/native/iis/isapi.dsp Thu Mar 22 12:52:51 2007
@@ -43,7 +43,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D 
"_MBCS" /D "_USRDLL" /D "ISAPI_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "ISAPI_EXPORTS" /D "HAS_PCRE" 
/Fd"Release/isapi_redirector_src" /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /I "..\common" /I "pcre" /I 
"$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" 
/D "_WINDOWS" /D "ISAPI_EXPORTS" /

svn commit: r521431 - in /tomcat/connectors/trunk/jk/native/iis/installer: conf/rewrite.properties isapi-redirector-win32-msi.ism

2007-03-22 Thread mturk
Author: mturk
Date: Thu Mar 22 13:08:37 2007
New Revision: 521431

URL: http://svn.apache.org/viewvc?view=rev&rev=521431
Log:
Add sample rewrite.properties file to the installer.

Added:
tomcat/connectors/trunk/jk/native/iis/installer/conf/rewrite.properties   
(with props)
Modified:

tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism

Added: tomcat/connectors/trunk/jk/native/iis/installer/conf/rewrite.properties
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/installer/conf/rewrite.properties?view=auto&rev=521431
==
--- tomcat/connectors/trunk/jk/native/iis/installer/conf/rewrite.properties 
(added)
+++ tomcat/connectors/trunk/jk/native/iis/installer/conf/rewrite.properties Thu 
Mar 22 13:08:37 2007
@@ -0,0 +1,13 @@
+# rewrite.properties - IIS
+#
+# Form of the file
+# requested=replacement
+#
+# Note: Requested must be present in the
+#   uriworkermap.properies file and mapped to
+#   the desired worker.
+#
+# Next will send /servlet/examples/ to the container
+# for the /servlets-examples request.
+#
+# /servlets-examples/=/examples/servlet/

Propchange: 
tomcat/connectors/trunk/jk/native/iis/installer/conf/rewrite.properties
--
svn:eol-style = native

Modified: 
tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism?view=diff&rev=521431&r1=521430&r2=521431
==
--- 
tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism 
(original)
+++ 
tomcat/connectors/trunk/jk/native/iis/installer/isapi-redirector-win32-msi.ism 
Thu Mar 22 13:08:37 2007
@@ -3473,6 +3473,7 @@
Value
Component_
ISAttributes
+   Registry12SOFTWARE\Apache Software 
Foundation\Jakarta Isapi 
Redirector\1.0rewrite_rule_file[INSTALLDIR]conf\rewrite.propertiesISRegistryComponent10
Registry102SOFTWARE\Apache Software 
FoundationISRegistryComponent10
Registry112SOFTWARE\Apache Software 
Foundation\Jakarta Isapi 
RedirectorISRegistryComponent10
Registry122SOFTWARE\Apache Software 
Foundation\Jakarta Isapi 
Redirector\1.0ISRegistryComponent10



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41932] New: - Tomcat does not run as a service, but it does from the command line

2007-03-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41932

   Summary: Tomcat does not run as a service, but it does from the
command line
   Product: Tomcat 5
   Version: 5.5.9
  Platform: Other
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P2
 Component: Native:JK
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Using Linux and Windows 2000, running from the command line (windows: 
catalina.bat), we are able to launch Tomcat and the servlet it loads runs 
fine.  

However, when using tomcat5.exe, it exits shortly after starting.  It installs 
as a service fine.  I tried running it from the Service Control Manager and 
also from the command line and the jakarta logs show the same thing.

There are no errors or Exceptions reported.  But why does it exit?  Why does 
it work fine when run from the command line using catalina.bat?   I assume if 
there was an error in my options, it would tell me.  

Below is the log:
[2007-03-21 16:33:00] [1098 prunsrv.c] [debug] Inside ServiceMain...
[2007-03-21 16:33:00] [info] Starting service...
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[0] -
Dcdx.configDir=C:\seratel\cdx-clients\lsa\config
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[1] -
Djava.util.logging.config.file=C:\seratel\cdx-
clients\lsa\config\logging.properties
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[2] -
Dapplication.name=cdx-lsa
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[3] -Xmx500m
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[4] -Dprocess.id=
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[5] -Dtpm.url=
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[6] -
Dprocess.id.file=C:\seratel\cdx-clients\lsa\logs\.pid
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[7] -
Dtpm.template.dir=C:\seratel\cdx-clients\lsa\tpmtemplates
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[8] -XX:+UseParallelGC
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[9] -
Xbootclasspath/a:C:\Program Files\Java\jdk1.5.0_11\jre\lib\rt.jar
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[10] -
Xbootclasspath/a:C:\seratel\cdx-clients\lsa\shared\lib\tamboot.jar
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[11] -
Xbootclasspath/a:C:\seratel\cdx-clients\lsa\shared\lib\xercesImpl.jar
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[12] -
Xbootclasspath/a:C:\seratel\cdx-clients\lsa\shared\lib\xml-apis.jar
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[13] -
Xbootclasspath/a:C:\seratel\cdx-clients\lsa\shared\lib\agentxapi.jar
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[14] -
Xbootclasspath/a:C:\seratel\cdx-clients\lsa\shared\lib\snmp.jar
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[15] -
Dcatalina.base=C:\seratel\cdx-clients\lsa
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[16] -
Dcatalina.home=C:\seratel\cdx-clients\lsa
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[17] -
Djava.endorsed.dirs=C:\seratel\cdx-clients\lsa\common\endorsed
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[18] -
Djava.io.tmpdir=C:\seratel\cdx-clients\lsa\temp
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[19] -
Djava.class.path=C:\seratel\cdx-clients\lsa\bin\bootstrap.jar
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[20] vfprintf
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[21] -Xms128m
[2007-03-21 16:33:01] [400  javajni.c] [debug] Jvm Option[22] -Xmx256m
[2007-03-21 16:33:01] [486  javajni.c] [debug] argv[0] = start
[2007-03-21 16:33:02] [968  prunsrv.c] [debug] Java started 
org/apache/catalina/startup/Bootstrap
[2007-03-21 16:33:02] [info] Service started in 2140 ms.
[2007-03-21 16:33:02] [1192 prunsrv.c] [debug] Waiting worker to finish...
[2007-03-21 16:33:06] [523  javajni.c] [debug] Java Worker thread finished
[2007-03-21 16:33:06] [1197 prunsrv.c] [debug] Worker finished.
[2007-03-21 16:33:06] [info] Debug service finished.
[2007-03-21 16:33:06] [info] Procrun finished.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521487 - in /tomcat/tc6.0.x/trunk/java/org/apache: coyote/http11/Http11NioProcessor.java coyote/http11/Http11NioProtocol.java tomcat/util/net/NioEndpoint.java

2007-03-22 Thread fhanik
Author: fhanik
Date: Thu Mar 22 14:52:25 2007
New Revision: 521487

URL: http://svn.apache.org/viewvc?view=rev&rev=521487
Log:
Added in sendfile support for the NIO connector
Currently the sending is done on the poller thread, could dispatch to the 
thread pool as well

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=521487&r1=521486&r2=521487
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
Thu Mar 22 14:52:25 2007
@@ -52,6 +52,7 @@
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.net.NioEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.util.net.NioEndpoint.KeyAttachment;
 
 
 /**
@@ -173,7 +174,10 @@
  */
 protected boolean http09 = false;
 
-
+/**
+ * Sendfile data.
+ */
+protected NioEndpoint.SendfileData sendfileData = null;
 
 /**
  * Comet used.
@@ -926,6 +930,17 @@
 response.setStatus(500);
 }
 request.updateCounters();
+
+// Do sendfile as needed: add socket to sendfile and end
+if (sendfileData != null && !error) {
+KeyAttachment ka = (KeyAttachment)socket.getAttachment(false);
+ka.setSendfileData(sendfileData);
+sendfileData.keepAlive = keepAlive;
+endpoint.getPoller0().add(socket,SelectionKey.OP_WRITE);
+openSocket = true;
+break;
+}
+
 
 rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
 
@@ -1249,6 +1264,7 @@
 http09 = false;
 contentDelimitation = false;
 expectation = false;
+sendfileData = null;
 if (ssl) {
 request.scheme().setString("https");
 }
@@ -1410,6 +1426,9 @@
 contentDelimitation = true;
 }
 
+// Advertise sendfile support through a request attribute
+if (endpoint.getUseSendfile()) 
+request.setAttribute("org.apache.tomcat.sendfile.support", 
Boolean.TRUE);
 // Advertise comet support through a request attribute
 request.setAttribute("org.apache.tomcat.comet.support", Boolean.TRUE);
 // Advertise comet timeout support
@@ -1585,11 +1604,26 @@
 (outputFilters[Constants.VOID_FILTER]);
 contentDelimitation = true;
 }
+
+// Sendfile support
+if (this.endpoint.getUseSendfile()) {
+String fileName = (String) 
request.getAttribute("org.apache.tomcat.sendfile.filename");
+if (fileName != null) {
+// No entity body sent here
+
outputBuffer.addActiveFilter(outputFilters[Constants.VOID_FILTER]);
+contentDelimitation = true;
+sendfileData = new NioEndpoint.SendfileData();
+sendfileData.fileName = fileName;
+sendfileData.pos = ((Long) 
request.getAttribute("org.apache.tomcat.sendfile.start")).longValue();
+sendfileData.length = ((Long) 
request.getAttribute("org.apache.tomcat.sendfile.end")).longValue() - 
sendfileData.pos;
+}
+}
+
 
 
 // Check for compression
 boolean useCompression = false;
-if (entityBody && (compressionLevel > 0)) {
+if (entityBody && (compressionLevel > 0) && (sendfileData == null)) {
 useCompression = isCompressable();
 // Change content-length to -1 to force chunking
 if (useCompression) {

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?view=diff&rev=521487&r1=521486&r2=521487
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java 
Thu Mar 22 14:52:25 2007
@@ -298,6 +298,15 @@
 }
 
 
+public boolean getUseSendfile() {
+return ep.getUseSendfile();
+}
+
+public void setUseSendfile(boolean useSendfile) {
+ep.setUseSendfile(useSendfile);
+}
+
+
 //  Tcp setup 
 
 public int getBacklog() {

Modified: tomcat/tc6.0.x/trunk/java/org

DO NOT REPLY [Bug 41932] - Tomcat does not run as a service, but it does from the command line

2007-03-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41932


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Native:JK   |Unknown




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521493 - in /tomcat/tc6.0.x/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2007-03-22 Thread fhanik
Author: fhanik
Date: Thu Mar 22 15:05:22 2007
New Revision: 521493

URL: http://svn.apache.org/viewvc?view=rev&rev=521493
Log:
Catch io exceptions and hide them unless debug is enabled

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=521493&r1=521492&r2=521493
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu 
Mar 22 15:05:22 2007
@@ -1476,9 +1476,12 @@
 else 
 cancelledKey(sk,SocketStatus.STOP,false);
 }
+}catch ( IOException x ) {
+if ( log.isDebugEnabled() ) log.warn("Unable to complete send 
file", x);
+cancelledKey(sk,SocketStatus.ERROR,false);
 }catch ( Throwable t ) {
 log.error("",t);
-cancelledKey(sk, SocketStatus.ERROR);
+cancelledKey(sk, SocketStatus.ERROR, false);
 }
 }
 
@@ -1549,6 +1552,7 @@
 error = false;
 fairness = 0;
 lastRegistered = 0;
+sendfileData = null;
 }
 
 public void reset() {

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=521493&r1=521492&r2=521493
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Mar 22 15:05:22 2007
@@ -18,6 +18,9 @@
   
 
   
+Added SENDFILE support for the NIO connector. (fhanik)
+  
+  
 Added support for shared thread pools by adding in the 
 element as a nested element to the  element. (fhanik)
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41864] - Wrong link on default home page

2007-03-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41864





--- Additional Comments From [EMAIL PROTECTED]  2007-03-22 15:13 ---
(In reply to comment #1)
> Most of the links on http://tomcat.apache.org/tomcat-6.0-doc/index.html
> go nowhere.

Huh? I just went there, and everything looks kosher. Every link I clicked went
somewhere reasonable.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521499 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

2007-03-22 Thread fhanik
Author: fhanik
Date: Thu Mar 22 15:17:58 2007
New Revision: 521499

URL: http://svn.apache.org/viewvc?view=rev&rev=521499
Log:
added in some useful release notes for users to be aware of.

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=521499&r1=521498&r2=521499
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Mar 22 15:17:58 2007
@@ -18,7 +18,13 @@
   
 
   
-Added SENDFILE support for the NIO connector. (fhanik)
+Added SENDFILE support for the NIO connector. (fhanik) 
+There are some Linux bugs reported against the sendfile behavior, make 
sure you
+have a JDK that is up to date, or disable sendfile behavior in the 
Connector.
+ 6427312: (fc) FileChannel.transferTo() throws IOException "system 
call interrupted"
+ 5103988: (fc) FileChannel.transferTo should return -1 for EAGAIN 
instead throws IOException
+ 6253145: (fc) FileChannel.transferTo on Linux fails when going beyond 
2GB boundary
+ 6470086: (fc) FileChannel.transferTo(2147483647, 1, channel) cause 
"Value too large" exception
   
   
 Added support for shared thread pools by adding in the 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r521499 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

2007-03-22 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Thu Mar 22 15:17:58 2007
New Revision: 521499

URL: http://svn.apache.org/viewvc?view=rev&rev=521499
Log:
added in some useful release notes for users to be aware of.

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml


To be honest, I don't think the changelog is the right place for 
documentation. maybe you could move that to the release notes.


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521509 - in /tomcat/tc6.0.x/trunk/webapps/docs: aio.xml config/http.xml

2007-03-22 Thread fhanik
Author: fhanik
Date: Thu Mar 22 15:33:16 2007
New Revision: 521509

URL: http://svn.apache.org/viewvc?view=rev&rev=521509
Log:
documented the useSendfile behavior for NIO

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/aio.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/aio.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/aio.xml?view=diff&rev=521509&r1=521508&r2=521509
==
--- tomcat/tc6.0.x/trunk/webapps/docs/aio.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/aio.xml Thu Mar 22 15:33:16 2007
@@ -266,7 +266,7 @@
   
 
   
-When APR is enabled, Tomcat supports using sendfile to send large static 
files.
+When APR or NIO is enabled, Tomcat supports using sendfile to send large 
static files.
 These writes, as soon as the system load increases, will be performed 
 asynchronously in the most efficient way. Instead of sending a large 
response using
 blocking writes, it is possible to write content to a static file, and 
write it

Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml?view=diff&rev=521509&r1=521508&r2=521509
==
--- tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml Thu Mar 22 15:33:16 2007
@@ -403,8 +403,13 @@
 the -Djava.net.preferIPv4Stack=true value to your command line
 
 
+  
+(bool)Use this attribute to enable or disable sendfile capability.
+   The default value is true
+
+  
   
-Set to true to use the NIO thread pool executor. The default value 
is true.
+(bool)Set to true to use the NIO thread pool executor. The default 
value is true.
 If set to false, it uses a thread pool based on a stack for its 
execution.
 Generally, using the executor yields a little bit slower performance, 
but yields a better
 fairness for processing connections in a high load environment as the 
traffic gets queued through a 
@@ -414,23 +419,23 @@
 
   
   
-The number of threads to be used to accept connections. Increase 
this value on a multi CPU machine,
+(int)The number of threads to be used to accept connections. 
Increase this value on a multi CPU machine,
 although you would never really need more than 2. Also, with a lot of 
non keep alive connections,
 you might want to increase this value as well. Default value is 1.
   
   
-The number of threads to be used to run for the polling events. 
Default value is 1.
+(int)The number of threads to be used to run for the polling 
events. Default value is 1.
Can't see a reason to go above that. But experiment and find your 
own results.
   
   
-The priority of the poller threads.
+(int)The priority of the poller threads.
   The default value is java.lang.Thread#NORM_PRIORITY.
   See the JavaDoc for the java.lang.Thread class for more details on
   what this priority means.
 
   
   
-The priority of the acceptor threads. The threads used to accept 
new connections.
+(int)The priority of the acceptor threads. The threads used to 
accept new connections.
   The default value is java.lang.Thread#NORM_PRIORITY.
   See the JavaDoc for the java.lang.Thread class for more details on
   what this priority means.
@@ -438,117 +443,120 @@
   
   
   
-The time in milliseconds to timeout on a select() for the poller.
+(int)The time in milliseconds to timeout on a select() for the 
poller.
This value is important, since connection clean up is done on the 
same thread, so dont set this 
value to an extremely high one.
   
   
-Whether to allow comet servlets or not, Default value is true.
+(bool)Whether to allow comet servlets or not, Default value is 
true.
   
   
-Boolean value, whether to use direct ByteBuffers or java mapped 
ByteBuffers. Default is false
+(bool)Boolean value, whether to use direct ByteBuffers or java 
mapped ByteBuffers. Default is false
When you are using direct buffers, make sure you allocate the 
appropriate amount of memory for the 
 direct memory space. On Sun's JDK that would be something like 
-XX:MaxDirectMemorySize=256m
   
   
-The socket receive buffer (SO_RCVBUF) size in bytes. Default value 
is 25188
+(int)The socket receive buffer (SO_RCVBUF) size in bytes. Default 
value is 25188
   
   
-The socket send buffer (SO_SNDBUF) size in bytes. Default value is 
43800
+(int)The socket send buffer 

Re: svn commit: r521499 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

2007-03-22 Thread Filip Hanik - Dev Lists

Remy Maucherat wrote:

[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Thu Mar 22 15:17:58 2007
New Revision: 521499

URL: http://svn.apache.org/viewvc?view=rev&rev=521499
Log:
added in some useful release notes for users to be aware of.

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml


To be honest, I don't think the changelog is the right place for 
documentation. maybe you could move that to the release notes.

will do
Filip


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521511 - in /tomcat/tc6.0.x/trunk: RELEASE-NOTES webapps/docs/changelog.xml

2007-03-22 Thread fhanik
Author: fhanik
Date: Thu Mar 22 15:38:04 2007
New Revision: 521511

URL: http://svn.apache.org/viewvc?view=rev&rev=521511
Log:
moved bug notes to the release notes

Modified:
tomcat/tc6.0.x/trunk/RELEASE-NOTES
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/RELEASE-NOTES
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/RELEASE-NOTES?view=diff&rev=521511&r1=521510&r2=521511
==
--- tomcat/tc6.0.x/trunk/RELEASE-NOTES (original)
+++ tomcat/tc6.0.x/trunk/RELEASE-NOTES Thu Mar 22 15:38:04 2007
@@ -113,6 +113,13 @@
 stability problems:
 export LD_ASSUME_KERNEL=2.4.1
 
+There are some Linux bugs reported against the NIO sendfile behavior, make 
sure you
+have a JDK that is up to date, or disable sendfile behavior in the 
Connector.
+6427312: (fc) FileChannel.transferTo() throws IOException "system call 
interrupted"
+5103988: (fc) FileChannel.transferTo should return -1 for EAGAIN instead 
throws IOException
+6253145: (fc) FileChannel.transferTo on Linux fails when going beyond 2GB 
boundary
+6470086: (fc) FileChannel.transferTo(2147483647, 1, channel) cause "Value too 
large" exception
+
 
 =
 Enabling SSI and CGI Support:

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=521511&r1=521510&r2=521511
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Mar 22 15:38:04 2007
@@ -19,12 +19,6 @@
 
   
 Added SENDFILE support for the NIO connector. (fhanik) 
-There are some Linux bugs reported against the sendfile behavior, make 
sure you
-have a JDK that is up to date, or disable sendfile behavior in the 
Connector.
- 6427312: (fc) FileChannel.transferTo() throws IOException "system 
call interrupted"
- 5103988: (fc) FileChannel.transferTo should return -1 for EAGAIN 
instead throws IOException
- 6253145: (fc) FileChannel.transferTo on Linux fails when going beyond 
2GB boundary
- 6470086: (fc) FileChannel.transferTo(2147483647, 1, channel) cause 
"Value too large" exception
   
   
 Added support for shared thread pools by adding in the 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41923] - Tomcat doesnt recognized client abort

2007-03-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41923





--- Additional Comments From [EMAIL PROTECTED]  2007-03-22 15:48 ---
It's worth noting that recovery_options=4 doesn't actually do anything (unless a
fix sneaked in without me noticing) - e.g. the behaviour of option 4 is the
default behaviour.

http://www.mail-archive.com/dev@tomcat.apache.org/msg12958.html

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r521527 - /tomcat/tc6.0.x/trunk/conf/server.xml

2007-03-22 Thread remm
Author: remm
Date: Thu Mar 22 16:34:29 2007
New Revision: 521527

URL: http://svn.apache.org/viewvc?view=rev&rev=521527
Log:
- Use fewer threads by default (it uses too much memory otherwise).

Modified:
tomcat/tc6.0.x/trunk/conf/server.xml

Modified: tomcat/tc6.0.x/trunk/conf/server.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/conf/server.xml?view=diff&rev=521527&r1=521526&r2=521527
==
--- tomcat/tc6.0.x/trunk/conf/server.xml (original)
+++ tomcat/tc6.0.x/trunk/conf/server.xml Thu Mar 22 16:34:29 2007
@@ -35,7 +35,8 @@
   
 
 
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 41932] - Tomcat does not run as a service, but it does from the command line

2007-03-22 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41932


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-03-22 16:37 ---
Bugzilla is not a support forum. Please use the users list.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]