DO NOT REPLY [Bug 46183] about jvm dump file EXCEPTION_ACCESS_VIOLATION (0xc0000005)

2008-11-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46183


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-11-11 03:26:54 PST ---
That is a jvm bug. You might want to try a newer jvm or seek support from Sun.


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

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



svn commit: r713070 - in /tomcat/trunk: ./ java/org/apache/cometd/ java/org/apache/tomcat/bayeux/ modules/bayeux/ modules/bayeux/java/ modules/bayeux/java/org/ modules/bayeux/java/org/apache/ modules/

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 07:58:23 2008
New Revision: 713070

URL: http://svn.apache.org/viewvc?rev=713070&view=rev
Log:
Move the bayeux to a separate module

Added:
tomcat/trunk/modules/bayeux/
tomcat/trunk/modules/bayeux/.classpath
tomcat/trunk/modules/bayeux/.project
tomcat/trunk/modules/bayeux/build.xml
tomcat/trunk/modules/bayeux/java/
tomcat/trunk/modules/bayeux/java/org/
tomcat/trunk/modules/bayeux/java/org/apache/
tomcat/trunk/modules/bayeux/java/org/apache/cometd/
  - copied from r713063, tomcat/trunk/java/org/apache/cometd/
tomcat/trunk/modules/bayeux/java/org/apache/tomcat/
tomcat/trunk/modules/bayeux/java/org/apache/tomcat/bayeux/
  - copied from r713063, tomcat/trunk/java/org/apache/tomcat/bayeux/
tomcat/trunk/modules/bayeux/test/
tomcat/trunk/modules/bayeux/test/org/
tomcat/trunk/modules/bayeux/test/org/apache/
tomcat/trunk/modules/bayeux/test/org/apache/cometd/
tomcat/trunk/modules/bayeux/test/org/apache/cometd/bayeux/
tomcat/trunk/modules/bayeux/test/org/apache/cometd/bayeux/samples/
  - copied from r713063, tomcat/trunk/test/org/apache/cometd/bayeux/samples/
tomcat/trunk/modules/bayeux/webapps/
tomcat/trunk/modules/bayeux/webapps/cometd/
  - copied from r713063, tomcat/trunk/webapps/cometd/
Removed:
tomcat/trunk/java/org/apache/cometd/
tomcat/trunk/java/org/apache/tomcat/bayeux/
tomcat/trunk/test/org/apache/cometd/bayeux/samples/
tomcat/trunk/webapps/cometd/
Modified:
tomcat/trunk/.classpath
tomcat/trunk/extras.xml

Modified: tomcat/trunk/.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/.classpath?rev=713070&r1=713069&r2=713070&view=diff
==
--- tomcat/trunk/.classpath (original)
+++ tomcat/trunk/.classpath Tue Nov 11 07:58:23 2008
@@ -1,20 +1,4 @@
 
-
 
 

@@ -24,5 +8,7 @@
 


+   
+   

 

Modified: tomcat/trunk/extras.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/extras.xml?rev=713070&r1=713069&r2=713070&view=diff
==
--- tomcat/trunk/extras.xml (original)
+++ tomcat/trunk/extras.xml Tue Nov 11 07:58:23 2008
@@ -15,7 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
+
 
 
   
@@ -80,11 +80,6 @@
   
   
 
-  
-  
-  
-  
-
   

   
@@ -230,112 +225,6 @@

   
 
-  
-
-
-
-  
-  
-
-   
-
-
-
-  
-  
-
-
-
-
-
-  
-  
-  
-
-
-
-
-  
-
-
-
-  
-
-
-
-  
-
-
-
-  
-
-
-
-
-  
-  
-  
-
-
-
-
-  
-
-
-
-  
-
-
-
-   
-   
-   
-   
- 
-   
- 
-  
-   
-   
- 
-   
-
-
-   
-
-  
-
-  
-
-   
-   
-   
-   
-
-
-
-
-   
-
-You've built the Tomcat Bayeux libraries, simply add the following 
libraries to your CATALINA_HOME/lib directory:
-  ${cometd-api.jar}
-  ${tomcat-bayeux.jar} 
-  ${tomcat.extras}/${json-lib.jar}
-To run the sample application, copy the following applications into your 
CATALINA_BASE/webapps directory
-  ${cometd.war}
-
-  
-
-
-
   
 
 
@@ -349,7 +238,7 @@
  
   
   
-  
+  
   
 
   

Added: tomcat/trunk/modules/bayeux/.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/bayeux/.classpath?rev=713070&view=auto
==
--- tomcat/trunk/modules/bayeux/.classpath (added)
+++ tomcat/trunk/modules/bayeux/.classpath Tue Nov 11 07:58:23 2008
@@ -0,0 +1,9 @@
+
+
+   
+   
+   
+   
+   
+   
+

Added: tomcat/trunk/modules/bayeux/.project
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/bayeux/.project?rev=713070&view=auto
==
--- tomcat/trunk/modules/bayeux/.project (added)
+++ tomcat/trunk/modules/bayeux/.project Tue Nov 11 07:58:23 2008
@@ -0,0 +1,17 @@
+
+
+   tomcat-bayeux
+   
+   
+   
+   
+   
+   org.eclipse.jdt.core.javabuilder
+   
+   
+   
+   
+   
+   org.eclipse.jdt.core.javanature
+   
+

Added: tomcat/trunk/modules/bayeux/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/bayeux/build.xml?rev=713070&view=auto
==
--- tomcat/trunk/modules/bayeux/build.xml (added)
+++ tomcat/trunk/modules/bayeux/b

Re: Thread safety issues in org.apache.catalina.util.CookieTools

2008-11-11 Thread Anton Khitrenovich
Mark,

Great, thanks!

BTW - The proposal is something official I can link to in my (future)
conversation with Sun or just an email to somebody somewhere?

Regards,
Anton.

On Tue, Nov 11, 2008 at 16:50, Mark Thomas <[EMAIL PROTECTED]> wrote:

> Anton Khitrenovich wrote:
> > Can somebody (please) confirm that there is a bug in Catalina code?
> Yep, it is a bug. It has been fixed for 6.0.x but not proposed for back
> porting to earlier versions.
>
> The fix was http://svn.apache.org/viewvc?view=rev&revision=708160
>
> I have just proposed it for 5.5.x. 4.1.x will pick up the changes since it
> is in the connectors module that they both share.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Thread safety issues in org.apache.catalina.util.CookieTools

2008-11-11 Thread Mark Thomas
Anton Khitrenovich wrote:
> Mark,
> 
> Great, thanks!
> 
> BTW - The proposal is something official I can link to in my (future)
> conversation with Sun or just an email to somebody somewhere?

http://svn.apache.org/viewvc?view=rev&revision=713053

Two more +1 votes (and no -1s) and it will be committed to 5.5.x/4.1.x

Mark

