DO NOT REPLY [Bug 46344] New: Two org.apache.AnnotationProcessor classes can cause ClassCastExceptions

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46344

   Summary: Two org.apache.AnnotationProcessor classes can cause
ClassCastExceptions
   Product: Tomcat 6
   Version: 6.0.18
  Platform: All
OS/Version: All
Status: NEW
  Severity: major
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


In the binary packages of tomcat 6 the class org.apache.AnnotationProcessor
exists twice. Once in the catalina.jar and once in the jasper.jar. Normally
this isn't a problem because both contain the same code and there is normally
only one classpath (one patches the other).

But in special environments this causes problems. In fact it isn't possible to
use tomcat 6 in an OSGi environment where catalina and jasper are in different
bundles with different classpaths because
org.apache.catalina.util.DefaultAnnotationProcessor implements
org.apache.AnnotationProcessor from the catalina bundle and jasper wants to
cast it to org.apache.AnnotationProcessor from the jasper bundle which is in
another classpath. That causes a ClassCastException.


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

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



DO NOT REPLY [Bug 46347] New: Endorsed option couldn't be overriden

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46347

   Summary: Endorsed option couldn't be overriden
   Product: Tomcat 6
   Version: 6.0.18
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


The catalina.sh script calls the setclasspath.sh script to define some
environment variables.

Among these variables is the JAVA_ENDORSED_DIRS (line 99):

JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed

There are 2 problems :

- JAVA_ENDORSED_DIRS couldn't be overriden (using -D in the command line)
- In a multi-instance configuration, the default endorsed dir is
CATALINA_HOME/endorsed instead of CATALINA_BASE/endorsed

Here is a proposition to modify setclasspath.sh :

# Set the default -Djava.endorsed.dirs argument
if [ "$JAVA_ENDORSED_DIRS" == "" ]
then
  JAVA_ENDORSED_DIRS="$CATALINA_BASE"/endorsed
fi


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

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



DO NOT REPLY [Bug 46350] New: Maven repository should contain source bundles

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46350

   Summary: Maven repository should contain source bundles
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Maven repository contains only the jar files for the compiled code. Tomcat
should deploy source bundles as well as it is really nice when working within
an IDE to be able to spring directly into the sources while debugging.

I can provide a patch in the coming days. For this the build files need to be
cleaned a bit. I'll open a separate issue for a patch with a few enhancements.


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

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



DO NOT REPLY [Bug 46350] Maven repository should contain source bundles

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46350


Marc Guillemot <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Depends on||46351




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

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



DO NOT REPLY [Bug 46351] New: Refactor a bit the build scripts

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46351

   Summary: Refactor a bit the build scripts
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]
Blocks: 46350


Created an attachment (id=22997)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22997)
Patch introducing patternsets and macros

