Re: svn commit: r1041120 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ tes

2010-12-03 Thread Mladen Turk

On 12/03/2010 08:21 AM, Mladen Turk wrote:

On 12/03/2010 07:43 AM, Konstantin Kolinko wrote:


So, binding to port 80 should be performed during initialization while
we have the root privileges, and not during startup. Does binding to
port 80 still work with Tomcat 7?



Didn't test, but probably not. The sockets are now created iside
start() instead init() so after the privileges are dropped.



Tested. It works on Linux, but it fails on Solaris.
SEVERE: Error starting endpoint
java.net.BindException: Permission denied :80
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:391)
...

7.0.4 works as expected since sockets are created at init()


Regards
--
^TM

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



DO NOT REPLY [Bug 50406] New: init() doesn't initialize connector any more

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50406

   Summary: init() doesn't initialize connector any more
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: regression
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: mt...@apache.org


Recent change of moving connectors init() code to start()
makes Tomcat unusable under commons-daemon.
This is severe regression cause sockets are now bind in start
method when the privileges are already dropped.

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

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



Re: svn commit: r1041120 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ tes

2010-12-03 Thread Mladen Turk

On 12/03/2010 07:43 AM, Konstantin Kolinko wrote:


So, binding to port 80 should be performed during initialization while
we have the root privileges, and not during startup. Does binding to
port 80 still work with Tomcat 7?



Created BZ50406.
IMO the entire r1041120 should be reverted and
BZ50360 which this patch suppose to fix should be
either handled differently cause the problem
was that stop() didn't close the socket (if true at the first place)


Regards
--
^TM

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



DO NOT REPLY [Bug 50407] New: Sessions stickyness issue.

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50407

   Summary: Sessions stickyness issue.
   Product: Tomcat Connectors
   Version: 1.2.28
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: mod_jk
AssignedTo: dev@tomcat.apache.org
ReportedBy: dpar...@commerceinsurance.com


We have two Apache webservers(2.2.15) and two Tomcat servers(5.5.27.

I am using mod_jk(1.2.28) to provide a Load balancing among two tomcat
instances. Somehow when I Start the application & try to login i get a message
"  Session has expired. Please Refresh your browser to start a new session" . 

The application works ok if I comment out the second worker defination from the
worker.properties file.

I believe there is an issue with the Session Stickyness.

We need this resolved ASAP as our target production date is 11/15/2010

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

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



DO NOT REPLY [Bug 50407] Sessions stickyness issue.

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50407

--- Comment #1 from dpar...@commerceinsurance.com 2010-12-03 09:44:26 EST ---
Created an attachment (id=26369)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26369)
worker.properties

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

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



DO NOT REPLY [Bug 50407] Sessions stickyness issue.

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50407

--- Comment #2 from dpar...@commerceinsurance.com 2010-12-03 09:45:18 EST ---
Created an attachment (id=26370)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26370)
Apache server conf

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

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



DO NOT REPLY [Bug 50407] Sessions stickyness issue.

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50407

--- Comment #3 from Christopher Schultz  
2010-12-03 10:29:38 EST ---
Sounds like this was something that should have been posted to the user list
before filing: sticky sessions work in many environments.

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

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



Re: My first to 7.x

2010-12-03 Thread Christopher Schultz
Mark,

On 12/2/2010 5:24 PM, Mark Thomas wrote:
> On 02/12/2010 21:25, Christopher Schultz wrote:
>> Then, should I update the changelog.xml?
> Yes.

Great. It looks like the format is latest-on-top. Since this is a bug,
it makes sense to use the  tag, but it's actually an enhancement
and not a flaw, so it makes sense to use . Does anyone care
which one I choose? It's got a bug id, so I'm leaning towards  to
get the auto-link in the docs.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


DO NOT REPLY [Bug 50406] init() doesn't initialize connector any more

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50406

--- Comment #1 from Christopher Schultz  
2010-12-03 10:40:44 EST ---
How about adding a method:

public void initAndStart()
{
  init();
  start();
}

Commons-daemon can use that. Of course, this introduces an API incompatibility
and users will have to have a minimum commons-daemon version to work properly
with TC 7.0.x.