> 
> Regards,
> Anton.
> 
> On Tue, Nov 11, 2008 at 16:50, Mark Thomas <[EMAIL PROTECTED]> wrote:
> 
>> Anton Khitrenovich wrote:
>>> Can somebody (please) confirm that there is a bug in Catalina code?
>> Yep, it is a bug. It has been fixed for 6.0.x but not proposed for back
>> porting to earlier versions.
>>
>> The fix was http://svn.apache.org/viewvc?view=rev&revision=708160
>>
>> I have just proposed it for 5.5.x. 4.1.x will pick up the changes since it
>> is in the connectors module that they both share.
>>
>> Mark
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 



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



Re: svn commit: r712278 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SocketProperties.java

2008-11-11 Thread Peter Rossbach

Hi Filip,

I don't see the one line patch. I also the problem, but I got a lot  
of NPE without the patch.


need help,

Peter


Am 11.11.2008 um 18:06 schrieb Filip Hanik - Dev Lists:


-1

this was intentional, and yes, it accidentally broke the NIO connector
the proper way to do this is to call

socketProperties.setProperties(serverSock.socket());

this way, your patch is only one line, and also doesn't add in a  
bunch of -1 illegal values


Filip


[EMAIL PROTECTED] wrote:

Author: pero
Date: Fri Nov  7 13:40:37 2008
New Revision: 712278

URL: http://svn.apache.org/viewvc?rev=712278&view=rev
Log:
Fix NPE to use Http11NioProtocol handler with default parameters!
# example:


   port="8080"  
protocol="org.apache.coyote.http11.Http11NioProtocol" 
connectionTimeout="2"redirectPort="8443" />


Used at MAC OS X with "-Djava.net.preferIPv4Stack=true"

I am not sure that default returns are correct!

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java


Modified: tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ 
tomcat/util/net/NioEndpoint.java? 
rev=712278&r1=712277&r2=712278&view=diff
= 
=
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java  
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java  
Fri Nov  7 13:40:37 2008

@@ -735,7 +735,12 @@
 return;
  serverSock = ServerSocketChannel.open();
-serverSock.socket().setPerformancePreferences 
(socketProperties.getPerformanceConnectionTime(),
+int performanceConnectionTime =  
socketProperties.getPerformanceConnectionTime();
+int performanceLatency=  
socketProperties.getPerformanceLatency();
+int performanceBandwidth =  
socketProperties.getPerformanceBandwidth();
+if (performanceConnectionTime != -1 &&  
performanceLatency != -1 &&

+performanceBandwidth != -1)
+serverSock.socket().setPerformancePreferences 
(socketProperties.getPerformanceConnectionTime(),

socketProperties.getPerformanceLatency(),

socketProperties.getPerformanceBandwidth());
 InetSocketAddress addr = (address!=null?new  
InetSocketAddress(address,port):new InetSocketAddress(port));


Modified: tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ 
tomcat/util/net/SocketProperties.java? 
rev=712278&r1=712277&r2=712278&view=diff
= 
=
--- tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java Fri Nov  7 13:40:37 2008

@@ -210,55 +210,82 @@
 }
  public boolean getOoBInline() {
-return ooBInline.booleanValue();
+if(ooBInline != null)
+return ooBInline.booleanValue();
+return false;
 }
  public int getPerformanceBandwidth() {
-return performanceBandwidth.intValue();
+if(performanceBandwidth != null)
+return performanceBandwidth.intValue();
+return -1;
 }
  public int getPerformanceConnectionTime() {
-return performanceConnectionTime.intValue();
+if(performanceConnectionTime!= null)
+return performanceConnectionTime.intValue();
+return -1;
+   }
  public int getPerformanceLatency() {
-return performanceLatency.intValue();
+if(performanceLatency != null)
+return performanceLatency.intValue();
+return -1 ;
 }
  public int getRxBufSize() {
-return rxBufSize.intValue();
+if(rxBufSize != null)
+return rxBufSize.intValue();
+return -1;
 }
  public boolean getSoKeepAlive() {
-return soKeepAlive.booleanValue();
+if(soKeepAlive != null)
+return soKeepAlive.booleanValue();
+return false;
 }
  public boolean getSoLingerOn() {
-return soLingerOn.booleanValue();
+if(soLingerOn != null)
+return soLingerOn.booleanValue();
+return false;
 }
  public int getSoLingerTime() {
-return soLingerTime.intValue();
+if(soLingerTime != null)
+return soLingerTime.intValue();
+return -1;
 }
  public boolean getSoReuseAddress() {
-return soReuseAddress.booleanValue();
+if(soReuseAddress != null)
+return soReuseAddress.booleanValue();
+return false;
 }
  public int getSoTimeout() {
-return soTimeout.intValue();
+if(soTim

Re: [VOTE] Releasing Apache Tomcat Native 1.1.16

2008-11-11 Thread Mladen Turk

Just an reminder that the voting is still on ;)

I'll wait another 48 hrs, and if not voted
seems we'll have to forget about this version.



Mladen Turk wrote:

Hello to the Tomcat team,

Native 1.1.16 has been available for testing for almost a week,
so I would like to proceed with the release vote.

If you want to take a look, the final source distribution can be
downloaded from:
http://tomcat.apache.org/dev/dist/tomcat-connectors/native/source/

Some binaries (windows only) are available at:
http://tomcat.apache.org/dev/dist/tomcat-connectors/native/binaries/

So here's the vote.
It will be closed on Wednesday November 5th, 2:00 p.m. GMT.

Apache Tomcat Native 1.1.16 is:

[ ] Stable - no major issues, no regressions
[ ] Beta   - at least one significant issue -- tell us what it is
[ ] Alpha  - multiple significant issues -- tell us what they are


Thank you,



--
^(TM)

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



Re: svn commit: r712278 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SocketProperties.java

2008-11-11 Thread Filip Hanik - Dev Lists

hi Peter, the one line patch is in my email,
that is the patch that you should apply, instead of your patch
socketProperties.setProperties(serverSock.socket());

would you like me to do it?
Filip

Peter Rossbach wrote:

Hi Filip,

I don't see the one line patch. I also the problem, but I got a lot of 
NPE without the patch.


need help,

Peter


Am 11.11.2008 um 18:06 schrieb Filip Hanik - Dev Lists:


-1

this was intentional, and yes, it accidentally broke the NIO connector
the proper way to do this is to call

socketProperties.setProperties(serverSock.socket());

this way, your patch is only one line, and also doesn't add in a 
bunch of -1 illegal values


Filip


[EMAIL PROTECTED] wrote:

Author: pero
Date: Fri Nov  7 13:40:37 2008
New Revision: 712278

URL: http://svn.apache.org/viewvc?rev=712278&view=rev
Log:
Fix NPE to use Http11NioProtocol handler with default parameters!
# example:
namePrefix="catalina-exec-" maxThreads="150" 
minSpareThreads="4"/>

   port="8080" 
protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="2"redirectPort="8443" />


Used at MAC OS X with "-Djava.net.preferIPv4Stack=true"

I am not sure that default returns are correct!

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=712278&r1=712277&r2=712278&view=diff 

== 

--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
Fri Nov  7 13:40:37 2008

@@ -735,7 +735,12 @@
 return;
  serverSock = ServerSocketChannel.open();
-
serverSock.socket().setPerformancePreferences(socketProperties.getPerformanceConnectionTime(), 

+int performanceConnectionTime = 
socketProperties.getPerformanceConnectionTime();
+int performanceLatency= 
socketProperties.getPerformanceLatency();
+int performanceBandwidth = 
socketProperties.getPerformanceBandwidth();
+if (performanceConnectionTime != -1 && performanceLatency 
!= -1 &&

+performanceBandwidth != -1)
+
serverSock.socket().setPerformancePreferences(socketProperties.getPerformanceConnectionTime(), 

   
socketProperties.getPerformanceLatency(),
   
socketProperties.getPerformanceBandwidth());
 InetSocketAddress addr = (address!=null?new 
InetSocketAddress(address,port):new InetSocketAddress(port));


Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=712278&r1=712277&r2=712278&view=diff 

== 

--- 
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
Fri Nov  7 13:40:37 2008

@@ -210,55 +210,82 @@
 }
  public boolean getOoBInline() {
-return ooBInline.booleanValue();
+if(ooBInline != null)
+return ooBInline.booleanValue();
+return false;
 }
  public int getPerformanceBandwidth() {
-return performanceBandwidth.intValue();
+if(performanceBandwidth != null)
+return performanceBandwidth.intValue();
+return -1;
 }
  public int getPerformanceConnectionTime() {
-return performanceConnectionTime.intValue();
+if(performanceConnectionTime!= null)
+return performanceConnectionTime.intValue();
+return -1;
+   }
  public int getPerformanceLatency() {
-return performanceLatency.intValue();
+if(performanceLatency != null)
+return performanceLatency.intValue();
+return -1 ;
 }
  public int getRxBufSize() {
-return rxBufSize.intValue();
+if(rxBufSize != null)
+return rxBufSize.intValue();
+return -1;
 }
  public boolean getSoKeepAlive() {
-return soKeepAlive.booleanValue();
+if(soKeepAlive != null)
+return soKeepAlive.booleanValue();
+return false;
 }
  public boolean getSoLingerOn() {
-return soLingerOn.booleanValue();
+if(soLingerOn != null)
+return soLingerOn.booleanValue();
+return false;
 }
  public int getSoLingerTime() {
-return soLingerTime.intValue();
+if(soLingerTime != null)
+return soLingerTime.intValue();
+return -1;
 }
  public boolean

Re: NTLMAuthenticator for Apache Tomcat 6.0.18 (Intranet within a Microsoft domain)

2008-11-11 Thread Christophe Dupriez
Hi David!

Thank you for your questions.

FIRST AN APOLOGY TO THE READERS:
The proposed patch file misses the most important, a new java class 
NTLMAuthenticator.java: I will make available in a corrected patch FRIDAY
(I am not back to my office before).

For my goals:
> > * centralize the parameterization of user authentication at the  
> > container level;
The WCA (Web Container Authentication) main advantage is that all applications 
may have a consistent, coherent security enforcement.
This comes from a central, common configuration in server.xml (Tomcat 
Container) removing many chores from the application itself.

Authorizations based on this authentication is very well expressed in the 
web.xml file of each application.

So I preferred to modify slightly Tomcat rather than modify each different 
applications (each propose a different security schemas when they are not using 
container based authentication).

> Do you mean that you want intranet users to have their local MAD login  
> propagated automatically to the tomcat server with  no explicit tomcat  
> login required?
YES !

>  If so the "official" way to support this is via  
> the JASPI spec (jsr 196) and (IIUC) a SPNEGO server authentication  
> module such as that at http://spnego.ocean.net.au/ (jboss might have  
> another one???)
I spent a few weeks trying the different alternatives. All complex and I did 
not achieve a real success.
Even JCIFS NTLM filter was not working correctly in our network.

