DO NOT REPLY [Bug 38099] - Some users get: "failed appending the header value"

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 11:50 ---
Created an attachment (id=17311)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17311&action=view)
isapi_redirect log file


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

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



Re: Cutting Tomcat 5.5.15 tomorrow (Tuesday)

2006-01-03 Thread Remy Maucherat

Yoav Shapira wrote:

Happy new year everyone ;)

Unless I hear a -1 in response to this message, I will tag and cut
Tomcat 5.5.15 tomorrow (Tuesday, 3 Jan 2006) at 10am my time (EST),
which is 1500h GMT.


Are you sure all the needed clustering fixes are in ?

Rémy

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



Re: Cutting Tomcat 5.5.15 tomorrow (Tuesday)

2006-01-03 Thread Yoav Shapira
I think so, based on Filip and Peter's +1 to me asking if a release
was OK last weekend, and then I never cut that release...

On 1/3/06, Remy Maucherat <[EMAIL PROTECTED]> wrote:
> Yoav Shapira wrote:
> > Happy new year everyone ;)
> >
> > Unless I hear a -1 in response to this message, I will tag and cut
> > Tomcat 5.5.15 tomorrow (Tuesday, 3 Jan 2006) at 10am my time (EST),
> > which is 1500h GMT.
>
> Are you sure all the needed clustering fixes are in ?
>
> Rémy
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

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



svn commit: r365649 - /tomcat/build/tags/tc5.5.x/TOMCAT_5_5_15/

2006-01-03 Thread yoavs
Author: yoavs
Date: Tue Jan  3 07:00:24 2006
New Revision: 365649

URL: http://svn.apache.org/viewcvs?rev=365649&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_15.

Added:
tomcat/build/tags/tc5.5.x/TOMCAT_5_5_15/
  - copied from r365648, tomcat/build/tc5.5.x/


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



svn commit: r365650 - /tomcat/connectors/tags/tc5.5.x/TOMCAT_5_5_15/

2006-01-03 Thread yoavs
Author: yoavs
Date: Tue Jan  3 07:00:24 2006
New Revision: 365650

URL: http://svn.apache.org/viewcvs?rev=365650&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_15.

Added:
tomcat/connectors/tags/tc5.5.x/TOMCAT_5_5_15/
  - copied from r365649, tomcat/connectors/trunk/


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



svn commit: r365651 - /tomcat/container/tags/tc5.5.x/TOMCAT_5_5_15/

2006-01-03 Thread yoavs
Author: yoavs
Date: Tue Jan  3 07:00:25 2006
New Revision: 365651

URL: http://svn.apache.org/viewcvs?rev=365651&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_15.

Added:
tomcat/container/tags/tc5.5.x/TOMCAT_5_5_15/
  - copied from r365650, tomcat/container/tc5.5.x/


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



svn commit: r365652 - /tomcat/jasper/tags/tc5.5.x/TOMCAT_5_5_15/

2006-01-03 Thread yoavs
Author: yoavs
Date: Tue Jan  3 07:00:26 2006
New Revision: 365652

URL: http://svn.apache.org/viewcvs?rev=365652&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_15.

Added:
tomcat/jasper/tags/tc5.5.x/TOMCAT_5_5_15/
  - copied from r365651, tomcat/jasper/tc5.5.x/


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



svn commit: r365654 - /tomcat/site/tags/TOMCAT_5_5_15/

2006-01-03 Thread yoavs
Author: yoavs
Date: Tue Jan  3 07:00:27 2006
New Revision: 365654

URL: http://svn.apache.org/viewcvs?rev=365654&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_15.

Added:
tomcat/site/tags/TOMCAT_5_5_15/
  - copied from r365653, tomcat/site/trunk/


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



svn commit: r365653 - /tomcat/servletapi/tags/servlet2.4-jsp2.0-tc5.x/TOMCAT_5_5_15/

2006-01-03 Thread yoavs
Author: yoavs
Date: Tue Jan  3 07:00:27 2006
New Revision: 365653

URL: http://svn.apache.org/viewcvs?rev=365653&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_15.

Added:
tomcat/servletapi/tags/servlet2.4-jsp2.0-tc5.x/TOMCAT_5_5_15/
  - copied from r365652, tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/


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



DO NOT REPLY [Bug 38095] - do not produce java code using "unchecked or unsafe operations"

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 16:10 ---
now that the ant guys helped my how to place the Xlint (thx!), I get

[javac] \build\jspC\org\apache\jsp\build\
jsp\listinbox_005fen_jsp.java:14: warning: [unchecked] unchecked call to add(E)
as a member of the raw type java.util.Vector
[javac] _jspx_dependants.add("/WEB-INF/lib/struts-bean.tld");
[javac] ^
...
[javac] _jspx_dependants.add("/WEB-INF/lib/struts-html.tld");
...
[javac] _jspx_dependants.add("/WEB-INF/lib/struts-logic.tld");
...

that is obviously caused in the jsp by my
<%@ taglib
uri="/WEB-INF/lib/struts-bean.tld" prefix="bean" %><%@ taglib
uri="/WEB-INF/lib/struts-html.tld" prefix="html" %><%@ taglib
uri="/WEB-INF/lib/struts-logic.tld" prefix="logic" %>
prefix.

