DO NOT REPLY [Bug 42134] New: - Reduce ThreadLocal usage in ApplicationContext.java

2007-04-16 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=42134

   Summary: Reduce ThreadLocal usage in ApplicationContext.java
   Product: Tomcat 6
   Version: unspecified
  Platform: Other
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P4
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


ApplicationContext.getRequestDispatcher uses 2 ThreadLocal variables. Instead it
could easily use 1. Using less ThreadLocal variables will (marginally) improve
performance/scalability. For small benchmarks the difference is probably
insignificant.

-- 
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]



DO NOT REPLY [Bug 42134] - Reduce ThreadLocal usage in ApplicationContext.java

2007-04-16 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=42134





--- Additional Comments From [EMAIL PROTECTED]  2007-04-16 04:51 ---
Created an attachment (id=19972)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19972&action=view)
Patch that uses 1 ThreadLocal instead of 2

Patch generated against 6.x trunk

-- 
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]



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Jim Jagielski


On Apr 14, 2007, at 9:24 AM, Guenter Knauf wrote:

I've just checked with these, and they dont work for NetWare  
because we have no /dev/null support.
Therefore I would like to suggest another approach: let us import  
ap_snprintf.c from Apache 1.3.x into the mod_jk project.
I think this is a good solution; we have there a ready-to-use  
stable implementation, and every platform which lacks of an own  
snprintf() / vsnprintf() implementation can then pick this up only  
when not build with/for Apache;


+1

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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Henri Gomez

Still on mod_jk and this kind of stuff.

We switch our dev servers from i5/OS v5R4 and many changes occurs in
IBM HTTP Server powered by Apache, and for instance this one :

As of i5/OS™ V5R4, modules must be recompiled with a UTF locale. This
creates an environment where locale-dependent C runtime functions
assume that string data is encoded in UTF-8. Any hardcoded constants
can be encoded in UTF-8 by adding a #pragma convert(1208) statement in
the module. Additionally, input data from the client will no longer be
converted to EBCDIC but will be passed as-is. Output data sent from
the module is not converted either so it must be encoded in ASCII or
UTF8 as required. APR and HTTP APIs as of V5R4, expect data in UTF-8.
Note that several APIs have additional functions that allow a CCSID to
be set to indicate the encoding of the parameters being passed.
Conversion functions between UTF-8 and EBCDIC have been added. Be sure
to review APIs used by your module to be aware of current changes.

Consequence, there is many works in i5/OS (AS400) implementation of mod_jk.

I hope to get some time to works on these adaptations and help is more
than welcome (did there is other i5/OS users around ?).

If I could'nt fix/adapt for i5/OS, we may have to remove the whole
AS400 support in next release of mod_jk ;(

Regards

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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Mladen Turk

Henri Gomez wrote:

Still on mod_jk and this kind of stuff.

We switch our dev servers from i5/OS v5R4 and many changes occurs in
IBM HTTP Server powered by Apache, and for instance this one :

If I could'nt fix/adapt for i5/OS, we may have to remove the whole
AS400 support in next release of mod_jk ;(



You mean the support for the IBM HTTP Server.
I suppose the AS400 is still able to have genuine Apache Httpd
and mod_jk compiled and running.

Regards,
Mladen.

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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Henri Gomez

2007/4/16, Mladen Turk <[EMAIL PROTECTED]>:

Henri Gomez wrote:
> Still on mod_jk and this kind of stuff.
>
> We switch our dev servers from i5/OS v5R4 and many changes occurs in
> IBM HTTP Server powered by Apache, and for instance this one :
>
> If I could'nt fix/adapt for i5/OS, we may have to remove the whole
> AS400 support in next release of mod_jk ;(
>

You mean the support for the IBM HTTP Server.
I suppose the AS400 is still able to have genuine Apache Httpd
and mod_jk compiled and running.


Nope on AS400, there is an IBM HTTP Server (powered by Apache), so
it's not a genuine Apache 2.x

So since there is no more IBM support for this kind of OpenSource
stuff in there proprietary OS, we may drop our support of mod_jk. I
don't have the time to work on v5R4 adaptation and since there is
little or no interest in user land, a pragmatic approch is to stop
this OS.

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



svn commit: r529269 - in /tomcat/connectors/trunk/jk/native/common: ap_snprintf.c ap_snprintf.h

2007-04-16 Thread fuankg
Author: fuankg
Date: Mon Apr 16 07:36:47 2007
New Revision: 529269

URL: http://svn.apache.org/viewvc?view=rev&rev=529269
Log:
added ap_snprintf() from Apache 1.3 to project.

Added:
tomcat/connectors/trunk/jk/native/common/ap_snprintf.c   (with props)
tomcat/connectors/trunk/jk/native/common/ap_snprintf.h   (with props)

Added: tomcat/connectors/trunk/jk/native/common/ap_snprintf.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/ap_snprintf.c?view=auto&rev=529269
==
--- tomcat/connectors/trunk/jk/native/common/ap_snprintf.c (added)
+++ tomcat/connectors/trunk/jk/native/common/ap_snprintf.c Mon Apr 16 07:36:47 
2007
@@ -0,0 +1,1178 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * This code is based on, and used with the permission of, the
+ * SIO stdio-replacement strx_* functions by Panos Tsirigotis
+ * <[EMAIL PROTECTED]> for xinetd.
+ */
+#define BUILD_STANDALONE
+
+#ifndef BUILD_STANDALONE
+#include "httpd.h"
+#else
+#include "ap_snprintf.h"
+#endif
+
+#include 
+#include 
+#ifndef NETWARE
+#include 
+#endif
+#include 
+#include 
+#include 
+#include 
+#ifdef WIN32
+#include 
+#endif
+
+typedef enum {
+NO = 0, YES = 1
+} boolean_e;
+
+#ifndef FALSE
+#define FALSE  0
+#endif
+#ifndef TRUE
+#define TRUE   1
+#endif
+#ifndef AP_LONGEST_LONG
+#define AP_LONGEST_LONGlong
+#endif
+#define NUL'\0'
+#define WIDE_INT   long
+#define WIDEST_INT AP_LONGEST_LONG
+
+typedef WIDE_INT wide_int;
+typedef unsigned WIDE_INT u_wide_int;
+typedef WIDEST_INT widest_int;
+#ifdef __TANDEM
+/* Although Tandem supports "long long" there is no unsigned variant. */
+typedef unsigned long   u_widest_int;
+#else
+typedef unsigned WIDEST_INT u_widest_int;
+#endif
+typedef int bool_int;
+
+#define S_NULL "(null)"
+#define S_NULL_LEN 6
+
+#define FLOAT_DIGITS   6
+#define EXPONENT_LENGTH10
+
+/*
+ * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions
+ *
+ * XXX: this is a magic number; do not decrease it
+ */
+#define NUM_BUF_SIZE   512
+
+/*
+ * cvt.c - IEEE floating point formatting routines for FreeBSD
+ * from GNU libc-4.6.27.  Modified to be thread safe.
+ */
+
+/*
+ *ap_ecvt converts to decimal
+ *  the number of digits is specified by ndigit
+ *  decpt is set to the position of the decimal point
+ *  sign is set to 0 for positive, 1 for negative
+ */
+
+#defineNDIG80
+
+/* buf must have at least NDIG bytes */
+static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, 
char *buf)
+{
+register int r2;
+double fi, fj;
+register char *p, *p1;
+
+if (ndigits >= NDIG - 1)
+   ndigits = NDIG - 2;
+r2 = 0;
+*sign = 0;
+p = &buf[0];
+if (arg < 0) {
+   *sign = 1;
+   arg = -arg;
+}
+arg = modf(arg, &fi);
+p1 = &buf[NDIG];
+/*
+ * Do integer part
+ */
+if (fi != 0) {
+   p1 = &buf[NDIG];
+   while (p1 > &buf[0] && fi != 0) {
+   fj = modf(fi / 10, &fi);
+   *--p1 = (int) ((fj + .03) * 10) + '0';
+   r2++;
+   }
+   while (p1 < &buf[NDIG])
+   *p++ = *p1++;
+}
+else if (arg > 0) {
+   while ((fj = arg * 10) < 1) {
+   arg = fj;
+   r2--;
+   }
+}
+p1 = &buf[ndigits];
+if (eflag == 0)
+   p1 += r2;
+*decpt = r2;
+if (p1 < &buf[0]) {
+   buf[0] = '\0';
+   return (buf);
+}
+while (p <= p1 && p < &buf[NDIG]) {
+   arg *= 10;
+   arg = modf(arg, &fj);
+   *p++ = (int) fj + '0';
+}
+if (p1 >= &buf[NDIG]) {
+   buf[NDIG - 1] = '\0';
+   return (buf);
+}
+p = p1;
+*p1 += 5;
+while (*p1 > '9') {
+   *p1 = '0';
+   if (p1 > buf)
+   ++ * --p1;
+   else {
+   *p1 = '1';
+   (*decpt)++;
+   if (eflag == 0) {
+   if (p > buf)
+   *p = '0';
+   p++;
+   }
+   }
+}
+*p = '\0';
+return (buf);
+}
+
+static char *ap

svn commit: r529272 - /tomcat/connectors/trunk/jk/native/common/jk_global.h

2007-04-16 Thread fuankg
Author: fuankg
Date: Mon Apr 16 07:42:57 2007
New Revision: 529272

URL: http://svn.apache.org/viewvc?view=rev&rev=529272
Log:
changed to use ap_snprintf() / ap_vsnprintf() if HAVE_SNPRINTF / HAVE_VSNPRINTF 
/ HAVE_APR not defined.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_global.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=529272&r1=529271&r2=529272
==
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Mon Apr 16 07:42:57 
2007
@@ -25,13 +25,8 @@
 #ifndef JK_GLOBAL_H
 #define JK_GLOBAL_H
 
-#ifndef NETWARE
-#if !defined(WIN32) && !defined(AS400)
+#if !defined(WIN32) && !defined(AS400) && !defined(NETWARE)
 #include "portable.h"
-#else
-#define HAVE_VSNPRINTF
-#define HAVE_SNPRINTF
-#endif
 #endif
 
 #if defined(WIN32)
@@ -310,6 +305,8 @@
 #ifdef WIN32
 /* For WIN32, emulate gettimeofday() using _ftime() */
 #define gettimeofday(tv,tz) { struct _timeb tb; _ftime(&tb); (tv)->tv_sec = 
tb.time; (tv)->tv_usec = tb.millitm * 1000; }
+#define HAVE_VSNPRINTF
+#define HAVE_SNPRINTF
 #ifdef HAVE_APR
 #define snprintf apr_snprintf
 #define vsnprintf apr_vsnprintf
@@ -330,11 +327,14 @@
 #endif
 #endif
 
-/*  There is a snprintf() and vsnprintf() in jk_util.c */
-/* if those work remove the #define. */
-#if defined(NETWARE) || defined(AS400)
-#define USE_SPRINTF
-#define USE_VSPRINTF
+/* Use ap snprintf() and vsnprintf() when needed */
+#if !defined(HAVE_APR)
+#if !defined(HAVE_SNPRINTF)
+#define snprintf ap_snprintf
+#endif
+#if !defined(HAVE_VSNPRINTF)
+#define vsnprintf ap_vsnprintf
+#endif
 #endif
 
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))



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