Or would it be better to revert the recent patch and create new methods with
different semantics? Since TC 7 is not considered stable (yet), it seems okay
to change the API like this. On the other hand, it impacts an external project.

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

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



Re: My [commit] first to 7.x

2010-12-03 Thread Christopher Schultz
All,

Duh, nevermind.

-chris

On 12/3/2010 10:37 AM, Christopher Schultz wrote:
> Mark,
> 
> On 12/2/2010 5:24 PM, Mark Thomas wrote:
>> On 02/12/2010 21:25, Christopher Schultz wrote:
>>> Then, should I update the changelog.xml?
>> Yes.
> 
> Great. It looks like the format is latest-on-top. Since this is a bug,
> it makes sense to use the  tag, but it's actually an enhancement
> and not a flaw, so it makes sense to use . Does anyone care
> which one I choose? It's got a bug id, so I'm leaning towards  to
> get the auto-link in the docs.
> 
> Thanks,
> -chris
> 



signature.asc
Description: OpenPGP digital signature


svn commit: r1041892 - in /tomcat/trunk: java/org/apache/catalina/connector/ test/org/apache/catalina/connector/ webapps/docs/ webapps/docs/config/

2010-12-03 Thread schultz
Author: schultz
Date: Fri Dec  3 16:07:50 2010
New Revision: 1041892

URL: http://svn.apache.org/viewvc?rev=1041892&view=rev
Log:
Fixed bug 48692: Provide option to parse application/x-www-form-urlencoded PUT 
requests

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1041892&r1=1041891&r2=1041892&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri Dec  3 
16:07:50 2010
@@ -18,7 +18,9 @@
 
 package org.apache.catalina.connector;
 
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.HashSet;
 
 import javax.management.ObjectName;
 
@@ -38,7 +40,7 @@ import org.apache.tomcat.util.res.String
 
 
 /**
- * Implementation of a Coyote connector for Tomcat 5.x.
+ * Implementation of a Coyote connector.
  *
  * @author Craig R. McClanahan
  * @author Remy Maucherat
@@ -184,6 +186,11 @@ public class Connector extends Lifecycle
 protected int maxSavePostSize = 4 * 1024;
 
 
+protected String parseBodyMethods = "POST";
+
+protected HashSet parseBodyMethodsSet;
+
+
 /**
  * Flag to use IP-based virtual hosting.
  */
@@ -449,6 +456,30 @@ public class Connector extends Lifecycle
 }
 
 