So the proposed patch is lot simpler (nearly no configuration) and it works 
(for us).

Have a nice week,

Christophe

- Original Message -
From: David Jencks [mailto:[EMAIL PROTECTED]
To: Tomcat Developers List [mailto:[EMAIL PROTECTED]
Subject: Re: NTLMAuthenticator for Apache Tomcat 6.0.18 (Intranet within a 
Microsoft domain)


> I'm a little confused about your goals
> 
> On Nov 10, 2008, at 11:41 AM, Christophe Dupriez wrote:
> 
> > Hi Tomcat Developpers!
> >
> > I wanted to:
> 
> What do you mean by this and how is this expressed?
> 
> > * have a simple NTLM authentication for intranet users;
> > * be able to run Tomcat in a Microsoft Active Directory network  
> > where the server is secured (absolutely no login allowed to regular  
> > users)
> 
> Do you mean that you want intranet users to have their local MAD login  
> propagated automatically to the tomcat server with  no explicit tomcat  
> login required?  If so the "official" way to support this is via  
> the JASPI spec (jsr 196) and (IIUC) a SPNEGO server authentication  
> module such as that at http://spnego.ocean.net.au/ (jboss might have  
> another one???)
> 
> At this point tomcat does not have  a jaspi implementation although I  
> expect it to be a part of javaee 6, and I'm mostly interested in  
> trying to understand what you are trying to do rather than suggesting  
> an implementation strategy.
> 
> thanks
> david jencks
> 
> >
> > There is a Microsoft “specification” (bug?) by which all LDAP binds  
> > are evaluated on the Domain Server (like if the user was attempting  
> > to login on the Domain Server).
> > It would be better to have binds evaluated as if they were  
> > originating from the LDAP client machine (the Tomcat Server).
> >
> > To circumvent this, I have been obliged to remove the binding (the  
> > password checking) but to ensure that it is NTLM (and nothing else)  
> > which provides the username.
> > The users are therefore automatically logged with the username used  
> > to log on their PC.
> >
> > The attached patch is for current Apache Tomcat sources (6.0.18).
> >
> > It adds:
> > An NTLM Authenticator: nothing to configure except in the web.xml of  
> > each application:
> >
> >NTLM
> >ThisIsApassword
> >
> > The realm-name is the “password” which ensures that authentication  
> > is done by NTLM and no other method.
> > A very long password is strongly recommended.
> > A modified JNDI Realm with new parameters:
> > preAuthenticatedPassword=”ThisIsApassword”
> > This to suppress password checking if preAuthenticatedPassword is  
> > provided.
> > userIdentification=”userPrincipalName” provides a standardized  
> > username, whatever the retrieved user name (case of complex  
> > userSearch patterns)
> > userNamePrefix and userNameSuffix
> > This to suppress a prefix and/or a suffix from username before  
> > returning it to the application: good to suppress domain  
> > identification, etc.
> > When you user complex userSearch pattern, this can be very useful.  
> > Example:
> > userSearch="(|(sAMAccountName={0})([EMAIL PROTECTED]) 
> > (userPrincipalName={0}))"
> > userIdentification="userPrincipalName" userNamePrefix=”domain\”
> [EMAIL PROTECTED] 
> > ”
> >
> > Hopes this can be useful to the community!
> >
> > Please do not hesitate to ask me if something can be done to make  
> > this contribution perennial.
> >
> > Wishing you a very nice day,
> >
> > Christophe Dupriez
> > Centre Antipoison

