[Bug 54284] Util.objectNameValueNeedsQuote throws NPE for anonymous Filters

2013-01-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54284

--- Comment #4 from Violeta Georgieva  ---
Created attachment 29817
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29817&action=edit
Patch proposal

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54284] Util.objectNameValueNeedsQuote throws NPE for anonymous Filters

2013-01-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54284

--- Comment #5 from Violeta Georgieva  ---
Created attachment 29818
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29818&action=edit
Test case

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54284] Util.objectNameValueNeedsQuote throws NPE for anonymous Filters

2013-01-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54284

Violeta Georgieva  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #6 from Violeta Georgieva  ---
Hi,

As per clarification provided by Servlet Specification expert group -
IllegalArgumentException should be thrown when filter name is NULL or empty
string.

Patch proposal and test case are attached.

Any comments will be appreciated.

Regards
Violeta

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



PreDestroy annotation handling

2013-01-05 Thread Konstantin Kolinko
Hi!

I was reviewing the calls to InstanceManager.destroyInstance( ) in
view of r1428645 and its followups. This method is essentially
responsible for calling methods annotated as @PreDestroy.

The documentation here are chapters 15.5.9/15.5.10 of Servlet 3.0 Rev a
and chapters 2.5/2.6 of JSR250 Common Annotations 1.1


There are several questions that remain for me.

1) Calling PreDestroy methods if destroy() method fails.

I think that PreDestroy methods should be called even if destroy() fails.
For Filters it was fixed by r1428645 . For Servlets this is yet to be fixed.

I think this has to be fixed, similar to r1428645.

2) Calling PreDestroy methods if init() method fails.

The specs say that
- if @PostConstruct methods fail then nothing is called afterwards, and
- if init() fails then destroy() is not called.

I wonder whether failure of init() precludes @PreDestroy methods from
being called. The current implementation is that they are not called.

I feel some concern as JSR250 and Servlet API are different APIs, and
in view of r1429173 which fixed a similar issue with cache in
SecurityUtil.

3) Besides annotations there are web.xml elements  "" and
"".

I do not see any proper documentation for them in the Servlet spec
(besides being mentioned in the fragment merging rules in ch.8.2.3).
Quick googling found this example from Jetty wiki:

http://wiki.eclipse.org/Jetty/Feature/Annotations#Lifecycle_callbacks:_PostConstruct_PreDestroy

They are also mentioned in JavaEE 6 Platform Specification (ch.
EE.5.2.5), which mentions that they are equivalent to annotations.

A question is that searching by the tag names I do not see any code in
Tomcat that handles them.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1429348 - in /tomcat/jk/trunk: jkstatus/build.xml native/NOTICE native/common/jk_status.c native/iis/jk_isapi_plugin.c xdocs/style.xsl

2013-01-05 Thread rjung
Author: rjung
Date: Sat Jan  5 18:09:04 2013
New Revision: 1429348

URL: http://svn.apache.org/viewvc?rev=1429348&view=rev
Log:
Again another year.

Modified:
tomcat/jk/trunk/jkstatus/build.xml
tomcat/jk/trunk/native/NOTICE
tomcat/jk/trunk/native/common/jk_status.c
tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
tomcat/jk/trunk/xdocs/style.xsl

Modified: tomcat/jk/trunk/jkstatus/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/jkstatus/build.xml?rev=1429348&r1=1429347&r2=1429348&view=diff
==
--- tomcat/jk/trunk/jkstatus/build.xml (original)
+++ tomcat/jk/trunk/jkstatus/build.xml Sat Jan  5 18:09:04 2013
@@ -120,7 +120,7 @@
   version="true"
   windowtitle="Jk Status Internal API Documentation"
   doctitle="Jk Status API"
-  bottom="Copyright © 2000-2012 Apache Software Foundation.  All 
Rights Reserved."
+  bottom="Copyright © 2000-2013 Apache Software Foundation.  All 
Rights Reserved."
 />
   
 

Modified: tomcat/jk/trunk/native/NOTICE
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/NOTICE?rev=1429348&r1=1429347&r2=1429348&view=diff
==
--- tomcat/jk/trunk/native/NOTICE (original)
+++ tomcat/jk/trunk/native/NOTICE Sat Jan  5 18:09:04 2013
@@ -1,5 +1,5 @@
 Apache Tomcat Connectors
-Copyright 2002-2012 The Apache Software Foundation
+Copyright 2002-2013 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

Modified: tomcat/jk/trunk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_status.c?rev=1429348&r1=1429347&r2=1429348&view=diff
==
--- tomcat/jk/trunk/native/common/jk_status.c (original)
+++ tomcat/jk/trunk/native/common/jk_status.c Sat Jan  5 18:09:04 2013
@@ -215,7 +215,7 @@
"http://www.w3.org/1999/xhtml\"; xml:lang=\"en\" lang=\"en\">" \
"JK Status 
Manager"
 