But this is as per the example in
http://struts.apache.org/struts-taglib/indexedprops.html what should this look 
like?
Should this be re-assigned to struts?

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

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



DO NOT REPLY [Bug 23950] - [PATCH] Context.listBindings(...) broken?

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 16:34 ---
Created an attachment (id=17315)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17315&action=view)
Possible patch to address this issue

Here is an updated (and less ambitious) patch that should address the
listBinding issue noted.

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

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



DO NOT REPLY [Bug 23950] - [PATCH] Context.listBindings(...) broken?

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 16:35 ---
Created an attachment (id=17316)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17316&action=view)
server.xml snippet to support test case


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

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



DO NOT REPLY [Bug 23950] - [PATCH] Context.listBindings(...) broken?

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 16:37 ---
Created an attachment (id=17317)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17317&action=view)
jar file containing test ObjectFactory and Object classes and sources


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

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



DO NOT REPLY [Bug 23950] - [PATCH] Context.listBindings(...) broken?

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 16:37 ---
Created an attachment (id=17318)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17318&action=view)
JSP to support test case


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

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



DO NOT REPLY [Bug 23950] - [PATCH] Context.listBindings(...) broken?

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

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 16:46 ---
Sorry about the lack of clarification on this one.  The problem seems to arise 
when using a custom ObjectFactory.  To reproduce the problem:

place uploaded JSP into webapp
place uploaded (ObjectFactory) jar file in WEB-INF/lib
edit server.xml to uploaded snippet:



  
factoryfactory.TestObjectFactory




The JSP verifies that the listBinding method return an appropriate class type 
for the foo object in the list Context.  The current implementation returns an 
instance of org.apache.naming.ResourceRef instead of TestObject.  The 
listBindings method seems to work fine for primitives defined as Environment 
objects.

The patch included is against the latest branch of Tomcat (I'm not sure how the 
naming subpackage is distributed and whether the changes can apply to less 
recent versions).  In an effort to maintain pre-1.4 compatibility some 
compromises are made in the exception handling of the nextElement and next 
methods -- it would be preferable for it use a 1.4 nested Exception.

I hope this helps.  Thanks!

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

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



DO NOT REPLY [Bug 38107] New: - memory leak when using https

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

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

   Summary: memory leak when using https
   Product: Tomcat 5
   Version: 5.5.12
  Platform: Other
OS/Version: Windows Server 2003
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connector:HTTP
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


There is a small memory leak when the ssl connector is used:
I've configured a connector for a https port:

and have written a small program that fetches the tomcat root page 1 times 
(using a commons-httpclient-wrapper):
String url = "https://tomcathost:18090/";;
for(int i = 0; i < count; i++){
HttpURLConnection con = handler.sendGetRequest(url, null);
handler.endRequest(con, con.getInputStream());
if((i % 100) == 0){
int percent = (i * 100) / count;
System.out.println(percent + "% done");
   }
}
The result is a permanent increasing memory usage watched in windows task 
manager for the tomcat5 process (1 requests causes a growth of 2036 KB). 
There is no memory leak using the http connector (without ssl). I've tried the 
tomcat versions 5.5.9 and 5.5.12 with the same result.

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

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