Thread safety issues in org.apache.catalina.util.CookieTools

2008-11-11 Thread Anton Khitrenovich
Hi all,

We are using IPlanet 6.1 web server, that is based on Catalina 4.1
container. Recently we've run into strange exceptions on Catalina level.
After examining stack trace and relevant code, I see that the problem
originates in non-synchronized usage of static SimpleDateFormat variables
from DateTool class by CookieTools.getCookieHeaderValue() function.
According to JDK documentation, "Date formats are not synchronized. It is
recommended to create separate format instances for each thread. If multiple
threads access a format concurrently, it must be synchronized externally."

Sample stack trace:

java.lang.ArrayIndexOutOfBoundsException: 466
at
sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:436)
at
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2081)
at
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1996)
at java.util.Calendar.setTimeInMillis(Calendar.java:1066)
at java.util.Calendar.setTime(Calendar.java:1032)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:785)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:778)
at
org.apache.catalina.util.CookieTools.getCookieHeaderValue(CookieTools.java:150)
at
org.apache.catalina.util.CookieTools.getCookieHeaderValue(CookieTools.java:100)
at
com.iplanet.ias.web.connector.nsapi.NSAPIResponse.sendHeaders(NSAPIResponse.java:492)
at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:251)
at
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:180)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)

Can somebody (please) confirm that there is a bug in Catalina code?

Links to relevant classes for your convenience:

*
http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/util/DateTool.java
*
http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/util/CookieTools.java(look
for DateTool usage)

Thanks,
Anton.


svn commit: r713086 - /tomcat/trunk/.classpath

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 09:12:18 2008
New Revision: 713086

URL: http://svn.apache.org/viewvc?rev=713086&view=rev
Log:
oops

Modified:
tomcat/trunk/.classpath

Modified: tomcat/trunk/.classpath
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/.classpath?rev=713086&r1=713085&r2=713086&view=diff
==
--- tomcat/trunk/.classpath (original)
+++ tomcat/trunk/.classpath Tue Nov 11 09:12:18 2008
@@ -1,4 +1,20 @@
 
+
 
 




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



Re: svn commit: r712278 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SocketProperties.java

2008-11-11 Thread Peter Rossbach

Yes, please
Peter


Am 11.11.2008 um 20:18 schrieb Filip Hanik - Dev Lists:


hi Peter, the one line patch is in my email,
that is the patch that you should apply, instead of your patch
socketProperties.setProperties(serverSock.socket());

would you like me to do it?
Filip

Peter Rossbach wrote:

Hi Filip,

I don't see the one line patch. I also the problem, but I got a  
lot of NPE without the patch.


need help,

Peter


Am 11.11.2008 um 18:06 schrieb Filip Hanik - Dev Lists:


-1

this was intentional, and yes, it accidentally broke the NIO  
connector

the proper way to do this is to call

socketProperties.setProperties(serverSock.socket());

this way, your patch is only one line, and also doesn't add in a  
bunch of -1 illegal values


Filip


[EMAIL PROTECTED] wrote:

Author: pero
Date: Fri Nov  7 13:40:37 2008
New Revision: 712278

URL: http://svn.apache.org/viewvc?rev=712278&view=rev
Log:
Fix NPE to use Http11NioProtocol handler with default parameters!
# example:


   port="8080"  
protocol="org.apache.coyote.http11.Http11NioProtocol"   
  connectionTimeout="2"redirectPort="8443" />


Used at MAC OS X with "-Djava.net.preferIPv4Stack=true"

I am not sure that default returns are correct!

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java


Modified: tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ 
tomcat/util/net/NioEndpoint.java? 
rev=712278&r1=712277&r2=712278&view=diff
=== 
===
--- tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java Fri Nov  7 13:40:37 2008

@@ -735,7 +735,12 @@
 return;
  serverSock = ServerSocketChannel.open();
-serverSock.socket().setPerformancePreferences 
(socketProperties.getPerformanceConnectionTime(),
+int performanceConnectionTime =  
socketProperties.getPerformanceConnectionTime();
+int performanceLatency=  
socketProperties.getPerformanceLatency();
+int performanceBandwidth =  
socketProperties.getPerformanceBandwidth();
+if (performanceConnectionTime != -1 &&  
performanceLatency != -1 &&

+performanceBandwidth != -1)
+serverSock.socket().setPerformancePreferences 
(socketProperties.getPerformanceConnectionTime(),

socketProperties.getPerformanceLatency(),

socketProperties.getPerformanceBandwidth());
 InetSocketAddress addr = (address!=null?new  
InetSocketAddress(address,port):new InetSocketAddress(port));


Modified: tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ 
tomcat/util/net/SocketProperties.java? 
rev=712278&r1=712277&r2=712278&view=diff
=== 
===
--- tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/ 
SocketProperties.java Fri Nov  7 13:40:37 2008

@@ -210,55 +210,82 @@
 }
  public boolean getOoBInline() {
-return ooBInline.booleanValue();
+if(ooBInline != null)
+return ooBInline.booleanValue();
+return false;
 }
  public int getPerformanceBandwidth() {
-return performanceBandwidth.intValue();
+if(performanceBandwidth != null)
+return performanceBandwidth.intValue();
+return -1;
 }
  public int getPerformanceConnectionTime() {
-return performanceConnectionTime.intValue();
+if(performanceConnectionTime!= null)
+return performanceConnectionTime.intValue();
+return -1;
+   }
  public int getPerformanceLatency() {
-return performanceLatency.intValue();
+if(performanceLatency != null)
+return performanceLatency.intValue();
+return -1 ;
 }
  public int getRxBufSize() {
-return rxBufSize.intValue();
+if(rxBufSize != null)
+return rxBufSize.intValue();
+return -1;
 }
  public boolean getSoKeepAlive() {
-return soKeepAlive.booleanValue();
+if(soKeepAlive != null)
+return soKeepAlive.booleanValue();
+return false;
 }
  public boolean getSoLingerOn() {
-return soLingerOn.booleanValue();
+if(soLingerOn != null)
+return soLingerOn.booleanValue();
+return false;
 }
  public int getSoLingerTime() {
-return soLingerTime.intValue();
+if(soLingerTime != null)
+return soLingerTime.intValue();
+return -1;
  

Re: Thread safety issues in org.apache.catalina.util.CookieTools

2008-11-11 Thread sebb
On 11/11/2008, Anton Khitrenovich <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>  We are using IPlanet 6.1 web server, that is based on Catalina 4.1
>  container. Recently we've run into strange exceptions on Catalina level.
>  After examining stack trace and relevant code, I see that the problem
>  originates in non-synchronized usage of static SimpleDateFormat variables
>  from DateTool class by CookieTools.getCookieHeaderValue() function.
>  According to JDK documentation, "Date formats are not synchronized. It is
>  recommended to create separate format instances for each thread. If multiple
>  threads access a format concurrently, it must be synchronized externally."
>

BTW, Commons LANG has a thread-safe FastDateFormat which can be used
instead of SimpleDateFormat#format(). However LANG does not have
versions of the parse() methods:

http://commons.apache.org/lang/api/org/apache/commons/lang/time/FastDateFormat.html

Might be worth considering to avoid the expense of per-thread copies
of the class.

>  Sample stack trace:
>
>  java.lang.ArrayIndexOutOfBoundsException: 466
> at
>  
> sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:436)
> at
>  java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2081)
> at
>  java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1996)
> at java.util.Calendar.setTimeInMillis(Calendar.java:1066)
> at java.util.Calendar.setTime(Calendar.java:1032)
> at java.text.SimpleDateFormat.format(SimpleDateFormat.java:785)
> at java.text.SimpleDateFormat.format(SimpleDateFormat.java:778)
> at
>  
> org.apache.catalina.util.CookieTools.getCookieHeaderValue(CookieTools.java:150)
> at
>  
> org.apache.catalina.util.CookieTools.getCookieHeaderValue(CookieTools.java:100)
> at
>  
> com.iplanet.ias.web.connector.nsapi.NSAPIResponse.sendHeaders(NSAPIResponse.java:492)
> at
>  
> org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:251)
> at
>  
> com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:180)
> at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
>
>  Can somebody (please) confirm that there is a bug in Catalina code?
>
>  Links to relevant classes for your convenience:
>
>  *
>  
> http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/util/DateTool.java
>  *
>  
> http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/util/CookieTools.java(look
>  for DateTool usage)
>
>  Thanks,
>
> Anton.
>

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