-#define JK_STATUS_COPYRIGHT"Copyright © 1999-2012, The 
Apache Software Foundation" \
+#define JK_STATUS_COPYRIGHT"Copyright © 1999-2013, The 
Apache Software Foundation" \
"Licensed under the http://www.apache.org/licenses/LICENSE-2.0\";>" \
"Apache License, Version 2.0."
 

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1429348&r1=1429347&r2=1429348&view=diff
==
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Sat Jan  5 18:09:04 2013
@@ -208,7 +208,7 @@ char HTML_ERROR_TAIL[] ="\n \n"
 "\n"
 "\n"
-"Copyright © 1999-2012 Apache Software 
Foundation\n"
+"Copyright © 1999-2013 Apache Software 
Foundation\n"
 "All Rights Reserved\n"
 "\n\n\n";
 

Modified: tomcat/jk/trunk/xdocs/style.xsl
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/style.xsl?rev=1429348&r1=1429347&r2=1429348&view=diff
==
--- tomcat/jk/trunk/xdocs/style.xsl (original)
+++ tomcat/jk/trunk/xdocs/style.xsl Sat Jan  5 18:09:04 2013
@@ -178,7 +178,7 @@
   PAGE FOOTER
   
 
-Copyright © 1999-2012, Apache Software Foundation
+Copyright © 1999-2013, Apache Software Foundation
 
   
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1429356 - /tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java

2013-01-05 Thread kkolinko
Author: kkolinko
Date: Sat Jan  5 18:50:46 2013
New Revision: 1429356

URL: http://svn.apache.org/viewvc?rev=1429356&view=rev
Log:
Comment

Modified:
tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java