svn commit: r529274 - in /tomcat/connectors/trunk/jk/native/common: jk_status.c jk_util.c

2007-04-16 Thread fuankg
Author: fuankg
Date: Mon Apr 16 07:49:52 2007
New Revision: 529274

URL: http://svn.apache.org/viewvc?view=rev&rev=529274
Log:
removed sprintf() / vsprintf() hacks; removed old vsnprintf() implementation.

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

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?view=diff&rev=529274&r1=529273&r2=529274
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Mon Apr 16 07:49:52 
2007
@@ -323,28 +323,6 @@
 HEADERS_NO_CACHE
 };
 
-#if !defined(HAVE_VSNPRINTF) && !defined(HAVE_APR)
-static FILE *f = NULL;
-static int vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
-{
-int res;
-
-if (f == NULL)
-f = fopen("/dev/null", "w");
-if (f == NULL)
-return -1;
-
-setvbuf(f, str, _IOFBF, n);
-
-res = vfprintf(f, fmt, ap);
-
-if (res > 0 && res < n) {
-res = vsprintf(str, fmt, ap);
-}
-return res;
-}
-#endif
-
 static void jk_puts(jk_ws_service_t *s, const char *str)
 {
 if (str)
@@ -390,11 +368,7 @@
 if (NULL == buf)
 return -1;
 #endif
-#ifdef USE_VSPRINTF /* until we get a vsnprintf function */
-rc = vsprintf(buf, fmt, args);
-#else
 rc = vsnprintf(buf, HUGE_BUFFER_SIZE, fmt, args);
-#endif
 va_end(args);
 if (rc > 0)
 s->write(s, buf, rc);

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=529274&r1=529273&r2=529274
==
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Mon Apr 16 07:49:52 2007
@@ -352,46 +352,6 @@
 return (int)strftime(str, len, JK_TIME_FORMAT, tms);
 }
 