The build scripts contain a lot of duplications and don't allow patternset to
be reused (needed to propose a patch for bug #46350. The proposed patch just
defines patternsets and macros to simplify a few things.


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

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



DO NOT REPLY [Bug 46352] New: Apache 1.3 crashes inside mod_jk.so with selfsigned SSL cert

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46352

   Summary: Apache 1.3 crashes inside mod_jk.so with selfsigned SSL
cert
   Product: Tomcat Connectors
   Version: 1.2.27
  Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: NEW
  Severity: normal
  Priority: P2
 Component: mod_jk
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


MacOSX 10.4.11 PPC, Tomcat 6.0.18, Tomcat native 1.1.15, stock Apache 1.3.41

When testing mod_jk 1.2.27 (AJP 1.3 connector), works fine with HTTP, crashes
with HTTPS.  ModSSL is configured with a selfsigned SSL cert.
Does not crash with mod_jk 1.2.23.
With 1.2.27 and CA-signed cert: not tested.

Crash report excerpt:
Exception:  EXC_BAD_ACCESS (0x0001)
Codes:  KERN_INVALID_ADDRESS (0x0001) at 0x262379f2

Thread 0 Crashed:
0   <<>>0x8b94 __memcpy + 1012 (cpu_capabilities.h:189)
1   mod_jk.so   0x0160e4e0 init_ws_service + 544 (mod_jk.c:659)
2   mod_jk.so   0x016107e4 jk_handler + 1096 (mod_jk.c:2200)
3   httpd   0xd91c ap_invoke_handler + 232
4   httpd   0x000179d8 process_request_internal + 640
5   httpd   0x00017a58 ap_process_request + 72
6   httpd   0x65f4 child_main + 1832
7   httpd   0x6858 make_child + 312
8   httpd   0x6c18 perform_idle_server_maintenance + 708
9   httpd   0x71fc standalone_main + 972
10  httpd   0x78a0 main + 1052
11  httpd   0x1cc4 _start + 340
12  httpd   0x1b6c start + 60

The reference to cpu_capabilities.h suggests that something, most likely httpd,
got built against the MacOSX 10.3.9 SDK.  Anything I built (tomcat native,
mod_jk, apr) was built universal against the MacOSX 10.4u sdk.


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

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



DO NOT REPLY [Bug 46352] Apache 1.3 crashes inside mod_jk.so with selfsigned SSL cert

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46352





--- Comment #1 from Rainer Jung <[EMAIL PROTECTED]>  2008-12-05 03:57:26 PST ---
Line 659 is:

reply_timeout = ap_table_get(r->subprocess_env, "JK_REPLY_TIMEOUT");

So it seems we have trouble retrieving data from the httpd environment
variables.
Can you produce a core and use a debugger like gdb to check, what
r->subprocess_env is in your case? It should not be null and its type should be
table. ap_table_get() is provided by httpd itself.

Did you build mod_jk yourself? Did you use the apxs in configure, that came
with your httpd? You can also try adding --enable-EAPI to configure, but I
doubt it will help.

The above line is part of a new feature. If you don't want to set
reply_timeouts via Apache httpd environment variables, you can comment the line
out. I would expect, that you'll then get crashes in other parts of the code,
but we might get a better idea what's wrong.


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

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



DO NOT REPLY [Bug 46347] Endorsed option couldn't be overriden

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46347


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-12-05 05:37:11 PST ---


*** This bug has been marked as a duplicate of bug 46232 ***


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

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



DO NOT REPLY [Bug 46232] Can't override XML parser implementation using endorsed mechanism

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46232


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
   ||nancy2.fr




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-12-05 05:37:11 PST ---
*** Bug 46347 has been marked as a duplicate of this bug. ***


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

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



svn commit: r723738 - in /tomcat/trunk/bin: setclasspath.bat setclasspath.sh

2008-12-05 Thread markt
Author: markt
Date: Fri Dec  5 06:27:57 2008
New Revision: 723738

URL: http://svn.apache.org/viewvc?rev=723738&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46232
Don't override the endorsed dir if the user has set it
Based on a patch by Russ Tokuyama

Modified:
tomcat/trunk/bin/setclasspath.bat
tomcat/trunk/bin/setclasspath.sh

Modified: tomcat/trunk/bin/setclasspath.bat
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.bat?rev=723738&r1=723737&r2=723738&view=diff
==
--- tomcat/trunk/bin/setclasspath.bat (original)
+++ tomcat/trunk/bin/setclasspath.bat Fri Dec  5 06:27:57 2008
@@ -61,8 +61,11 @@
 goto exit
 :okBasedir
 
+rem Don't override the endorsed dir if the user has set it previously
+if not "%JAVA_ENDORSED_DIRS" == "" goto gotEndorseddir
 rem Set the default -Djava.endorsed.dirs argument
 set JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed
+:gotEndorseddir
 
 rem Set standard CLASSPATH
 rem Note that there are no quotes as we do not want to introduce random

Modified: tomcat/trunk/bin/setclasspath.sh
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.sh?rev=723738&r1=723737&r2=723738&view=diff
==
--- tomcat/trunk/bin/setclasspath.sh (original)
+++ tomcat/trunk/bin/setclasspath.sh Fri Dec  5 06:27:57 2008
@@ -95,8 +95,11 @@
   fi
 fi
 
-# Set the default -Djava.endorsed.dirs argument
-JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
+# Don't override the endorsed dir if the user has set it previously
+if [-z "$JAVA_ENDORSED_DIRS"]; then
+  # Set the default -Djava.endorsed.dirs argument
+  JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
+fi
 
 # Set standard CLASSPATH
 if [ "$1" = "javac" ] ; then



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



svn commit: r723744 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-12-05 Thread markt
Author: markt
Date: Fri Dec  5 06:41:37 2008
New Revision: 723744

URL: http://svn.apache.org/viewvc?rev=723744&view=rev
Log:
Propose fix

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=723744&r1=723743&r2=723744&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Dec  5 06:41:37 2008
@@ -1,4 +1,4 @@
-
+
   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.
@@ -243,3 +243,9 @@
   http://svn.apache.org/viewvc?rev=723404&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46232
+  Don't override the endorsed dir if the user has set it
+  http://svn.apache.org/viewvc?rev=723738&view=rev
+  +1: mart
+  -1: 



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



DO NOT REPLY [Bug 46232] Can't override XML parser implementation using endorsed mechanism

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46232





--- Comment #2 from Mark Thomas <[EMAIL PROTECTED]>  2008-12-05 06:42:35 PST ---
This has been fixed in trunk and proposed for 6.0.x.
I modified the proposed patch to cover the .bat file and to use the same method
as elsewhere in the .sh scripts to test for an environment variable.


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

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



DO NOT REPLY [Bug 46352] Apache 1.3 crashes inside mod_jk.so with selfsigned SSL cert

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46352





--- Comment #2 from Patrick Middleton <[EMAIL PROTECTED]>  2008-12-05 07:55:49 
PST ---
Yes, I built mod_jk.so myself -- Apple doesn't supply this with MacOSX, only
with MacOSX Server, and unlike mod_ssl the source used is not available via
www.opensource.apple.com/darwinsource/ .

The configure command used (mea culpa, should have been in the original
submission) was (ad lib http://developer.apple.com/technotes/tn2005/tn2137.html
) 

env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch
ppc" \
  LDFLAGS="-arch i386 -arch ppc" \
  ./configure \
  --disable-dependency-tracking \
  --enable-EAPI \
  --with-apxs=/usr/sbin/apxs



Create a coredump on MacOSX for debugging purposes?  Never seen that done. 
Attaching with gdb would work if I could tell which httpd server process was
going to handle the request.  I tried logging with jk_log, but the process was
crashing before the log was flushed.  I added this:

 if (r) {
int myHandle = open("/tmp/log.txt", O_WRONLY|O_APPEND|O_CREAT, 0666);
char myBuf[1024];
sprintf(myBuf, "%s:%d r: 0x%08x r->subprocess_env: 0x%08x\n", __FILE__,
__LINE__, (int)r, (r ? (int)( r->subprocess_env) : 0));
write(myHandle, myBuf, strlen(myBuf));
if (r && r->subprocess_env) {
sprintf(myBuf, "%s:%d r->subprocess_env: %s\n", __FILE__, __LINE__,
ap_array_pstrcat(r->pool, (array_header*) r->subprocess_env, '='));
write(myHandle, myBuf, strlen(myBuf));
}
close(myHandle);
}

which wrote this for three requests: two over HTTP, the last over HTTPS.
mod_jk.c:663 r: 0x01856238 r->subprocess_env: 0x01856548
mod_jk.c:666 r->subprocess_env: SCRIPT_URL=/services/MyServlet
mod_jk.c:663 r: 0x01856238 r->subprocess_env: 0x01856548
mod_jk.c:666 r->subprocess_env: SCRIPT_URL=/services/MyServlet
mod_jk.c:663 r: 0x01856238 r->subprocess_env: 0x01856548
mod_jk.c:666 r->subprocess_env: SCRIPT_URL=/services/Style.css

Enabling the generation of core dumps for use with gdb is proving awkward.


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

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



DO NOT REPLY [Bug 46247] SVN property patches

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46247


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-12-05 07:57:23 PST ---
Thanks for the patch.

I have applied it to trunk less the .bat/.sh changes which I am -1 on and the
mime-type changes which I couldn't see why you wanted to change them.


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

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



svn commit: r723775 [5/5] - in /tomcat/trunk: java/org/apache/juli/ modules/bayeux/ modules/bayeux/java/org/apache/cometd/bayeux/ modules/bayeux/java/org/apache/tomcat/bayeux/ modules/bayeux/java/org/

2008-12-05 Thread markt
Modified: tomcat/trunk/res/META-INF/LICENSE
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/LICENSE?rev=723775&r1=723774&r2=723775&view=diff
==
--- tomcat/trunk/res/META-INF/LICENSE (original)
+++ tomcat/trunk/res/META-INF/LICENSE Fri Dec  5 07:57:43 2008
@@ -1,202 +1,202 @@
-
- Apache License
-   Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-  "License" shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  "Licensor" shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  "Legal Entity" shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  "control" means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  "You" (or "Your") shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  "Source" form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  "Object" form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  "Work" shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  "Derivative Works" shall mean any work, whether in Source or Object
-  form, that is based on (or derived from) the Work and for which the
-  editorial revisions, annotations, elaborations, or other modifications
-  represent, as a whole, an original work of authorship. For the purposes
-  of this License, Derivative Works shall not include works that remain
-  separable from, or merely link (or bind by name) to the interfaces of,
-  the Work and Derivative Works thereof.
-
-  "Contribution" shall mean any work of authorship, including
-  the original version of the Work and any modifications or additions
-  to that Work or Derivative Works thereof, that is intentionally
-  submitted to Licensor for inclusion in the Work by the copyright owner
-  or by an individual or Legal Entity authorized to submit on behalf of
-  the copyright owner. For the purposes of this definition, "submitted"
-  means any form of electronic, verbal, or written communication sent
-  to the Licensor or its representatives, including but not limited to
-  communication on electronic mailing lists, source code control systems,
-  and issue tracking systems that are managed by, or on behalf of, the
-  Licensor for the purpose of discussing and improving the Work, but
-  excluding communication that is conspicuously marked or otherwise
-  designated in writing by the copyright owner as "Not a Contribution."
-
-  "Contributor" shall mean Licensor and any individual or Legal Entity
-  on behalf of whom a Contribution has been received by Licensor and
-  subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  copyright license to reproduce, prepare Derivative Works of,
-  publicly display, publicly perform, sublicense, and distribute the
-  Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  (except as stated in this section) patent license to make, have made,
-  use, offer to sell, sell, import, and otherwise transfer the Work,
-  where such license applies only to those patent claims licensable
-  by such Contributor that are necessarily infringed by their
-  Contribution(s) alone or by combination of their Contribution(s)
-  with the Work to which such Contribution(s) was submitted.

DO NOT REPLY [Bug 46354] New: LIMIT_BUFFER setting causes arraycopy errors

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46354

   Summary: LIMIT_BUFFER setting causes arraycopy errors
   Product: Tomcat 5
   Version: 5.5.23
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Per the advice in this issue:

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

We just tried to apply the following setting to our Tomcat instances

-Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true

A short time after applying this setting, we would start seeing the following
stack traces on various random requests.

SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(System.java)
at java.lang.String.getChars(String.java:855)
at
org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:146)
at
org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:159)
at
org.apache.jsp.tag.web.arch.patterns.DetailInspector.list_tag._jspx_meth_c_005fif_005f3(list_tag.java:683)
at
org.apache.jsp.tag.web.arch.patterns.DetailInspector.list_tag._jspx_meth_c_005fforEach_005f0(list_tag.java:630)
at
org.apache.jsp.tag.web.arch.patterns.DetailInspector.list_tag.doTag(list_tag.java:302)
at
org.apache.jsp.WEB_002dINF.pages.registrar.academic.Student.inspect.pgmstudy_002dtab_jsp._jspx_meth_detail_005flist_005f0(pgmstudy_002dtab_jsp.java:224)
at
org.apache.jsp.WEB_002dINF.pages.registrar.academic.Student.inspect.pgmstudy_002dtab_jsp.access$0(pgmstudy_002dtab_jsp.java:214)
at
org.apache.jsp.WEB_002dINF.pages.registrar.academic.Student.inspect.pgmstudy_002dtab_jsp$pgmstudy_002dtab_jspHelper.invoke0(pgmstudy_002dtab_jsp.java:492)
at
org.apache.jsp.WEB_002dINF.pages.registrar.academic.Student.inspect.pgmstudy_002dtab_jsp$pgmstudy_002dtab_jspHelper.invoke(pgmstudy_002dtab_jsp.java:571)
at
org.apache.jsp.tag.web.arch.patterns.DetailInspector.inspector_tag.doTag(inspector_tag.java:163)
at
org.apache.jsp.WEB_002dINF.pages.registrar.academic.Student.inspect.pgmstudy_002dtab_jsp._jspService(pgmstudy_002dtab_jsp.java:151)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...