[APR/JNI] send from specific interface

2008-11-11 Thread Lorenz Breu
hi guys

can somebody give me a hint on how to send a udp message from a specific
port using the jni (or directly the apr) code? i am trying the following:

long handle = Socket.create(Socket.APR_INET, Socket.SOCK_DGRAM,
Socket.APR_PROTO_UDP, pool);
Socket.optSet(handle, Socket.APR_SO_NONBLOCK, 1);
Socket.timeoutSet(handle, 0);
InetSocketAddress la = (InetSocketAddress) localAddress;
long sa;
if (la.getAddress() == null) {
sa = Address.info(Address.APR_ANYADDR, Socket.APR_INET,
la.getPort(), 0, pool);
} else {
sa = Address.info(la.getAddress().getHostAddress(), Socket.APR_INET,
la.getPort(), 0, pool);
}
Multicast.hops(handle, ttl);
Socket.bind(handle, sa);
Socket.connect(handle, remoteAddress);

If I leave out the bind part and just connect the socket to the remote
address (in this case also on localhost) it works fine, everything works
fine, however as soon as i do the bind() first followed by the
connect(), it looks like the message is no longer received by the
receiver (on the same machine)... any caveats i am missing? wireshark
lists the udp packet, even with a  "good" source port if i set the local
address port to 0, so it may be sent, but then why is it not received if
i send to the same address as before without the bind()?? or is it not
sent after all? but then why would wireshark list the datagram?

does anybody have an idea, where i could be going wrong? should i ask
such questions on the users list?

cheers,
lorenz






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



svn commit: r713144 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11NioProtocol.java tomcat/util/net/NioEndpoint.java tomcat/util/net/SocketProperties.java

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 12:00:26 2008
New Revision: 713144

URL: http://svn.apache.org/viewvc?rev=713144&view=rev
Log:
Fix socket properties usage so that we can decide if we want to accept the 
default value or if we want to use a preset value

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=713144&r1=713143&r2=713144&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Tue Nov 
11 12:00:26 2008
@@ -132,10 +132,6 @@
 ep.setName(getName());
 ep.setHandler(cHandler);
 
-//todo, determine if we even need these
-
ep.getSocketProperties().setRxBufSize(Math.max(ep.getSocketProperties().getRxBufSize(),getMaxHttpHeaderSize()));
-
ep.getSocketProperties().setTxBufSize(Math.max(ep.getSocketProperties().getTxBufSize(),getMaxHttpHeaderSize()));
-
 try {
 ep.init();
 sslImplementation = new JSSEImplementation();

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=713144&r1=713143&r2=713144&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Nov 11 
12:00:26 2008
@@ -735,14 +735,7 @@
 return;
 
 serverSock = ServerSocketChannel.open();
-int performanceConnectionTime = 
socketProperties.getPerformanceConnectionTime();
-int performanceLatency= socketProperties.getPerformanceLatency();
-int performanceBandwidth = socketProperties.getPerformanceBandwidth();
-if (performanceConnectionTime != -1 && performanceLatency != -1 &&
-performanceBandwidth != -1)
-
serverSock.socket().setPerformancePreferences(socketProperties.getPerformanceConnectionTime(),
-  
socketProperties.getPerformanceLatency(),
-  
socketProperties.getPerformanceBandwidth());
+socketProperties.setProperties(serverSock.socket());
 InetSocketAddress addr = (address!=null?new 
InetSocketAddress(address,port):new InetSocketAddress(port));
 serverSock.socket().bind(addr,backlog); 
 serverSock.configureBlocking(true); //mimic APR behavior

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=713144&r1=713143&r2=713144&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Tue Nov 
11 12:00:26 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketException;
 
@@ -205,87 +206,76 @@
 socket.setTrafficClass(soTrafficClass.intValue());
 }
 
+public void setProperties(ServerSocket socket) throws SocketException{
+if (rxBufSize != null)
+socket.setReceiveBufferSize(rxBufSize.intValue());
+if (performanceConnectionTime != null && performanceLatency != null &&
+performanceBandwidth != null)
+socket.setPerformancePreferences(
+performanceConnectionTime.intValue(),
+performanceLatency.intValue(),
+performanceBandwidth.intValue());
+if (soReuseAddress != null)
+socket.setReuseAddress(soReuseAddress.booleanValue());
+if (soTimeout != null)
+socket.setSoTimeout(soTimeout.intValue());
+}
+
+
 public boolean getDirectBuffer() {
 return directBuffer;
 }
 
 public boolean getOoBInline() {
-if(ooBInline != null)
-return ooBInline.booleanValue();
-return false;
+return ooBInline.booleanValue();
 }
 
 public int getPerformanceBandwidth() {
-if(performanceBandwidth != null)
-return performanceBandwidth.intValue();
-return -1;
+return performanceBandwidth.intValue();
 }
 
 public int getPerformanceConnectionTime() {
-if(performanceConnectionTime!= null)
-  

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

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 13:04:57 2008
New Revision: 713169

URL: http://svn.apache.org/viewvc?rev=713169&view=rev
Log:
votes

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=713169&r1=713168&r2=713169&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 11 13:04:57 2008
@@ -82,7 +82,7 @@
   http://svn.apache.org/viewvc?rev=694951&view=rev (JIO)
   http://svn.apache.org/viewvc?rev=708195&view=rev (APR, NIO)
   http://svn.apache.org/viewvc?rev=708223&view=rev (Change log level)
-  +1: markt
+  +1: markt, fhanik
0: remm (logging could pile up quickly)
   markt Because thread count only grows there will only ever be one log 
message
   -1: 
@@ -110,7 +110,7 @@
 * More EL fixes. Add lookaheads to prevent parsing ambiguity
   http://svn.apache.org/viewvc?rev=696780&view=rev (the change)
   http://svn.apache.org/viewvc?rev=696782&view=rev (the auto generated code)
-  +1: mark, remm
+  +1: mark, remm, fhanik
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45026
@@ -195,7 +195,7 @@
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46105
   Correctly set URI encoding when replaying a request after FORM auth
   http://svn.apache.org/viewvc?rev=709294&view=rev
-  +1: markt
+  +1: markt, fhanik
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46125
@@ -203,7 +203,7 @@
   big
   http://svn.apache.org/viewvc?rev=709811&view=rev
   +1: markt
-  -1:
+  -1: fhanik - InternalAprInputBuffer/InternalNioInputBuffer should provide 
the same behavior
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46115
   Path is required when using deploy
@@ -238,7 +238,7 @@
 
 * Deprecate the invoker servlet ready for its removal in 7.0.x
   http://people.apache.org/~markt/patches/2008-11-03-invoker.patch
-  +1: markt, rjung
+  +1: markt, rjung, fhanik
   -1: 
   rjung: You might also add the deprecation info to the default conf/web.xml.
 
@@ -247,6 +247,7 @@
   Patch provided by CŽdric Mailleux
   http://svn.apache.org/viewvc?rev=710205&view=rev
   +1: markt
+   0: is there a trunk checkin or a diff?
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46011
@@ -258,20 +259,20 @@
 
 * Fix http://svn.apache.org/viewvc?rev=712274&view=rev
   ReplicationValve can throw NPE as context doesn't exists! (Config as Engine 
level)
-  +1: pero
+  +1: pero, fhanik
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42673
   Correctly handle includes with multi-level contexts
   Patch provided by Peter Jodeleit
   http://svn.apache.org/viewvc?rev=712461&view=rev