-/* Write at most n characters to the buffer in str, return the
- * number of chars written or -1 if the buffer would have been
- * overflowed.
- *
- * This is portable to any POSIX-compliant system that has /dev/null
- */
-#if !defined(HAVE_VSNPRINTF) && !defined(HAVE_APR)
-static FILE *f = NULL;
-static int vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
-{
-int res;
-
-if (f == NULL)
-f = fopen("/dev/null", "w");
-if (f == NULL)
-return -1;
-
-setvbuf(f, str, _IOFBF, n);
-
-res = vfprintf(f, fmt, ap);
-
-if (res > 0 && res < n) {
-res = vsprintf(str, fmt, ap);
-}
-return res;
-}
-#endif
-#if !defined(HAVE_SNPRINTF) && !defined(HAVE_APR)
-static int snprintf(char *str, size_t n, const char *fmt, ...)
-{
-va_list ap;
-int res;
-
-va_start(ap, fmt);
-res = vsnprintf(str, n, fmt, ap);
-va_end(ap);
-return res;
-}
-#endif
-
 static int JK_METHOD log_to_file(jk_logger_t *l, int level, const char *what)
 {
 if (l &&
@@ -530,13 +490,8 @@
 /* This information helps to correlate lines from different logs. 
*/
 /* Performance is no issue, because with production log levels */
 /* we only call it often, if we have a lot of errors */
-#ifdef USE_SPRINTF  /* until we get a snprintf function */
-rc = sprintf(&buf[used], "[%04d:%04d] ", getpid(),
-jk_gettid());
-#else
 rc = snprintf(&buf[used], usable_size - used,
  "[%04d:%04d] ", getpid(), jk_gettid());
-#endif
 used += rc;
 if (rc < 0 || usable_size - used < 8) {
 return 0;
@@ -553,12 +508,8 @@
 }
 }
 
-#ifdef USE_SPRINTF  /* until we get a snprintf function */
-rc = sprintf(&buf[used], "%s (%d): ", f, line);
-#else
 rc = snprintf(&buf[used], usable_size - used,
  "%s (%d): ", f, line);
-#endif
 used += rc;
 if (rc < 0 || usable_size - used < 0) {
 return 0;   /* [V] not sure what to return... */
@@ -566,11 +517,7 @@
 }
 
 va_start(args, fmt);
-#ifdef USE_VSPRINTF /* until we get a vsnprintf function */
-rc = vsprintf(buf + used, fmt, args);
-#else
 rc = vsnprintf(buf + used, usable_size - used, fmt, args);
-#endif
 va_end(args);
 if ( rc <= usable_size - used ) {
 used += rc;



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



DO NOT REPLY [Bug 42130] - Corrections to manager app's manager.xml and broken links.

2007-04-16 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=42130


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Priority|P3  |P5




-- 
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: r529275 - /tomcat/connectors/trunk/jk/native/common/jk_version.h

2007-04-16 Thread fuankg
Author: fuankg
Date: Mon Apr 16 07:50:40 2007
New Revision: 529275

URL: http://svn.apache.org/viewvc?view=rev&rev=529275
Log:
enter next round.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_version.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_version.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_version.h?view=diff&rev=529275&r1=529274&r2=529275
==
--- tomcat/connectors/trunk/jk/native/common/jk_version.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_version.h Mon Apr 16 07:50:40 
2007
@@ -26,14 +26,14 @@
 /** START OF AREA TO MODIFY BEFORE RELEASING */
 #define JK_VERMAJOR 1
 #define JK_VERMINOR 2
-#define JK_VERFIX   22
-#define JK_VERSTRING"1.2.22"
+#define JK_VERFIX   23
+#define JK_VERSTRING"1.2.23"
 
 /* Beta number */
 #define JK_VERBETA  0
 #define JK_BETASTRING   "0"
 /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */
-#define JK_VERISRELEASE 1
+#define JK_VERISRELEASE 0
 #define JK_VERRC0
 #define JK_RCSTRING "0"
 



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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Mladen Turk

Henri Gomez wrote:

2007/4/16, Mladen Turk <[EMAIL PROTECTED]>:


You mean the support for the IBM HTTP Server.
I suppose the AS400 is still able to have genuine Apache Httpd
and mod_jk compiled and running.


Nope on AS400, there is an IBM HTTP Server (powered by Apache), so
it's not a genuine Apache 2.x



Right, but one can compile Apache Httpd from the ASF thought
and run it on AS400. I suppose all the EBCDIC we added to
mod_jk will allow it compile with standard httpd like before.


So since there is no more IBM support for this kind of OpenSource
stuff in there proprietary OS, we may drop our support of mod_jk. I
don't have the time to work on v5R4 adaptation and since there is
little or no interest in user land, a pragmatic approch is to stop
this OS.



Fair enough. A simple note in BUILDING would be OK.

Regards,
Mladen.

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



svn commit: r529276 - in /tomcat/connectors/trunk/jk/native: apache-1.3/Makefile.netware jni/Makefile.netware netscape/Makefile.netware

2007-04-16 Thread fuankg
Author: fuankg
Date: Mon Apr 16 07:55:45 2007
New Revision: 529276

URL: http://svn.apache.org/viewvc?view=rev&rev=529276
Log:
changed makefiles to pick up ap_snprintf(); fixed linking.

Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware
tomcat/connectors/trunk/jk/native/jni/Makefile.netware
tomcat/connectors/trunk/jk/native/netscape/Makefile.netware

Modified: tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware?view=diff&rev=529276&r1=529275&r2=529276
==
--- tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.netware Mon Apr 16 
07:55:45 2007
@@ -5,11 +5,11 @@
 
 # Edit the path below to point to the base of your Apache 1.3 includes.
 ifndef AP_HOME
-AP_HOME= c:/projects/cw/apache_1.3.33
+AP_HOME= c:/projects/cw/apache_1.3.37
 endif
 # Edit the path below to point to the base of your NetWare Java SDK.
-ifndef JAVA_HOME
-JAVA_HOME  = c:/projects/sdks/java-nw
+ifndef NW_JDK
+NW_JDK = c:/projects/sdks/java-nw
 endif
 # Edit the path below to point to the base of your Novell NDK.
 ifndef NDKBASE
@@ -18,15 +18,17 @@
 INSTDIR= s:/apache/modules
 
 # Edit the vars below to change NLM target settings.
-TARGET  = mod_jk
+TARGET = mod_jk
 VERSION= $(JK_VERSION)
-COPYR  = Copyright (c) 2000-2004 The Apache Software Foundation. All rights 
reserved.
+#COPYR = Copyright (c) 2000-2007 The Apache Software Foundation. All rights 
reserved.
+COPYR  = Licensed under the Apache License, Version 2.0
 DESCR  = Apache $(AP_VERSION_STR) plugin for Tomcat $(JK_VERSION_STR)
 MTSAFE = NO
-STACK  = 49152
+STACK  = 65536
 #SCREEN= NONE
 EXPORTS= jk_module
 #AP_PRE= YES
+#MODULES   =
 
 # Edit the var below to point to your lib architecture.
 ifndef LIBARCH
@@ -54,16 +56,18 @@
CC = mwccnlm
 else
CC = gcc
+   GCC_ROOT = $(MINGNLM)
 endif
 # RM   = rm -f
 #CP= cp -fv
+AWK= awk
 
 # Global flags for all compilers
 CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
 
 ifeq ($(CC),mwccnlm)
 LD = mwldnlm
-LDFLAGS= -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm 
-commandfile
+LDFLAGS= -nostdlib $(OBJS) $(PRELUDE) $(LDLIBS) -o $@ -commandfile
 CFLAGS += -gccinc -inline off -opt nointrinsics
 #CFLAGS+= -w on
 ifeq ($(LIBARCH),LIBC)
@@ -73,6 +77,7 @@
 else
 #  PRELUDE = $(SDK_CLIB)/imports/clibpre.obj
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
+   LDLIBS = "$(METROWERKS)/Novell Support/libraries/runtime/mwcrtl.lib"
 #  CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
CFLAGS += -align 1 -proc 586
 endif
@@ -87,6 +92,8 @@
 #  CFLAGS += -D__ANSIC__
 else
 #  PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
+   PRELUDE = $(NDK_ROOT)/pre/prelude.o
+   LDLIBS = $(GCC_ROOT)/lib/gcc-lib/i586-netware/3.2.3/libgcc.a
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
 endif
 endif
@@ -103,7 +110,7 @@
 JKCOMMON = ../common
 
 INCLUDES = -I$(AP_HOME)/src/include -I$(AP_HOME)/src/os/netware
-INCLUDES += -I$(JKCOMMON) -I$(JAVA_HOME)/include 
-I$(JAVA_HOME)/include/netware 
+INCLUDES += -I$(JKCOMMON) -I$(NW_JDK)/include -I$(NW_JDK)/include/netware 
 
 ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
@@ -119,12 +126,13 @@
XDCDATA = $(AP_HOME)/src/os/netware/apache.xdc
 endif
 
-ifeq ($(OSTYPE),linux)
+ifeq ($(findstring linux,$(OSTYPE)),linux)
 DL = '
--include $(NDKBASE)/nlmconv/ncpfs.inc
+#-include $(NDKBASE)/nlmconv/ncpfs.inc
 endif
 
 OBJS   = \
+   $(OBJDIR)/$(TARGET).o \
$(OBJDIR)/jk_nwmain.o \
$(OBJDIR)/jk_ajp12_worker.o \
$(OBJDIR)/jk_ajp13.o \
@@ -145,27 +153,22 @@
$(OBJDIR)/jk_status.o \
$(OBJDIR)/jk_uri_worker_map.o \
$(OBJDIR)/jk_util.o \
-   $(OBJDIR)/jk_worker.o \
-   $(OBJDIR)/$(TARGET).o
+   $(OBJDIR)/jk_worker.o
 
+#OBJS  += $(OBJDIR)/ap_snprintf.o
 
-all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm 
+vpath %.c . $(JKCOMMON) $(AP_HOME)/src/os/netware
 
-$(OBJDIR)/%.o: %.c
-   @echo Compiling $<
-   @$(CC) $(CFLAGS) -c $< -o $@
 
-$(OBJDIR)/%.o: $(JKCOMMON)/%.c
-   @echo Compiling $<
-   @$(CC) $(CFLAGS) -c $< -o $@
+all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm 
 
-$(OBJDIR)/%.o: $(AP_HOME)/src/os/netware/%.c
+$(OBJDIR)/%.o: %.c
@echo Compiling $<
@$(CC) $(CFLAGS) -c $< -o $@
 
 $(OBJDIR)/version.inc: $(JKCOMMON)/jk_version.h $(AP_HOME)/src/include/httpd.h 
$(OBJDIR)
@echo Creating $@
-   @awk -f ../../support/get_ver.awk $< $(AP_HOME)/src/include/httpd.h > $@
+   @$(AWK) -f ../../support/get_ver.awk $< $(AP_HOME)/src/include/httpd.h 
> $@
 
 dist: 

Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Henri Gomez

Right, but one can compile Apache Httpd from the ASF thought
and run it on AS400. I suppose all the EBCDIC we added to
mod_jk will allow it compile with standard httpd like before.


On AS400, it will be more than difficult and not supported by IBM.

The fair solution is to use a Linux partition on AS400 and get back in
OSS land :)


> So since there is no more IBM support for this kind of OpenSource
> stuff in there proprietary OS, we may drop our support of mod_jk. I
> don't have the time to work on v5R4 adaptation and since there is
> little or no interest in user land, a pragmatic approch is to stop
> this OS.
>

Fair enough. A simple note in BUILDING would be OK.

Regards,
Mladen.

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




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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Mladen Turk

Henri Gomez wrote:

Right, but one can compile Apache Httpd from the ASF thought
and run it on AS400. I suppose all the EBCDIC we added to
mod_jk will allow it compile with standard httpd like before.


On AS400, it will be more than difficult and not supported by IBM.



But it will be supported by the Apache community :)
I'm sure there are many users that use the original
Apache Httpd on AS400.