+public String getParseBodyMethods()
+{
+return (this.parseBodyMethods);
+}
+
+public void setParseBodyMethods(String methods)
+{
+HashSet methodSet = new HashSet();
+
+if(null != methods)
+methodSet.addAll(Arrays.asList(methods.split("\\s*,\\s*")));
+
+if(methodSet.contains("TRACE"))
+throw new IllegalArgumentException("TRACE method MUST NOT include 
an entity (see RFC 2616 Section 9.6)");
+
+this.parseBodyMethods = methods;
+this.parseBodyMethodsSet = methodSet;
+}
+
+public boolean isParseBodyMethod(String method)
+{
+return parseBodyMethodsSet.contains(method);
+}
+
 /**
  * Return the port number on which we listen for requests.
  */
@@ -866,6 +897,10 @@ public class Connector extends Lifecycle
 protocolHandler.setAdapter(adapter);
 protocolHandler.setDomain(getDomain());
 
+// Make sure parseBodyMethodsSet has a default
+if(null == parseBodyMethodsSet)
+setParseBodyMethods(getParseBodyMethods());
+
 try {
 protocolHandler.init();
 } catch (Exception e) {

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1041892&r1=1041891&r2=1041892&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri Dec  3 
16:07:50 2010
@@ -2798,7 +2798,7 @@ public class Request
 if (usingInputStream || usingReader)
 return;
 
-if (!getMethod().equalsIgnoreCase("POST"))
+if(!getConnector().isParseBodyMethod(getMethod()))
 return;
 
 String contentType = getContentType();

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1041892&r1=1041891&r2=1041892&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Fri Dec  3 
16:07:50 2010
@@ -23,6 +23,7 @@ import java.io.PrintWriter;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.Enumeration;
+import java.util.TreeMap;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -331,6 +332,198 @@ public class TestRequest extends TomcatB
 assertNotNull(is);
 }
 
+/**
+ * Test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=48692
+ * PUT requests should be able to fetch request parameters coming from
+ * the request body (when properly configured using the new parseBodyMethod
+ * setting).
+ */
+public void testBug48692() {
+Bug48692Client client = new Bug48692Client();
+client.setPort(getPort());
+
+// Make sure GET works properly
+client.doR

DO NOT REPLY [Bug 48692] Provide option to parse application/x-www-form-urlencoded PUT requests

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48692

--- Comment #14 from Christopher Schultz  
2010-12-03 11:11:26 EST ---
Fixed in trunk. Will be included in Tomcat 7.0.6.

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

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



DO NOT REPLY [Bug 48692] Provide option to parse application/x-www-form-urlencoded PUT requests

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48692

Christopher Schultz  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

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

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



Adding utility classes

2010-12-03 Thread Christopher Schultz
All,

There's an annoyance bug
(https://issues.apache.org/bugzilla/show_bug.cgi?id=49125) that requires
a utility to convert byte arrays into readable strings. I have a patch
that includes a method to do that, but I'm unsure of where that
"toHexString" method should go.

For now, I have placed it into
java/org/apache/tomcat/util/buf/HexUtils.java because that's where I
found other hex-encoding utility methods.

Is that an appropriate place? My only concern is that it's in the
"utils/buf" package when it's not necessarily targeted at the message
buffer code.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


DO NOT REPLY [Bug 48550] Update examples and default server.xml to use UTF-8

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48550

--- Comment #2 from Christopher Schultz  
2010-12-03 11:31:00 EST ---
(In reply to comment #1)
> Please clarify what is the actual difference between these two statements:
> 
> 3) update Servlet and JSP examples to allow UTF-8 input (1) and 2) will 
> provide
> that) and to use UTF-8 as their output character encoding
> 
> 4) the servlet/JSP sources will probably stay as ISO-8859-1, as they are now

#3 means changing the examples webapp to accept UTF-8 input (shouldn't be a big
deal, as #1 and #2 provide that, as mentioned) and to set the <%...@page
pageEncoding="UTF-8" @> in order to set the output encoding.

#4 means that we won't bother re-encoding all of the JSP files as UTF-8 because
a) such a change would be surprising to users and b) it is not necessary as
those pages are probably all using pure ASCII at this point anyway

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

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



Re: My [commit] first to 7.x

2010-12-03 Thread Konstantin Kolinko
2010/12/3 Christopher Schultz :
> All,
>
> Duh, nevermind.
>
> -chris
>
> On 12/3/2010 10:37 AM, Christopher Schultz wrote:
>>
>> Great. It looks like the format is latest-on-top. Since this is a bug,
>> it makes sense to use the  tag, but it's actually an enhancement
>> and not a flaw, so it makes sense to use . Does anyone care
>> which one I choose? It's got a bug id, so I'm leaning towards  to
>> get the auto-link in the docs.
>>

Looks like you figured that already, but just to summarize:

There are //   (and , ,  that
are almost never used)  that give us category of the change.

There are  and  that can be used anywhere in the text and
give us a link to bug number and revision respectively.

You may look into tomcat-docs.xsl for how it happens.

> latest-on-top

Latest TC version on top.
In each section there are subsections (there is a comment that lists
their names in order,
).

In each subsection the changes are sorted by their bug number, the
ones without a number - in any order, but usually chronologically.


Note, that there is a list of "authors" at the top of the document.