Modified: tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java?rev=1429356&r1=1429355&r2=1429356&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java (original)
+++ tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java Sat Jan  5 
18:50:46 2013
@@ -40,17 +40,20 @@ import org.apache.tomcat.util.res.String
 /**
  * This utility class associates a Subject to the current
  * AccessControlContext. When a SecurityManager is
- * used, * the container will always associate the called thread with an
- * AccessControlContext * containing only the principal of the requested
+ * used, the container will always associate the called thread with an
+ * AccessControlContext containing only the principal of the requested
  * Servlet/Filter.
  *
- * This class uses reflection to invoke the invoke methods.
+ * This class uses reflection to invoke the methods.
  *
  * @author Jean-Francois Arcand
  */
 
 public final class SecurityUtil{
 
+// Note that indexes overlap.
+// A Servlet uses "init", "service", "event", "destroy".
+// A Filter uses "doFilter", "doFilterEvent", "destroy".
 private static final int INIT= 0;
 private static final int SERVICE = 1;
 private static final int DOFILTER = 1;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1429360 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/security/SecurityUtil.java webapps/docs/changelog.xml

2013-01-05 Thread kkolinko
Author: kkolinko
Date: Sat Jan  5 19:01:34 2013
New Revision: 1429360

URL: http://svn.apache.org/viewvc?rev=1429360&view=rev
Log:
Merged revisions r1429179 r1429180 r1429356 from tomcat/trunk:

Simplify the code.
- The method names are case-sensitive.
- We are returning "null" on failure, so there is no need to check whether an 
array entry is not-null before returning it.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityUtil.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1429179-1429180,1429356

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityUtil.java?rev=1429360&r1=1429359&r2=1429360&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityUtil.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityUtil.java 
Sat Jan  5 19:01:34 2013
@@ -40,17 +40,20 @@ import org.apache.tomcat.util.res.String
 /**
  * This utility class associates a Subject to the current
  * AccessControlContext. When a SecurityManager is
- * used, * the container will always associate the called thread with an
- * AccessControlContext * containing only the principal of the requested
+ * used, the container will always associate the called thread with an
+ * AccessControlContext containing only the principal of the requested
  * Servlet/Filter.
  *
- * This class uses reflection to invoke the invoke methods.
+ * This class uses reflection to invoke the methods.
  *
  * @author Jean-Francois Arcand
  */
 
 public final class SecurityUtil{
 
+// Note that indexes overlap.
+// A Servlet uses "init", "service", "event", "destroy".
+// A Filter uses "doFilter", "doFilterEvent", "destroy".
 private static final int INIT= 0;
 private static final int SERVICE = 1;
 private static final int DOFILTER = 1;
@@ -339,23 +342,17 @@ public final class SecurityUtil{
  */
 private static Method findMethod(Method[] methodsCache,
  String methodName){
-if (methodName.equalsIgnoreCase(INIT_METHOD)
-&& methodsCache[INIT] != null){
+if (methodName.equals(INIT_METHOD)){
 return methodsCache[INIT];
-} else if (methodName.equalsIgnoreCase(DESTROY_METHOD)
-&& methodsCache[DESTROY] != null){
+} else if (methodName.equals(DESTROY_METHOD)){
 return methodsCache[DESTROY];
-} else if (methodName.equalsIgnoreCase(SERVICE_METHOD)
-&& methodsCache[SERVICE] != null){
+} else if (methodName.equals(SERVICE_METHOD)){
 return methodsCache[SERVICE];
-} else if (methodName.equalsIgnoreCase(DOFILTER_METHOD)
-&& methodsCache[DOFILTER] != null){
+} else if (methodName.equals(DOFILTER_METHOD)){
 return methodsCache[DOFILTER];
-} else if (methodName.equalsIgnoreCase(EVENT_METHOD)
-&& methodsCache[EVENT] != null){
+} else if (methodName.equals(EVENT_METHOD)){
 return methodsCache[EVENT];
-} else if (methodName.equalsIgnoreCase(DOFILTEREVENT_METHOD)
-&& methodsCache[DOFILTEREVENT] != null){
+} else if (methodName.equals(DOFILTEREVENT_METHOD)){
 return methodsCache[DOFILTEREVENT];
 }
 return null;
@@ -385,17 +382,17 @@ public final class SecurityUtil{
 Method method =
 targetObject.getClass().getMethod(methodName, targetType);
 
-if (methodName.equalsIgnoreCase(INIT_METHOD)){
+if (methodName.equals(INIT_METHOD)){
 methodsCache[INIT] = method;
-} else if (methodName.equalsIgnoreCase(DESTROY_METHOD)){
+} else if (methodName.equals(DESTROY_METHOD)){
 methodsCache[DESTROY] = method;
-} else if (methodName.equalsIgnoreCase(SERVICE_METHOD)){
+} else if (methodName.equals(SERVICE_METHOD)){
 methodsCache[SERVICE] = method;
-} else if (methodName.equalsIgnoreCase(DOFILTER_METHOD)){
+} else if (methodName.equals(DOFILTER_METHOD)){
 methodsCache[DOFILTER] = method;
-} else if (methodName.equalsIgnoreCase(EVENT_METHOD)){
+} else if (methodName.equals(EVENT_METHOD)){
 methodsCache[EVENT] = method;
-} else if (methodName.equalsIgnoreCase(DOFILTEREVENT_METHOD)){
+} else if (methodName.equals(DOFILTEREVENT_METHOD)){
 methodsCache[DOFILTEREVENT] = method;
 }
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/change

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

2013-01-05 Thread kkolinko
Author: kkolinko
Date: Sat Jan  5 20:00:32 2013
New Revision: 1429369

URL: http://svn.apache.org/viewvc?rev=1429369&view=rev
Log:
Add proposal and move an earlier one into the correct section

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=1429369&r1=1429368&r2=1429369&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Jan  5 20:00:32 2013
@@ -94,6 +94,21 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko
   -1:
 
+* Fix memory leak of servlet instances when running with a
+  SecurityManager and either init() or destroy() methods fail
+  or the servlet is a SingleThreadModel one.
+  It is based on r1429186
+  
http://people.apache.org/~kkolinko/patches/2013-01-05_tc6_SecurityUtil_remove.patch
+  +1: kkolinko
+  -1:
+
+* Improve method cache handling in SecurityUtil class.
+  Add caching for Comet methods and simplify cache lookup code.
+  It is backport of r728776 (BZ 46304) and r1429360
+  
http://people.apache.org/~kkolinko/patches/2013-01-05_tc6_46304_SecurityUtil.patch
+  +1: kkolinko
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 
@@ -130,11 +145,3 @@ PATCHES/ISSUES THAT ARE STALLED
 http://svn.apache.org/viewvc?view=revision&revision=1380841
  (Is one supposed to just copy the current version of websocket
  package from Tomcat 7 here?)
-
-* Fix memory leak of servlet instances when running with a
-  SecurityManager and either init() or destroy() methods fail
-  or the servlet is a SingleThreadModel one.
-  It is based on r1429186
-  
http://people.apache.org/~kkolinko/patches/2013-01-05_tc6_SecurityUtil_remove.patch
-  +1: kkolinko
-  -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: PreDestroy annotation handling

2013-01-05 Thread Christopher Schultz
Konstantin,

On 1/5/13 12:52 PM, Konstantin Kolinko wrote:
> 2) Calling PreDestroy methods if init() method fails.
> 
> The specs say that
> - if @PostConstruct methods fail then nothing is called afterwards, and
> - if init() fails then destroy() is not called.
> 
> I wonder whether failure of init() precludes @PreDestroy methods from
> being called. The current implementation is that they are not called.
> 
> I feel some concern as JSR250 and Servlet API are different APIs, and
> in view of r1429173 which fixed a similar issue with cache in
> SecurityUtil.

I would be surprised to have PreDestroy called if destroy wasn't
ultimately going to be called (or at least the goal is to call destroy
-- perhaps some error prevents us from doing so). I guess that means
that I would personally favor the current implementation. On the other
hand, I don't use these features so I don't have a vested interest (yet)
in how they operate. I'm just commenting based upon basic logic.

-chris



signature.asc
Description: OpenPGP digital signature


Re: PreDestroy annotation handling

2013-01-05 Thread Mark Thomas


Konstantin Kolinko  wrote:

>1) Calling PreDestroy methods if destroy() method fails.
>
>I think that PreDestroy methods should be called even if destroy()
>fails.
>For Filters it was fixed by r1428645 . For Servlets this is yet to be
>fixed.
>
>I think this has to be fixed, similar to r1428645.

+1.

>2) Calling PreDestroy methods if init() method fails.
>
>The specs say that
>- if @PostConstruct methods fail then nothing is called afterwards, and
>- if init() fails then destroy() is not called.
>
>I wonder whether failure of init() precludes @PreDestroy methods from
>being called. The current implementation is that they are not called.
>
>I feel some concern as JSR250 and Servlet API are different APIs, and
>in view of r1429173 which fixed a similar issue with cache in
>SecurityUtil.

There is a distinct lack of clarity in the specs for this one. I'd leave it as 
is for now but open a Jira issue for the servlet spec to ask for clarification.

>3) Besides annotations there are web.xml elements  "" and
>"".
>
>I do not see any proper documentation for them in the Servlet spec
>(besides being mentioned in the fragment merging rules in ch.8.2.3).
>Quick googling found this example from Jetty wiki:
>
>http://wiki.eclipse.org/Jetty/Feature/Annotations#Lifecycle_callbacks:_PostConstruct_PreDestroy
>
>They are also mentioned in JavaEE 6 Platform Specification (ch.
>EE.5.2.5), which mentions that they are equivalent to annotations.
>
>A question is that searching by the tag names I do not see any code in
>Tomcat that handles them.

Nor me and I don't recall implementing anything for them either. This one needs 
a Bugzilla issue.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: PreDestroy annotation handling

2013-01-05 Thread Konstantin Kolinko
2013/1/6 Christopher Schultz :
>
> On 1/5/13 12:52 PM, Konstantin Kolinko wrote:
>> 2) Calling PreDestroy methods if init() method fails.
>>
>> The specs say that
>> - if @PostConstruct methods fail then nothing is called afterwards, and
>> - if init() fails then destroy() is not called.
>>
>> I wonder whether failure of init() precludes @PreDestroy methods from
>> being called. The current implementation is that they are not called.
>>
>> I feel some concern as JSR250 and Servlet API are different APIs, and
>> in view of r1429173 which fixed a similar issue with cache in
>> SecurityUtil.
>
> I would be surprised to have PreDestroy called if destroy wasn't
> ultimately going to be called (or at least the goal is to call destroy
> -- perhaps some error prevents us from doing so). I guess that means
> that I would personally favor the current implementation. On the other
> hand, I don't use these features so I don't have a vested interest (yet)
> in how they operate. I'm just commenting based upon basic logic.
>

I have a slight guess that you were confused by the names. It is
called "Pre" destroy, but it is actually called after the destroy
method. The order of calls is:

(1) @PostConstruct
(2) init()
...
(3) destroy()
(4) @PreDestroy

In the Servlet spec it is explicitly mentioned that methods annotated
as PostConstruct are called before any lifecycle methods.  There is no
such clarity regarding the PreDestroy methods, but the above order
comes from the symmetry and it is how the current implementation is.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54377] New: RemoteIpFilter does not correctly set request attributes for AccessLog

2013-01-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54377

Bug ID: 54377
   Summary: RemoteIpFilter does not correctly set request
attributes for AccessLog
   Product: Tomcat 7
   Version: 7.0.32
  Hardware: All
OS: All
Status: NEW
  Severity: minor
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: g...@arakelian.com
Classification: Unclassified

In RemoteIpFilter class, there is code that publishes the new request
attributes to AccessLog (see below).

821 if (requestAttributesEnabled) {
822 request.setAttribute(AccessLog.REMOTE_ADDR_ATTRIBUTE,
823 request.getRemoteAddr());
824 request.setAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE,
825 request.getRemoteHost());
826 request.setAttribute(AccessLog.PROTOCOL_ATTRIBUTE,
827 request.getProtocol());
828 request.setAttribute(AccessLog.SERVER_PORT_ATTRIBUTE,
829 Integer.valueOf(request.getServerPort()));
830 }