The fair solution is to use a Linux partition on AS400 and get back in
OSS land :)



+1

Regards,
Mladen.

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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Henri Gomez

But it will be supported by the Apache community :)


Well ASF should first find an System I (new AS400 name) and play with it


I'm sure there are many users that use the original
Apache Httpd on AS400.


Nope, System I users are very conservative, I wonder I'm not the only
one to work on Apache modules on this OS :(

BTW, without support from IBM Rochester Labs to know how to update
mod_jk with new UTF8 support on v5R4 and what differ from original
Apache and IBM implementation, we're stuck in the unholy land without
knowledge of what should be done.


> The fair solution is to use a Linux partition on AS400 and get back in
> OSS land :)
>

+1


A Linux partition on System I works well with Redhat and Suse
specifics distributions  ;)

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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Guenter Knauf
Hi Henri,
>> anybody out there who can test this with AS400?

> I could test on AS400 but mod_jk didn't works on AS400, seems to me a
> thread/log problem and I can't figure it where
I've just put the stuff into SVN, perhaps you can check it that builds at least;
if you see linkage errors then you might have to add ap_spnprintf.c somwhere to 
the buid process...

does mod_jk 1.2.15 work on AS400? I see currently with this 1.2.23-dev a memory 
leak of 8280 bytes;
with 1.2.15 I dont see this; but I've not further tracked down yet where this 
might be - however its _not_ from the HUGE_BUFFER_SIZE buffer; I did a quick 
test with this buffer doubled in size, but the leak kept same...

Guenter.



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



Re: snprintf/vsnprintf in mod_jk

2007-04-16 Thread Henri Gomez

Well the latest mod_jk working on i5/OS v5R3 was 1.2.19. 1.2.20,
1.2.21 and 1.2.22 didn't works and you could see on the dev list the
various problems encoutered.

With i5/OS v5R4, the module are no more in EBCDIC land but UTF and as
such need a serious code review.

I just asked one IBM representative in Rochester Labs if they could
help us (ASF) in such area. The future of mod_jk on i5/OS depends on
the answer, since it will be very difficult and time consuming to have
a functionnal mod_jk without help from the Labs.

Stay tuned

2007/4/16, Guenter Knauf <[EMAIL PROTECTED]>:

Hi Henri,
>> anybody out there who can test this with AS400?

> I could test on AS400 but mod_jk didn't works on AS400, seems to me a
> thread/log problem and I can't figure it where
I've just put the stuff into SVN, perhaps you can check it that builds at least;
if you see linkage errors then you might have to add ap_spnprintf.c somwhere to 
the buid process...

does mod_jk 1.2.15 work on AS400? I see currently with this 1.2.23-dev a memory 
leak of 8280 bytes;
with 1.2.15 I dont see this; but I've not further tracked down yet where this 
might be - however its _not_ from the HUGE_BUFFER_SIZE buffer; I did a quick 
test with this buffer doubled in size, but the leak kept same...

Guenter.



-
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: r529305 - /tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 09:14:47 2007
New Revision: 529305

URL: http://svn.apache.org/viewvc?view=rev&rev=529305
Log:
- Port changes from the NIO connector to the APR connector, to resolve memory 
leaking when using an executor (note:
  when not using an executor, no memory leak could occur).
- Discard thread local usage altogether, as my testing did not show a 
measurable performance difference. I don't know
  if this would change when scaling up the number of CPUs (if anyone wants to 
test).
- No size limit by default, since this is mechanically limited (amount of 
threads + open comet connections).
- Harmonize code with the HTTP/1.1 connector.

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

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?view=diff&rev=529305&r1=529304&r2=529305
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 
Mon Apr 16 09:14:47 2007
@@ -19,10 +19,13 @@
 
 import java.net.InetAddress;
 import java.net.URLEncoder;
+import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.Executor;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.management.MBeanRegistration;
 import javax.management.MBeanServer;
@@ -49,15 +52,10 @@
  * @author Remy Maucherat
  * @author Costin Manolache
  */