Also, note that you can preview changelog.xml by opening it in a web
browser (it has "

Re: Adding utility classes

2010-12-03 Thread Konstantin Kolinko
2010/12/3 Christopher Schultz :
> All,
>
> There's an annoyance bug
> (https://issues.apache.org/bugzilla/show_bug.cgi?id=49125) that requires
> a utility to convert byte arrays into readable strings. I have a patch
> that includes a method to do that, but I'm unsure of where that
> "toHexString" method should go.
>
> For now, I have placed it into
> java/org/apache/tomcat/util/buf/HexUtils.java because that's where I
> found other hex-encoding utility methods.
>
> Is that an appropriate place? My only concern is that it's in the
> "utils/buf" package when it's not necessarily targeted at the message
> buffer code.
>

Personally, I do not really care where it is.  An important thing is
into what jar the class goes. We keep the jasper self-contained in 5.5
and 6.0. In TC7 we allow it to depend on the classes packed into
tomcat-util.jar.

Don't forget to set svn:eol-style=native on the added file.

Best regards,
Konstantin Kolinko

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



DO NOT REPLY [Bug 50408] New: Scoped EL variable in methodexpression is treated as Object

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50408

   Summary: Scoped EL variable in methodexpression is treated as
Object
   Product: Tomcat 7
   Version: 7.0.5
  Platform: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: bal...@gmail.com


Consider following example:


  

  ${name}${value}

  


The ${name} is a String. The ${name.class.name} also proves that. The
getHeaders(name) call however results in:

org.apache.jasper.el.JspELException: /test.jsp(23,12)
'${pageContext.response.getHeaders(name)}' java.lang.NoSuchMethodException:
org.apache.catalina.connector.ResponseFacade.getHeaders(java.lang.Object)

Another example which also results in NoSuchMethodException which suggests that
an Object is been passed as argument:


${pageContext.response.getHeader(name)}

This works all fine on Glassfish v3.

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

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



DO NOT REPLY [Bug 50407] Sessions stickyness issue.

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50407

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #4 from Mark Thomas  2010-12-03 12:37:11 EST ---
Bugzilla is not a support forum.

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

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



Re: svn commit: r1041120 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ tes

2010-12-03 Thread Mark Thomas
On 03/12/2010 08:49, Mladen Turk wrote:
> On 12/03/2010 07:43 AM, Konstantin Kolinko wrote:
>>
>> So, binding to port 80 should be performed during initialization while
>> we have the root privileges, and not during startup. Does binding to
>> port 80 still work with Tomcat 7?
>>
> 
> Created BZ50406.
> IMO the entire r1041120 should be reverted and
> BZ50360 which this patch suppose to fix should be
> either handled differently cause the problem
> was that stop() didn't close the socket (if true at the first place)

Agreed. r1041120 does need to be reverted. I'll do that shortly.

Bug 50360 is valid - there is a test case for it.

I'll have to look into an alternative solution for Bug 50360.

Mark

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



Re: svn commit: r1041120 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ tes

2010-12-03 Thread Mark Thomas
On 03/12/2010 05:45, Mladen Turk wrote:
> We would need that back or even better axe running and paused
> and creating an "state" enum.
> 
> For example the connector will report as running on start()
> even if missconfigured cause it is set before Acceptor or Pollers
> are created.
> 
> So internally both for paused and running we actually have
> pauseStarted -> paused, runningStarted -> running=true
> For stop() we have
> pausePending -> paused, runningPending -> running=false
> 
> Currently it is possible to start() while stop() is still running
> which could only happen if stop() actually ended.
> 
> Think that single eg. EndpointState enum will cover all the
> states during start(),pause(),resume(),stop() replacing multiple
> booleans (at least running and paused) with a single enum.
> 
> 
> WDTYT?

What we really need is the Lifecycle stuff that is in Catalina. We can't
use that directly since that would create a dependency from the
connectors to Catalina.

We could refactor the Lifecycle stuff out of Catalina. Put the
interfaces in o.a.tomcat and the implementation (i.e. the base classes)
in o.a.tomcat.lifecycle. I'm not completely comfortable doing that but I
like duplicating the code even less. I'm leaning towards making that change.

Regardless of the above, I think the answer to bug 50360 is a bindOnInit
property.
If true, socket is bound on init() and released on destroy()
If false, socket is bound on start() and released on stop()

Question is, should the default be true (as current, works for jsvc,
issues when embedding) or false (change from current, breaks jsvc, works
when embedding). I'm leaning towards a default of true.

Mark

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



DO NOT REPLY [Bug 50360] Server socket still bound after Embedded.stop is invoked

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360

Mark Thomas  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #8 from Mark Thomas  2010-12-03 13:00:10 EST ---
The original fix is going to have to be reverted. It caused issues with jsvc
(bug 50406) since the privileged ports need to be bound before the user id
switches to the non-root user.

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

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



svn commit: r1041940 - in /tomcat/trunk: ./ java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ test

2010-12-03 Thread markt
Author: markt
Date: Fri Dec  3 18:07:52 2010
New Revision: 1041940

URL: http://svn.apache.org/viewvc?rev=1041940&view=rev
Log:
Revert r1041120 but disable rather than delete new test

Added:
tomcat/trunk/.fbprefs
Modified:
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/coyote/ProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml

Added: tomcat/trunk/.fbprefs
URL: http://svn.apache.org/viewvc/tomcat/trunk/.fbprefs?rev=1041940&view=auto
==
--- tomcat/trunk/.fbprefs (added)
+++ tomcat/trunk/.fbprefs Fri Dec  3 18:07:52 2010
@@ -0,0 +1,127 @@
+#FindBugs User Preferences
+#Thu Dec 02 16:10:08 GMT 2010
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorCallToUnsupportedMethod=CallToUnsupportedMethod|false
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|true
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindCircularDependencies=FindCircularDependencies|false
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
+detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|true
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUn

DO NOT REPLY [Bug 50406] init() doesn't initialize connector any more

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50406

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas  2010-12-03 13:09:07 EST ---
Breaking change reverted.

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

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



Re: svn commit: r1041120 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ tes

2010-12-03 Thread Mladen Turk

On 12/03/2010 06:58 PM, Mark Thomas wrote:


Think that single eg. EndpointState enum will cover all the
states during start(),pause(),resume(),stop() replacing multiple
booleans (at least running and paused) with a single enum.


WDTYT?


What we really need is the Lifecycle stuff that is in Catalina. We can't
use that directly since that would create a dependency from the
connectors to Catalina.



A bit complex to do initially, but might offer more
fine grained lifecycle management.



Regardless of the above, I think the answer to bug 50360 is a bindOnInit
property.
If true, socket is bound on init() and released on destroy()
If false, socket is bound on start() and released on stop()

Question is, should the default be true (as current, works for jsvc,
issues when embedding) or false (change from current, breaks jsvc, works
when embedding). I'm leaning towards a default of true.



Well, breaking default means regression.
If started via Bootstrap default should be bindOnInit=true
50360 doesn't use Bootstrap, so default can be false, and
Bootstrap can set it to true.


Regards
--
^TM

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



svn commit: r1041978 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java

2010-12-03 Thread markt
Author: markt
Date: Fri Dec  3 20:23:43 2010
New Revision: 1041978

URL: http://svn.apache.org/viewvc?rev=1041978&view=rev
Log:
Need at least one test per class dummy test for unit tests to pass

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java?rev=1041978&r1=1041977&r2=1041978&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestXxxEndpoint.java Fri Dec  
3 20:23:43 2010
@@ -44,4 +44,8 @@ public class TestXxxEndpoint extends Tom
 socket.close();
 tomcat.getConnector().start();
 }
+
+public void testDummy() throws Exception {
+// NO-OP
+}
 }



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