If we remove the setting, then things behave normally (albeit with the memory
issues discussed in the linked issue).

We are running on top of java version 1.6.0.


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

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



DO NOT REPLY [Bug 46354] LIMIT_BUFFER setting causes arraycopy errors

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46354





--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-12-05 09:04:34 PST ---
Upgrading to 5.5.27 may well fix this.


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

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



DO NOT REPLY [Bug 46247] SVN property patches

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46247





--- Comment #2 from Sebb <[EMAIL PROTECTED]>  2008-12-05 09:12:03 PST ---
Created an attachment (id=22998)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22998)
SVN property fixes

A few more SVN properties that seem to have been missed.

I've removed the .bat/.sh changes.


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

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



DO NOT REPLY [Bug 46352] Apache 1.3 crashes inside mod_jk.so with selfsigned SSL cert

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46352





--- Comment #3 from Patrick Middleton <[EMAIL PROTECTED]>  2008-12-05 09:16:19 
PST ---
so we have all the magic tested and working as per
http://developer.apple.com/technotes/tn2004/tn2123.html for enabling core
dumps, and even a CoreDumpDirectory directive in /etc/httpd/httpd.conf , but we
get no core dumps.

One thing I have noticed is that httpd seems to take several seconds to crash;
as if steadily iterating until it blows the stack up, which might explain why
the the dead address looks like a bit of ASCII string.