The problem is that the source values should come from xRequest, e.g.
xRequest.getRemoteAddr() and xRequest.getRemoteHost(), etc.

As it is written above, RemoteIpFilter simply republishes the current values,
and AccessLog therefore does not display the correct values.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: PreDestroy annotation handling

2013-01-05 Thread Christopher Schultz
Konstantin,

On 1/5/13 6:31 PM, Konstantin Kolinko wrote:
> 2013/1/6 Christopher Schultz :
>>
>> On 1/5/13 12:52 PM, Konstantin Kolinko wrote:
>>> 2) Calling PreDestroy methods if init() method fails.
>>>
>>> The specs say that
>>> - if @PostConstruct methods fail then nothing is called afterwards, and
>>> - if init() fails then destroy() is not called.
>>>
>>> I wonder whether failure of init() precludes @PreDestroy methods from
>>> being called. The current implementation is that they are not called.
>>>
>>> I feel some concern as JSR250 and Servlet API are different APIs, and
>>> in view of r1429173 which fixed a similar issue with cache in
>>> SecurityUtil.
>>
>> I would be surprised to have PreDestroy called if destroy wasn't
>> ultimately going to be called (or at least the goal is to call destroy
>> -- perhaps some error prevents us from doing so). I guess that means
>> that I would personally favor the current implementation. On the other
>> hand, I don't use these features so I don't have a vested interest (yet)
>> in how they operate. I'm just commenting based upon basic logic.
>>
> 
> I have a slight guess that you were confused by the names. It is
> called "Pre" destroy, but it is actually called after the destroy
> method. The order of calls is:
> 
> (1) @PostConstruct
> (2) init()
> ...
> (3) destroy()
> (4) @PreDestroy
> 
> In the Servlet spec it is explicitly mentioned that methods annotated
> as PostConstruct are called before any lifecycle methods.  There is no
> such clarity regarding the PreDestroy methods, but the above order
> comes from the symmetry and it is how the current implementation is.