svn commit: r1042021 - in /tomcat/trunk: java/javax/el/CompositeELResolver.java test/javax/el/ test/javax/el/TestCompositeELResolver.java test/webapp-3.0/bug50408.jsp webapps/docs/changelog.xml

2010-12-03 Thread markt
Author: markt
Date: Fri Dec  3 21:49:54 2010
New Revision: 1042021

URL: http://svn.apache.org/viewvc?rev=1042021&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50408
Fix NoSuchMethodException when using scoped variables with EL 
method invocation.

Added:
tomcat/trunk/test/javax/el/
tomcat/trunk/test/javax/el/TestCompositeELResolver.java   (with props)
tomcat/trunk/test/webapp-3.0/bug50408.jsp   (with props)
Modified:
tomcat/trunk/java/javax/el/CompositeELResolver.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/javax/el/CompositeELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/CompositeELResolver.java?rev=1042021&r1=1042020&r2=1042021&view=diff
==
--- tomcat/trunk/java/javax/el/CompositeELResolver.java (original)
+++ tomcat/trunk/java/javax/el/CompositeELResolver.java Fri Dec  3 21:49:54 2010
@@ -21,6 +21,8 @@ import java.beans.FeatureDescriptor;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
+import javax.servlet.jsp.el.ScopedAttributeELResolver;
+
 public class CompositeELResolver extends ELResolver {
 
 private int size;
@@ -118,6 +120,14 @@ public class CompositeELResolver extends
 for (int i = 0; i < sz; i++) {
 type = this.resolvers[i].getType(context, base, property);
 if (context.isPropertyResolved()) {
+if (resolvers[i] instanceof ScopedAttributeELResolver) {
+// Special case since this will always return Object.class
+Object value =
+resolvers[i].getValue(context, base, property);
+if (value != null) {
+return value.getClass();
+}
+}
 return type;
 }
 }

Added: tomcat/trunk/test/javax/el/TestCompositeELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestCompositeELResolver.java?rev=1042021&view=auto
==
--- tomcat/trunk/test/javax/el/TestCompositeELResolver.java (added)
+++ tomcat/trunk/test/javax/el/TestCompositeELResolver.java Fri Dec  3 21:49:54 
2010
@@ -0,0 +1,33 @@
+package javax.el;
+
+import java.io.File;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.util.buf.ByteChunk;
+
+public class TestCompositeELResolver extends TomcatBaseTest {
+
+public void testBug50408() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir =  new File("test/webapp-3.0");
+// app dir is relative to server home
+StandardContext ctxt = (StandardContext) tomcat.addWebapp(null,
+"/test", appDir.getAbsolutePath());
+
+// This test needs the JSTL libraries
+File lib = new File("webapps/examples/WEB-INF/lib");
+ctxt.setAliases("/WEB-INF/lib=" + lib.getCanonicalPath());
+
+tomcat.start();
+
+int rc = getUrl("http://localhost:"; + getPort() +
+"/test/bug50408.jsp", new ByteChunk(), null);
+
+assertEquals(HttpServletResponse.SC_OK, rc);
+}
+}