I have also noted that my JkMount directives aren't working as expected.  Using
older mod_jk versions, they worked with everything in the main httpd.conf ;
with newer versions, some weren't working at all with HTTPS, so I moved most of
the mod_jk configuration into the virtual host containers; and it's still not
right.  Depending on the URL, some requests get 404 errors from the webserver,
and some cause crashes.

mod_jk.c:663 r: 0x01807100 r->subprocess_env: 0x01807468
mod_jk.c:666 r->subprocess_env:
REDIRECT_SCRIPT_URL=/services/=REDIRECT_SCRIPT_URI=http://localhost/services/=REDIRECT_STATUS


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

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



DO NOT REPLY [Bug 46354] LIMIT_BUFFER setting causes arraycopy errors

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46354





--- Comment #2 from Ed Hill <[EMAIL PROTECTED]>  2008-12-05 09:16:25 PST ---
I will try, but nothing in the release notes jumped out at me...


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

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



svn commit: r723802 - in /tomcat/trunk/modules/jdbc-pool: java/org/apache/tomcat/jdbc/pool/ java/org/apache/tomcat/jdbc/pool/interceptor/ test/org/apache/tomcat/jdbc/test/

2008-12-05 Thread fhanik
Author: fhanik
Date: Fri Dec  5 09:36:09 2008
New Revision: 723802