-  +1: markt
+  +1: markt, fhanik
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747
   Ensure context.xml takes effect on first deployment. Make processing of
   context.xml consistent.
   http://svn.apache.org/viewvc?rev=712464&view=rev
-  +1: markt
+  +1: markt, fhanik
   -1: 
 



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



svn commit: r713174 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/connector/CoyoteAdapter.java java/org/apache/catalina/connector/Request.java

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 13:22:17 2008
New Revision: 713174

URL: http://svn.apache.org/viewvc?rev=713174&view=rev
Log:
Add fix for Comet

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=713174&r1=713173&r2=713174&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 11 13:22:17 2008
@@ -42,13 +42,6 @@
  and seems impossible to anticipate):
  https://issues.apache.org/bugzilla/show_bug.cgi?id=36155#c17
 
-* Fix comet behavior
-  Invoke READ when there is a body and make sure END is called if 
CometEvent.close is called during an invokation
-  http://svn.apache.org/viewvc?rev=677473&view=rev
-  +1: fhanik, funkman, pero
-   0: remm: no idea if it's better or worse (the fact that it's been closed is 
visible)
-  -1: 
-
 * Fix issue where the first request for a deleted JSPs returns as if the JSP
   still exists.
   http://svn.apache.org/viewvc?view=rev&revision=683969

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=713174&r1=713173&r2=713174&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
Tue Nov 11 13:22:17 2008
@@ -206,6 +206,13 @@
 