Propchange: tomcat/trunk/test/javax/el/TestCompositeELResolver.java
--
svn:eol-style = native

Added: tomcat/trunk/test/webapp-3.0/bug50408.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug50408.jsp?rev=1042021&view=auto
==
--- tomcat/trunk/test/webapp-3.0/bug50408.jsp (added)
+++ tomcat/trunk/test/webapp-3.0/bug50408.jsp Fri Dec  3 21:49:54 2010
@@ -0,0 +1,26 @@
+<%--
+ 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.
+--%>
+<%...@taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
+
+  
+
+  
+${name} : ${value}
+  
+
+  
+
\ No newline at end of file

Propchange: tomcat/trunk/test/webapp-3

DO NOT REPLY [Bug 50408] Scoped EL variable in methodexpression is treated as Object

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50408

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
 OS/Version||All

--- Comment #1 from Mark Thomas  2010-12-03 16:51:47 EST ---
Thanks for the report and the code snippet. That made reproducing this and
generating a test case much easier.

This has been fixed in 7.0.x and will be included in 7.0.6 onwards.

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

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



svn commit: r1042022 - in /tomcat: tc6.0.x/trunk/STATUS.txt trunk/java/org/apache/catalina/session/StandardManager.java trunk/webapps/docs/changelog.xml

2010-12-03 Thread slaurent
Author: slaurent
Date: Fri Dec  3 22:00:58 2010
New Revision: 1042022

URL: http://svn.apache.org/viewvc?rev=1042022&view=rev
Log:
bug 48973 (enhancement): Don't create SESSIONS.ser when no session exists 
https://issues.apache.org/bugzilla/show_bug.cgi?id=48973

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1042022&r1=1042021&r2=1042022&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Dec  3 22:00:58 2010
@@ -207,3 +207,10 @@ PATCHES PROPOSED TO BACKPORT:
   http://people.apache.org/~markt/patches/2010-12-02-bug50201-tc6.patch
   +1: markt
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48973
+  Avoid creating file SESSIONS.ser if there's no session.
+  The patch provided by Marc Guillemot works for tc 6 & 7
+  +1: slaurent
+  -1:
+  
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardManager.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardManager.java?rev=1042022&r1=1042021&r2=1042022&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/StandardManager.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardManager.java Fri Dec  
3 22:00:58 2010
@@ -366,6 +366,11 @@ public class StandardManager extends Man
 
 if (log.isDebugEnabled())
 log.debug("Unloading persisted sessions");