URL: http://svn.apache.org/viewvc?rev=723802&view=rev
Log:
Query collection stats

Added:

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CreateTestTable.java

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java
Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractCreateStatementInterceptor.java

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=723802&r1=723801&r2=723802&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Fri Dec  5 09:36:09 2008
@@ -28,6 +28,7 @@
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
@@ -57,6 +58,9 @@
  */
 
 public class ConnectionPool {
+public static interface CloseListener {
+void poolClosed(ConnectionPool pool);
+}
 
 //logger
 protected static Log log = LogFactory.getLog(ConnectionPool.class);
@@ -64,7 +68,8 @@
 
//===
 // INSTANCE/QUICK ACCESS VARIABLE
 
//===
-
+protected ConcurrentLinkedQueue listeners = new 
ConcurrentLinkedQueue();
+
 /**
  * All the information about the connection pool
  */
@@ -226,11 +231,7 @@
 }
 
 try {
-//cache the constructor
-if (proxyClassConstructor == null ) {
-Class proxyClass = 
Proxy.getProxyClass(ConnectionPool.class.getClassLoader(), new Class[] 
{java.sql.Connection.class});
-proxyClassConstructor = proxyClass.getConstructor(new Class[] 
{ InvocationHandler.class });
-}
+getProxyConstructor();
 //create the proxy
 //TODO possible optimization, keep track if this connection was 
returned properly, and don't generate a new facade
 Connection connection = 
(Connection)proxyClassConstructor.newInstance(new Object[] { handler });
@@ -243,13 +244,25 @@
 }
 
 }