DO NOT REPLY [Bug 37350] - Problems serving large (50k+) static images on linux

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 20:48 ---
(In reply to comment #5)
> (In reply to comment #4)
> 
> I take it back, I installed from the 5.5.12 tarball, not the rpm package. I
> still have the tarball if anybody wants it. Curiously though, I yanked the
> latest tarball off of apache and the latest tarball has the *right* .jar in 
> it.
> The tarball I have has the *wrong* .jar in it. Looks like somebody already 
> fixed
> this after I got my tarball.
> 

I was having the same problem on a windows machine, and I copied the naming*.jar
from the beta 5.5.14 and all is well now.

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

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



svn commit: r365735 - in /tomcat/container/branches/tc4.1.x: catalina/src/share/org/apache/catalina/mbeans/ catalina/src/share/org/apache/catalina/realm/ webapps/admin/WEB-INF/ webapps/admin/WEB-INF/c

2006-01-03 Thread markt
Author: markt
Date: Tue Jan  3 12:24:27 2006
New Revision: 365735

URL: http://svn.apache.org/viewcvs?rev=365735&view=rev
Log:
Fix bug 16185 by porting support for localDataSource attribute from TC5

Added:

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/DataSourceRealmForm.java
   (with props)

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/SaveDataSourceRealmAction.java
   (with props)
tomcat/container/branches/tc4.1.x/webapps/admin/realm/dataSourceRealm.jsp   
(with props)
Modified:

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/AddRealmAction.java

tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm/EditRealmAction.java
tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/struts-config.xml
tomcat/container/branches/tc4.1.x/webapps/admin/resources/dataSources.jspf
tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/config/realm.xml
tomcat/container/branches/tc4.1.x/webapps/tomcat-docs/realm-howto.xml

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml?rev=365735&r1=365734&r2=365735&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
 Tue Jan  3 12:24:27 2006
@@ -353,6 +353,11 @@
 group="Realm"
  type="org.apache.catalina.realm.DataSourceRealm">
 
+
+
 
@@ -365,6 +370,10 @@
   description="Digest algorithm used in storing passwords in a
 non-plaintext format"
  type="java.lang.String"/>
+
+
 
 http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java?rev=365735&r1=365734&r2=365735&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/realm/DataSourceRealm.java
 Tue Jan  3 12:24:27 2006
@@ -32,6 +32,7 @@
 import org.apache.catalina.ServerFactory;
 import org.apache.catalina.core.StandardServer;
 import org.apache.catalina.util.StringManager;
+import org.apache.naming.ContextBindings;
 
 /**
 *
@@ -79,6 +80,12 @@
 
 
 /**
+ * Does this realm use a context local datasource.
+ */
+protected boolean localDataSource = false;
+
+
+/**
  * Descriptive information about this Realm implementation.
  */
 protected static final String name = "DataSourceRealm";
@@ -142,6 +149,23 @@
 }
 
 /**
+ * Return if the datasource will be looked up in the webapp JNDI Context.
+ */
+public boolean getLocalDataSource() {
+return localDataSource;
+}
+
+/**
+ * Set to true to cause the datasource to be looked up in the webapp JNDI
+ * Context.
+ *
+ * @param localDataSource the new flag value
+ */
+public void setLocalDataSource(boolean localDataSource) {
+this.localDataSource = localDataSource;
+}
+
+/**
  * Return the column in the user role table that names a role.
  *
  */
@@ -360,8 +384,15 @@
 private Connection open() {
 
 try {
-StandardServer server = (StandardServer) ServerFactory.getServer();
-Context context = server.getGlobalNamingContext();
+Context context = null;
+if (localDataSource) {
+context = ContextBindings.getClassLoader();
+context = (Context) context.lookup("comp/env");
+} else {
+StandardServer server = 
+(StandardServer) ServerFactory.getServer();
+context = server.getGlobalNamingContext();
+}
 DataSource dataSource = (DataSource)context.lookup(dataSourceName);
 return dataSource.getConnection();
 } catch (Exception e) {

Modified: 
tomcat/container/branches/tc4.1.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties
URL: 
http://svn.apache.

DO NOT REPLY [Bug 16185] - UserDatabase is not bound in this context

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

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


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 21:25 ---
This has been fixed in SVN by porting support for the localDataSource attribute
on the DataSourceRealm from TC5.5.x

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

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



DO NOT REPLY [Bug 23950] - [PATCH] Context.listBindings(...) broken?

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

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





--- Additional Comments From [EMAIL PROTECTED]  2006-01-03 22:41 ---
Thanks for the clarification and a special thanks for the test case.

I think I can see what the problem is. Have a quick read of section 5.1.5 of
this link first 
http://java.sun.com/j2se/1.4.2/docs/guide/jndi/spec/jndi/jndi.5.html

Some of the objects being returned, including those created by a custom
ObjectFactory are References. To quote part of the doc referenced above "When
the result of an operation such as Context.lookup() or Binding.getObject() is a
Reference object, JNDI attempts to convert the reference into the object that it
represents before returning it to the client."

As far as I can see, there is no code in Binding.getObject() that will do this.
Tomcat implements it's own Context and there is code in NamingContext.lookup()
that resolves references (aka external links). It isn't completely clear to me
right now where this lookup should occur in the case of Context.listBindings()
but as far as I can tell, if we add a if (entry.value instanceof
Reference) test in NamingContextBindingsEnumeration and resolve any
References we find it should fix the problem. I'll work on a patch to do this.

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

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



Re: Cutting Tomcat 5.5.15 tomorrow (Tuesday)

2006-01-03 Thread Peter Rossbach

Hey,

all my clustering fixes are committed. Fine, than I can start to  
finish the cross context session replication  feature.


Thanks
Peter

Am 03.01.2006 um 14:41 schrieb Yoav Shapira:


I think so, based on Filip and Peter's +1 to me asking if a release
was OK last weekend, and then I never cut that release...

On 1/3/06, Remy Maucherat <[EMAIL PROTECTED]> wrote:

Yoav Shapira wrote:

Happy new year everyone ;)

Unless I hear a -1 in response to this message, I will tag and cut
Tomcat 5.5.15 tomorrow (Tuesday, 3 Jan 2006) at 10am my time (EST),
which is 1500h GMT.


Are you sure all the needed clustering fixes are in ?

Rémy

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





--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

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





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



DO NOT REPLY [Bug 38113] New: - getQueryString returns null instead of empty-string

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

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

   Summary: getQueryString returns null instead of empty-string
   Product: Tomcat 5
   Version: 5.5.12
  Platform: All
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The method getQueryString in class org.apache.catalina.connector.Request returns
null, instead of an empty string for a URL of the form http://foo/bar? as
required by the specification.  A correct implementation of the method is as
follows:

/**
 * Return the query string associated with this request.
 */
public String getQueryString() {
Object qStrObj = coyoteRequest.queryString();
return ((qStrObj == null) ? null : qStrObj.toString());
}

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

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



svn commit: r365816 - /tomcat/sandbox/java/org/apache/tomcat/util/threads/ThreadPool.java

2006-01-03 Thread costin
Author: costin
Date: Tue Jan  3 20:10:57 2006
New Revision: 365816

URL: http://svn.apache.org/viewcvs?rev=365816&view=rev
Log:
Since this is sandbox, let's see if we can get rid of the monitor
thread, and instead do the same checks on each worker thread, before
and after a task is performed. Also expose the controller, to make it 
a bit more flexible and avoid wrappings


Modified:
tomcat/sandbox/java/org/apache/tomcat/util/threads/ThreadPool.java

Modified: tomcat/sandbox/java/org/apache/tomcat/util/threads/ThreadPool.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/util/threads/ThreadPool.java?rev=365816&r1=365815&r2=365816&view=diff
==
--- tomcat/sandbox/java/org/apache/tomcat/util/threads/ThreadPool.java 
(original)
+++ tomcat/sandbox/java/org/apache/tomcat/util/threads/ThreadPool.java Tue Jan  
3 20:10:57 2006
@@ -45,7 +45,6 @@
 public static final int MAX_THREADS_MIN = 10;
 public static final int MAX_SPARE_THREADS = 50;
 public static final int MIN_SPARE_THREADS = 4;
-public static final int WORK_WAIT_TIMEOUT = 60*1000;
 
 /*
  * Where the threads are held.
@@ -53,12 +52,6 @@
 protected ControlRunnable[] pool = null;
 
 /*
- * A monitor thread that monitors the pool for idel threads.
- */
-protected MonitorRunnable monitor;
-
-
-/*
  * Max number of threads that you can open in the pool.
  */
 protected int maxThreads;
@@ -146,13 +139,6 @@
 pool = new ControlRunnable[maxThreads];
 
 openThreads(minSpareThreads);
-if (maxSpareThreads < maxThreads) {
-monitor = new MonitorRunnable(this);
-}
-}
-
-public MonitorRunnable getMonitor() {
-return monitor;
 }
   
 /**
@@ -286,7 +272,7 @@
 }
 
 public void run(Runnable r) {
-ControlRunnable c = findControlRunnable();
+ControlRunnable c = findControlRunnable(true);
 c.runIt(r);
 }
 
@@ -301,16 +287,25 @@
  * Executes a given Runnable on a thread in the pool, block if needed.
  */
 public void runIt(ThreadPoolRunnable r) {
-ControlRunnable c = findControlRunnable();
+ControlRunnable c = findControlRunnable(true);
 c.runIt(r);
 }
 
 public void runIt(ThreadPoolRunnable r, Object param) {
-ControlRunnable c = findControlRunnable();
+ControlRunnable c = findControlRunnable(true);
 c.runIt(r, param);
 }
 
-private ControlRunnable findControlRunnable() {
+/** Find a worker thread and remove it from the pool.
+ * 
+ *  If the pool is stopping, will generate a runtime exception to 
+ *  block the processing.
+ *  
+ *  
+ * @param waitForThread if true, will wait for a thread to become 
available.
+ * @return
+ */
+public ControlRunnable findControlRunnable(boolean waitForThread) {
 ControlRunnable c=null;
 
 if ( stopThePool ) {
@@ -329,6 +324,9 @@
 openThreads(toOpen);
 } else {
 logFull(log, currentThreadCount, maxThreads);
+if( ! waitForThread ) {
+return null;
+}
 // Wait for a thread to become idel.
 try {
 this.wait();
@@ -385,10 +383,6 @@
 public synchronized void shutdown() {
 if(!stopThePool) {
 stopThePool = true;
-if (monitor != null) {
-monitor.terminate();
-monitor = null;
-}
 for(int i = 0; i < currentThreadCount - currentThreadsBusy; i++) {
 try {
 pool[i].terminate();
@@ -406,6 +400,16 @@
 }
 }
 
+boolean checkSpare() {
+if( stopThePool ) {
+return true; // die, the pool is stopped
+}
+if( (currentThreadCount - currentThreadsBusy) > maxSpareThreads ) {
+return true;
+}
+return false;
+}
+
 /**
  * Called by the monitor thread to harvest idle threads.
  */
@@ -525,71 +529,9 @@
//loghelper.flush();
 }
 
-/** 
- * Periodically execute an action - cleanup in this case
- */
-public static class MonitorRunnable implements Runnable {
-ThreadPool p;
-Thread t;
-int interval=WORK_WAIT_TIMEOUT;
-booleanshouldTerminate;
-
-MonitorRunnable(ThreadPool p) {
-this.p=p;
-this.start();
-}
-
-public void start() {
-shouldTerminate = false;
-t = new Thread(this);
-t.setDaemon(p.getDaemon() );
-   t.setName(p.getName() + "-Monitor");
-t.start();
-}
-
-public void setInterval(int i ) {
-this.interval=i;
-}
-
-public void run() {
-while(

svn commit: r365855 - in /tomcat/sandbox/java/org/apache/tomcat/util/net: AcceptorEndpoint.java SimpleEndpoint.java

2006-01-03 Thread costin
Author: costin
Date: Tue Jan  3 23:42:26 2006
New Revision: 365855

URL: http://svn.apache.org/viewcvs?rev=365855&view=rev
Log:
Having all threads blocked in accept ( instead of using a thread pool
and notifications ) and simple thread management is 'simple' enough to 
be in the simple endpoint, no need for 2. 

Removed:
tomcat/sandbox/java/org/apache/tomcat/util/net/AcceptorEndpoint.java
Modified:
tomcat/sandbox/java/org/apache/tomcat/util/net/SimpleEndpoint.java

Modified: tomcat/sandbox/java/org/apache/tomcat/util/net/SimpleEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/util/net/SimpleEndpoint.java?rev=365855&r1=365854&r2=365855&view=diff
==
--- tomcat/sandbox/java/org/apache/tomcat/util/net/SimpleEndpoint.java 
(original)
+++ tomcat/sandbox/java/org/apache/tomcat/util/net/SimpleEndpoint.java Tue Jan  
3 23:42:26 2006
@@ -26,6 +26,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
 
 /**
@@ -47,11 +48,14 @@
 static Log log=LogFactory.getLog(SimpleEndpoint.class );
 
 private final Object threadSync = new Object();
+
+// active acceptors
+private int acceptors=0;
 
-/* The background thread. */
-private Thread thread = null;
 
 public SimpleEndpoint() {
+maxSpareThreads = 4;
+minSpareThreads = 1;
 }
 
 
@@ -73,14 +77,6 @@
 if( serverTimeout >= 0 )
 serverSocket.setSoTimeout( serverTimeout );
 
-thread = new Thread(this, "SimpleEP");
-thread.setDaemon(daemon);
-if( getThreadPriority() > 0 ) {
-thread.setPriority(getThreadPriority());
-}
-thread.setDaemon(true);
-thread.start();
-
 } catch( IOException ex ) {
 throw ex;
 }
@@ -93,9 +89,52 @@
 }
 running = true;
 paused = false;
+if( maxSpareThreads == minSpareThreads ) {
+maxSpareThreads = minSpareThreads + 4;
+}
+
+// Start the first thread
+checkSpares();
+}
+
+/** Check the spare situation. If not enough - create more.
+ * If too many - return true to end this.
+ * 
+ * This is the main method to handle the number of threads.
+ * 
+ * @return
+ */
+boolean checkSpares() {
+// make sure we have min spare threads
+while( (acceptors - curThreads ) < minSpareThreads ) {
+if( acceptors >= maxThreads ) {
+// limit reached, we won't accept any more requests. 
+} else {
+newAcceptor();
+}
+}
 
+if( acceptors - curThreads > maxSpareThreads ) {
+threadEnd( Thread.currentThread() );
+return true; // this one should go
+}
+
+return false;
 }
 
+void newAcceptor() {
+acceptors++;
+Thread t=new ThreadWithAttributes( this, new AcceptorRunnable());
+t.setName("Tomcat-" + acceptors);
+if( threadPriority > 0 ) {
+t.setPriority(threadPriority);
+}
+t.setDaemon(daemon);
+threadStart( t );
+t.start();
+}
+
+
 public void pauseEndpoint() {
 if (running && !paused) {
 paused = true;
@@ -254,7 +293,7 @@
 return accepted;
 }
 
-protected void processSocket(Socket s, TcpConnection con, Object[] 
threadData) {
+public void processSocket(Socket s, TcpConnection con, Object[] 
threadData) {
 // Process the connection
 int step = 1;
 try {
@@ -299,81 +338,63 @@
 }
 }
 
-
-/**
- * Accept, dispatch on a new thread. May benefit from VM thread pooling, 
but
- * the goal is to minimize the number of resources used.
- * 
- * TODO: change this to use NIO, use the thread for other control events
- * ( timers, etc ) that would require a separate thread.
- * 
- * TODO: maybe add back ability to do pooling, by refactoring ThreadPool
- * or adding some optional interface. Maybe better abstract the other 
endpoint 
- * thread models in a new TP interface.
- */
 public void run() {
+// nothing here, all action is in AcceptorRunnable
+}
 
-// Loop until we receive a shutdown command
-while (running) {
+class AcceptorRunnable implements Runnable {
+private TcpConnection con = new TcpConnection();
 
-// Loop if endpoint is paused
-while (paused) {
-try {
-Thread.sleep(1000);
-} catch (InterruptedException e) {
-// Ignore
+
+/**
+ * Accept, dispatch on a new thread. May benefit from VM thread 
pooling, but
+ * the 

svn commit: r365856 - in /tomcat/sandbox/java/org/apache/tomcat/util/net/apr: ./ AprByteChannel.java AprEndpoint.java AprFileChannel.java AprSocket.java

2006-01-03 Thread costin
Author: costin
Date: Tue Jan  3 23:45:04 2006
New Revision: 365856

URL: http://svn.apache.org/viewcvs?rev=365856&view=rev
Log:
Remove duplicate code, few more attempts to find a 'consistent' way to
deal with apr by implementing nio interfaces using apr. 


Added:
tomcat/sandbox/java/org/apache/tomcat/util/net/apr/
tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprByteChannel.java
tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprEndpoint.java
  - copied, changed from r348662, 
tomcat/sandbox/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprFileChannel.java
tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprSocket.java

Added: tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprByteChannel.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprByteChannel.java?rev=365856&view=auto
==
--- tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprByteChannel.java 
(added)
+++ tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprByteChannel.java Tue 
Jan  3 23:45:04 2006
@@ -0,0 +1,26 @@
+/*
+ */
+package org.apache.tomcat.util.net.apr;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.ByteChannel;
+
+public class AprByteChannel implements ByteChannel {
+
+public int read(ByteBuffer dst) throws IOException {
+return 0;
+}
+
+public boolean isOpen() {
+return false;
+}
+
+public void close() throws IOException {
+}
+
+public int write(ByteBuffer src) throws IOException {
+return 0;
+}
+
+}

Copied: tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprEndpoint.java 
(from r348662, tomcat/sandbox/java/org/apache/tomcat/util/net/AprEndpoint.java)
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprEndpoint.java?p2=tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprEndpoint.java&p1=tomcat/sandbox/java/org/apache/tomcat/util/net/AprEndpoint.java&r1=348662&r2=365856&rev=365856&view=diff
==
--- tomcat/sandbox/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/sandbox/java/org/apache/tomcat/util/net/apr/AprEndpoint.java Tue Jan 
 3 23:45:04 2006
@@ -14,27 +14,26 @@
  *  limitations under the License.
  */
 
-package org.apache.tomcat.util.net;
+package org.apache.tomcat.util.net.apr;
 
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Stack;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.tomcat.jni.OS;
 import org.apache.tomcat.jni.Address;
 import org.apache.tomcat.jni.Error;
-import org.apache.tomcat.jni.File;
 import org.apache.tomcat.jni.Library;
+import org.apache.tomcat.jni.OS;
 import org.apache.tomcat.jni.Poll;
 import org.apache.tomcat.jni.Pool;
-import org.apache.tomcat.jni.Socket;
-import org.apache.tomcat.jni.Status;
 import org.apache.tomcat.jni.SSL;
 import org.apache.tomcat.jni.SSLContext;
 import org.apache.tomcat.jni.SSLSocket;
+import org.apache.tomcat.jni.Socket;
+import org.apache.tomcat.jni.Status;
+import org.apache.tomcat.util.net.PoolTcpEndpoint;
+import org.apache.tomcat.util.net.TcpConnection;
+import org.apache.tomcat.util.net.TcpConnectionHandler;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
@@ -221,23 +220,6 @@
 return sendfileSize; 
 }
 
-
-/**
- * Server socket port.
- */
-protected int port;
-public int getPort() { return port; }
-public void setPort(int port ) { this.port=port; }
-
-
-/**
- * Address for the server socket.
- */
-protected InetAddress address;
-public InetAddress getAddress() { return address; }
-public void setAddress(InetAddress address) { this.address = address; }
-
-
 /**
  * Handling of accepted sockets.
  */
@@ -261,32 +243,6 @@
 
 
 /**
- * Socket TCP no delay.
- */
-protected boolean tcpNoDelay = false;
-public boolean getTcpNoDelay() { return tcpNoDelay; }
-public void setTcpNoDelay(boolean tcpNoDelay) { this.tcpNoDelay = 
tcpNoDelay; }
-
-
-/**
- * Socket linger.
- */
-protected int soLinger = 100;
-public int getSoLinger() { return soLinger; }
-public void setSoLinger(int soLinger) { this.soLinger = soLinger; }
-
-
-/**
- * Socket timeout.
- */
-protected int soTimeout = -1;
-public int getSoTimeout() { return soTimeout; }
-public void setSoTimeout(int soTimeout) { 
-this.soTimeout = soTimeout;
-}
-
-
-/**
  * Timeout on first request read before going to the poller, in ms.
  */
 protected int firstReadTimeout = 100;
@@ -304,25 +260,6 @@
 this.pollTime = pollTime;
 }
 
-
- 

svn commit: r365857 - in /tomcat/sandbox/java/org/apache/tomcat/util/net: ./ javaio/ nio/

2006-01-03 Thread costin
Author: costin
Date: Tue Jan  3 23:48:20 2006
New Revision: 365857

URL: http://svn.apache.org/viewcvs?rev=365857&view=rev
Log:
Moving code around, so it can be used at the same time with the old one
( if needed ) and to make it easier to exclude or package. 

The old endpoint is in javaio, with the ssl abstractions that don't
fit APR nor NIO. 

Few more simplifications and fixes to nio to reduce the thread use (
same as in LeaderFollower I think )




Added:
tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/

tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/DefaultServerSocketFactory.java
  - copied, changed from r348654, 
tomcat/sandbox/java/org/apache/tomcat/util/net/DefaultServerSocketFactory.java

tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/LeaderFollowerEndpoint.java
  - copied, changed from r348656, 
tomcat/sandbox/java/org/apache/tomcat/util/net/LeaderFollowerEndpoint.java

tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/LeaderFollowerWorkerThread.java
  - copied, changed from r348662, 
tomcat/sandbox/java/org/apache/tomcat/util/net/LeaderFollowerWorkerThread.java

tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/MasterSlaveEndpoint.java
  - copied, changed from r348656, 
tomcat/sandbox/java/org/apache/tomcat/util/net/MasterSlaveEndpoint.java

tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/MasterSlaveWorkerThread.java
  - copied, changed from r348662, 
tomcat/sandbox/java/org/apache/tomcat/util/net/MasterSlaveWorkerThread.java
tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/SSLImplementation.java
  - copied, changed from r348654, 
tomcat/sandbox/java/org/apache/tomcat/util/net/SSLImplementation.java
tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/SSLSupport.java
  - copied, changed from r348654, 
tomcat/sandbox/java/org/apache/tomcat/util/net/SSLSupport.java

tomcat/sandbox/java/org/apache/tomcat/util/net/javaio/ServerSocketFactory.java
  - copied, changed from r348654, 
tomcat/sandbox/java/org/apache/tomcat/util/net/ServerSocketFactory.java
tomcat/sandbox/java/org/apache/tomcat/util/net/nio/
tomcat/sandbox/java/org/apache/tomcat/util/net/nio/NioEndpoint.java
  - copied, changed from r349085, 
tomcat/sandbox/java/org/apache/tomcat/util/net/NioEndpoint.java
Removed:
tomcat/sandbox/java/org/apache/tomcat/util/net/AprEndpoint.java

tomcat/sandbox/java/org/apache/tomcat/util/net/DefaultServerSocketFactory.java
tomcat/sandbox/java/org/apache/tomcat/util/net/LeaderFollowerEndpoint.java

tomcat/sandbox/java/org/apache/tomcat/util/net/LeaderFollowerWorkerThread.java
tomcat/sandbox/java/org/apache/tomcat/util/net/MasterSlaveEndpoint.java
tomcat/sandbox/java/org/apache/tomcat/util/net/MasterSlaveWorkerThread.java
tomcat/sandbox/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/sandbox/java/org/apache/tomcat/util/net/SSLImplementation.java
tomcat/sandbox/java/org/apache/tomcat/util/net/SSLSupport.java
tomcat/sandbox/java/org/apache/tomcat/util/net/ServerSocketFactory.java
Modified:
tomcat/sandbox/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java

Modified: tomcat/sandbox/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java?rev=365857&r1=365856&r2=365857&view=diff
==
--- tomcat/sandbox/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java 
(original)
+++ tomcat/sandbox/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java Tue Jan 
 3 23:48:20 2006
@@ -26,8 +26,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadPool;
-import org.apache.tomcat.util.threads.ThreadPool.ThreadPoolListener;
 
 /* Similar with MPM module in Apache2.0. Handles all the details related with
"tcp server" functionality - thread management, accept policy, etc.
@@ -54,7 +52,7 @@
  */
 public class PoolTcpEndpoint implements Runnable { // implements Endpoint {
 
-static Log log=LogFactory.getLog(PoolTcpEndpoint.class );
+protected static Log log=LogFactory.getLog(PoolTcpEndpoint.class );
 
 protected StringManager sm = 
 StringManager.getManager("org.apache.tomcat.util.net.res");
@@ -89,7 +87,7 @@
 protected int maxThreads = 20;
 protected int maxSpareThreads = 20;
 protected int minSpareThreads = 20;
-protected String type;
+protected String type = "default";
 
 protected String name = "EP"; // base name for threads
 
@@ -98,6 +96,8 @@
 protected boolean daemon = true;
 
 private ArrayList listeners = new ArrayList();
+
+private boolean polling;
 
 public PoolTcpEndpoint() {
 }
@@ -105,16 +105,16 @@
 public static PoolTcpEndpoint getEndpoint(String type) {
 String cn 

svn commit: r365858 - /tomcat/sandbox/java/org/apache/tomcat/util/buf/ByteChunk.java

2006-01-03 Thread costin
Author: costin
Date: Tue Jan  3 23:48:42 2006
New Revision: 365858

URL: http://svn.apache.org/viewcvs?rev=365858&view=rev
Log:
few extra checks 

Modified:
tomcat/sandbox/java/org/apache/tomcat/util/buf/ByteChunk.java

Modified: tomcat/sandbox/java/org/apache/tomcat/util/buf/ByteChunk.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/tomcat/util/buf/ByteChunk.java?rev=365858&r1=365857&r2=365858&view=diff
==
--- tomcat/sandbox/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/sandbox/java/org/apache/tomcat/util/buf/ByteChunk.java Tue Jan  3 
23:48:42 2006
@@ -690,15 +690,19 @@
 int myPos=i+1;
 
 // not enough chars to have a match
-if( i + srcLen >= end ) {
+if( myPos + srcLen >= end ) {
 break;
 }
 
+try {
for( int srcPos=srcOff + 1; srcPos< srcEnd; ) {
 if( bb.get(myPos++) != src.charAt( srcPos++ ))
break;
 if( srcPos==srcEnd ) return i-start; // found it
}
+} catch( Throwable t ) {
+t.printStackTrace();
+}
}
return -1;
 }



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



svn commit: r365859 - in /tomcat/sandbox/java/org/apache/coyote/http11: Http11BaseProtocol.java Http11Processor.java Http11Protocol.java apr/Http11AprBaseProtocol.java apr/Http11AprProcessor.java

2006-01-03 Thread costin
Author: costin
Date: Tue Jan  3 23:51:50 2006
New Revision: 365859

URL: http://svn.apache.org/viewcvs?rev=365859&view=rev
Log:
Update for the new apr package, remove the old ssl abstraction.

Since APR and NIO can't use the SocketFactory, nor JK - it doesn't make
any sense to keep it for anything but the old-style connector ( which
should be deprecated/removed eventually ). 
This also brings APR, NIO, JK closer in how they can deal with SSL.


Modified:
tomcat/sandbox/java/org/apache/coyote/http11/Http11BaseProtocol.java
tomcat/sandbox/java/org/apache/coyote/http11/Http11Processor.java
tomcat/sandbox/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/sandbox/java/org/apache/coyote/http11/apr/Http11AprBaseProtocol.java
tomcat/sandbox/java/org/apache/coyote/http11/apr/Http11AprProcessor.java

Modified: tomcat/sandbox/java/org/apache/coyote/http11/Http11BaseProtocol.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/coyote/http11/Http11BaseProtocol.java?rev=365859&r1=365858&r2=365859&view=diff
==
--- tomcat/sandbox/java/org/apache/coyote/http11/Http11BaseProtocol.java 
(original)
+++ tomcat/sandbox/java/org/apache/coyote/http11/Http11BaseProtocol.java Tue 
Jan  3 23:51:50 2006
@@ -32,11 +32,11 @@
 import org.apache.coyote.ProtocolHandler;
 import org.apache.coyote.RequestGroupInfo;
 import org.apache.tomcat.util.net.PoolTcpEndpoint;
-import org.apache.tomcat.util.net.SSLImplementation;
-import org.apache.tomcat.util.net.SSLSupport;
-import org.apache.tomcat.util.net.ServerSocketFactory;
 import org.apache.tomcat.util.net.TcpConnection;
 import org.apache.tomcat.util.net.TcpConnectionHandler;
+//import org.apache.tomcat.util.net.javaio.SSLImplementation;
+//import org.apache.tomcat.util.net.javaio.SSLSupport;
+//import org.apache.tomcat.util.net.javaio.ServerSocketFactory;
 import org.apache.tomcat.util.res.StringManager;
 
 
@@ -124,6 +124,7 @@
 throw ex;
 }
 
+/* Endpoint should know about ssl.
 if( socketFactory!=null ) {
 Enumeration attE=attributes.keys();
 while( attE.hasMoreElements() ) {
@@ -132,6 +133,7 @@
 socketFactory.setAttribute( key, v );
 }
 }
+*/
 
 // XXX get domain from registration
 try {
@@ -186,12 +188,13 @@
 
 //  Properties
 // 
-protected PoolTcpEndpoint ep= PoolTcpEndpoint.getEndpoint("acc");
+protected PoolTcpEndpoint ep= PoolTcpEndpoint.getEndpoint(null);
 
 protected boolean secure;
 
-protected ServerSocketFactory socketFactory;
-protected SSLImplementation sslImplementation;
+// Old style, no longer supported by apr, nio
+//protected ServerSocketFactory socketFactory;
+//protected SSLImplementation sslImplementation;
 // socket factory attriubtes ( XXX replace with normal setters )
 protected Hashtable attributes = new Hashtable();
 protected String socketFactoryName=null;
@@ -646,7 +649,12 @@
 InputStream in = socket.getInputStream();
 OutputStream out = socket.getOutputStream();
 
-if( proto.secure ) {
+processor.setSecure( proto.secure );
+
+/* This was passing the ssl info from potocol to processor.
+ * Now endpoing knows all about ssl.
+ * 
+ if( proto.secure ) {
 SSLSupport sslSupport=null;
 if(proto.sslImplementation != null)
 sslSupport = 
proto.sslImplementation.getSSLSupport(socket);
@@ -654,6 +662,7 @@
 } else {
 processor.setSSLSupport( null );
 }
+*/
 processor.setSocket( socket );
 
 processor.process(in, out);

Modified: tomcat/sandbox/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/coyote/http11/Http11Processor.java?rev=365859&r1=365858&r2=365859&view=diff
==
--- tomcat/sandbox/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/sandbox/java/org/apache/coyote/http11/Http11Processor.java Tue Jan  
3 23:51:50 2006
@@ -51,7 +51,7 @@
 import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.MimeHeaders;
 import org.apache.tomcat.util.net.PoolTcpEndpoint;
-import org.apache.tomcat.util.net.SSLSupport;
+//import org.apache.tomcat.util.net.javaio.SSLSupport;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.threads.ThreadWithAttributes;
 
@@ -197,9 +197,14 @@
 
 
 /**
- * SSL information.
+ * SSL information - removed, specific to old-style java io
  */
-protected SSLSupport sslSupport;
+// protected