+
+if (sessions.isEmpty()) {
+log.debug("No persisted sessions to unload");
+return; // nothing to do
+}
 
 // Open an output stream to the specified pathname, if any
 File file = file();

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1042022&r1=1042021&r2=1042022&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Dec  3 22:00:58 2010
@@ -33,6 +33,7 @@
 Tim Whittington
 Mladen Turk
 Christopher Schultz
+Sylvain Laurent
 Changelog
   
 
@@ -41,6 +42,11 @@
 
   
 
+  
+48973: Avoid creating a SESSIONS.ser file when stopping an 
+application if there's no session. Patch provided by Marc Guillemot.
+(slaurent)
+  
   
 48692: Provide option to parse
 application/x-www-form-urlencoded PUT requests. (schultz)



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



DO NOT REPLY [Bug 48973] Don't create SESSIONS.ser when no session exists

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48973

--- Comment #1 from Sylvain Laurent  2010-12-03 
17:03:53 EST ---
Patch applied on trunk, it will be available for tomcat 7.0.6.
Backport to tomcat 6 proposed.

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

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



svn commit: r1042029 - in /tomcat: tc6.0.x/trunk/STATUS.txt trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java trunk/webapps/docs/changelog.xml trunk/webapps/docs/config/listener

2010-12-03 Thread slaurent
Author: slaurent
Date: Fri Dec  3 22:19:11 2010
New Revision: 1042029

URL: http://svn.apache.org/viewvc?rev=1042029&view=rev
Log:
bug 50282 : Load javax.security.auth.login.Configuration with 
JreMemoryLeakPreventionListener to avoid memory leak when stopping a webapp 
that would use JAAS.

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

tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/listeners.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1042029&r1=1042028&r2=1042029&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Dec  3 22:19:11 2010
@@ -213,4 +213,10 @@ PATCHES PROPOSED TO BACKPORT:
   The patch provided by Marc Guillemot works for tc 6 & 7
   +1: slaurent
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
+  Improve JreMemoryLeakPreventionListener to load 
+  javax.security.auth.login.Configuration to avoid redeployment leak.
+  +1: slaurent
+  -1:
   
\ No newline at end of file

Modified: 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1042029&r1=1042028&r2=1042029&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
Fri Dec  3 22:19:11 2010
@@ -107,7 +107,21 @@ public class JreMemoryLeakPreventionList
  this.securityPolicyProtection = securityPolicyProtection;
  }
  