connector.getContainer().getPipeline().getFirst().event(request, response, 
request.getEvent());
 }
 if (response.isClosed() || !request.isComet()) {
+if (status==SocketStatus.OPEN) {
+//CometEvent.close was called during an event.
+
request.getEvent().setEventType(CometEvent.EventType.END);
+request.getEvent().setEventSubType(null);
+error = true;
+
connector.getContainer().getPipeline().getFirst().event(request, response, 
request.getEvent());
+}
 res.action(ActionCode.ACTION_COMET_END, null);
 } else if (!error && read && request.getAvailable()) {
 // If this was a read and not all bytes have been read, or 
if no data
@@ -287,7 +294,7 @@
 
 if (request.isComet()) {
 if (!response.isClosed() && !response.isError()) {
-if (request.getAvailable()) {
+if (request.getAvailable() || 
(request.getContentLength() > 0 && (!request.isParametersParsed( {
 // Invoke a read event right away if there are 
available bytes
 if (event(req, res, SocketStatus.OPEN)) {
 comet = true;

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=713174&r1=713173&r2=713174&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java Tue 
Nov 11 13:22:17 2008
@@ -2248,6 +2248,12 @@
 this.comet = comet;
 }
 
+/**
+ * return true if we have parsed parameters
+ */
+public boolean isParametersParsed() {
+return parametersParsed;
+}
 
 /**
  * Return true if bytes are available.



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



svn commit: r713175 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/coyote/http11/Http11Processor.java

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 13:27:55 2008
New Revision: 713175

URL: http://svn.apache.org/viewvc?rev=713175&view=rev
Log:
dereference a socket that is no more used, frees up socket buffers

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=713175&r1=713174&r2=713175&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 11 13:27:55 2008
@@ -153,11 +153,6 @@
   +1: markt
   -0: remm (I also do not think the patch is a good idea as a backport)
 
-* Derefence socket when the request is complete
-  http://svn.apache.org/viewvc?rev=702676&view=rev
-  +1: fhanik, remm, markt, pero
-  -1: 
-
 * Backport NCDFE fix from trunk (TCK failures without it)
   http://svn.apache.org/viewvc?rev=640888&view=rev 
   +1: markt

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=713175&r1=713174&r2=713175&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java Tue 
Nov 11 13:27:55 2008
@@ -908,7 +908,7 @@
 // Recycle
 inputBuffer.recycle();
 outputBuffer.recycle();
-
+this.socket = null;
 // Recycle ssl info
 sslSupport = null;
 }



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



svn commit: r713177 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/ha/context/ReplicatedContext.java

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 13:29:34 2008
New Revision: 713177

URL: http://svn.apache.org/viewvc?rev=713177&view=rev
Log:
Fix class cast exception

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

tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=713177&r1=713176&r2=713177&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 11 13:29:34 2008
@@ -160,11 +160,6 @@
 really old to me, so where would this come from ?)
   -1: 
 
-* Fix classcast exception upon shutdown(edgecase)
-  http://svn.apache.org/viewvc?rev=706433&view=rev 
-  +1: fhanik, markt, pero
-  -1: 
-  
 * maxThreads to be 200 by default
   http://svn.apache.org/viewvc?rev=707264&view=rev 
   +1: fhanik, markt, pero, remm

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java?rev=713177&r1=713176&r2=713177&view=diff
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/context/ReplicatedContext.java 
Tue Nov 11 13:29:34 2008
@@ -54,6 +54,7 @@
 startComplete = true;
 }
 
+@Override
 public synchronized void start() throws LifecycleException {
 if ( this.started ) return;
 super.addLifecycleListener(this);
@@ -74,13 +75,14 @@
 }
 }
 
+@Override
 public synchronized void stop() throws LifecycleException
 {
-ReplicatedMap map = 
(ReplicatedMap)((ReplApplContext)this.context).getAttributeMap();
-if ( map!=null ) {
-map.breakdown();
-}
 if ( !this.started ) return;
+AbstractMap map = 
(AbstractMap)((ReplApplContext)this.context).getAttributeMap();
+if ( map!=null && map instanceof ReplicatedMap) {
+((ReplicatedMap)map).breakdown();
+}
 try {
 super.lifecycle.removeLifecycleListener(this);
 } catch ( Exception x ){



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



svn commit: r713053 - /tomcat/current/tc5.5.x/STATUS.txt

2008-11-11 Thread markt
Author: markt
Date: Tue Nov 11 06:50:09 2008
New Revision: 713053

URL: http://svn.apache.org/viewvc?rev=713053&view=rev
Log:
Propose thread safety back port

Modified:
tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=713053&r1=713052&r2=713053&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Tue Nov 11 06:50:09 2008
@@ -136,3 +136,8 @@
   http://svn.apache.org/viewvc?rev=709294&view=rev
   +1: markt
   -1: 
+
+* Fix thread safety issues in date formats
+  http://svn.apache.org/viewvc?view=rev&revision=708160
+  +1: markt
+  -1: 



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



Re: Thread safety issues in org.apache.catalina.util.CookieTools

2008-11-11 Thread Mark Thomas
Anton Khitrenovich wrote:
> Can somebody (please) confirm that there is a bug in Catalina code?
Yep, it is a bug. It has been fixed for 6.0.x but not proposed for back
porting to earlier versions.

The fix was http://svn.apache.org/viewvc?view=rev&revision=708160

I have just proposed it for 5.5.x. 4.1.x will pick up the changes since it
is in the connectors module that they both share.

Mark


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



svn commit: r713183 - /tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 13:47:37 2008
New Revision: 713183

URL: http://svn.apache.org/viewvc?rev=713183&view=rev
Log:
Update changelog with last three commits

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=713183&r1=713182&r2=713183&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue Nov 11 13:47:37 2008
@@ -36,6 +36,15 @@
   
 
   
+Comet should always invoke END and properly invoke READ (r713174)
+ 
+  
+Fix class cast exception when shutting down a replicated context but 
no cluster has been configured in server.xml (r713177)
+ 
+  
+Dererence socket when its no longer used. Frees up socket buffers and 
memory. No functional change. (r713175)
+  
+  
 Correct wrong "No role found" debug message,
 logged in RealmBase even if a role was found. (rjung)
   



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



svn commit: r713186 - in /tomcat/tc6.0.x/trunk: java/org/apache/tomcat/util/net/ webapps/docs/config/

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 13:51:52 2008
New Revision: 713186

URL: http://svn.apache.org/viewvc?rev=713186&view=rev
Log:
Set default thread count to 200

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=713186&r1=713185&r2=713186&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue 
Nov 11 13:51:52 2008
@@ -178,7 +178,7 @@
 /**
  * Maximum amount of worker threads.
  */
-protected int maxThreads = 40;
+protected int maxThreads = 200;
 public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
 public int getMaxThreads() { return maxThreads; }
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java?rev=713186&r1=713185&r2=713186&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java Tue 
Nov 11 13:51:52 2008
@@ -126,7 +126,7 @@
 /**
  * Maximum amount of worker threads.
  */
-protected int maxThreads = 40;
+protected int maxThreads = 200;
 public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
 public int getMaxThreads() { return maxThreads; }
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=713186&r1=713185&r2=713186&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Tue 
Nov 11 13:51:52 2008
@@ -151,7 +151,7 @@
 /**
  * Maximum amount of worker threads.
  */
-protected int maxThreads = 40;
+protected int maxThreads = 200;
 public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
 public int getMaxThreads() { return maxThreads; }
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=713186&r1=713185&r2=713186&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue 
Nov 11 13:51:52 2008
@@ -349,7 +349,7 @@
 /**
  * Maximum amount of worker threads.
  */
-protected int maxThreads = 400;
+protected int maxThreads = 200;
 public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
 public int getMaxThreads() { return maxThreads; }
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml?rev=713186&r1=713185&r2=713186&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml Tue Nov 11 13:51:52 2008
@@ -328,7 +328,7 @@
   The maximum number of request processing threads to be created
   by this Connector, which therefore determines the
   maximum number of simultaneous requests that can be handled.  If
-  not specified, this attribute is set to 40. If an executor is associated
+  not specified, this attribute is set to 200. If an executor is associated
   with this connector, this attribute is ignored as the connector will 
   execute tasks using the executor rather than an internal thread pool.
 



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



svn commit: r713187 - in /tomcat/tc6.0.x/trunk: STATUS.txt webapps/docs/changelog.xml

2008-11-11 Thread fhanik
Author: fhanik
Date: Tue Nov 11 13:52:38 2008
New Revision: 713187

URL: http://svn.apache.org/viewvc?rev=713187&view=rev
Log:
update change log and status file

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/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=713187&r1=713186&r2=713187&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 11 13:52:38 2008
@@ -160,11 +160,6 @@
 really old to me, so where would this come from ?)
   -1: 
 
-* maxThreads to be 200 by default
-  http://svn.apache.org/viewvc?rev=707264&view=rev 
-  +1: fhanik, markt, pero, remm
-  -1: 
-  
 * Fix read/write timeout during async comet access
   http://svn.apache.org/viewvc?rev=707670&view=rev 
   +1: fhanik, pero

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=713187&r1=713186&r2=713187&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue Nov 11 13:52:38 2008
@@ -36,6 +36,9 @@
   
 
   
+Default thread count for HTTP connectors is 200. (r713186)
+  
+  
 Comet should always invoke END and properly invoke READ (r713174)
  
   



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



Re: svn commit: r712278 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SocketProperties.java

2008-11-11 Thread Filip Hanik - Dev Lists

-1

this was intentional, and yes, it accidentally broke the NIO connector
the proper way to do this is to call

socketProperties.setProperties(serverSock.socket());

this way, your patch is only one line, and also doesn't add in a bunch of -1 
illegal values

Filip


[EMAIL PROTECTED] wrote:

Author: pero
Date: Fri Nov  7 13:40:37 2008
New Revision: 712278

URL: http://svn.apache.org/viewvc?rev=712278&view=rev
Log:
Fix NPE to use Http11NioProtocol handler with default parameters!
# example:
maxThreads="150" minSpareThreads="4"/>

   port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" 
   connectionTimeout="2" 
   redirectPort="8443" />


Used at MAC OS X with "-Djava.net.preferIPv4Stack=true"

I am not sure that default returns are correct!

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=712278&r1=712277&r2=712278&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Nov  7 
13:40:37 2008
@@ -735,7 +735,12 @@
 return;
 
 serverSock = ServerSocketChannel.open();

-
serverSock.socket().setPerformancePreferences(socketProperties.getPerformanceConnectionTime(),
+int performanceConnectionTime = 
socketProperties.getPerformanceConnectionTime();
+int performanceLatency= socketProperties.getPerformanceLatency();
+int performanceBandwidth = socketProperties.getPerformanceBandwidth();
+if (performanceConnectionTime != -1 && performanceLatency != -1 &&
+performanceBandwidth != -1)
+
serverSock.socket().setPerformancePreferences(socketProperties.getPerformanceConnectionTime(),
   
socketProperties.getPerformanceLatency(),
   
socketProperties.getPerformanceBandwidth());
 InetSocketAddress addr = (address!=null?new 
InetSocketAddress(address,port):new InetSocketAddress(port));

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=712278&r1=712277&r2=712278&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Fri Nov  
7 13:40:37 2008
@@ -210,55 +210,82 @@
 }
 
 public boolean getOoBInline() {

-return ooBInline.booleanValue();
+if(ooBInline != null)
+return ooBInline.booleanValue();
+return false;
 }
 
 public int getPerformanceBandwidth() {

-return performanceBandwidth.intValue();
+if(performanceBandwidth != null)
+return performanceBandwidth.intValue();
+return -1;
 }
 
 public int getPerformanceConnectionTime() {

-return performanceConnectionTime.intValue();
+if(performanceConnectionTime!= null)
+return performanceConnectionTime.intValue();
+return -1;
+  
 }
 
 public int getPerformanceLatency() {

-return performanceLatency.intValue();
+if(performanceLatency != null)
+return performanceLatency.intValue();
+return -1 ;
 }
 
 public int getRxBufSize() {

-return rxBufSize.intValue();
+if(rxBufSize != null)
+return rxBufSize.intValue();
+return -1;
 }
 
 public boolean getSoKeepAlive() {

-return soKeepAlive.booleanValue();
+if(soKeepAlive != null)
+return soKeepAlive.booleanValue();
+return false;
 }
 
 public boolean getSoLingerOn() {

-return soLingerOn.booleanValue();
+if(soLingerOn != null)
+return soLingerOn.booleanValue();
+return false;
 }
 
 public int getSoLingerTime() {

-return soLingerTime.intValue();
+if(soLingerTime != null)
+return soLingerTime.intValue();
+return -1;
 }
 
 public boolean getSoReuseAddress() {

-return soReuseAddress.booleanValue();
+if(soReuseAddress != null)
+return soReuseAddress.booleanValue();
+return false;
 }
 
 public int getSoTimeout() {

-return soTimeout.intValue();
+if(soTimeout != null)
+return soTimeout.intValue();
+return -1;
 }
 
 public int getSoTrafficClass() {

-return soTrafficClass.intVa

Re: svn commit: r712278 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SocketProperties.java

2008-11-11 Thread Filip Hanik - Dev Lists

done

Filip
Peter Rossbach wrote:

Yes, please
Peter


Am 11.11.2008 um 20:18 schrieb Filip Hanik - Dev Lists:


hi Peter, the one line patch is in my email,
that is the patch that you should apply, instead of your patch
socketProperties.setProperties(serverSock.socket());

would you like me to do it?
Filip

Peter Rossbach wrote:

Hi Filip,

I don't see the one line patch. I also the problem, but I got a lot 
of NPE without the patch.


need help,

Peter


Am 11.11.2008 um 18:06 schrieb Filip Hanik - Dev Lists:


-1

this was intentional, and yes, it accidentally broke the NIO connector
the proper way to do this is to call

socketProperties.setProperties(serverSock.socket());

this way, your patch is only one line, and also doesn't add in a 
bunch of -1 illegal values


Filip


[EMAIL PROTECTED] wrote:

Author: pero
Date: Fri Nov  7 13:40:37 2008
New Revision: 712278

URL: http://svn.apache.org/viewvc?rev=712278&view=rev
Log:
Fix NPE to use Http11NioProtocol handler with default parameters!
# example:
namePrefix="catalina-exec-" maxThreads="150" 
minSpareThreads="4"/>

   port="8080" 
protocol="org.apache.coyote.http11.Http11NioProtocol"  
  connectionTimeout="2"redirectPort="8443" />


Used at MAC OS X with "-Djava.net.preferIPv4Stack=true"

I am not sure that default returns are correct!

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java


Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=712278&r1=712277&r2=712278&view=diff 

== 

--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
Fri Nov  7 13:40:37 2008

@@ -735,7 +735,12 @@
 return;
  serverSock = ServerSocketChannel.open();
-
serverSock.socket().setPerformancePreferences(socketProperties.getPerformanceConnectionTime(), 

+int performanceConnectionTime = 
socketProperties.getPerformanceConnectionTime();
+int performanceLatency= 
socketProperties.getPerformanceLatency();
+int performanceBandwidth = 
socketProperties.getPerformanceBandwidth();
+if (performanceConnectionTime != -1 && performanceLatency 
!= -1 &&

+performanceBandwidth != -1)
+
serverSock.socket().setPerformancePreferences(socketProperties.getPerformanceConnectionTime(), 

   
socketProperties.getPerformanceLatency(),
   
socketProperties.getPerformanceBandwidth());
 InetSocketAddress addr = (address!=null?new 
InetSocketAddress(address,port):new InetSocketAddress(port));


Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=712278&r1=712277&r2=712278&view=diff 

== 

--- 
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java 
Fri Nov  7 13:40:37 2008

@@ -210,55 +210,82 @@
 }
  public boolean getOoBInline() {
-return ooBInline.booleanValue();
+if(ooBInline != null)
+return ooBInline.booleanValue();
+return false;
 }
  public int getPerformanceBandwidth() {
-return performanceBandwidth.intValue();
+if(performanceBandwidth != null)
+return performanceBandwidth.intValue();
+return -1;
 }
  public int getPerformanceConnectionTime() {
-return performanceConnectionTime.intValue();
+if(performanceConnectionTime!= null)
+return performanceConnectionTime.intValue();
+return -1;
+   }
  public int getPerformanceLatency() {
-return performanceLatency.intValue();
+if(performanceLatency != null)
+return performanceLatency.intValue();
+return -1 ;
 }
  public int getRxBufSize() {
-return rxBufSize.intValue();
+if(rxBufSize != null)
+return rxBufSize.intValue();
+return -1;
 }
  public boolean getSoKeepAlive() {
-return soKeepAlive.booleanValue();
+if(soKeepAlive != null)
+return soKeepAlive.booleanValue();
+return false;
 }
  public boolean getSoLingerOn() {
-return soLingerOn.booleanValue();
+if(soLingerOn != null)
+return soLingerOn.booleanValue();
+return false;
 }
  public int getSoLingerTime() {
-return soLingerTime.intValue();
+i

DO NOT REPLY [Bug 46183] about jvm dump file EXCEPTION_ACCESS_VIOLATION (0xc0000005)

2008-11-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46183





--- Comment #2 from umayahara <[EMAIL PROTECTED]>  2008-11-11 21:15:45 PST ---
ご連絡いただきありがとうございました。
SUNへ問い合わせます。


about Bug 46183
thank you


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can JULI logging can be configured with other application servers

2008-11-11 Thread Hearty

Is JULI is designed to work with other application servers or it is can be
configured only with tomcat?
If it is possible to configure with other app servers  how it can be
initialized to log per web-app generically?
-- 
View this message in context: 
http://www.nabble.com/Can-JULI-logging-can-be-configured-with-other-application-servers-tp20454976p20454976.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


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