-public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration
-{
-public Http11AprProtocol() {
-cHandler = new Http11ConnectionHandler( this );
-setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
-setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
-//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
-setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
-}
+public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration {
+
+protected static org.apache.juli.logging.Log log = 
+org.apache.juli.logging.LogFactory.getLog(Http11AprProtocol.class);
 
 /**
  * The string manager for this package.
@@ -65,6 +63,13 @@
 protected static StringManager sm =
 StringManager.getManager(Constants.Package);
 
+public Http11AprProtocol() {
+setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
+setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
+//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
+setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+}
+
 /** Pass config info
  */
 public void setAttribute( String name, Object value ) {
@@ -98,25 +103,22 @@
 return (String)getAttribute(name);
 }
 
-/** The adapter, used to call the connector
+/**
+ * The adapter, used to call the connector.
  */
-public void setAdapter(Adapter adapter) {
-this.adapter=adapter;
-}
-
-public Adapter getAdapter() {
-return adapter;
-}
+protected Adapter adapter;
+public void setAdapter(Adapter adapter) { this.adapter = adapter; }
+public Adapter getAdapter() { return adapter; }
 
 
 /** Start the protocol
  */
 public void init() throws Exception {
-ep.setName(getName());
-ep.setHandler(cHandler);
+endpoint.setName(getName());
+endpoint.setHandler(cHandler);
 
 try {
-ep.init();
+endpoint.init();
 } catch (Exception ex) {
 log.error(sm.getString("http11protocol.endpoint.initerror"), ex);
 throw ex;
@@ -135,7 +137,7 @@
 tpOname=new ObjectName
 (domain + ":" + "type=ThreadPool,name=" + getName());
 Registry.getRegistry(null, null)
-.registerComponent(ep, tpOname, null );
+.registerComponent(endpoint, tpOname, null );
 } catch (Exception e) {
 log.error("Can't register threadpool" );
 }
@@ -146,7 +148,7 @@
 }
 
 try {
-ep.start();
+endpoint.start();
 } catch (Exception ex) {
 log.error(sm.getString("http11protocol.endpoint.starterror"), ex);
 throw ex;
@@ -157,7 +159,7 @@
 
 public void pause() throws Exception {
 try {
-ep.pause();
+endpoint.pause();
 } catch (Exception ex) {
 log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex);
 throw ex;
@@ -168,7 +170,7 @@
 
 public void resume() throws Exception {
 try {
-ep.resume();
+endpoint.resume();
 }

svn commit: r529308 - /tomcat/connectors/trunk/jk/native/apache-2.0/bldjk54.qclsrc

2007-04-16 Thread hgomez
Author: hgomez
Date: Mon Apr 16 09:17:22 2007
New Revision: 529308

URL: http://svn.apache.org/viewvc?view=rev&rev=529308
Log:
Build CL for i5/OS v5R4

Added:
tomcat/connectors/trunk/jk/native/apache-2.0/bldjk54.qclsrc

Added: tomcat/connectors/trunk/jk/native/apache-2.0/bldjk54.qclsrc
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/bldjk54.qclsrc?view=auto&rev=529308
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/bldjk54.qclsrc (added)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/bldjk54.qclsrc Mon Apr 16 
09:17:22 2007
@@ -0,0 +1,299 @@
+PGM
+CRTCMOD MODULE(MOD_JK/MOD_JK) +
+   SRCSTMF('/home/apache/jk/native/apache-2.0/mod_jk.c') +
+   DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' + 
+  'USE_APACHE_MD5' '_REENTRANT') +
+   TEXT('mod_jk.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_AJP_COM) +
+SRCSTMF('/home/apache/jk/native/common/jk_ajp_common.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +  
+   'USE_APACHE_MD5' '_REENTRANT') +
+TEXT('jk_ajp_common.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_AJP12_W) +
+SRCSTMF('/home/apache/jk/native/common/jk_ajp12_worker.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +  
+   'USE_APACHE_MD5' '_REENTRANT') +
+TEXT('jk_ajp12_worker.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_AJP13) +
+SRCSTMF('/home/apache/jk/native/common/jk_ajp13.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +   
+   'USE_APACHE_MD5' '_REENTRANT') +
+TEXT('jk_ajp13.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_AJP13_W) +
+SRCSTMF('/home/apache/jk/native/common/jk_ajp13_worker.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +  
+   'USE_APACHE_MD5' '_REENTRANT') +
+TEXT('jk_ajp13_worker.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_AJP14) +
+SRCSTMF('/home/apache/jk/native/common/jk_ajp14.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +  
+   'USE_APACHE_MD5' '_REENTRANT') +
+TEXT('jk_ajp14.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_AJP14_W) +
+SRCSTMF('/home/apache/jk/native/common/jk_ajp14_worker.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +  
+   'USE_APACHE_MD5' '_REENTRANT') +
+TEXT('jk_ajp14_worker.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_CONNECT) +
+SRCSTMF('/home/apache/jk/native/common/jk_connect.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +  
+   'USE_APACHE_MD5' '_REENTRANT' 'USE_SO_RCVTIMEO' +
+   'USE_SO_SNDTIMEO' ) +
+TEXT('jk_connect.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Include')
+
+CRTCMOD MODULE(MOD_JK/JK_CONTEXT) +
+SRCSTMF('/home/apache/jk/native/common/jk_context.c') +
+DEFINE('AS400' 'AS400_UTF8' 'HAVE_JNI' 'HAVE_APR' '_XOPEN_SOURCE=530' +  
+   'USE_APACHE_MD5' '_REENTRANT') +
+TEXT('jk_context.c') +
+OPTIMIZE(40) +
+LOCALETYPE(*LOCALEUTF) +
+TGTCCSID(1208) +
+TERASPACE(*YES) +
+LANGLVL(*EXTENDED) +
+TGTRLS(*CURRENT) +
+INCDIR('/home/apache/jk/native/common' '/QIBM/ProdData/HTTPA/Incl

Tomcat Embedded - Where do I start?

2007-04-16 Thread risky57

I need to create an application where i can start and stop a web server. I
have been told to look at Tomcat Embedded. The examples I have seen ask for
some jars, which i cant seem to find.

I Had downloaded and unpacked the embedded version of tomcat. but it did not
contain certain jars as needed by certain examples e.g. servlets-snoop.jar.

can anyone point me in the right direction?
-- 
View this message in context: 
http://www.nabble.com/Tomcat-Embedded---Where-do-I-start--tf3587113.html#a10024330
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


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



svn commit: r529398 - in /tomcat/tc6.0.x/trunk/webapps/host-manager: host-manager.xml manager.xml

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 14:00:52 2007
New Revision: 529398

URL: http://svn.apache.org/viewvc?view=rev&rev=529398
Log:
- Update path (part of 42130).

Removed:
tomcat/tc6.0.x/trunk/webapps/host-manager/host-manager.xml
Modified:
tomcat/tc6.0.x/trunk/webapps/host-manager/manager.xml

Modified: tomcat/tc6.0.x/trunk/webapps/host-manager/manager.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/host-manager/manager.xml?view=diff&rev=529398&r1=529397&r2=529398
==
--- tomcat/tc6.0.x/trunk/webapps/host-manager/manager.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/host-manager/manager.xml Mon Apr 16 14:00:52 
2007
@@ -7,7 +7,7 @@
 -->
 
 
-
 
 



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



svn commit: r529399 - /tomcat/tc6.0.x/trunk/webapps/manager/manager.xml

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 14:01:16 2007
New Revision: 529399

URL: http://svn.apache.org/viewvc?view=rev&rev=529399
Log:
- Update path (part of 42130).

Removed:
tomcat/tc6.0.x/trunk/webapps/manager/manager.xml


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



svn commit: r529433 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 15:59:03 2007
New Revision: 529433

URL: http://svn.apache.org/viewvc?view=rev&rev=529433
Log:
- Fix links (42130).

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties?view=diff&rev=529433&r1=529432&r2=529433
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties 
Mon Apr 16 15:59:03 2007
@@ -9,9 +9,9 @@
 htmlManagerServlet.appsTasks=Commands
 htmlManagerServlet.appsTitle=Applications
 htmlManagerServlet.helpHtmlManager=HTML Manager Help
-htmlManagerServlet.helpHtmlManagerFile=html-manager-howto.html
+htmlManagerServlet.helpHtmlManagerFile=../docs/html-manager-howto.html
 htmlManagerServlet.helpManager=Manager Help
-htmlManagerServlet.helpManagerFile=manager-howto.html
+htmlManagerServlet.helpManagerFile=../docs/manager-howto.html
 htmlManagerServlet.deployButton=Deploy
 htmlManagerServlet.deployConfig=XML Configuration file URL:
 htmlManagerServlet.deployPath=Context Path (optional):



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



svn commit: r529434 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/LocalStrings.properties

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 15:59:24 2007
New Revision: 529434

URL: http://svn.apache.org/viewvc?view=rev&rev=529434
Log:
- Fix links (42130).

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/LocalStrings.properties

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/LocalStrings.properties?view=diff&rev=529434&r1=529433&r2=529434
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/LocalStrings.properties
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/host/LocalStrings.properties
 Mon Apr 16 15:59:24 2007
@@ -26,7 +26,7 @@
 htmlHostManagerServlet.list=List Virtual Hosts
 htmlHostManagerServlet.helpHtmlManagerFile=html-host-manager-howto.html
 htmlHostManagerServlet.helpHtmlManager=HTML Host Manager Help (Coming Soon!)
-htmlHostManagerServlet.helpManagerFile=host-manager-howto.html
+htmlHostManagerServlet.helpManagerFile=../docs/host-manager-howto.html
 htmlHostManagerServlet.helpManager=Host Manager Help
 htmlHostManagerServlet.hostName=Host name
 htmlHostManagerServlet.hostAliases=Host aliases



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



Re: Tomcat Embedded - Where do I start?

2007-04-16 Thread Mark Thomas
risky57 wrote:
> can anyone point me in the right direction?

The users list. See
http://tomcat.apache.org/lists.html

Mark

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



svn commit: r529442 - /tomcat/tc6.0.x/trunk/webapps/manager/sessionDetail.jsp

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 16:30:03 2007
New Revision: 529442

URL: http://svn.apache.org/viewvc?view=rev&rev=529442
Log:
- Add session browser capabilities in the manager. Let me know if it creates 
problems (I checked XSS to some extent to,
  but please double check if you can).
- Submitted by Cédrik Lime.

Added:
tomcat/tc6.0.x/trunk/webapps/manager/sessionDetail.jsp

Added: tomcat/tc6.0.x/trunk/webapps/manager/sessionDetail.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/manager/sessionDetail.jsp?view=auto&rev=529442
==
--- tomcat/tc6.0.x/trunk/webapps/manager/sessionDetail.jsp (added)
+++ tomcat/tc6.0.x/trunk/webapps/manager/sessionDetail.jsp Mon Apr 16 16:30:03 
2007
@@ -0,0 +1,132 @@
+
+<[EMAIL PROTECTED] session="false" contentType="text/html; charset=ISO-8859-1" 
%>
+<[EMAIL PROTECTED] import="java.util.Enumeration" %>
+<[EMAIL PROTECTED] import="javax.servlet.http.HttpSession" %>
+<[EMAIL PROTECTED] import="org.apache.catalina.Session" %>
+<[EMAIL PROTECTED] import="org.apache.catalina.manager.JspHelper" %>
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<%--!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"--%>
+
+http://www.w3.org/1999/xhtml"; xml:lang="en">
+<% String path = (String) request.getAttribute("path");
+   Session currentSession = (Session)request.getAttribute("currentSession");
+   HttpSession currentHttpSession = currentSession.getSession();
+   String currentSessionId = currentSession.getId();
+   String submitUrl = 
((HttpServletRequest)pageContext.getRequest()).getRequestURL().toString();
+%>
+
+
+   
+   
+   
+   
+   
+   
+   
+   Sessions Administration: details for <%= currentSessionId 
%>
+
+
+Details for Session <%= JspHelper.escapeXml(currentSessionId) %>
+
+
+  
+Session Id
+<%= currentSessionId %>
+  
+  
+Guessed Locale
+<%= JspHelper.guessDisplayLocaleFromSession(currentSession) %>
+  
+  
+Guessed User
+<%= JspHelper.guessDisplayUserFromSession(currentSession) %>
+  
+  
+Creation Time
+<%= JspHelper.getDisplayCreationTimeForSession(currentSession) %>
+  
+  
+Last Accessed Time
+<%= JspHelper.getDisplayLastAccessedTimeForSession(currentSession) 
%>
+  
+  
+Session Max Inactive Interval
+<%= 
JspHelper.secondsToTimeString(currentSession.getMaxInactiveInterval()) %>
+  
+  
+Used Time
+<%= JspHelper.getDisplayUsedTimeForSession(currentSession) %>
+  
+  
+Inactive Time
+<%= JspHelper.getDisplayInactiveTimeForSession(currentSession) %>
+  
+  
+TTL
+<%= JspHelper.getDisplayTTLForSession(currentSession) %>
+  
+
+
+Refresh
+
+<%= JspHelper.escapeXml(request.getAttribute("error")) 
%>
+<%= JspHelper.escapeXml(request.getAttribute("message")) 
%>
+
+
+<% int nAttributes = 0;
+   Enumeration attributeNamesEnumeration = 
currentHttpSession.getAttributeNames();
+   while (attributeNamesEnumeration.hasMoreElements()) {
+  attributeNamesEnumeration.nextElement();
+  ++nAttributes;
+   }
+%>
+   <%= 
JspHelper.formatNumber(nAttributes) %> attributes
+   
+   
+   Remove Attribute
+   Attribute name
+   Attribute value
+   
+   
+   <%--tfoot>
+   
+   
+   TODO: set Max Inactive Interval on sessions
+   
+   
+   
+   
+<% attributeNamesEnumeration = currentHttpSession.getAttributeNames();
+   while (attributeNamesEnumeration.hasMoreElements()) {
+   String attributeName = (String) attributeNamesEnumeration.nextElement();
+%>
+   
+   
+   <%= JspHelper.escapeXml(attributeName) %>
+   <% Object attributeValue = 
currentHttpSession.getAttribute(attributeName); %>"><%= 
JspHelper.escapeXml(attributeValue) %>
+   
+<% } // end while %>
+   
+
+
+Close window
+
+<%--div style="display: none;">
+
+   http://validator.w3.org/check?uri=referer";>http://www.w3.org/Icons/valid-html401";
+   alt="Valid HTML 4.01!" height="31" width="88">
+   http://validator.w3.org/check?uri=referer";>http://www.w3.org/Icons/valid-xhtml10";
+   alt="Valid XHTML 1.0!" height="31" width="88" />
+   http://validator.w3.org/check?uri=referer";>http://www.w3.org/Icons/valid-xhtml11";
+   alt="Valid XHTML 1.1!" height="31" width="88" />
+
+
+
+
+
\ No newline at end of file



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



svn commit: r529443 - /tomcat/tc6.0.x/trunk/webapps/manager/sessionsList.jsp

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 16:30:24 2007
New Revision: 529443

URL: http://svn.apache.org/viewvc?view=rev&rev=529443
Log:
- Add session browser capabilities in the manager. Let me know if it creates 
problems (I checked XSS to some extent to,
  but please double check if you can).
- Submitted by Cédrik Lime.

Added:
tomcat/tc6.0.x/trunk/webapps/manager/sessionsList.jsp   (with props)

Added: tomcat/tc6.0.x/trunk/webapps/manager/sessionsList.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/manager/sessionsList.jsp?view=auto&rev=529443
==
--- tomcat/tc6.0.x/trunk/webapps/manager/sessionsList.jsp (added)
+++ tomcat/tc6.0.x/trunk/webapps/manager/sessionsList.jsp Mon Apr 16 16:30:24 
2007
@@ -0,0 +1,122 @@
+
+<[EMAIL PROTECTED] session="false" contentType="text/html; charset=ISO-8859-1" 
%>
+<[EMAIL PROTECTED] import="java.util.Collection" %>
+<[EMAIL PROTECTED] import="java.util.Iterator" %>
+<[EMAIL PROTECTED] import="org.apache.catalina.manager.JspHelper" %>
+<[EMAIL PROTECTED] import="org.apache.catalina.Session" %>
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+
+http://www.w3.org/1999/xhtml"; xml:lang="en">
+<% String path = (String) request.getAttribute("path");
+   String submitUrl = 
((HttpServletRequest)pageContext.getRequest()).getRequestURL().append("?path=").append(path).toString();
+   Collection activeSessions = (Collection) 
request.getAttribute("activeSessions");
+%>
+
+
+   
+   
+   
+   
+   
+   
+   
+   Sessions Administration for <%= path %>
+
+
+Sessions Administration for <%= path %>
+
+Tips:
+
+   Click on a column to sort.
+   To view a session details and/or remove a session attributes, click 
on its id.
+
+
+<%= JspHelper.escapeXml(request.getAttribute("error")) 
%>
+<%= JspHelper.escapeXml(request.getAttribute("message")) 
%>
+
+
+   Active HttpSessions informations
+   
+   "/>
+   <% String order = (String) request.getAttribute("order");
+  if (order == null || "".equals(order)) {
+   order = "ASC";
+  }
+   %>
+   
+   
+   <%= JspHelper.formatNumber(activeSessions.size()) %> active 
Sessions
+   
+   
+   
+   Session 
Id
+   Guessed 
Locale
+   Guessed User 
name
+   Creation 
Time
+   Last Accessed 
Time
+   Used 
Time
+   Inactive 
Time
+   TTL
+   
+   
+   <% if (activeSessions.size() > 10) { %>
+   <%--  is the same as  --%>
+   
+   Session 
Id
+   Guessed 
Locale
+   Guessed User 
name
+   Creation 
Time
+   Last Accessed 
Time
+   Used 
Time
+   Inactive 
Time
+   TTL
+   
+   
+   <% } // end if %>
+   
+<% Iterator iter = activeSessions.iterator();
+   while (iter.hasNext()) {
+   Session currentSession = (Session) iter.next();
+   String currentSessionId = currentSession.getId();
+%>
+   
+   
+<%= JspHelper.escapeXml(currentSessionId) 
%>
+   
+   <%= 
JspHelper.guessDisplayLocaleFromSession(currentSession) %>
+   <%= 
JspHelper.guessDisplayUserFromSession(currentSession) %>
+   <%= 
JspHelper.getDisplayCreationTimeForSession(currentSession) %>
+   <%= 
JspHelper.getDisplayLastAccessedTimeForSession(currentSession) %>
+   <%= 
JspHelper.getDisplayUsedTimeForSession(currentSession) %>
+   <%= 
JspHelper.getDisplayInactiveTimeForSession(currentSession) %>
+   <%= 
JspHelper.getDisplayTTLForSession(currentSession) %>
+   
+<% } // end while %>
+   
+   
+   
+   
+   
+   
+
+
+Close window
+
+<%--div style="display: none;">
+
+   http://validator.w3.org/check?uri=referer";>http://www.w

svn commit: r529444 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager: HTMLManagerServlet.java JspHelper.java util/ util/BaseSessionComparator.java util/ReverseComparator.java util/SessionUt

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 16:30:55 2007
New Revision: 529444

URL: http://svn.apache.org/viewvc?view=rev&rev=529444
Log:
- Add session browser capabilities in the manager. Let me know if it creates 
problems (I checked XSS to some extent to,
  but please double check if you can).
- Submitted by Cédrik Lime.

Added:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/JspHelper.java   
(with props)
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/util/

tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/util/BaseSessionComparator.java
   (with props)

tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/util/ReverseComparator.java
   (with props)

tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/util/SessionUtils.java   
(with props)
Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java?view=diff&rev=529444&r1=529443&r2=529444
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java 
Mon Apr 16 16:30:55 2007
@@ -23,6 +23,10 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.text.MessageFormat;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -30,9 +34,14 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
+import org.apache.catalina.Session;
+import org.apache.catalina.manager.util.BaseSessionComparator;
+import org.apache.catalina.manager.util.ReverseComparator;
+import org.apache.catalina.manager.util.SessionUtils;
 import org.apache.catalina.util.RequestUtil;
 import org.apache.catalina.util.ServerInfo;
 import org.apache.tomcat.util.http.fileupload.DiskFileUpload;
@@ -50,7 +59,7 @@
 * makes it easier to administrate.
 * 
 * However if you use a software that parses the output of
-* ManagerServletManagerServlet you won't be able to upgrade
 * to this Servlet since the output are not in the
 * same format ar from ManagerServlet
 *
@@ -63,6 +72,11 @@
 
 public final class HTMLManagerServlet extends ManagerServlet {
 
+protected static final String APPLICATION_MESSAGE = "message";
+protected static final String APPLICATION_ERROR = "error";
+protected String sessionsListJspPath  = "/sessionsList.jsp";
+protected String sessionDetailJspPath = "/sessionDetail.jsp";
+
 // - Public Methods
 
 /**
@@ -100,7 +114,15 @@
 } else if (command.equals("/undeploy")) {
 message = undeploy(path);
 } else if (command.equals("/sessions")) {
-message = sessions(path);
+//message = sessions(path);
+try {
+doSessions(path, request, response);
+return;
+} catch (Exception e) {
+log("HTMLManagerServlet.sessions[" + path + "]", e);
+message = sm.getString("managerServlet.exception",
+e.toString());
+}
 } else if (command.equals("/start")) {
 message = start(path);
 } else if (command.equals("/stop")) {
@@ -562,6 +584,309 @@
 return stringWriter.toString();
 }
 
+/**
+ * @see javax.servlet.Servlet#getServletInfo()
+ */
+public String getServletInfo() {
+return "HTMLManagerServlet, Copyright (c) The Apache Software 
Foundation";
+}   
+
+/**
+ * @see javax.servlet.GenericServlet#init()
+ */
+public void init() throws ServletException {
+super.init();
+}   
+
+//  Sessions administration
+
+/**
+ * 
+ * @param req
+ * @param resp
+ * @throws ServletException
+ * @throws IOException 
+ */
+protected void doSessions(String path, HttpServletRequest req, 
HttpServletResponse resp) throws ServletException, IOException {
+req.setAttribute("path", path);
+String action = req.getParameter("action");
+if (debug >= 1) {
+log("sessions: Session action '" + action + "' for web application 
at '" + path + "'");
+}
+if ("sessionDetail".equals(action)) {
+   String sessionId = req.getParameter("sessionId");
+   displaySessionDetailPage(req, resp, path, sessionId);
+   return;
+} else if ("i

DO NOT REPLY [Bug 42130] - Corrections to manager app's manager.xml and broken links.

2007-04-16 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=42130


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-04-16 17:02 ---
I have addressed these issues.

-- 
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: r529465 - in /tomcat/tc6.0.x/trunk/java/org/apache/coyote: ajp/AjpAprProtocol.java ajp/AjpProtocol.java http11/Http11AprProtocol.java http11/Http11Protocol.java

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 18:50:35 2007
New Revision: 529465

URL: http://svn.apache.org/viewvc?view=rev&rev=529465
Log:
- Merge changes to the other protocols, to fix leaking when using an executor 
(for java.io, not using a thread local
  has no performance impact).
- Harmonize properties between the 4 protocols.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Protocol.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?view=diff&rev=529465&r1=529464&r2=529465
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Mon Apr 
16 18:50:35 2007
@@ -21,7 +21,9 @@
 import java.net.URLEncoder;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.Executor;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.management.MBeanRegistration;
 import javax.management.MBeanServer;
@@ -86,7 +88,7 @@
 /**
  * Associated APR endpoint.
  */
-protected AprEndpoint ep = new AprEndpoint();
+protected AprEndpoint endpoint = new AprEndpoint();
 
 
 /**
@@ -96,25 +98,6 @@
 
 
 /**
- * Should authentication be done in the native webserver layer, 
- * or in the Servlet container ?
- */
-protected boolean tomcatAuthentication = true;
-
-
-/**
- * Required secret.
- */
-protected String requiredSecret = null;
-
-
-/**
- * AJP packet size.
- */
-protected int packetSize = Constants.MAX_PACKET_SIZE;
-
-
-/**
  * Adapter which will process the requests recieved by this endpoint.
  */
 private Adapter adapter;
@@ -184,12 +167,12 @@
 /** Start the protocol
  */
 public void init() throws Exception {
-ep.setName(getName());
-ep.setHandler(cHandler);
-ep.setUseSendfile(false);
+endpoint.setName(getName());
+endpoint.setHandler(cHandler);
+endpoint.setUseSendfile(false);
 
 try {
-ep.init();
+endpoint.init();
 } catch (Exception ex) {
 log.error(sm.getString("ajpprotocol.endpoint.initerror"), ex);
 throw ex;
@@ -206,7 +189,7 @@
 tpOname = new ObjectName
 (domain + ":" + "type=ThreadPool,name=" + getName());
 Registry.getRegistry(null, null)
-.registerComponent(ep, tpOname, null );
+.registerComponent(endpoint, tpOname, null );
 } catch (Exception e) {
 log.error("Can't register threadpool" );
 }
@@ -217,7 +200,7 @@
 }
 
 try {
-ep.start();
+endpoint.start();
 } catch (Exception ex) {
 log.error(sm.getString("ajpprotocol.endpoint.starterror"), ex);
 throw ex;
@@ -228,7 +211,7 @@
 
 public void pause() throws Exception {
 try {
-ep.pause();
+endpoint.pause();
 } catch (Exception ex) {
 log.error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
 throw ex;
@@ -239,7 +222,7 @@
 
 public void resume() throws Exception {
 try {
-ep.resume();
+endpoint.resume();
 } catch (Exception ex) {
 log.error(sm.getString("ajpprotocol.endpoint.resumeerror"), ex);
 throw ex;
@@ -251,86 +234,14 @@
 public void destroy() throws Exception {
 if (log.isInfoEnabled())
 log.info(sm.getString("ajpprotocol.stop", getName()));
-ep.destroy();
+endpoint.destroy();
 if (tpOname!=null)
 Registry.getRegistry(null, null).unregisterComponent(tpOname);
 if (rgOname != null)
 Registry.getRegistry(null, null).unregisterComponent(rgOname);
 }
 
-
-// *
-public Executor getExecutor() {
-return ep.getExecutor();
-}
-
 // *
-public void setExecutor(Executor executor) {
-ep.setExecutor(executor);
-}
-
-public int getMaxThreads() {
-return ep.getMaxThreads();
-}
-
-public void setMaxThreads(int maxThreads) {
-ep.setMaxThreads(maxThreads);
-setAttribute("maxThreads", "" + maxThreads);
-}
-
-public void setThreadPriority(int threadPriority) {
-ep.setThreadPriority(threadPriority);
-setAttribute("threadPriority", "" + threadPriority);
-}
-
-public int getThreadPriority() {
-ret

svn commit: r529466 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java

2007-04-16 Thread remm
Author: remm
Date: Mon Apr 16 18:52:50 2007
New Revision: 529466

URL: http://svn.apache.org/viewvc?view=rev&rev=529466
Log:
- Code cleanup (less thread local manipulation).
- Submitted by Arvind Srinivasan.

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

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java?view=diff&rev=529466&r1=529465&r2=529466
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java 
Mon Apr 16 18:52:50 2007
@@ -137,15 +137,10 @@
 
 
 /**
- * Thread local mapping data.
+ * Thread local data used during request dispatch.
  */
-private ThreadLocal localMappingData = new ThreadLocal();
-
-
-/**
- * Thread local URI message bytes.
- */
-private ThreadLocal localUriMB = new ThreadLocal();
+private ThreadLocal dispatchData =
+new ThreadLocal();
 
 
 // - Public Methods
@@ -377,17 +372,16 @@
 if (path == null)
 return (null);
 
-// Retrieve the thread local URI
-MessageBytes uriMB = (MessageBytes) localUriMB.get();
-if (uriMB == null) {
-uriMB = MessageBytes.newInstance();
-CharChunk uriCC = uriMB.getCharChunk();
-uriCC.setLimit(-1);
-localUriMB.set(uriMB);
-} else {
-uriMB.recycle();
+// Use the thread local URI and mapping data
+DispatchData dd = dispatchData.get();
+if (dd == null) {
+dd = new DispatchData();
+dispatchData.set(dd);
 }
 
+MessageBytes uriMB = dd.uriMB;
+uriMB.recycle();
+
 // Get query string
 String queryString = null;
 int pos = path.indexOf('?');
@@ -397,12 +391,8 @@
 pos = path.length();
 }
  
-// Retrieve the thread local mapping data
-MappingData mappingData = (MappingData) localMappingData.get();
-if (mappingData == null) {
-mappingData = new MappingData();
-localMappingData.set(mappingData);
-}
+// Use the thread local mapping data
+MappingData mappingData = dd.mappingData;
 
 // Map the URI
 CharChunk uriCC = uriMB.getCharChunk();
@@ -960,6 +950,24 @@
 return "/" + hostName + "/" + path;
 else
 return "/" + hostName + path;
+}
+
+
+/**
+ * Internal class used as thread-local storage when doing path
+ * mapping during dispatch.
+ */
+private final class DispatchData {
+
+public MessageBytes uriMB;
+public MappingData mappingData;
+
+public DispatchData() {
+uriMB = MessageBytes.newInstance();
+CharChunk uriCC = uriMB.getCharChunk();
+uriCC.setLimit(-1);
+mappingData = new MappingData();
+}
 }
 
 



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



DO NOT REPLY [Bug 42134] - Reduce ThreadLocal usage in ApplicationContext.java

2007-04-16 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=42134


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2007-04-16 18:55 ---
It does not hurt (so I'm committing it), but it is most likely not possible to
measure a performance difference.

-- 
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]



DO NOT REPLY [Bug 39832] - HTML Manager improvements

2007-04-16 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=39832





--- Additional Comments From [EMAIL PROTECTED]  2007-04-16 18:55 ---
I tentatively committed this submission in the 6.0.x branch. Thanks.

-- 
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]



Tomcat Administration

2007-04-16 Thread Venkata Naveen

hi
Hi iam unable to get the tomcat administration page.
It is giving the message like
"Tomcat's administration web application is no longer installed by default.
Download and install the "admin" package to use it. "

where to get the tomcat admin package, and how to install that admin into
the tomcat directory.

please help me friends...
Thanks & regards

Venkata Naveen
-- 
View this message in context: 
http://www.nabble.com/Tomcat-Administration-tf3588934.html#a10029545
Sent from the Tomcat - Dev mailing list archive at Nabble.com.