-/**
+ /**
+  * Protect against the memory leak caused when the first call to
+  * javax.security.auth.login.Configuration is triggered by a 
web
+  * application. This first call populate a static variable with a 
reference
+  * to the context class loader. Defaults to true.
+  */
+ private boolean securityLoginConfigurationProtection = true;
+ public boolean isSecurityLoginConfigurationProtection() {
+ return securityLoginConfigurationProtection;
+ }
+ public void setSecurityLoginConfigurationProtection(boolean 
securityLoginConfigurationProtection) {
+ this.securityLoginConfigurationProtection = 
securityLoginConfigurationProtection;
+ }
+
+ /**
  * Protect against the memory leak, when the initialization of the
  * Java Cryptography Architecture is triggered by initializing
  * a MessageDigest during web application deployment.
@@ -274,6 +288,19 @@ public class JreMemoryLeakPreventionList
 }
 }
 
+
+/*
+ * Initializing javax.security.auth.login.Configuration 
retains a static reference to the context 
+ * class loader.
+ */
+if (securityLoginConfigurationProtection) {
+try {
+
Class.forName("javax.security.auth.login.Configuration", true, 
ClassLoader.getSystemClassLoader());
+} catch(ClassNotFoundException e) {
+// Ignore
+}
+}
+
 /*
  * Creating a MessageDigest during web application startup
  * initializes the Java Cryptography Architecture. Under 
certain

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1042029&r1=1042028&r2=1042029&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Dec  3 22:19:11 2010
@@ -43,6 +43,12 @@
   
 
   
+50282: Load 
javax.security.auth.login.Configuration
+with JreMemoryLeakPreventionListener to avoid memory leak
+when stopping a webapp that would use JAAS.
+(slaurent)
+  
+  
 48973: Avoid creating a SESSIONS.ser file when stopping an 
 application if there's no session. Patch provided by Marc Guillemot.
 (slaurent)

Modified: tomcat/trunk/webapps/docs/config/listeners.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1042029&r1=1042028&r2=1042029&view=diff
==
--- tomcat/trunk/webapps/docs/config/listeners.xml (original)
+++ tomcat/trunk/webapps/docs/config/listeners.xml Fri Dec  3 22:19:11 2010
@@ -270,6 +270,16 @@ service:jmx:rmi://:10002
 trigger a memory leak on reload. Defaults to

DO NOT REPLY [Bug 50282] Reference from javax.security.auth.login.LoginContext.contextClassLoader initalized in static code block prevents an undeployed Web application from being garbage collected (s

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282

--- Comment #5 from Sylvain Laurent  2010-12-03 
17:21:17 EST ---
patch applied on trunk, will be available for tomcat 7.0.6
Backport to tomcat 6 proposed.

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

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



DO NOT REPLY [Bug 50410] New: Poll.create with THREADSAFE will silently switch the flag off

2010-12-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50410

   Summary: Poll.create with THREADSAFE will silently switch the
flag off
   Product: Tomcat Native
   Version: 1.1.20
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Library
AssignedTo: dev@tomcat.apache.org
ReportedBy: cos...@apache.org


If apr returns APR_ENOTIMPL the JNI code will just turn the flag off. 
I couldn't find any way for java side to find if the create poll was or was not
threadsafe. 

There are 2 options to fix it: 
- throw an exception - seems the right thing to do, java can do the fallback
- consistent with 'wakeable' - add a field and a method to check if it's on. 

It seems Tomcat code is not using the flag, not sure why - I would go with the
first option.

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

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



Re: svn commit: r1042029 - in /tomcat: tc6.0.x/trunk/STATUS.txt trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java trunk/webapps/docs/changelog.xml trunk/webapps/docs/config/list

2010-12-03 Thread Konstantin Kolinko
2010/12/4  :
> Author: slaurent
> Date: Fri Dec  3 22:19:11 2010
> New Revision: 1042029
>
> URL: http://svn.apache.org/viewvc?rev=1042029&view=rev
> Log:
> bug 50282 : Load javax.security.auth.login.Configuration with 
> JreMemoryLeakPreventionListener to avoid memory leak when stopping a webapp 
> that would use JAAS.
>
> Modified:
>    tomcat/tc6.0.x/trunk/STATUS.txt
>    
> tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
>    tomcat/trunk/webapps/docs/changelog.xml
>    tomcat/trunk/webapps/docs/config/listeners.xml
>
> Modified: tomcat/tc6.0.x/trunk/STATUS.txt
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1042029&r1=1042028&r2=1042029&view=diff
> +
> +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
> +  Improve JreMemoryLeakPreventionListener to load
> +  javax.security.auth.login.Configuration to avoid redeployment leak.
> +  +1: slaurent
> +  -1:

You must include patch URL in your proposal. (What are we voting for?)
Thus, you usually cannot mix update to STATUS and update to trunk in
the same commit.

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1041940 - in /tomcat/trunk: ./ java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/

2010-12-03 Thread Konstantin Kolinko
2010/12/3  :
> Author: markt
> Date: Fri Dec  3 18:07:52 2010
> New Revision: 1041940
>
> URL: http://svn.apache.org/viewvc?rev=1041940&view=rev
> Log:
> Revert r1041120 but disable rather than delete new test
>
> Added:
>    tomcat/trunk/.fbprefs
> Modified:
> ...

".fbprefs" does not belong to this commit.

Best regards,
Konstantin Kolinko

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