Right: this also mirrors the (somewhat confusing) ServletContextListener
method "contextDestroyed" which actually gets called /before/ the
context is destroyed.

My argument still holds: if destroy() isn't called, @PreDestroy should
also not be called IMO (regardless of the order).

-chris



signature.asc
Description: OpenPGP digital signature


Bug report for Tomcat 7 [2013/01/06]

2013-01-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|16579|New|Enh|2003-01-30|documentation page layout/style breaks wrapping to|
|18500|New|Enh|2003-03-30|Host aliases to match by regular expression   |
|28039|Opn|Enh|2004-03-30|Cluster Support for SingleSignOn  |
|40728|Inf|Enh|2006-10-11|Catalina MBeans use non-serializable classes  |
|40881|Opn|Enh|2006-11-02|Unable to receive message through  TCP channel -> |
|41007|Opn|Enh|2006-11-20|Can't define customized 503 error page|
|43866|New|Enh|2007-11-14|add support for session attribute propagation with|
|43925|Opn|Enh|2007-11-21|org.apache.jasper.runtime.BodyContentImpl causing |
|44216|New|Enh|2008-01-11|Don't reuse session ID even if emptySessionPath=tr|
|48550|Inf|Enh|2010-01-14|Update examples and default server.xml to use UTF-|
|49395|New|Enh|2010-06-06|manager.findLeaks : display the date when the leak|
|49589|New|Enh|2010-07-12|Tag handlers with constant attribute values are al|
|49785|New|Enh|2010-08-19|Enabling TLS for JNDIRealm|
|49821|New|Enh|2010-08-25|Tomcat CLI|
|50019|New|Enh|2010-09-28|Adding JNDI "lookup-name" support In XML and Resou|
|50175|New|Enh|2010-10-28|Enhance memory leak detection by selectively apply|
|50234|New|Enh|2010-11-08|JspC use servlet 3.0 features |
|50504|New|Enh|2010-12-21|Allow setting query string character set trough re|
|50670|New|Enh|2011-01-27|Tribes | RpcChannel | Add option to specify extern|
|51195|New|Enh|2011-05-13|"Find leaks" reports a false positive memory/class|
|51294|Opn|Enh|2011-05-30|Since 7.0.12 do not work option unpackWARs=true fo|
|51423|Inf|Enh|2011-06-23|[Patch] to add a path and a version parameters to |
|51463|New|Enh|2011-07-01|Tomcat.setBaseDir  (package org.apache.catalina.st|
|51496|New|Enh|2011-07-11|NSIS - Warn that duplicate service name will resul|
|51497|New|Enh|2011-07-11|Use canonical IPv6 text representation in logs|
|51526|New|Enh|2011-07-18|Process web application context config with embedd|
|51587|New|Enh|2011-07-29|Implement status and uptime commands  |
|51953|New|Enh|2011-10-04|Proposal: netmask filtering valve and filter  |
|52092|New|Enh|2011-10-26|Please make AsyncFileHandler and OneLineFormatter |
|52135|Opn|Enh|2011-11-04|Global error page is not handled  |
|52235|New|Enh|2011-11-23|Please do a bit of SEO tuning for the web site|
|52236|New|Enh|2011-11-23|Idea: support 'overlays' shaped like Maven overlay|
|52323|New|Enh|2011-12-13|Cobertura test code coverage support for build.xml|
|52381|New|Enh|2011-12-22|Please add OSGi metadata  |
|52448|New|Enh|2012-01-11|Cache jar indexes in WebappClassLoader to speed up|
|52489|New|Enh|2012-01-19|Enhancement request for code signing of war files |
|52558|New|Enh|2012-01-30|CometConnectionManagerValve is adding non-serializ|
|52688|New|Enh|2012-02-16|Add ability to remove old access log files|
|52751|Opn|Enh|2012-02-23|Optimized configuration of the system info display|
|52952|New|Enh|2012-03-20|Improve ExtensionValidator handling for embedded s|
|53085|New|Enh|2012-04-16|[perf] [concurrency] DefaultInstanceManager.annota|
|53387|New|Enh|2012-06-08|SSI: Allow to use $1 to get result of regular expr|
|53411|Opn|Enh|2012-06-13|NullPointerException in org.apache.tomcat.util.buf|
|53469|Inf|Nor|2012-06-26|possible bug in Response.normalize(CharChunk cc)  |
|53492|New|Enh|2012-07-01|Make JspC shell multithreaded |
|53553|New|Enh|2012-07-16|[PATCH] Deploy uploaded WAR with context.xml from |
|53602|New|Enh|2012-07-25|Support for HTTP status code 451  |
|53620|New|Enh|2012-07-30|[juli] delay opening a file until something gets l|
|53665|New|Enh|2012-08-06|Minor JNDI Howto document enhancement concerning m|
|53776|New|Enh|2012-08-24|Multitenancy support for JDBCRealm|
|53777|New|Enh|2012-08-24|Ability to bundle JAAS Configuration in Webappp   |
|53869|

Bug report for Tomcat 8 [2013/01/06]

2013-01-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|53737|Opn|Enh|2012-08-18|Use ServletContext.getJspConfigDescriptor() in Jas|
|53930|New|Enh|2012-09-24|allow capture of catalina stdout/stderr to a comma|
|53987|New|Enh|2012-10-09|Log uncovered HTTP methods in combined security co|
|54095|New|Enh|2012-11-03|[patch] support gzipped versions of static resourc|
|54330|New|Enh|2012-12-19|Patch with some refactoring of Member.java|
+-+---+---+--+--+
| Total5 bugs   |
+---+

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Bug report for Taglibs [2013/01/06]

2013-01-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|38193|Ass|Enh|2006-01-09|[RDC] BuiltIn Grammar support for Field   |
|38600|Ass|Enh|2006-02-10|[RDC] Enable RDCs to be used in X+V markup (X+RDC)|
|42413|New|Enh|2007-05-14|[PATCH] Log Taglib enhancements   |
|46052|New|Nor|2008-10-21|SetLocaleSupport is slow to initialize when many l|
|48333|New|Enh|2009-12-02|TLD generator |
+-+---+---+--+--+
| Total5 bugs   |
+---+

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Bug report for Tomcat Connectors [2013/01/06]

2013-01-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|34526|Opn|Nor|2005-04-19|Truncated content in decompressed requests from mo|
|35959|Opn|Enh|2005-08-01|mod_jk not independant of UseCanonicalName|
|43303|New|Enh|2007-09-04|Versioning under Windows not reported by many conn|
|43968|Inf|Enh|2007-11-26|[patch] support ipv6 with mod_jk  |
|44290|Inf|Nor|2008-01-24|mod_jk/1.2.26: retry is not useful for an importan|
|44349|Inf|Maj|2008-02-04|mod_jk/1.2.26 module does not read worker.status.s|
|44379|New|Enh|2008-02-07|convert the output of strftime into UTF-8 |
|44454|New|Nor|2008-02-19|busy count reported in mod_jk inflated, causes inc|
|44571|New|Enh|2008-03-10|Limits busy per worker to a threshold |
|45063|New|Nor|2008-05-22|JK-1.2.26 IIS ISAPI filter issue when running diff|
|45313|New|Nor|2008-06-30|mod_jk 1.2.26 & apache 2.2.9 static compiled on so|
|46337|New|Nor|2008-12-04|real worker name is wrong |
|46676|New|Enh|2009-02-09|Configurable test request for Watchdog thread |
|46767|New|Enh|2009-02-25|mod_jk to send DECLINED in case no fail-over tomca|
|47327|New|Enh|2009-06-07|remote_user not logged in apache logfile  |
|47617|Inf|Enh|2009-07-31|include time spent doing ajp_get_endpoint() in err|
|47678|New|Cri|2009-08-11|Unable to allocate shared memory when using isapi_|
|47714|New|Cri|2009-08-20|Reponse mixed between users   |
|47750|New|Maj|2009-08-27|Loss of worker settings when changing via jkstatus|
|47795|New|Maj|2009-09-07|service sticky_session not being set correctly wit|
|47840|Inf|Min|2009-09-14|A broken worker name is written in the log file.  |
|48191|New|Maj|2009-11-13|Problem with mod_jk 1.2.28 - Can not render up the|
|48460|New|Nor|2009-12-30|mod_proxy_ajp document has three misleading portio|
|48490|New|Nor|2010-01-05|Changing a node to stopped in uriworkermap.propert|
|48513|New|Enh|2010-01-09|IIS Quick setup instructions  |
|48564|New|Nor|2010-01-18|Unable to turn off retries for LB worker  |
|48830|New|Nor|2010-03-01|IIS shutdown blocked in endpoint service when serv|
|48891|Opn|Enh|2010-03-11|Missing EOL-style settings in tomcat/jk/trunk |
|49035|New|Maj|2010-04-01|data lost when post a multipart/form-data form|
|49063|New|Enh|2010-04-07|Please add JkStripSession status in jk-status work|
|49135|New|Enh|2010-04-16|SPDY Connector for The Tomcat |
|49469|New|Enh|2010-06-19|Workers status page has negative number of connect|
|49732|Opn|Nor|2010-08-10|reply_timeout can't wait forever. |
|49822|New|Enh|2010-08-25|Add hash lb worker method |
|49903|New|Enh|2010-09-09|Make workers file reloadable  |
|50186|New|Nor|2010-10-31|Wrong documentation of connection_pool_timeout / c|
|52334|New|Maj|2011-12-14|recover_time is not properly used |
|52483|New|Enh|2012-01-18|Print JkOptions's options in log file and jkstatus|
|52651|New|Nor|2012-02-13|JKSHMFile size limitation |
|53324|Opn|Nor|2012-05-30|Starting with mod_jk 1.2.35 I cannot modify worker|
|53542|New|Min|2012-07-13|Spelling mistake on 503 service unavailable page  |
|53762|New|Nor|2012-08-22|JK status manager: mass nodes handling doesn't wor|
|53883|New|Maj|2012-09-17|isapi_redirect v 1.2.37 crashes w3wp.exe  on the p|
|53977|New|Maj|2012-10-07|32bits isapi connector cannot work in wow64 mode  |
|54027|New|Cri|2012-10-18|isapi send request to outside address instead of i|
|54112|Opn|Blk|2012-11-07|ISAPI redirector not working when IIS recycles|
|54117|New|Maj|2012-11-08|access violation exception in isapi_redirect.dll  |
|54177|New|Nor|2012-11-20|jkmanager generates non-well-formed XML for certai|
+-+---+---+--+--+
| Total   48 bugs   |
+---+

--

Bug report for Tomcat 6 [2013/01/06]

2013-01-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|41679|New|Enh|2007-02-22|SemaphoreValve should be able to filter on url pat|
|41883|Ass|Enh|2007-03-18|use abstract wrapper instead of plain X509Certific|
|43001|New|Enh|2007-07-30|JspC lacks setMappedFile and setDie for use in Ant|
|43400|New|Enh|2007-09-14|enum support for tag libs |
|43548|Opn|Enh|2007-10-04|xml schema for tomcat-users.xml   |
|43682|New|Enh|2007-10-23|JULI: web-inf/classes/logging.properties to suppor|
|43742|New|Enh|2007-10-30|.tag compiles  performed one at a time -- extremel|
|43979|New|Enh|2007-11-27|Add abstraction for Java and Classfile output |
|44199|New|Enh|2008-01-10|expose current backlog queue size |
|44225|New|Enh|2008-01-14|SSL connector tries to load the private keystore f|
|44294|New|Enh|2008-01-25|Support for EL functions with varargs |
|44645|New|Enh|2008-03-20|[Patch] JNDIRealm - Doesn't support JNDI "java.nam|
|44787|New|Enh|2008-04-09|provide more error context on "java.lang.IllegalSt|
|44818|New|Enh|2008-04-13|tomcat hangs with GET when content-length is defin|
|45014|New|Enh|2008-05-15|Request and Response classes should have wrappers |
|45282|New|Enh|2008-06-25|NioReceiver doesn't close cleanly, leaving sockets|
|45428|New|Enh|2008-07-18|warn if the tomcat stop doesn't complete  |
|45832|New|Enh|2008-09-18|add DIGEST authentication support to Ant tasks|
|45878|New|Enh|2008-09-24|Generated jars do not contain proper manifests or |
|45879|Opn|Enh|2008-09-24|Windows installer fails to install NOTICE and RELE|
|45931|Opn|Enh|2008-10-01|trimSpaces incorrectly modifies output|
|46173|New|Enh|2008-11-09|Small patch for manager app: Setting an optional c|
|46263|New|Enh|2008-11-21|Tomcat reloading of context.xml does not update do|
|46284|New|Enh|2008-11-24|Add flag to DeltaManager that blocks processing cl|
|46350|New|Enh|2008-12-05|Maven repository should contain source bundles|
|46727|New|Enh|2009-02-17|DefaultServlet - serving multiple encodings   |
|46902|New|Enh|2009-03-24|LoginValve to bypass restrictions of j_security_ch|
|47214|New|Enh|2009-05-17|Inner classes that are explicitly referenced - sho|
|47242|New|Enh|2009-05-22|request for AJP command line client   |
|47281|New|Enh|2009-05-28|Efficiency of the JDBCStore   |
|47407|New|Enh|2009-06-23|HttpSessionListener doesn't operate in the session|
|47467|New|Enh|2009-07-02|Deployment of the war file by URL when contextpath|
|47834|New|Enh|2009-09-14|TldConfig throws Exception when exploring unpacked|
|47919|New|Enh|2009-09-30|Log Tomcat & Java environment variables in additio|
|48358|Opn|Enh|2009-12-09|JSP-unloading reloaded|
|48543|New|Enh|2010-01-14|[Patch] More flexibility in specifying -Dcatalina.|
|48672|New|Enh|2010-02-03|Tomcat Virtual Host Manager (/host-manager) have b|
|48674|New|Enh|2010-02-03|Tomcat Virtual Host Manager application doesn't pe|
|48743|New|Enh|2010-02-15|Make the SLEEP variable in catalina.sh settable fr|
|48899|New|Enh|2010-03-12|Guess URI charset should solve lot of problems|
|48922|New|Enh|2010-03-16|org.apache.catalina.connector.Request clone static|
|48928|New|Enh|2010-03-17|An alternative solution to preloading classes when|
|49161|New|Enh|2010-04-21|Unknown Publisher when installing tomcat 6.0.26   |
|49176|Opn|Enh|2010-04-23|Jasper in Dev Mode Is Memory Inefficient  |
|49464|New|Enh|2010-06-18|DefaultServlet and CharacterEncoding  |
|49531|New|Enh|2010-06-30|singlesignon failover not working on DeltaManager/|
|49804|New|Enh|2010-08-23|Allow Embedded.redirectStreams value to be configu|
|49939|New|Enh|2010-09-16|Expose a method via JMX which empties the webapp f|
|49943|New|Enh|2010-09-16|Logging (via juli) does not reread configuration c|
|50285|New|Enh|2010-11-17|Standard HTTP and AJP connectors silently ignore a|
|50288|New|Enh|2010-11-17|Uploading a war file that already exists should au|
|50692|

Bug report for Tomcat Modules [2013/01/06]

2013-01-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|48240|New|Nor|2009-11-19|Tomcat-Lite missing @Override markers |
|48268|New|Nor|2009-11-23|Patch to fix generics in tomcat-lite  |
|48861|New|Nor|2010-03-04|Files without AL headers  |
|49685|New|Nor|2010-08-02|Unsafe synchronization in class ManagedBean   |
|49686|New|Nor|2010-08-02|Using an instance lock to protect static shared da|
|50571|Inf|Nor|2011-01-11|Tomcat 7 JDBC connection pool exception enhancemen|
|51595|Inf|Nor|2011-08-01|org.apache.tomcat.jdbc.pool.jmx.ConnectionPool sho|
|51879|Inf|Enh|2011-09-22|Improve access to Native Connection Methods   |
|52024|Inf|Enh|2011-10-13|Custom interceptor to support automatic failover o|
|53088|Opn|Min|2012-04-17|Give PoolCleaner TimerTask a better name  |
|53198|New|Cri|2012-05-07|'driverClassName' Data Source Property Being Manda|
|53199|Inf|Enh|2012-05-07|Refactor ConnectionPool to use ScheduledExecutorSe|
|53200|New|Enh|2012-05-07|Be able to use SlowQueryReport without reporting f|
|53770|New|Enh|2012-08-23|tomcat-pool: always log validation query syntax er|
|53853|New|Nor|2012-09-11|Can tomcat-jdbc consider Thread#getContextClassLoa|
|53905|New|Nor|2012-09-19|Connection pool not reusing connections.  |
|53968|New|Nor|2012-10-04|Database password is exposed via JMX in getDbPrope|
|54225|New|Nor|2012-11-30|if initSQL property is set to an empty string a Nu|
|54227|New|Nor|2012-11-30|maxAge should be checked on borrow|
|54235|New|Nor|2012-12-03|tomcat jdbc pool stackoverflow error used with spr|
|54337|New|Nor|2012-12-21|StatementCache leaks statements/cursors   |
+-+---+---+--+--+
| Total   21 bugs   |
+---+

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Bug report for Tomcat Native [2013/01/06]

2013-01-05 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=Critical  REG=Regression  MAJ=Major   |
| |   |   MIN=Minor   NOR=NormalENH=Enhancement TRV=Trivial |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|45392|New|Nor|2008-07-14|No OCSP support for client SSL verification   |
|46179|Opn|Maj|2008-11-10|apr ssl client authentication |
|48655|Inf|Nor|2010-02-02|Active multipart downloads prevent tomcat shutdown|
|49038|Inf|Nor|2010-04-02|Crash in tcnative |
|51655|New|Nor|2011-08-12|Index page does not say what native does  |
|51813|New|Cri|2011-09-14|Tomcat randomly crashes with [libtcnative-1.so.1+0|
|52153|New|Maj|2011-11-08|periodic JVM crash (access violation) on buffer fl|
|52231|New|Nor|2011-11-23|Ant Tasks need to reflect changes in manager comma|
|52319|New|Maj|2011-12-12|Tomcat 6 crashes with [libapr-1.so.0+0x196da]  sig|
|52627|New|Min|2012-02-08|Segmentation fault in org.apache.tomcat.jni.File.i|
|53110|New|Cri|2012-04-20|Access Violation Error while creating SHM |
|53605|New|Nor|2012-07-26|use tcnative-1.1.24 Tomcat shutdown still crash   |
|53847|Inf|Nor|2012-09-10|High CPU usage in tomcat native 1.22+ |
|53937|New|Reg|2012-09-26|Double call to apr_pool_destroy() if OCSP checking|
|53940|New|Enh|2012-09-27|Added support for new CRL loading after expiration|
|53952|New|Nor|2012-10-02|Add support for TLS 1.1 and 1.2   |
|54085|New|Nor|2012-11-01|ssl_socket_recv sometimes loops infinitely with no|
|54324|New|Maj|2012-12-18|Support is required to disable TLS compression to |
+-+---+---+--+--+
| Total   18 bugs   |
+---+

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org