-
+
+public Constructor getProxyConstructor() throws NoSuchMethodException {
+//cache the constructor
+if (proxyClassConstructor == null ) {
+Class proxyClass = 
Proxy.getProxyClass(ConnectionPool.class.getClassLoader(), new Class[] 
{java.sql.Connection.class});
+proxyClassConstructor = proxyClass.getConstructor(new Class[] { 
InvocationHandler.class });
+}
+return proxyClassConstructor;
+}
 
 @Override
 protected void finalize() throws Throwable {
 close(true);
 }
 
+public void addCloseListener(CloseListener listener) {
+listeners.add(listener);
+}
+
 /**
  * Closes the pool and all disconnects all idle connections
  * Active connections will be closed upon the [EMAIL PROTECTED] 
java.sql.Connection#close close} method is called
@@ -288,6 +301,11 @@
 }
 size.set(0);
 if (this.getPoolProperties().isJmxEnabled()) stopJmx();
+
+while (listeners.size()>0) {
+CloseListener listener = listeners.poll();
+if (listener!=null) listener.poolClosed(this);
+}
 } //closePool
 
 

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java?rev=723802&r1=723801&r2=723802&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
 Fri Dec  5 09:36:09 2008
@@ -43,6 +43,10 @@
 protected static Log log = LogFactory.getLog(DataSourceProxy.class);
 
 protected volatile ConnectionPool pool = null;
+public ConnectionPool getPool() {
+return pool;
+}
+
 protec

DO NOT REPLY [Bug 46352] Apache 1.3 crashes inside mod_jk.so with selfsigned SSL cert

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46352





--- Comment #4 from Rainer Jung <[EMAIL PROTECTED]>  2008-12-05 09:39:35 PST ---
(In reply to comment #3)
> so we have all the magic tested and working as per
> http://developer.apple.com/technotes/tn2004/tn2123.html for enabling core
> dumps, and even a CoreDumpDirectory directive in /etc/httpd/httpd.conf , but 
> we
> get no core dumps.

I didn't read the document, but what could help: if you start as root (e.g.
when using low ports) and switch user via User/Group in httpd.conf, use a high
port instead and run directly as a normal user. Most OSes are reluctant to dump
core for processes which were switching user. Another thing (maybe in the
quoted doc?) is that limit/ulimit can prevent the writing of core dumps.

Concerning gdb: httpd -X starts only one httpd process, so you always know
which you should attach to :) Of course that's not for production, because it
can only handle one response at a time, but that's fine for testing.

> One thing I have noticed is that httpd seems to take several seconds to crash;
> as if steadily iterating until it blows the stack up, which might explain why
> the the dead address looks like a bit of ASCII string.

Possible, see below for the ap_table_get code, which indeed does an iteration.

> I have also noted that my JkMount directives aren't working as expected.  
> Using
> older mod_jk versions, they worked with everything in the main httpd.conf ;
> with newer versions, some weren't working at all with HTTPS, so I moved most 
> of
> the mod_jk configuration into the virtual host containers; and it's still not
> right.  Depending on the URL, some requests get 404 errors from the webserver,
> and some cause crashes.

That should be an independent thing. In fact in 1.2.26 we cleaned up the vhost
handling and as a result there was exactly one incompatible change, namely the
relation between JkMount and vhosts. For testing, you can rule out that effect
by e.g. putting them all globalyy and adding to the global server "JkMountCopy
All". If you put them into the VHosts, you might need to add them to several
VHosts (e.g. one for http, one for https).


Concerning your previous comment:

> which wrote this for three requests: two over HTTP, the last over HTTPS.
> mod_jk.c:663 r: 0x01856238 r->subprocess_env: 0x01856548
> mod_jk.c:666 r->subprocess_env: SCRIPT_URL=/services/MyServlet
> mod_jk.c:663 r: 0x01856238 r->subprocess_env: 0x01856548
> mod_jk.c:666 r->subprocess_env: SCRIPT_URL=/services/MyServlet
> mod_jk.c:663 r: 0x01856238 r->subprocess_env: 0x01856548
> mod_jk.c:666 r->subprocess_env: SCRIPT_URL=/services/Style.css

OK, so it's not NULL, and after the last output it crashes (because it's an
HTTP request), right?

Unfortunately I can't see any use of memcpy in httpd's ap_table_get:

API_EXPORT(const char *) ap_table_get(const table *t, const char *key)
{
table_entry *elts = (table_entry *) t->a.elts;
int i;

if (key == NULL)
return NULL;

for (i = 0; i < t->a.nelts; ++i)
if (!strcasecmp(elts[i].key, key))
return elts[i].val;

return NULL;
}

Maybe the strcasecmp doesn't terminate, because one of the two strings is not
correctly 0-terminated?

Unfortunately I don't have access to MacOS X, so that will be hard to debug for
me. You could:

1) delete line 659 and see, whether it runs stable then

2) replace the call to ap_table_get in line 659 by a call to my_table_get and
copy the above ap_table_get under the name my_table_get into mod_jk.c. This
code can then be instrumented with more output statements like you already did,
to get an idea what's wrong and where exactly it crashes.


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

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



svn commit: r723803 - in /tomcat/trunk: java/org/apache/tomcat/util/net/jsse/NioX509KeyManager.java modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/SimplePOJOAsyncExample.java modules/jdbc-pool/tes

2008-12-05 Thread markt
Author: markt
Date: Fri Dec  5 09:48:41 2008
New Revision: 723803

URL: http://svn.apache.org/viewvc?rev=723803&view=rev
Log:
A few more properties

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/NioX509KeyManager.java   
(props changed)

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/SimplePOJOAsyncExample.java
   (props changed)

tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestAsyncQueue.java
   (props changed)

Propchange: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/NioX509KeyManager.java
--
svn:eol-style = native

Propchange: 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/SimplePOJOAsyncExample.java
--
svn:eol-style = native

Propchange: 
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestAsyncQueue.java
--
svn:eol-style = native



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



DO NOT REPLY [Bug 46247] SVN property patches

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46247





--- Comment #3 from Mark Thomas <[EMAIL PROTECTED]>  2008-12-05 09:49:16 PST ---
Most of those are already set. I have updated the few that weren't.


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

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



DO NOT REPLY [Bug 46255] ThreadDeath must be rethrown if caught

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46255


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-12-05 10:13:51 PST ---
Reading the javadoc for ThreadDeath, it is thrown as a result of calling
Thread.stop(). There is only one instance of that call in Tomcat (in
ThreadPool) and it is never used. Therefore, I do not see the need to fix this.


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

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



DO NOT REPLY [Bug 46247] SVN property patches

2008-12-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46247


Sebb <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Comment #4 from Sebb <[EMAIL PROTECTED]>  2008-12-05 10:25:23 PST ---
Sorry, I had not realised that native/connector was an external - seems to be a
bug in Subclipse, as normally these are flagged - this stops my script working.

Two more recent files have crept in without properties:

svn ps svn:eol-style native
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CreateTestTable.java
svn ps svn:eol-style native
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestSlowQueryReport.java


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

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



svn commit: r723889 - in /tomcat/trunk/java/org/apache/catalina: Executor.java core/StandardThreadExecutor.java

2008-12-05 Thread fhanik
Author: fhanik
Date: Fri Dec  5 14:02:15 2008
New Revision: 723889

URL: http://svn.apache.org/viewvc?rev=723889&view=rev
Log:
Add the ability to configure a job queue size, and a timeout for how long we 
want to try to add something to the queue.

Modified:
tomcat/trunk/java/org/apache/catalina/Executor.java
tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java

Modified: tomcat/trunk/java/org/apache/catalina/Executor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Executor.java?rev=723889&r1=723888&r2=723889&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Executor.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Executor.java Fri Dec  5 14:02:15 2008
@@ -16,8 +16,26 @@
  */
 package org.apache.catalina;
 
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.TimeUnit;
+
 
 
 public interface Executor extends java.util.concurrent.Executor, Lifecycle {
 public String getName();
+
+/**
+ * Executes the given command at some time in the future.  The command
+ * may execute in a new thread, in a pooled thread, or in the calling
+ * thread, at the discretion of the Executor implementation.
+ * If no threads are available, it will be added to the work queue.
+ * If the work queue is full, the system will wait for the specified 
+ * time until it throws a RejectedExecutionException
+ *
+ * @param command the runnable task
+ * @throws RejectedExecutionException if this task cannot be
+ * accepted for execution - the queue is full
+ * @throws NullPointerException if command or unit is null
+ */
+void execute(Runnable command, long timeout, TimeUnit unit);
 }
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java?rev=723889&r1=723888&r2=723889&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java Fri 
Dec  5 14:02:15 2008
@@ -33,22 +33,51 @@
 public class StandardThreadExecutor implements Executor {
 
 // -- Properties
+/**
+ * Default thread priority
+ */
 protected int threadPriority = Thread.NORM_PRIORITY;
 
+/**
+ * Run threads in daemon or non-daemon state
+ */
 protected boolean daemon = true;
 
+/**
+ * Default name prefix for the thread name
+ */
 protected String namePrefix = "tomcat-exec-";
 
+/**
+ * max number of threads
+ */
 protected int maxThreads = 200;
 
+/**
+ * min number of threads
+ */
 protected int minSpareThreads = 25;
 
+/**
+ * idle time in milliseconds
+ */
 protected int maxIdleTime = 6;
 
+/**
+ * The executor we use for this component
+ */
 protected ThreadPoolExecutor executor = null;
 
+/**
+ * the name of this thread pool
+ */
 protected String name;
 
+/**
+ * The maximum number of elements that can queue up before we reject them
+ */
+protected int maxQueueSize = Integer.MAX_VALUE;
+
 private LifecycleSupport lifecycle = new LifecycleSupport(this);
 // -- Constructors
 public StandardThreadExecutor() {
@@ -60,7 +89,7 @@
 // -- Public Methods
 public void start() throws LifecycleException {
 lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null);
-TaskQueue taskqueue = new TaskQueue();
+TaskQueue taskqueue = new TaskQueue(maxQueueSize);
 TaskThreadFactory tf = new TaskThreadFactory(namePrefix);
 lifecycle.fireLifecycleEvent(START_EVENT, null);
 executor = new ThreadPoolExecutor(getMinSpareThreads(), 
getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
@@ -76,13 +105,29 @@
 lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null);
 }
 
+public void execute(Runnable command, long timeout, TimeUnit unit) {
+if ( executor != null ) {
+try {
+executor.execute(command);
+} catch (RejectedExecutionException rx) {
+//there could have been contention around the queue
+try {
+if ( !( (TaskQueue) 
executor.getQueue()).force(command,timeout,unit) ) throw new 
RejectedExecutionException("Work queue full.");
+}catch (InterruptedException x) {
+throw new RejectedExecutionException("Interrupted.",x);
+}
+}
+} else throw new Il