svn commit: r701355 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java startup/LocalStrings.properties startup/TldConfig.java

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 04:53:28 2008
New Revision: 701355

URL: http://svn.apache.org/viewvc?rev=701355&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45933
Don't use parser from web-app for tld files

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=701355&r1=701354&r2=701355&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Oct  3 
04:53:28 2008
@@ -4267,10 +4267,6 @@
 ((Lifecycle) pipeline).start();
 }
 
-if(getProcessTlds()) {
-processTlds();
-}
-
 // Notify our interested LifecycleListeners
 lifecycle.fireLifecycleEvent(START_EVENT, null);
 
@@ -4481,40 +4477,6 @@
 }
 
 /**
- * Processes TLDs.
- *
- * @throws LifecycleException If an error occurs
- */
- protected void processTlds() throws LifecycleException {
-   TldConfig tldConfig = new TldConfig();
-   tldConfig.setContext(this);
-
-   // (1)  check if the attribute has been defined
-   //  on the context element.
-   tldConfig.setTldValidation(tldValidation);
-   tldConfig.setTldNamespaceAware(tldNamespaceAware);
-
-   // (2) if the attribute wasn't defined on the context
-   // try the host.
-   if (!tldValidation) {
- tldConfig.setTldValidation
-   (((StandardHost) getParent()).getXmlValidation());
-   }
-
-   if (!tldNamespaceAware) {
- tldConfig.setTldNamespaceAware
-   (((StandardHost) getParent()).getXmlNamespaceAware());
-   }
-
-   try {
- tldConfig.execute();
-   } catch (Exception ex) {
- log.error("Error reading tld listeners " 
-+ ex.toString(), ex); 
-   }
- }
-
-/**
  * Stop this Context component.
  *
  * @exception LifecycleException if a shutdown error occurs
@@ -5327,6 +5289,10 @@
 return;
 }
 }
+if (processTlds) {
+this.addLifecycleListener(new TldConfig());
+}
+
 super.init();
 
 // Notify our interested LifecycleListeners

Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=701355&r1=701354&r2=701355&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Fri 
Oct  3 04:53:28 2008
@@ -87,6 +87,8 @@
 hostConfig.undeploy=Undeploying context [{0}]
 hostConfig.undeploy.error=Error undeploying web application at context path {0}
 hostConfig.undeploying=Undeploying deployed web applications
+tldConfig.cce=Lifecycle event data object {0} is not a Context
+tldConfig.execute=Error processing TLD files for context path {0}
 userConfig.database=Exception loading user database
 userConfig.deploy=Deploying web application for user {0}
 userConfig.deploying=Deploying user web applications

Modified: tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=701355&r1=701354&r2=701355&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java Fri Oct  3 
04:53:28 2008
@@ -47,20 +47,24 @@
 import javax.servlet.ServletException;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.util.StringManager;
 import org.apache.tomcat.util.digester.Digester;
 import org.xml.sax.InputSource;
 
 /**
- * Startup event listener for a Context that configures the properties
- * of that Context, and the associated defined servlets.
+ * Startup event listener for a Context that configures application
+ * listeners configured in any TLD files.
  *
  * @author Craig R. McClanahan
  * @author Jean-Francois Arcand
  * @author 

svn commit: r701356 - in /tomcat: current/tc5.5.x/STATUS.txt tc6.0.x/trunk/STATUS.txt

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 04:58:42 2008
New Revision: 701356

URL: http://svn.apache.org/viewvc?rev=701356&view=rev
Log:
Proposals

Modified:
tomcat/current/tc5.5.x/STATUS.txt
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=701356&r1=701355&r2=701356&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Fri Oct  3 04:58:42 2008
@@ -112,3 +112,9 @@
   +1: markt, rjung
   -1: 
   rjung: Please add NOTICE to the uninstall section of the nsi file as well.
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45933
+  Don't use xml parser from web-app to process tld files
+  http://svn.apache.org/viewvc?rev=701355&view=rev
+  +1: markt
+  -1: 

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=701356&r1=701355&r2=701356&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct  3 04:58:42 2008
@@ -254,3 +254,8 @@
   +1: mark, remm
   -1: 
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45933
+  Don't use xml parser from web-app to process tld files
+  http://svn.apache.org/viewvc?rev=701355&view=rev
+  +1: markt
+  -1: 



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



Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Mark Thomas
Mladen Turk wrote:
> Hi,
> 
> I'd like to create a branch of connectors
> for native component so it depends on the
> new APR 1.3.x API
> The new API offers some essential features targeted
> explicitly for pool issues usage in
> high level languages like Java.
> 
> So, my idea is to branch the current trunk
> as connectors/branches/other/native/1.1.x
> and continue development in trunk with
> APR 1.3.x as minimum version required.
> This would be 1.3.x version of tomcat-native
> (to match the required APR version)
> 
> Any further 1.1.x release for Tomcat 6 would
> in that case be released out of that branch.
> 
> Also inside tomcat/6.0.x branch
> we have svn:external 'native' pointing to
> connector:
> svn.apache.org/repos/asf/tomcat/connectors/trunk/jni/native
> 
> This would either be changed to point to that new branch or
> get completely removed now when we have tomcat-native releases.

Removal works for me.

> Comments?

+1

Mark




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



svn commit: r701358 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 05:09:16 2008
New Revision: 701358

URL: http://svn.apache.org/viewvc?rev=701358&view=rev
Log:
Better fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=45403
With this patch, the allowLinking flag applies to all web application 
resources. It is very slightly slower. On my machine with allowLinking=false, 
the change to line 899 increases the time from ~7 microseconds to create the 
file to ~70 microseconds to create and validate the file. As far as I can tell, 
this change is only going to affect context start times. If directory listings 
are enabled in the default servlet, they will also be slightly slower but they 
were horribly slow to start with.

Modified:
tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=701358&r1=701357&r2=701358&view=diff
==
--- tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Fri Oct  
3 05:09:16 2008
@@ -819,6 +819,15 @@
 protected File file(String name) {
 
 File file = new File(base, name);
+return validate(file);
+
+}
+
+
+/*
+ * Check that the file is valid for this context
+ */
+private File validate(File file) {
 if (file.exists() && file.canRead()) {
 
if (allowLinking)
@@ -896,7 +905,9 @@
 
 for (int i = 0; i < names.length; i++) {
 
-File currentFile = new File(file, names[i]);
+File currentFile = validate(new File(file, names[i]));
+if (currentFile == null) continue;
+
 Object object = null;
 if (currentFile.isDirectory()) {
 FileDirContext tempContext = new FileDirContext(env);



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



Re: svn commit: r701355 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java startup/LocalStrings.properties startup/TldConfig.java

2008-10-03 Thread Tim Funk
Unless I am missing something - we will now have a one TldConfig per 
Context. And each TldConfig will have its own tldDigester. But the 
tldDigester is only used once on startup to find all the listeners.


So tldDigester only needs to live for the life of execute() where 
eventType=Lifecycle.START_EVENT.


Long story short:
I think tldDigester can now be a local variable in the execute() method. 
That way the tldDigester can be deallocated after startup by how the 
variable is scoped.


-Tim

[EMAIL PROTECTED] wrote:

Author: markt
Date: Fri Oct  3 04:53:28 2008
New Revision: 701355

URL: http://svn.apache.org/viewvc?rev=701355&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45933
Don't use parser from web-app for tld files

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=701355&r1=701354&r2=701355&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Oct  3 
04:53:28 2008
@@ -4267,10 +4267,6 @@
 ((Lifecycle) pipeline).start();
 }
 
-if(getProcessTlds()) {

-processTlds();
-}
-
 // Notify our interested LifecycleListeners

 lifecycle.fireLifecycleEvent(START_EVENT, null);
 
@@ -4481,40 +4477,6 @@

 }
 
 /**

- * Processes TLDs.
- *
- * @throws LifecycleException If an error occurs
- */
- protected void processTlds() throws LifecycleException {
-   TldConfig tldConfig = new TldConfig();
-   tldConfig.setContext(this);
-
-   // (1)  check if the attribute has been defined
-   //  on the context element.
-   tldConfig.setTldValidation(tldValidation);
-   tldConfig.setTldNamespaceAware(tldNamespaceAware);
-
-   // (2) if the attribute wasn't defined on the context
-   // try the host.
-   if (!tldValidation) {
- tldConfig.setTldValidation
-   (((StandardHost) getParent()).getXmlValidation());
-   }
-
-   if (!tldNamespaceAware) {
- tldConfig.setTldNamespaceAware
-   (((StandardHost) getParent()).getXmlNamespaceAware());
-   }
-
-   try {

- tldConfig.execute();
-   } catch (Exception ex) {
- log.error("Error reading tld listeners " 
-+ ex.toString(), ex); 
-   }

- }
-
-/**

  * Stop this Context component.
  *
  * @exception LifecycleException if a shutdown error occurs
@@ -5327,6 +5289,10 @@
 return;
 }
 }
+if (processTlds) {
+this.addLifecycleListener(new TldConfig());
+}
+
 super.init();
 
 // Notify our interested LifecycleListeners


Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=701355&r1=701354&r2=701355&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Fri 
Oct  3 04:53:28 2008
@@ -87,6 +87,8 @@
 hostConfig.undeploy=Undeploying context [{0}]
 hostConfig.undeploy.error=Error undeploying web application at context path {0}
 hostConfig.undeploying=Undeploying deployed web applications
+tldConfig.cce=Lifecycle event data object {0} is not a Context
+tldConfig.execute=Error processing TLD files for context path {0}
 userConfig.database=Exception loading user database
 userConfig.deploy=Deploying web application for user {0}
 userConfig.deploying=Deploying user web applications

Modified: tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=701355&r1=701354&r2=701355&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java Fri Oct  3 
04:53:28 2008
@@ -47,20 +47,24 @@
 import javax.servlet.ServletException;
 
 import org.apache.catalina.Context;

+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
 import org.apache.cata

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

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 05:12:11 2008
New Revision: 701361

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

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=701361&r1=701360&r2=701361&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct  3 05:12:11 2008
@@ -259,3 +259,9 @@
   http://svn.apache.org/viewvc?rev=701355&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45403
+  See commit message for details of negligable performance impact
+  http://svn.apache.org/viewvc?rev=701358&view=rev
+  +1: markt
+  -1: 



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



svn commit: r701362 - /tomcat/trunk/webapps/docs/jndi-resources-howto.xml

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 05:15:53 2008
New Revision: 701362

URL: http://svn.apache.org/viewvc?rev=701362&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45940
typo user->username

Modified:
tomcat/trunk/webapps/docs/jndi-resources-howto.xml

Modified: tomcat/trunk/webapps/docs/jndi-resources-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/jndi-resources-howto.xml?rev=701362&r1=701361&r2=701362&view=diff
==
--- tomcat/trunk/webapps/docs/jndi-resources-howto.xml (original)
+++ tomcat/trunk/webapps/docs/jndi-resources-howto.xml Fri Oct  3 05:15:53 2008
@@ -592,7 +592,7 @@
 url - Connection URL to be passed to our JDBC driver.
 (For backwards compatibility, the property driverName
 is also recognized.)
-user - Database username to be passed to our
+username - Database username to be passed to our
 JDBC driver.
 validationQuery - SQL query that can be used by the
 pool to validate connections before they are returned to the



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



svn commit: r701363 - in /tomcat/tc6.0.x/trunk/webapps/docs: changelog.xml jndi-resources-howto.xml

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 05:18:34 2008
New Revision: 701363

URL: http://svn.apache.org/viewvc?rev=701363&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45940

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.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=701363&r1=701362&r2=701363&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Oct  3 05:18:34 2008
@@ -148,6 +148,14 @@
   
 
   
+  
+
+  
+45940: Correct name of username attribute for JDBC resources
+in JNDI how to. (markt)
+  
+
+  
   
 
   

Modified: tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml?rev=701363&r1=701362&r2=701363&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml Fri Oct  3 
05:18:34 2008
@@ -592,7 +592,7 @@
 url - Connection URL to be passed to our JDBC driver.
 (For backwards compatibility, the property driverName
 is also recognized.)
-user - Database username to be passed to our
+username - Database username to be passed to our
 JDBC driver.
 validationQuery - SQL query that can be used by the
 pool to validate connections before they are returned to the



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



DO NOT REPLY [Bug 45940] jndi-resources-howto.html lists 'user' not 'username' as a attribute

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45940


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 05:18:48 PST ---
Thanks for the report. This has been fixed in trunk and 6.0.x and will be in
6.0.19 onwards.


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

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



Re: svn commit: r701355 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java startup/LocalStrings.properties startup/TldConfig.java

2008-10-03 Thread Mark Thomas
Tim Funk wrote:
> Unless I am missing something - we will now have a one TldConfig per
> Context.
That is how it was before.

> And each TldConfig will have its own tldDigester.
No, tldDigester is static.

> But the
> tldDigester is only used once on startup to find all the listeners.
> 
> So tldDigester only needs to live for the life of execute() where
> eventType=Lifecycle.START_EVENT.
> 
> Long story short:
> I think tldDigester can now be a local variable in the execute() method.
> That way the tldDigester can be deallocated after startup by how the
> variable is scoped.
I'm not against that change although it may slow start-up slightly. I
haven't tested how expensive creating the parser is. It would also fix an
unreported bug that the xml validation settings are taken from the first
context and used for all contexts.

Mark

> 
> -Tim
> 
> [EMAIL PROTECTED] wrote:
>> Author: markt
>> Date: Fri Oct  3 04:53:28 2008
>> New Revision: 701355
>>
>> URL: http://svn.apache.org/viewvc?rev=701355&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45933
>> Don't use parser from web-app for tld files
>>
>> Modified:
>> tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
>> tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
>> tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
>> URL:
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=701355&r1=701354&r2=701355&view=diff
>>
>> ==
>>
>> --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
>> (original)
>> +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
>> Fri Oct  3 04:53:28 2008
>> @@ -4267,10 +4267,6 @@
>>  ((Lifecycle) pipeline).start();
>>  }
>>  -if(getProcessTlds()) {
>> -processTlds();
>> -}
>> - // Notify our interested
>> LifecycleListeners
>>  lifecycle.fireLifecycleEvent(START_EVENT, null);
>>  @@ -4481,40 +4477,6 @@
>>  }
>>  
>>  /**
>> - * Processes TLDs.
>> - *
>> - * @throws LifecycleException If an error occurs
>> - */
>> - protected void processTlds() throws LifecycleException {
>> -   TldConfig tldConfig = new TldConfig();
>> -   tldConfig.setContext(this);
>> -
>> -   // (1)  check if the attribute has been defined
>> -   //  on the context element.
>> -   tldConfig.setTldValidation(tldValidation);
>> -   tldConfig.setTldNamespaceAware(tldNamespaceAware);
>> -
>> -   // (2) if the attribute wasn't defined on the context
>> -   // try the host.
>> -   if (!tldValidation) {
>> - tldConfig.setTldValidation
>> -   (((StandardHost) getParent()).getXmlValidation());
>> -   }
>> -
>> -   if (!tldNamespaceAware) {
>> - tldConfig.setTldNamespaceAware
>> -   (((StandardHost) getParent()).getXmlNamespaceAware());
>> -   }
>> --   try {
>> - tldConfig.execute();
>> -   } catch (Exception ex) {
>> - log.error("Error reading tld listeners "
>> -+ ex.toString(), ex); -   }
>> - }
>> --/**
>>   * Stop this Context component.
>>   *
>>   * @exception LifecycleException if a shutdown error occurs
>> @@ -5327,6 +5289,10 @@
>>  return;
>>  }
>>  }
>> +if (processTlds) {
>> +this.addLifecycleListener(new TldConfig());
>> +}
>> +
>>  super.init();
>>   // Notify our interested LifecycleListeners
>>
>> Modified:
>> tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
>> URL:
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=701355&r1=701354&r2=701355&view=diff
>>
>> ==
>>
>> ---
>> tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
>> (original)
>> +++
>> tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
>> Fri Oct  3 04:53:28 2008
>> @@ -87,6 +87,8 @@
>>  hostConfig.undeploy=Undeploying context [{0}]
>>  hostConfig.undeploy.error=Error undeploying web application at
>> context path {0}
>>  hostConfig.undeploying=Undeploying deployed web applications
>> +tldConfig.cce=Lifecycle event data object {0} is not a Context
>> +tldConfig.execute=Error processing TLD files for context path {0}
>>  userConfig.database=Exception loading user database
>>  userConfig.deploy=Deploying web application for user {0}
>>  userConfig.deploying=Deploying user web applications
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/startup/

Re: svn commit: r701358 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

2008-10-03 Thread Remy Maucherat
On Fri, 2008-10-03 at 12:09 +, [EMAIL PROTECTED] wrote:
> Author: markt
> Date: Fri Oct  3 05:09:16 2008
> New Revision: 701358
> 
> URL: http://svn.apache.org/viewvc?rev=701358&view=rev
> Log:
> Better fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=45403
> With this patch, the allowLinking flag applies to all web application 
> resources. It is very slightly slower. On my machine with allowLinking=false, 
> the change to line 899 increases the time from ~7 microseconds to create the 
> file to ~70 microseconds to create and validate the file. As far as I can 
> tell, this change is only going to affect context start times. If directory 
> listings are enabled in the default servlet, they will also be slightly 
> slower but they were horribly slow to start with.

Only 10 times slower :)

Rémy



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



Re: svn commit: r701358 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

2008-10-03 Thread Mark Thomas
Remy Maucherat wrote:
> On Fri, 2008-10-03 at 12:09 +, [EMAIL PROTECTED] wrote:
>> Author: markt
>> Date: Fri Oct  3 05:09:16 2008
>> New Revision: 701358
>>
>> URL: http://svn.apache.org/viewvc?rev=701358&view=rev
>> Log:
>> Better fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=45403
>> With this patch, the allowLinking flag applies to all web application 
>> resources. It is very slightly slower. On my machine with 
>> allowLinking=false, the change to line 899 increases the time from ~7 
>> microseconds to create the file to ~70 microseconds to create and validate 
>> the file. As far as I can tell, this change is only going to affect context 
>> start times. If directory listings are enabled in the default servlet, they 
>> will also be slightly slower but they were horribly slow to start with.
> 
> Only 10 times slower :)

True, but we are talking micro seconds so in absolute terms it isn't that much.

Mark



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



DO NOT REPLY [Bug 45933] Error processing TLD file in webapp with XML parser

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45933





--- Comment #3 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 04:54:19 PST ---
Ignore my previous. I now have a test case.

Thanks for the report. This has been fixed in trunk and proposed for 6.0.x and
5.5.x.


-- 
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]



Re: svn commit: r701358 - /tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java

2008-10-03 Thread Remy Maucherat
On Fri, 2008-10-03 at 13:28 +0100, Mark Thomas wrote:
> Remy Maucherat wrote:
> > On Fri, 2008-10-03 at 12:09 +, [EMAIL PROTECTED] wrote:
> >> Author: markt
> >> Date: Fri Oct  3 05:09:16 2008
> >> New Revision: 701358
> >>
> >> URL: http://svn.apache.org/viewvc?rev=701358&view=rev
> >> Log:
> >> Better fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=45403
> >> With this patch, the allowLinking flag applies to all web application 
> >> resources. It is very slightly slower. On my machine with 
> >> allowLinking=false, the change to line 899 increases the time from ~7 
> >> microseconds to create the file to ~70 microseconds to create and validate 
> >> the file. As far as I can tell, this change is only going to affect 
> >> context start times. If directory listings are enabled in the default 
> >> servlet, they will also be slightly slower but they were horribly slow to 
> >> start with.
> > 
> > Only 10 times slower :)
> 
> True, but we are talking micro seconds so in absolute terms it isn't that 
> much.

So you tested on a pc with a very small amount of files and webapps, and
with everything in cache :) 

Rémy



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



Re: svn commit: r701355 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java startup/LocalStrings.properties startup/TldConfig.java

2008-10-03 Thread Tim Funk
Now I am more confused. So tldDigester is static. The init method sets 
setTldValidation and setTldNamespaceAware based on the first Context it 
encountered. (As well as the first StandardHost) So if another 
Context/StandardHost have different settings, they are ignored. (Which 
sounds like a different pre-existing "bug") In which case, not much to 
worry about. And since only one instance of tldDigester would exist 
(instead of one per context) - its not the end of the world with respect 
to memory waste.


-Tim

Mark Thomas wrote:

Tim Funk wrote:

Unless I am missing something - we will now have a one TldConfig per
Context.

That is how it was before.


And each TldConfig will have its own tldDigester.

No, tldDigester is static.


But the
tldDigester is only used once on startup to find all the listeners.

So tldDigester only needs to live for the life of execute() where
eventType=Lifecycle.START_EVENT.

Long story short:
I think tldDigester can now be a local variable in the execute() method.
That way the tldDigester can be deallocated after startup by how the
variable is scoped.

I'm not against that change although it may slow start-up slightly. I
haven't tested how expensive creating the parser is. It would also fix an
unreported bug that the xml validation settings are taken from the first
context and used for all contexts.


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



Re: svn commit: r701355 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java startup/LocalStrings.properties startup/TldConfig.java

2008-10-03 Thread Mark Thomas
Tim Funk wrote:
> Now I am more confused. So tldDigester is static. The init method sets
> setTldValidation and setTldNamespaceAware based on the first Context it
> encountered. (As well as the first StandardHost) So if another
> Context/StandardHost have different settings, they are ignored. (Which
> sounds like a different pre-existing "bug") In which case, not much to
> worry about.

The web.xml and context.xml digesters have the same problem (see
ContextConfig). Given the lack of bug reports, I suspect no-one uses these
settings or if they do, they set them the same for all hosts/contexts.

Mark

 And since only one instance of tldDigester would exist
> (instead of one per context) - its not the end of the world with respect
> to memory waste.
> 
> -Tim
> 
> Mark Thomas wrote:
>> Tim Funk wrote:
>>> Unless I am missing something - we will now have a one TldConfig per
>>> Context.
>> That is how it was before.
>>
>>> And each TldConfig will have its own tldDigester.
>> No, tldDigester is static.
>>
>>> But the
>>> tldDigester is only used once on startup to find all the listeners.
>>>
>>> So tldDigester only needs to live for the life of execute() where
>>> eventType=Lifecycle.START_EVENT.
>>>
>>> Long story short:
>>> I think tldDigester can now be a local variable in the execute() method.
>>> That way the tldDigester can be deallocated after startup by how the
>>> variable is scoped.
>> I'm not against that change although it may slow start-up slightly. I
>> haven't tested how expensive creating the parser is. It would also fix an
>> unreported bug that the xml validation settings are taken from the first
>> context and used for all contexts.
> 
> -
> 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: r701355 - in /tomcat/trunk/java/org/apache/catalina: core/StandardContext.java startup/LocalStrings.properties startup/TldConfig.java

2008-10-03 Thread Tim Funk

Mark Thomas wrote:

Tim Funk wrote:

Now I am more confused. So tldDigester is static. The init method sets
setTldValidation and setTldNamespaceAware based on the first Context it
encountered. (As well as the first StandardHost) So if another
Context/StandardHost have different settings, they are ignored. (Which
sounds like a different pre-existing "bug") In which case, not much to
worry about.


The web.xml and context.xml digesters have the same problem (see
ContextConfig). Given the lack of bug reports, I suspect no-one uses these
settings or if they do, they set them the same for all hosts/contexts.


That was my impression too as I looked at the code.

-Tim

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



DO NOT REPLY [Bug 45937] Function ':not' not found

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45937


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 05:54:34 PST ---
Sorry - my bad. It will be fixed in 6.0.19

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


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

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



DO NOT REPLY [Bug 45511] EL "empty" keyword does not work

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45511


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #4 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 05:54:34 PST ---
*** Bug 45937 has been marked as a duplicate of this bug. ***


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

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



svn commit: r701371 - in /tomcat/connectors/trunk/jk/xdocs: generic_howto/timeouts.xml miscellaneous/changelog.xml reference/workers.xml

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 06:12:11 2008
New Revision: 701371

URL: http://svn.apache.org/viewvc?rev=701371&view=rev
Log:
Enhance description of connection_pool_size in docs.

Modified:
tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml?rev=701371&r1=701370&r2=701371&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml Fri Oct  3 
06:12:11 2008
@@ -162,10 +162,15 @@
 to use this attribute in combination with Apache httpd. For
 Apache httpd we automatically detect the number of threads per
 process and set the maximum pool size to this value. For IIS we use
-a default value of 250, for the Sun Web Server the default is "1".
-We recommend adjusting this value for IIS and the Sun Web Server
+a default value of 250 (before version 1.2.20: 10),
+for the Sun Web Server the default is "1".
+We strongly recommend adjusting this value for IIS and the Sun Web Server
 to the number of requests one web server process should
-be able to send to a backend in parallel.
+be able to send to a backend in parallel. You should measure how many 
connections
+you need during peak hours without performance problems, and then add some
+percentage depending on your growth rate etc. Finally you should check,
+whether your web server processes are able to use at least as many threads,
+as you configured as the pool size.
 
 
 The JK attribute connection_pool_minsize defines,

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=701371&r1=701370&r2=701371&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Fri Oct  3 
06:12:11 2008
@@ -43,6 +43,9 @@
   
   
 
+  
+Documentation: Enhance description of connection_pool_size. (rjung)
+  
   
 IIS: SERVER_NAME variable can be the same for
 multiple different server instances if requests

Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?rev=701371&r1=701370&r2=701371&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Fri Oct  3 06:12:11 
2008
@@ -310,12 +310,21 @@
 process can made.
 
 Connection pool size property is only used for multi threaded
-web servers such as Apache 2.0 (worker), IIS and Netscape. The 
connection_pool_size property
-should reflect the number of threads per child process. JK will discover
-the number of threads per child process on Apache 2 web server with worker-mpm 
and set
-its default value to match the ThreadsPerChild Apache directive. For IIS the 
default
-value is 250. For other web servers than Apache or IIS the default value is 1
-and you should adjust it manually.
+web servers such as Apache, IIS and Netscape/Sun. The connection_pool_size 
property
+needs to reflect the number of requests one web server process should
+be able to send to a backend in parallel. Usually this is the same as
+the number of threads per web server process. JK will discover
+this number for the Apache web server automatically and set the pool size to
+this value. For IIS the default value is 250 (before version 1.2.20: 10),
+for Netscape/Sun the default value is 1.
+
+We strongly recommend adjusting this value for IIS and the Netscape/Sun
+to the number of requests one web server process should
+be able to send to a backend in parallel. You should measure how many 
connections
+you need during peak activity without performance problems, and then add some
+percentage depending on your growth rate. Finally you should check,
+whether your web server processes are able to use at least as many threads,
+as you configured as the pool size.
 
 Do not use connection_pool_size with values higher then 1 on Apache 
2.x prefork or Apache 1.3.x!
 



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



Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Yoav Shapira
On Fri, Oct 3, 2008 at 1:56 AM, Mladen Turk <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'd like to create a branch of connectors
> for native component so it depends on the
> new APR 1.3.x API

+1.

Like Mark, I'm also OK with removal.

Yoav

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



svn commit: r701379 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2008-10-03 Thread mturk
Author: mturk
Date: Fri Oct  3 06:37:22 2008
New Revision: 701379

URL: http://svn.apache.org/viewvc?rev=701379&view=rev
Log:
Use nicer error messages and unify its generation. Also make sure they are 
larger then 600 bytes, so IE displays them instead his own pages

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=701379&r1=701378&r2=701379&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Fri Oct  3 06:37:22 
2008
@@ -164,30 +164,252 @@
 #define MAX_INSTANCEID  32
 #define MAX_PACKET_SIZE 65536
 
-char HTML_ERROR_400[] = "\n"
-"Bad 
request!\n"
-"Bad request!\n"
-"Your browser (or proxy) sent a request that "
-"this server could not 
understand.";
-
-char HTML_ERROR_404[] = "\n"
-"Object not 
found!\n"
-"The requested URL was not found on 
this server"
-"\nIf you entered the URL manually 
please check your"
-"spelling and try again.";
-
-char HTML_ERROR_500[] = "\n"
-"Server 
error!\n"
-"Internal server error!\n"
-"The server encountered an internal error and 
was "
-"unable to complete your 
request.";
-
-char HTML_ERROR_503[] = "\n"
-"Service 
unavailable!\n"
-"Service temporary 
unavailable!\n"
-"The server is temporarily unable to service 
your "
-"request due to maintenance downtime or 
capacity problems. "
-"Please try again later.";
+char HTML_ERROR_HEAD[] ="\n"
+"http://www.w3c.org/TR/REC-html40/loose.dtd\";>\n"
+"\n\n"
+"\n"
+"\n"
+"body {\n"
+"   color: #00;\n"
+"   background-color: #FF;\n"
+"   font-family: Verdana, Tahoma, Arial, 
Helvetica, sans-serif;\n"
+"   font-size: 9pt;\n"
+"   margin: 10px 10px;\n"
+"}\n"
+"p#footer {\n"
+"   text-align: right;\n"
+"   font-size: 80%;\n"
+"}\n"
+"\n";
+
+#define HTML_ERROR_BODY_FMT 
"%s!\n\n\n%s!\n\n%s\n\n"
+
+char HTML_ERROR_TAIL[] =
"\n\n"
+VERSION_STRING "\n"
+" \n"
+"\n"
+"\n"
+"Copyright © 1999-2008 Apache Software 
Foundation\n"
+"All Rights Reserved\n"
+"\n\n\n";
+
+static struct error_reasons {
+int status;
+const char *reason;
+const char *title;
+const char *description;
+} error_reasons[] = {
+{ 100,
+  "Continue",
+  NULL,
+  NULL
+},
+{ 101,
+  "Switching Protocols",
+  NULL,
+  NULL
+},
+{ 200,
+  "OK",
+  NULL,
+  NULL
+},
+{ 201,
+  "Created",
+  NULL,
+  NULL
+},
+{ 202,
+  "Accepted",
+  NULL,
+  NULL
+},
+{ 203,
+  "Non-Authoritative Information",
+  NULL,
+  NULL
+},
+{ 204,
+  "No Content",
+  NULL,
+  NULL
+},
+{ 205,
+  "Reset Content",
+  NULL,
+  NULL
+},
+{ 206,
+  "Partial Content",
+  NULL,
+  NULL
+},
+{ 300,
+  "Multiple Choices",
+  NULL,
+  NULL
+},
+{ 301,
+  "Moved Permanently",
+  NULL,
+  NULL
+},
+{ 302,
+  "Moved Temporarily",
+  NULL,
+  NULL
+},
+{ 303,
+  "See Other",
+  NULL,
+  NULL
+},
+{ 304,
+  "Not Modified",
+  NULL,
+  NULL
+},
+{ 305,
+  "Use Proxy",
+  NULL,
+  NULL
+},
+{ 400,
+  "Bad Request",
+  "Bad Request",
+  "Your browser (or proxy) sent a request that "
+  "this server could not understand."
+},
+{ 401,
+  "Unauthorized",
+  NULL,
+  N

[Proposal] Create new bugzilla products for mod_jk and native

2008-10-03 Thread Mark Thomas
I would like to propose creating two new products in bugzilla:

- Tomcat mod_jk
- Tomcat APR-native

I am open to suggestions for better component names.

The bug reporting pages on the website and in the docs would need to be
updated.

Advantages:
- All issues in a single place instead of assigned to the Tomcat version
the OP happens to be using
- The connector versions will be used instead of the Tomcat version the OP
happens to be using

Disadvantages
- A deluge of e-mail as the bugs are moved around

The e-mail deluge I can deal with by re-routing all the Tomcat bugs to me
rather than the list whilst I do the move. Any 'genuine' bug mail I will
forward to the dev list.

Mark


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



Re: [Proposal] Create new bugzilla products for mod_jk and native

2008-10-03 Thread Henri Gomez
Good idea

But to follow the http://tomcat.apache.org/ names, Tomcat Connectors
and Tomcat Native will be better ?

2008/10/3 Mark Thomas <[EMAIL PROTECTED]>:
> I would like to propose creating two new products in bugzilla:
>
> - Tomcat mod_jk
> - Tomcat APR-native
>
> I am open to suggestions for better component names.
>
> The bug reporting pages on the website and in the docs would need to be
> updated.
>
> Advantages:
> - All issues in a single place instead of assigned to the Tomcat version
> the OP happens to be using
> - The connector versions will be used instead of the Tomcat version the OP
> happens to be using
>
> Disadvantages
> - A deluge of e-mail as the bugs are moved around
>
> The e-mail deluge I can deal with by re-routing all the Tomcat bugs to me
> rather than the list whilst I do the move. Any 'genuine' bug mail I will
> forward to the dev list.
>
> 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: [Proposal] Create new bugzilla products for mod_jk and native

2008-10-03 Thread Mark Thomas
Henri Gomez wrote:
> Good idea
> 
> But to follow the http://tomcat.apache.org/ names, Tomcat Connectors
> and Tomcat Native will be better ?

I like it.

Mark



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



svn commit: r701383 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 07:01:34 2008
New Revision: 701383

URL: http://svn.apache.org/viewvc?rev=701383&view=rev
Log:
Add define USE_RAW_HEADERS:
Possible Fix for BZ 38895: We are mixing up "_" and "-"
because we are using the CGI style IIS headers instead of
the original raw ones.
Needs a bit more testing, but looked good in January.
And: Finally a fix that shortens the code ...

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=701383&r1=701382&r2=701383&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Fri Oct  3 07:01:34 
2008
@@ -81,11 +81,17 @@
 #define WORKER_HEADER_NAME_BASE   ("TOMCATWORKER")
 #define WORKER_HEADER_INDEX_BASE  ("TOMCATWORKERIDX")
 #define TOMCAT_TRANSLATE_HEADER_NAME_BASE ("TOMCATTRANSLATE")
+#ifdef USE_RAW_HEADERS
+#define CONTENT_LENGTH("CONTENT-LENGTH:")
+#else
 #define CONTENT_LENGTH("CONTENT_LENGTH:")
+#endif
 
 /* The HTTP_ form of the header for use in ExtensionProc */
 #define HTTP_HEADER_PREFIX   "HTTP_"
+#ifndef USE_RAW_HEADERS
 #define HTTP_HEADER_PREFIX_LEN   5
+#endif
 
 /* The template used to construct our unique headers
  * from the base name and module instance
@@ -413,7 +419,9 @@
 
 
 #define STRNULL_FOR_NULL(x) ((x) ? (x) : "(null)")
+#ifndef USE_RAW_HEADERS
 #define JK_TOLOWER(x)   ((char)tolower((BYTE)(x)))
+#endif
 
 #define GET_SERVER_VARIABLE_VALUE(name, place)  \
   do {  \
@@ -2835,7 +2843,11 @@
 
 huge_buf_sz = MAX_PACKET_SIZE;
 if (get_server_value(private_data->lpEcb,
+#ifdef USE_RAW_HEADERS
+ "ALL_RAW", huge_buf, huge_buf_sz)) {
+#else
  "ALL_HTTP", huge_buf, huge_buf_sz)) {
+#endif
 unsigned int cnt = 0;
 char *tmp;
 
@@ -2868,8 +2880,10 @@
 for (i = 0, tmp = headers_buf; *tmp && i < cnt;) {
 int real_header = JK_TRUE;
 
+#ifndef USE_RAW_HEADERS
 /* Skip the HTTP_ prefix to the beginning of the header name */
 tmp += HTTP_HEADER_PREFIX_LEN;
+#endif
 
 if (!strnicmp(tmp, URI_HEADER_NAME, strlen(URI_HEADER_NAME))
 || !strnicmp(tmp, WORKER_HEADER_NAME,
@@ -2900,12 +2914,14 @@
 }
 
 while (':' != *tmp && *tmp) {
+#ifndef USE_RAW_HEADERS
 if ('_' == *tmp) {
 *tmp = '-';
 }
 else {
 *tmp = JK_TOLOWER(*tmp);
 }
+#endif
 tmp++;
 }
 *tmp = '\0';



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



Re: [Proposal] Create new bugzilla products for mod_jk and native

2008-10-03 Thread Mladen Turk

Mark Thomas wrote:

I would like to propose creating two new products in bugzilla:

- Tomcat mod_jk


+1


- Tomcat APR-native



Tomcat Native
(we have tomcat-native-x.x.x, not tomcat-apr-native)


Regards
--
^(TM)

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



DO NOT REPLY [Bug 45931] trimSpaces incorrectly modifies output

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45931


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 07:20:41 PST ---
trimSpaces is equivalent to trimDirectiveWhitespaces

Section JSP.3.3.8 is clear that the whitespace must be removed completely.

trimSpaces can currently be true or false. I would not be against an
enhancement that added the value "single" and in that case using the code in
your patch.

Let us know if you need some pointers on writing a new patch.


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

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



DO NOT REPLY [Bug 39530] Tomcat 5.5.17 generates incorrect code with trimSpaces turned on.

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39530


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Comment #6 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 07:23:07 PST ---
Although the 2.0 JSP spec doesn't refer to trimming spaces, the 2.1 spec does.
I think it is reasonable for Tomcat 5.5.x to be consistent with 6.0.x.

The JSP 2.1 spec requires that trim spaces removes all of the whitespace. See
bug 45931 for more information.


-- 
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]



Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Rainer Jung
Mladen Turk schrieb:
> Hi,
> 
> I'd like to create a branch of connectors
> for native component so it depends on the
> new APR 1.3.x API
> The new API offers some essential features targeted
> explicitly for pool issues usage in
> high level languages like Java.
> 
> So, my idea is to branch the current trunk
> as connectors/branches/other/native/1.1.x
> and continue development in trunk with
> APR 1.3.x as minimum version required.
> This would be 1.3.x version of tomcat-native
> (to match the required APR version)
> dist-source target in dist.xml to include
> Any further 1.1.x release for Tomcat 6 would
> in that case be released out of that branch.
> 
> Also inside tomcat/6.0.x branch
> we have svn:external 'native' pointing to
> connector:
> svn.apache.org/repos/asf/tomcat/connectors/trunk/jni/native
> 
> This would either be changed to point to that new branch or
> get completely removed now when we have tomcat-native releases.
> 
> 
> Comments?

Branching sounds good.

The native external is used in the dist.xml build file in order to
include the tcnative sources in the TC src release. So either we need to
adjust this part of TC build process, or simply switch the external for
TC 6.0.x to the 1.1 branch (and keep TC trunk native external pointing
to connectors trunk).

I expect you plan to branch all of connectors and not only jni/native?

Whenever that native trunk gets released the first time, we should
rethink the versioning though. I guess 1.2.x would make more sense than
1.3.x. We are now at 1.1.x, which is based on APR 1.2.x (and might work
with 0.9 too), so expressing any direct version dependency could be
confusing.

Regards,

Rainer

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



Re: [Proposal] Create new bugzilla products for mod_jk and native

2008-10-03 Thread Jim Jagielski

+1

On Oct 3, 2008, at 9:47 AM, Mark Thomas wrote:


I would like to propose creating two new products in bugzilla:

- Tomcat mod_jk
- Tomcat APR-native

I am open to suggestions for better component names.

The bug reporting pages on the website and in the docs would need to  
be

updated.

Advantages:
- All issues in a single place instead of assigned to the Tomcat  
version

the OP happens to be using
- The connector versions will be used instead of the Tomcat version  
the OP

happens to be using

Disadvantages
- A deluge of e-mail as the bugs are moved around

The e-mail deluge I can deal with by re-routing all the Tomcat bugs  
to me
rather than the list whilst I do the move. Any 'genuine' bug mail I  
will

forward to the dev list.

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: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Jim Jagielski


On Oct 3, 2008, at 9:33 AM, Yoav Shapira wrote:


On Fri, Oct 3, 2008 at 1:56 AM, Mladen Turk <[EMAIL PROTECTED]> wrote:

Hi,

I'd like to create a branch of connectors
for native component so it depends on the
new APR 1.3.x API


+1.

Like Mark, I'm also OK with removal.



+1


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



Re: [Proposal] Create new bugzilla products for mod_jk and native

2008-10-03 Thread Rainer Jung
Mark Thomas schrieb:
> I would like to propose creating two new products in bugzilla:
> 
> - Tomcat mod_jk
> - Tomcat APR-native

Great initiative.

> I am open to suggestions for better component names.

I like Henri's suggestions, Tomcat Connectors and Tomcat Native.
Although mod_jk is the more often used term, stictly speaking we don't
use it for the isapi and nsapi variants and in the announcement mails,
and we use the Tomcat XXX terms on the Tomcat home page for
documentation and download links too.

At least on https://issues.apache.org/bugzilla/enter_bug.cgi one can add
an explaining line, what the name refers to. On the search mask, there
is only the product name though.

Regards,

Rainer

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



svn commit: r701414 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 08:37:04 2008
New Revision: 701414

URL: http://svn.apache.org/viewvc?rev=701414&view=rev
Log:
Only allow JkWatchdogInterval in global context.

Modified:
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=701414&r1=701413&r2=701414&view=diff
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Oct  3 08:37:04 
2008
@@ -1182,6 +1182,11 @@
 static const char *jk_set_watchdog_interval(cmd_parms * cmd,
 void *dummy, const char 
*watchdog_interval)
 {
+const char *err_string = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+if (err_string != NULL) {
+return err_string;
+}
+
 #if APR_HAS_THREADS
 jk_watchdog_interval = atoi(watchdog_interval);
 if (jk_watchdog_interval < 0) {



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



DO NOT REPLY [Bug 45015] Quoting in attributes

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45015


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WORKSFORME




--- Comment #8 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 08:39:53 PST ---
I have done some more testing and I can't repeat the issue reported in comment
6. If you still see it, please re-open this report and add the simplest JSP
that demonstrates the issue.


-- 
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]



Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Mladen Turk

Rainer Jung wrote:

Mladen Turk schrieb:

The native external is used in the dist.xml build file in order to
include the tcnative sources in the TC src release. So either we need to
adjust this part of TC build process, or simply switch the external for
TC 6.0.x to the 1.1 branch (and keep TC trunk native external pointing
to connectors trunk).



Right. We should use the released tarballs.
The svn:external was simply the easiest to do, but now
when we have native releases, those should be downloaded
and unpacked on build according to the version in
build.properties



Whenever that native trunk gets released the first time, we should
rethink the versioning though. I guess 1.2.x would make more sense than
1.3.x. We are now at 1.1.x, which is based on APR 1.2.x (and might work
with 0.9 too), so expressing any direct version dependency could be
confusing.



Sure, 1.2.x is fine.

Regards
--
^(TM)

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



svn commit: r701432 - in /tomcat/trunk: java/org/apache/el/lang/ELSupport.java test/org/apache/el/lang/TestELSupport.java

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 09:19:01 2008
New Revision: 701432

URL: http://svn.apache.org/viewvc?rev=701432&view=rev
Log:
Fix regression in previous fix for 
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656
Patch provided by Nils Eckert.

Modified:
tomcat/trunk/java/org/apache/el/lang/ELSupport.java
tomcat/trunk/test/org/apache/el/lang/TestELSupport.java

Modified: tomcat/trunk/java/org/apache/el/lang/ELSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELSupport.java?rev=701432&r1=701431&r2=701432&view=diff
==
--- tomcat/trunk/java/org/apache/el/lang/ELSupport.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ELSupport.java Fri Oct  3 09:19:01 2008
@@ -224,18 +224,18 @@
 return ((BigDecimal) number).toBigInteger();
 }
 if (number instanceof BigInteger) {
-return new BigInteger(number.toString());
+return number;
 }
 return BigInteger.valueOf(number.longValue());
 }
 if (BigDecimal.class.equals(type)) {
 if (number instanceof BigDecimal) {
-return new BigDecimal(number.toString());
+return number;
 }
 if (number instanceof BigInteger) {
 return new BigDecimal((BigInteger) number);
 }
-return new BigDecimal(number.doubleValue());
+return new BigDecimal(number.toString());
 }
 if (Byte.TYPE == type || Byte.class.equals(type)) {
 return new Byte(number.byteValue());
@@ -341,7 +341,7 @@
 public final static Object coerceToType(final Object obj, final Class type)
 throws IllegalArgumentException {
 if (type == null || Object.class.equals(type) ||
-(obj != null && type.equals(obj.getClass( {
+(obj != null && type.isAssignableFrom(obj.getClass( {
 return obj;
 }
 if (String.class.equals(type)) {
@@ -356,9 +356,6 @@
 if (Boolean.class.equals(type) || Boolean.TYPE == type) {
 return coerceToBoolean(obj);
 }
-if (obj != null && type.isAssignableFrom(obj.getClass())) {
-return obj;
-}
 if (type.isEnum()) {
 return coerceToEnum(obj, type);
 }

Modified: tomcat/trunk/test/org/apache/el/lang/TestELSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/lang/TestELSupport.java?rev=701432&r1=701431&r2=701432&view=diff
==
--- tomcat/trunk/test/org/apache/el/lang/TestELSupport.java (original)
+++ tomcat/trunk/test/org/apache/el/lang/TestELSupport.java Fri Oct  3 09:19:01 
2008
@@ -56,6 +56,12 @@
 testIsSame(Float.valueOf(0.123456F));
 }
 
+public void testCoerceIntegerToNumber() {
+Integer input = 4390241;
+Object output = ELSupport.coerceToType(input, Number.class);
+assertEquals(input, output);
+}
+
 private static void testIsSame(Object value) {
 assertEquals(value, ELSupport.coerceToNumber(value, value.getClass()));
 }



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



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

2008-10-03 Thread markt
Author: markt
Date: Fri Oct  3 09:21:52 2008
New Revision: 701433

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

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=701433&r1=701432&r2=701433&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct  3 09:21:52 2008
@@ -265,3 +265,9 @@
   http://svn.apache.org/viewvc?rev=701358&view=rev
   +1: markt
   -1: 
+
+* Fix regression in https://issues.apache.org/bugzilla/show_bug.cgi?id=43656
+  Patch provided by Nils Eckert
+  https://issues.apache.org/bugzilla/show_bug.cgi?id=43656
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #9 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 09:22:13 PST ---
Thanks for the patch.

I have committed it to trunk and proposed it for 6.0.x


-- 
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: r701434 - /tomcat/current/tc4.1.x/STATUS.txt

2008-10-03 Thread fhanik
Author: fhanik
Date: Fri Oct  3 09:25:06 2008
New Revision: 701434

URL: http://svn.apache.org/viewvc?rev=701434&view=rev
Log:
vote

Modified:
tomcat/current/tc4.1.x/STATUS.txt

Modified: tomcat/current/tc4.1.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc4.1.x/STATUS.txt?rev=701434&r1=701433&r2=701434&view=diff
==
--- tomcat/current/tc4.1.x/STATUS.txt (original)
+++ tomcat/current/tc4.1.x/STATUS.txt Fri Oct  3 09:25:06 2008
@@ -27,7 +27,7 @@
 
 * Add a NOTICE file to the TC4 distribution
   http://people.apache.org/~markt/patches/2008-09-25-tc4-notice.patch
-  +1: markt, rjung
+  +1: markt, rjung, fhanik
   -1: 
   rjung: I didn't do a detailed check on the contents of the added licenses.
   But technically everything looks fine and of course there's no



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



svn commit: r701435 - in /tomcat/connectors/trunk/jk/native: apache-2.0/mod_jk.c iis/jk_isapi_plugin.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 09:35:57 2008
New Revision: 701435

URL: http://svn.apache.org/viewvc?rev=701435&view=rev
Log:
Minor watchdig enhancements:
- Reset watchdog interval to 0, if thread creation
  fails (so we use the request based maintenance)
  and any partially initialized thread might stop.
- Let Apache log similar messages as IIS
- Check and correct negative interval values in IIS like
  we do in Apache
- Use JK log for thread creation error message, because
  at that time we already have it available.

Modified:
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=701435&r1=701434&r2=701435&view=diff
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Oct  3 09:35:57 
2008
@@ -2820,7 +2820,8 @@
 
 if (JK_IS_DEBUG_LEVEL(conf->log))
 jk_log(conf->log, JK_LOG_DEBUG,
-   "Watchdog initialized");
+   "Watchdog thread initialized with %d second interval",
+   jk_watchdog_interval);
 for (;;) {
 for (i = 0; i < jk_watchdog_interval; i++) {
 apr_sleep(apr_time_from_sec(1));
@@ -2831,7 +2832,7 @@
 break;
 if (JK_IS_DEBUG_LEVEL(conf->log))
jk_log(conf->log, JK_LOG_DEBUG,
-  "Watchdog running");
+  "Watchdog thread running");
 wc_maintain(conf->log);
 }
 return NULL;
@@ -2862,8 +2863,9 @@
 #if APR_HAS_THREADS
 rv = apr_thread_create(&wdt, NULL, jk_watchdog_func, conf, pconf);
 if (rv != APR_SUCCESS) {
-ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
- "mod_jk: could not init JK watchdog thread");
+jk_log(conf->log, JK_LOG_ERROR,
+   "Could not init watchdog thread, error=%d", rv);
+jk_watchdog_interval = 0;
 }
 apr_thread_detach(wdt);
 #endif

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=701435&r1=701434&r2=701435&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Fri Oct  3 09:35:57 
2008
@@ -2579,6 +2579,8 @@
 #endif
 reject_unsafe = get_config_bool(src, REJECT_UNSAFE_TAG, JK_FALSE);
 watchdog_interval = get_config_int(src, WATCHDOG_INTERVAL_TAG, 0);
+if (watchdog_interval < 0)
+watchdog_interval = 0;
 #ifdef ISAPI_ALLOW_CHUNKING
 chunked_encoding_enabled = get_config_bool(src, 
ENABLE_CHUNKED_ENCODING_TAG, JK_FALSE);
 #endif



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



svn commit: r701441 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 09:45:49 2008
New Revision: 701441

URL: http://svn.apache.org/viewvc?rev=701441&view=rev
Log:
In order to fallback to traditional maintenance with IIS,
we must also reset watchdog_interval. But then it is
natural to use watchdog_interval and not is_inited as
a thread stop trigger for IIS, as we do for Apache.

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=701441&r1=701440&r2=701441&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Fri Oct  3 09:45:49 
2008
@@ -2199,6 +2199,7 @@
 
 if (is_inited) {
 is_inited = JK_FALSE;
+watchdog_interval = 0;
 if (watchdog_handle) {
 WaitForSingleObject(watchdog_handle, INFINITE);
 CloseHandle(watchdog_handle);
@@ -2294,13 +2295,13 @@
"Watchdog thread initialized with %u second interval",
watchdog_interval);
 }
-while (is_inited) {
+while (watchdog_interval) {
 for (i = 0; i < (watchdog_interval * 10); i++) {
-if (!is_inited)
+if (!watchdog_interval)
 break;
 Sleep(100);
 }
-if (!is_inited)
+if (!watchdog_interval)
 break;
 if (JK_IS_DEBUG_LEVEL(logger)) {
 jk_log(logger, JK_LOG_DEBUG,
@@ -2486,6 +2487,7 @@
 if (!watchdog_handle) {
 jk_log(logger, JK_LOG_EMERG, "Error %d (0x%08x) creating 
Watchdog thread",
GetLastError(), GetLastError());
+watchdog_interval = 0;
 }
 }
 jk_log(logger, JK_LOG_INFO, "%s initialized", (VERSION_STRING));



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



Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Costin Manolache
There are few issues and questions, I'm not sure its as simple as it looks
:-)

For new development - are you going to make changes in both branches ? I
assume there will be
features that can only be done in 1.3.

Also, if we have separate releases of APR - are we going to release binaries
? For both ?
What is the apr version in common linux distros ?

Is this something that can't be done with #ifdefs and compilation tricks ?

Costin

On Thu, Oct 2, 2008 at 10:56 PM, Mladen Turk <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I'd like to create a branch of connectors
> for native component so it depends on the
> new APR 1.3.x API
> The new API offers some essential features targeted
> explicitly for pool issues usage in
> high level languages like Java.
>
> So, my idea is to branch the current trunk
> as connectors/branches/other/native/1.1.x
> and continue development in trunk with
> APR 1.3.x as minimum version required.
> This would be 1.3.x version of tomcat-native
> (to match the required APR version)
>
> Any further 1.1.x release for Tomcat 6 would
> in that case be released out of that branch.
>
> Also inside tomcat/6.0.x branch
> we have svn:external 'native' pointing to
> connector:
> svn.apache.org/repos/asf/tomcat/connectors/trunk/jni/native
>
> This would either be changed to point to that new branch or
> get completely removed now when we have tomcat-native releases.
>
>
> Comments?
>
> Regards
> --
> ^(TM)
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


svn commit: r701449 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 10:19:46 2008
New Revision: 701449

URL: http://svn.apache.org/viewvc?rev=701449&view=rev
Log:
Whitespace and indentation cleanup.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?rev=701449&r1=701448&r2=701449&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Fri Oct  3 10:19:46 
2008
@@ -932,43 +932,43 @@
 
 static jk_uint32_t status_cmd_props(int cmd)
 {
-  jk_uint32_t props = 0;
+jk_uint32_t props = 0;
+
+if (cmd == JK_STATUS_CMD_LIST ||
+cmd == JK_STATUS_CMD_SHOW)
+props |= JK_STATUS_CMD_PROP_REFRESH |
+ JK_STATUS_CMD_PROP_SWITCH_RO |
+ JK_STATUS_CMD_PROP_LINK_HELP |
+ JK_STATUS_CMD_PROP_LEGEND;
+if (cmd == JK_STATUS_CMD_LIST ||
+cmd == JK_STATUS_CMD_SHOW ||
+cmd == JK_STATUS_CMD_VERSION)
+props |= JK_STATUS_CMD_PROP_DUMP_LINK;
+if (cmd == JK_STATUS_CMD_LIST ||
+cmd == JK_STATUS_CMD_SHOW ||
+cmd == JK_STATUS_CMD_VERSION ||
+cmd == JK_STATUS_CMD_DUMP)
+props |= JK_STATUS_CMD_PROP_HEAD |
+ JK_STATUS_CMD_PROP_FMT;
+if (cmd == JK_STATUS_CMD_SHOW ||
+cmd == JK_STATUS_CMD_VERSION ||
+cmd == JK_STATUS_CMD_DUMP)
+props |= JK_STATUS_CMD_PROP_BACK_LIST;
+if (cmd == JK_STATUS_CMD_SHOW ||
+cmd == JK_STATUS_CMD_EDIT ||
+cmd == JK_STATUS_CMD_VERSION ||
+cmd == JK_STATUS_CMD_DUMP)
+props |= JK_STATUS_CMD_PROP_BACK_LINK;
+if (cmd != JK_STATUS_CMD_EDIT &&
+cmd != JK_STATUS_CMD_UPDATE &&
+cmd != JK_STATUS_CMD_RESET &&
+cmd != JK_STATUS_CMD_RECOVER)
+props |= JK_STATUS_CMD_PROP_READONLY;
+if (cmd != JK_STATUS_CMD_LIST &&
+cmd != JK_STATUS_CMD_VERSION &&
+cmd != JK_STATUS_CMD_DUMP)
+props |= JK_STATUS_CMD_PROP_CHECK_WORKER;
 
-  if (cmd == JK_STATUS_CMD_LIST ||
-  cmd == JK_STATUS_CMD_SHOW)
-  props |= JK_STATUS_CMD_PROP_REFRESH |
-   JK_STATUS_CMD_PROP_SWITCH_RO |
-   JK_STATUS_CMD_PROP_LINK_HELP |
-   JK_STATUS_CMD_PROP_LEGEND;
-  if (cmd == JK_STATUS_CMD_LIST ||
-  cmd == JK_STATUS_CMD_SHOW ||
-  cmd == JK_STATUS_CMD_VERSION)
-  props |= JK_STATUS_CMD_PROP_DUMP_LINK;
-  if (cmd == JK_STATUS_CMD_LIST ||
-  cmd == JK_STATUS_CMD_SHOW ||
-  cmd == JK_STATUS_CMD_VERSION ||
-  cmd == JK_STATUS_CMD_DUMP)
-  props |= JK_STATUS_CMD_PROP_HEAD |
-   JK_STATUS_CMD_PROP_FMT;
-  if (cmd == JK_STATUS_CMD_SHOW ||
-  cmd == JK_STATUS_CMD_VERSION ||
-  cmd == JK_STATUS_CMD_DUMP)
-  props |= JK_STATUS_CMD_PROP_BACK_LIST;
-  if (cmd == JK_STATUS_CMD_SHOW ||
-  cmd == JK_STATUS_CMD_EDIT ||
-  cmd == JK_STATUS_CMD_VERSION ||
-  cmd == JK_STATUS_CMD_DUMP)
-  props |= JK_STATUS_CMD_PROP_BACK_LINK;
-  if (cmd != JK_STATUS_CMD_EDIT &&
-  cmd != JK_STATUS_CMD_UPDATE &&
-  cmd != JK_STATUS_CMD_RESET &&
-  cmd != JK_STATUS_CMD_RECOVER)
-  props |= JK_STATUS_CMD_PROP_READONLY;
-  if (cmd != JK_STATUS_CMD_LIST &&
-  cmd != JK_STATUS_CMD_VERSION &&
-  cmd != JK_STATUS_CMD_DUMP)
-  props |= JK_STATUS_CMD_PROP_CHECK_WORKER;
-  
 return props;
 }
 
@@ -1340,7 +1340,7 @@
 if (idx) {
 if (jk_wildchar_match(wr->name, sub_worker, 0) == 0) {
 *idx = i + 1;
-break;
+break;
 }
 }
 else if (strcmp(sub_worker, wr->name) == 0)
@@ -1818,7 +1818,7 @@
 jk_printf(s, " time_to_recover_min=%d", rs_min);
 jk_printf(s, " time_to_recover_max=%d", rs_max);
 }
-else 
+else
 jk_printf(s, " map_count=%d", map_count);
 jk_puts(s, "\n");
 
@@ -3853,7 +3853,7 @@
 JK_TRACE_EXIT(l);
 return JK_FALSE;
 }
-
+
 if (!sub_worker || !sub_worker[0]) {
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,



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



DO NOT REPLY [Bug 45931] trimSpaces incorrectly modifies output

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45931





--- Comment #2 from Meetesh Karia <[EMAIL PROTECTED]>  2008-10-03 10:22:50 PST 
---
Hi Mark,

Thanks for the comment.  The main question I have is whether you'd want to
leave the -trimspaces option for JspC backwards-compatible (ie, if there's no
"true", "false", or "single" after it, treat it as "true"), or whether you'd be
ok with changing the behavior to requiring the value after the flag.

Also, if there's anything else that's important to keep in mind when writing a
patch for tomcat, please share.

Thanks!

(In reply to comment #1)
> trimSpaces is equivalent to trimDirectiveWhitespaces
> 
> Section JSP.3.3.8 is clear that the whitespace must be removed completely.
> 
> trimSpaces can currently be true or false. I would not be against an
> enhancement that added the value "single" and in that case using the code in
> your patch.
> 
> Let us know if you need some pointers on writing a new patch.
> 


-- 
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: r701454 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 10:30:57 2008
New Revision: 701454

URL: http://svn.apache.org/viewvc?rev=701454&view=rev
Log:
Whitespace and indentation cleanup.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=701454&r1=701453&r2=701454&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Fri Oct  3 10:30:57 
2008
@@ -282,7 +282,7 @@
 }
 
 /* Syncing config values from shm */
-void jk_lb_pull(lb_worker_t * p, jk_logger_t *l)
+void jk_lb_pull(lb_worker_t *p, jk_logger_t *l)
 {
 unsigned int i = 0;
 
@@ -331,7 +331,7 @@
 }
 
 /* Syncing config values to shm */
-void jk_lb_push(lb_worker_t * p, jk_logger_t *l)
+void jk_lb_push(lb_worker_t *p, jk_logger_t *l)
 {
 unsigned int i = 0;
 
@@ -491,7 +491,7 @@
 return val;
 }
 
-static void close_workers(lb_worker_t * p, int num_of_workers, jk_logger_t *l)
+static void close_workers(lb_worker_t *p, int num_of_workers, jk_logger_t *l)
 {
 int i = 0;
 for (i = 0; i < num_of_workers; i++) {
@@ -823,7 +823,7 @@
 }
 
 static int find_failover_worker(jk_ws_service_t *s,
-lb_worker_t * p,
+lb_worker_t *p,
 int *states,
 jk_logger_t *l)
 {
@@ -843,7 +843,7 @@
 }
 
 static int find_best_worker(jk_ws_service_t *s,
-lb_worker_t * p,
+lb_worker_t *p,
 int *states,
 jk_logger_t *l)
 {
@@ -857,7 +857,7 @@
 }
 
 static lb_sub_worker_t *get_most_suitable_worker(jk_ws_service_t *s,
- lb_worker_t * p,
+ lb_worker_t *p,
  char *sessionid,
  int *states,
  jk_logger_t *l)
@@ -1227,6 +1227,9 @@
 if (rec->s->busy)
 rec->s->busy--;
 if (service_stat == JK_TRUE) {
+/*
+ * Successful request.
+ */
 rec->s->state  = JK_LB_STATE_OK;
 p->states[rec->i] = JK_LB_STATE_OK;
 rec->s->error_time = 0;
@@ -1235,9 +1238,9 @@
 }
 else if (service_stat == JK_CLIENT_ERROR) {
 /*
-* Client error !!!
-* Since this is bad request do not fail over.
-*/
+ * Client error !!!
+ * Since this is bad request do not fail over.
+ */
 rec->s->state  = JK_LB_STATE_OK;
 p->states[rec->i] = JK_LB_STATE_ERROR;
 rec->s->error_time = 0;
@@ -1246,10 +1249,10 @@
 }
 else if (service_stat == JK_SERVER_ERROR) {
 /*
-* Internal JK server error
-* Don't mark the node as bad.
-* Failing over to another node could help.
-*/
+ * Internal JK server error.
+ * Don't mark the node as bad.
+ * Failing over to another node could help.
+ */
 rec->s->state  = JK_LB_STATE_OK;
 p->states[rec->i] = JK_LB_STATE_ERROR;
 rec->s->error_time = 0;
@@ -1257,10 +1260,10 @@
 }
 else if (service_stat == JK_STATUS_ERROR) {
 /*
-* Status code configured as service is down.
-* Don't mark the node as bad.
-* Failing over to another node could help.
-*/
+ * Status code configured as service is down.
+ * Don't mark the node as bad.
+ * Failing over to another node could help.
+ */
 rec->s->state  = JK_LB_STATE_OK;
 p->states[rec->i] = JK_LB_STATE_ERROR;
 rec->s->error_time = 0;
@@ -1268,10 +1271,10 @@
 }
 else if (service_stat == JK_STATUS_FATAL_ERROR) {
 /*
-* Status code configured as service is down.
-* Mark the node as bad.
-* Failing over to another node could help.
-*/
+ * Status code configured as service is down.
+ *

svn commit: r701459 - /tomcat/connectors/trunk/jk/native/common/jk_status.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 10:34:30 2008
New Revision: 701459

URL: http://svn.apache.org/viewvc?rev=701459&view=rev
Log:
connection_keepalive -> connection_ping_interval
in status worker output.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_status.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?rev=701459&r1=701458&r2=701459&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Fri Oct  3 10:34:30 
2008
@@ -1788,7 +1788,7 @@
 jk_printf(s, " prepost_timeout=%d", aw->prepost_timeout);
 jk_printf(s, " reply_timeout=%d", aw->reply_timeout);
 jk_printf(s, " retries=%d", aw->retries);
-jk_printf(s, " connection_keepalive=%d", aw->conn_ping_interval);
+jk_printf(s, " connection_ping_interval=%d", aw->conn_ping_interval);
 jk_printf(s, " recovery_options=%u", aw->recovery_opts);
 jk_printf(s, " max_packet_size=%u", aw->max_packet_size);
 if (lb) {



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



Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Mladen Turk

Costin Manolache wrote:

There are few issues and questions, I'm not sure its as simple as it looks
:-)

For new development - are you going to make changes in both branches ? I
assume there will be
features that can only be done in 1.3.



Right.
1.1.x will be in bug fixing mode


Also, if we have separate releases of APR - are we going to release binaries
? For both ?


Right. 1.1.x will be released for bug fixing purposes.
It's quite stable these days, and there's no need for polluting
that with new features or changed way of pool management.


What is the apr version in common linux distros ?



Depends, Httpd 2.2.+ relies on APR 1.3. SVN as well,
so eventually distros will pick it up.


Is this something that can't be done with #ifdefs and compilation tricks ?



Nope. That's a nightmare to maintain, and doesn't resolve anything
from binary standpoint.


Regards
--
^(TM)

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



DO NOT REPLY [Bug 45931] trimSpaces incorrectly modifies output

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45931


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Comment #3 from Mark Thomas <[EMAIL PROTECTED]>  2008-10-03 10:50:13 PST ---
Keep the current behaviour (ie true) if nothing is specified for trimspaces
since that is backwards compatible.

Things to keep in mind:
 - patches should be in diff -u format
 - avoid changing stuff that isn't relevant (ie don't mix a functional patch
with code clean-up)
 - keep the patch as simple as you can

Note I have re-opened this as an enhancement so it doesn't get lost.


-- 
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: r701478 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 11:22:15 2008
New Revision: 701478

URL: http://svn.apache.org/viewvc?rev=701478&view=rev
Log:
Wake up watchdog in Apache every 100ms, like we do in IIS.

Modified:
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=701478&r1=701477&r2=701478&view=diff
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Fri Oct  3 11:22:15 
2008
@@ -2824,7 +2824,8 @@
jk_watchdog_interval);
 for (;;) {
 for (i = 0; i < jk_watchdog_interval; i++) {
-apr_sleep(apr_time_from_sec(1));
+/* apr_sleep() uses microseconds */
+apr_sleep((apr_time_t)(10));
 if (!jk_watchdog_interval)
 break;
 }



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



Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Costin Manolache
On Fri, Oct 3, 2008 at 10:43 AM, Mladen Turk <[EMAIL PROTECTED]> wrote:

> Costin Manolache wrote:
>
>> There are few issues and questions, I'm not sure its as simple as it looks
>> :-)
>>
>> For new development - are you going to make changes in both branches ? I
>> assume there will be
>> features that can only be done in 1.3.
>>
>>
> Right.
> 1.1.x will be in bug fixing mode
>
>  Also, if we have separate releases of APR - are we going to release
>> binaries
>> ? For both ?
>>
>
> Right. 1.1.x will be released for bug fixing purposes.
> It's quite stable these days, and there's no need for polluting
> that with new features or changed way of pool management.
>
>  What is the apr version in common linux distros ?
>>
>>
> Depends, Httpd 2.2.+ relies on APR 1.3. SVN as well,
> so eventually distros will pick it up.
>


Well, that's a bit tricky - people don't upgrade prod servers easily.

My concern is mostly about possibility for binary releases, in particular
for linux - and also mac ( a lot of people don't enjoy
compiling from source and dealing with dependencies ).
BTW - anyone knows what's the status on MacOS (i.e. the current apr version
) ?



>
>
>  Is this something that can't be done with #ifdefs and compilation tricks ?
>>
>>
> Nope. That's a nightmare to maintain, and doesn't resolve anything
> from binary standpoint.
>


It would allow new features ( not depending on pool ) to be compiled for
current distros.

Another alternative - would it be possible to statically link apr, and
generate a single combined
.so for both ? This way a binary distro of tomcat jni would just work,
regardless of the distro
version of apr.

Sorry, I'm getting older and lazy - or at least the time I have for this
kind of stuff is getting extremely
limited.
I think many users would enjoy to just install a .deb/.rpm and start using
it ( even better if it install
 in /usr/lib so no env /cli magic is needed ).


Costin


>
>
>
> Regards
> --
> ^(TM)
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Mladen Turk

Costin Manolache wrote:


 What is the apr version in common linux distros ?



Depends, Httpd 2.2.+ relies on APR 1.3. SVN as well,
so eventually distros will pick it up.




Well, that's a bit tricky - people don't upgrade prod servers easily.

My concern is mostly about possibility for binary releases, in particular
for linux


Can be done if someone is willing to make them and test
them on multiple systems. Don't think we have the resources
for that, but one day when ASF lab gets functional we could
do it probably.


- and also mac ( a lot of people don't enjoy
compiling from source and dealing with dependencies ).
BTW - anyone knows what's the status on MacOS (i.e. the current apr version
) ?



Apr 1.3 works on Mac. The previous versions didn't have
sendfile support.

Regards
--
^(TM)

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



svn commit: r701498 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 12:22:52 2008
New Revision: 701498

URL: http://svn.apache.org/viewvc?rev=701498&view=rev
Log:
- Allow ping_mode = 'a' (for al)
- Check ping_mode for AJP_CPING_INTERVAL instead of
  AJP_CPING_PREPOST when setting conn_ping_interval.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=701498&r1=701497&r2=701498&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Fri Oct  3 
12:22:52 2008
@@ -374,6 +374,10 @@
 mv |= AJP_CPING_PREPOST;
 else if (*m == 'I' || *m == 'i')
 mv |= AJP_CPING_INTERVAL;
+else if (*m == 'A' || *m == 'a') {
+mv = AJP_CPING_CONNECT | AJP_CPING_PREPOST | AJP_CPING_INTERVAL;
+break;
+}
 m++;
 }
 return mv;
@@ -1005,7 +1009,7 @@
  * @param msg  message to send
  * @param llogger
  * @return JK_FATAL_ERROR: endpoint contains unknown protocol
- * JK_FALSE: other failure 
+ * JK_FALSE: other failure
  * JK_TRUE: success
  * @remark Always closes socket in case of
  * a socket error, or JK_FATAL_ERROR
@@ -1066,7 +1070,7 @@
  * @param ae   endpoint
  * @param msg  message to send
  * @param llogger
- * @return JK_FALSE: failure 
+ * @return JK_FALSE: failure
  * JK_TRUE: success
  * @remark Always closes socket in case of
  * a socket error
@@ -2504,7 +2508,7 @@
 p->ping_mode =
 jk_get_worker_ping_mode(props, p->name,
 AJP_CPING_NONE);
-
+
 p->connect_timeout =
 jk_get_worker_connect_timeout(props, p->name,
   AJP_DEF_CONNECT_TIMEOUT);
@@ -2512,6 +2516,7 @@
 p->prepost_timeout =
 jk_get_worker_prepost_timeout(props, p->name,
   AJP_DEF_PREPOST_TIMEOUT);
+
 if ((p->ping_mode & AJP_CPING_CONNECT) &&
  p->connect_timeout == AJP_DEF_CONNECT_TIMEOUT)
 p->connect_timeout = p->ping_timeout;
@@ -2522,7 +2527,7 @@
 
 p->conn_ping_interval =
 jk_get_worker_conn_ping_interval(props, p->name, 0);
-if ((p->ping_mode & AJP_CPING_PREPOST) &&
+if ((p->ping_mode & AJP_CPING_INTERVAL) &&
 p->conn_ping_interval == 0)
 p->conn_ping_interval = p->ping_timeout / 10;
 



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



svn commit: r701507 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp_common.c jk_ajp_common.h jk_util.c jk_util.h

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 12:37:13 2008
New Revision: 701507

URL: http://svn.apache.org/viewvc?rev=701507&view=rev
Log:
Add retry_wait for AJP13 workers.
If a request fails, sleep a configurable time
before each following retry.
Remember: this has nothing to do with the lb retries.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=701507&r1=701506&r2=701507&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Fri Oct  3 
12:37:13 2008
@@ -2097,7 +2097,8 @@
 ajp_worker_t *aw;
 int log_error;
 int rc = JK_UNSET;
-char *msg;
+char *msg = "";
+int retry_wait;
 
 JK_TRACE_ENTER(l);
 
@@ -2200,8 +2201,22 @@
 aw->s->state = JK_AJP_STATE_PROBE;
 if (aw->s->busy > aw->s->max_busy)
 aw->s->max_busy = aw->s->busy;
+retry_wait = p->worker->retry_wait;
 for (i = 0; i < aw->retries; i++) {
 /*
+ * ajp_send_request() already locally handles
+ * reconnecting and broken connection detection.
+ * So if we already failed in it, wait a bit before
+ * retrying the same backend.
+ */
+if (i > 0 && retry_wait >= 0) {
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   "retry %d, sleeping for %d ms before retrying",
+   i, retry_wait);
+jk_sleep(retry_wait);
+}
+/*
  * We're using op->request which hold initial request
  * if Tomcat is stopped or restarted, we will pass op->request
  * to next valid tomcat.
@@ -2303,9 +2318,6 @@
 *is_error = JK_HTTP_SERVER_BUSY;
 msg = "because of response status";
 rc = err;
-if (i >= JK_RETRIES) {
-jk_sleep(JK_SLEEP_DEF);
-}
 }
 /* This should only be the cases err == JK_FALSE */
 else {
@@ -2317,10 +2329,6 @@
 *is_error = JK_HTTP_BAD_GATEWAY;
 msg = "";
 rc = JK_FALSE;
-/* Check for custom retries */
-if (i >= JK_RETRIES) {
-jk_sleep(JK_SLEEP_DEF);
-}
 }
 }
 else {
@@ -2549,6 +2557,10 @@
 p->socket_buf =
 jk_get_worker_socket_buffer(props, p->name, p->max_packet_size);
 
+p->retry_wait =
+jk_get_worker_retry_wait(props, p->name,
+ JK_SLEEP_DEF);
+
 p->http_status_fail_num = jk_get_worker_fail_on_status(props, p->name,
  &p->http_status_fail[0],
  JK_MAX_HTTP_STATUS_FAILS);
@@ -2613,6 +2625,10 @@
 jk_log(l, JK_LOG_DEBUG,
"max packet size:  %d",
 p->max_packet_size);
+
+jk_log(l, JK_LOG_DEBUG,
+   "retry wait time:  %d",
+p->retry_wait);
 }
 /*
  *  Need to initialize secret here since we could return from inside

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h?rev=701507&r1=701506&r2=701507&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h Fri Oct  3 
12:37:13 2008
@@ -318,12 +318,12 @@
 int connect_timeout;  /* connect cping/cpong delay in ms (0 means 
disabled)  */
 int reply_timeout;/* reply timeout delay in ms (0 means disabled) 
*/
 int prepost_timeout;  /* before sending a request cping/cpong timeout 
delay in ms (0 means disabled) */
-int conn_ping_interval;   /* interval for sending cping packets on
+int conn_ping_interval;   /* interval for sending keepalive cping packets 
on
* unused connection */
 int ping_timeout; /* generic cping/cpong timeout. Used for 
keepalive packets or
* as default for boolean valued connect and 
prepost timeouts.
*/
-unsigned int ping_mode;   /* Ping mode flags */
+unsigned int ping_mode;   /* Ping mode flags (which types of cpings should 
be used) */
 /*
  * Recovery options
  */
@@ -337,6 +337,8 @@
 
 unsigned i

svn commit: r701508 - in /tomcat/connectors/trunk/jk/xdocs: miscellaneous/changelog.xml reference/workers.xml

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 12:41:08 2008
New Revision: 701508

URL: http://svn.apache.org/viewvc?rev=701508&view=rev
Log:
Document retry_wait and add to changelog.

Modified:
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=701508&r1=701507&r2=701508&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Fri Oct  3 
12:41:08 2008
@@ -43,6 +43,9 @@
   
   
 
+  
+AJP13: Add a configurable retry wait time. (rjung)
+  
   
 Documentation: Enhance description of connection_pool_size. (rjung)
   

Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?rev=701508&r1=701507&r2=701508&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Fri Oct  3 12:41:08 
2008
@@ -725,17 +725,24 @@
 The maximum number of times that the worker will send a request to Tomcat
 in case of a communication error. Each retry will be done over another
 connection. The first time already gets counted, so retries=2 means
-one retry after error. If the value is greater than the default value, on
-each additional retry an extra wait of 100ms will be inserted.
+one retry after error. Before a retry, the worker waits for a configurable
+sleeping time.
 
 See also the attribute recovery_options for a more fine-grained control
-of retries.
+of retries and retry_wait for the sleep time configuration.
 
 
 Until version 1.2.16 the default value was 3.
 
 
 
+
+The amount of time in milliseconds the worker sleeps before doing any retry.
+
+This features has been added in jk 1.2.27.
+
+
+
 
 Recovery options influence, how we should handle retries,
 in case we detect a problem with Tomcat.



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



svn commit: r701513 - in /tomcat/connectors/trunk/jk/xdocs/reference: apache.xml iis.xml

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 12:45:41 2008
New Revision: 701513

URL: http://svn.apache.org/viewvc?rev=701513&view=rev
Log:
Clarify a bit, how our watchdig thread works
and what it does. Keep description for IIS and
Apache consistent.

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
tomcat/connectors/trunk/jk/xdocs/reference/iis.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?rev=701513&r1=701512&r2=701513&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Fri Oct  3 12:45:41 
2008
@@ -196,15 +196,25 @@
 
 
 This directive configures the watchdog thread interval in seconds.
-The workers are maintained periodically on this interval.
-If you set this directive to "0", watchdog thread will not be
-created and standard on request maintenance will be applied.
+The workers are maintained periodically by a background thread
+running periodically every watchdog_interval seconds. Worker maintenance
+checks for idle connections, corrects load status and is able
+to detect backend health status.
+
+The maintenance only happens, if since the last maintenance at
+least worker.maintain
+seconds have passed. So setting the JkWatchdogInterval
+much smaller than worker.maintain is not useful.
 
 The default value is 0 seconds, meaning the watchdog thread
-will not be created inside each child process.
+will not be created, and the maintenance is done in combination
+with normal requests instead.
+
+This directive is only allowed once. It must be put into
+the global part of the configuration.
 
 This directive has been added in version 1.2.27 of mod_jk.
-It is available only for httpd 2.0 and above using APR libraries
+It is available only for httpd 2.x and above using APR libraries
 including thread support.
 
 
@@ -356,7 +366,7 @@
 
 
 
-Since JK 1.2.3 for Apache 2.0 and JK 1.2.16 for Apache 1.3 this can also
+Since JK 1.2.3 for Apache 2.x and JK 1.2.16 for Apache 1.3 this can also
 be used for piped logging:
 
 

Modified: tomcat/connectors/trunk/jk/xdocs/reference/iis.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/iis.xml?rev=701513&r1=701512&r2=701513&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/reference/iis.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/iis.xml Fri Oct  3 12:45:41 2008
@@ -179,6 +179,26 @@
 
 This directive has been added in version 1.2.24
 
+
+A DWORD value representing the watchdog thread interval in seconds.
+The workers are maintained periodically by a background thread
+running periodically every watchdog_interval seconds. Worker maintenance
+checks for idle connections, corrects load status and is able
+to detect backend health status.
+
+
+The maintenance only happens, if since the last maintenance at
+least worker.maintain
+seconds have passed. So setting the watchdog_interval
+much smaller than worker.maintain is not useful.
+
+
+The default value is 0 seconds, meaning the watchdog thread
+will not be created, and the maintenance is done in combination
+with normal requests instead.
+
+This directive has been added in version 1.2.27
+
 
  
 



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



svn commit: r701514 - /tomcat/connectors/trunk/jk/xdocs/reference/apache.xml

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 12:46:47 2008
New Revision: 701514

URL: http://svn.apache.org/viewvc?rev=701514&view=rev
Log:
Strenghten information about JkMount and virtual hosts.

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/apache.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?rev=701514&r1=701513&r2=701514&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Fri Oct  3 12:46:47 
2008
@@ -36,10 +36,10 @@
 explicitely listed in the table below.
 
 
-Values are inherited from the main server to the virtual hosts. 
+Most values are inherited from the main server to the virtual hosts.
 Since version 1.2.20 they can be overwritten in the virtual hosts.
-Exceptions from this rule are
-again explicitely listed in the table below.
+Exceptions from this rule are again explicitely listed in the table below.
+See especially JkMountCopy.
 
 Waring: If Apache httpd and Tomcat are configured to serve content from
 the same filing system location then care must be taken to ensure that httpd is
@@ -57,7 +57,7 @@
 The name of a worker file for the Tomcat servlet containers.
 
 This directive is only allowed once. It must be put into
- the global part of the configuration.
+the global part of the configuration.
 
 If you don't use the JkWorkerProperty directives, then you must
 define your workers with a valid JkWorkersFile. There is no default
@@ -83,7 +83,7 @@
 The shm file is used by balancer and status workers.
 
 This directive is only allowed once. It must be put into
- the global part of the configuration.
+the global part of the configuration.
 
 The default value is logs/jk-runtime-status.
 It is highly recommended that the shm file be placed on a local
@@ -104,7 +104,7 @@
 Size of the shared memory file name.
 
 This directive is only allowed once. It must be put into
- the global part of the configuration.
+the global part of the configuration.
 
 The default value depends on the platform. It is usually less than 64KB.
 
@@ -137,7 +137,10 @@
 You can also use it inside Location with a different syntax.
 Inside Location, one omits the first argument (path),
 which gets inherited from the Location.
-For inheritance rules, see: JkMountCopy.
+
+By default JkMount entries are not inherited from the global
+server to other VirtualHosts or between VirtualHosts.
+For the complete inheritance rules, see: JkMountCopy.
 
 
 An exclusion mount point from a context to a Tomcat worker.
@@ -168,7 +171,7 @@
 
 
 If this directive is set to "On" in some virtual server,
-the mounts from the global server will be copied to the
+the mounts from the global server will be copied to this
 virtual server, more precisely all mounts defined by JkMount
 or JkUnMount. The Mounts defined by JkMountFile and JkAutoAlias
 will only be inherited, if the VirtualHost does not define
@@ -180,7 +183,8 @@
 This directive is only allowed inside VirtualHost (with value "On")
 and in the global server (with value "All").
 
-The default is Off.
+The default is Off, so no mounts will be inherited from the global
+server to any VirtualHost.
 
 Starting with version 1.2.26 you can also set it to "All" in the
 global virtual server. This will switch the default to On.
@@ -346,7 +350,6 @@
 Take a look at Workers documentation for detailed 
description.
 
 
-  
   JkWorkersFile /etc/httpd/conf/workers.properties
 
 
@@ -429,7 +432,7 @@
 The syntax of the format string is similar to the Apache LogFormat command, 
 here is a list of the available request log format options:
 
-   
+
 
 
   Bytes sent, excluding HTTP headers 
(CLF format)
@@ -461,7 +464,7 @@
 The module sets several notes in the Apache httpd notes table.
 Most of them are are only useful in combination with a load balancer worker.
 
-   
+
 
 
   Name of the worker 
selected by the URI mapping



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



svn commit: r701515 - /tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 12:48:27 2008
New Revision: 701515

URL: http://svn.apache.org/viewvc?rev=701515&view=rev
Log:
Correct comments about maintenance in timeouts
document in light of new watchdog thread.

Modified:
tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml

Modified: tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml?rev=701515&r1=701514&r2=701515&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/generic_howto/timeouts.xml Fri Oct  3 
12:48:27 2008
@@ -152,9 +152,11 @@
 The 60 seconds interval
 can be adjusted with the global attribute worker.maintain. We do not
 recommend to change this value, because it has a lot of side effects.
-The maintenance task only runs, if requests get processed. So if your web
-server has processes that do not receive any requests for a long
-time, there is no way to close the idle connections in its pool.
+Until version 1.2.26, the maintenance task only runs, if requests get
+processed. So if your web server has processes that do not receive any
+requests for a long time, there is no way to close the idle connections
+in its pool. Starting with version 1.2.27 you can configure an independant
+watchdog thread when using Apache 2.x with threaded APR or IIS.
 
 
 The maximum connection pool size can be configured with the



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



svn commit: r701517 - /tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 12:53:21 2008
New Revision: 701517

URL: http://svn.apache.org/viewvc?rev=701517&view=rev
Log:
Update changelog:
- switch a couple of 'update's to 'add's
- Add some more information to watchdog entry
  since it is now for Apache and IIS
- add IIS to mount extensions entry
- add error page refactoring for IIS
- add max_packet_size usage for TCP buffers
- add disabling prefork mod_jk in multi-thread Apache

Modified:
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=701517&r1=701516&r2=701517&view=diff
==
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Fri Oct  3 
12:53:21 2008
@@ -49,6 +49,9 @@
   
 Documentation: Enhance description of connection_pool_size. (rjung)
   
+  
+Refactor error page generation for isapi plugin. (mturk)
+  
   
 IIS: SERVER_NAME variable can be the same for
 multiple different server instances if requests
@@ -56,24 +59,30 @@
 Use INSTANCE_ID variable to which the request
 belongs instead. (mturk)
   
-  
+  
 Allow forwarding server error pages. This can be done
 on per-uri basis using new use_server_errors extension.
 (mturk)
-  
-  
+  
+  
 Added session_cookie and session_path for configuring
 default session identifiers. (mturk)
+  
+  
+Use max_packet_size also as TCP send and receive buffer size. (mturk)
   
-  
+  
+Do not allow Apache to start in multi-threaded mode if mod_jk
+ was only build for single threaded server (prefork). (mturk)
+  
 45812: Add done() service method that
 causes sending EOS bucket for Apache httpd 2.x.
 This allows filter chain to work properly. (mturk)
   
-  
+  
 Added connection_ping_interval, ping_timeout and ping_mode directives.
 (mturk)
-  
+  
   
 Apache: Use correct ld flags provided by apxs when building module.
 Prevents some crashes on AIX for httpd 1.3 module. (rjung)
@@ -98,9 +107,13 @@
 Add info to docs, that variables sent via JkEnvVar
 are not listed in request.getAttributeNames(). (rjung)
   
+  
+Add watchdog background thread for Apache 2.x and IIS
+doing internal maintenance (idle connection checks, backend probing).
+See JkWatchdogInternal (Apache) and watchdog_interval (IIS). (mturk)
+  
   
-Add JkWatchdogInterval directive for Apache 2.0
-that allows unattended maintenance of the workers. (mturk)
+Change log level of some messages from error to info. (mturk)
   
   
 Fix docs for worker attribute "secret". (rjung)
@@ -122,20 +135,20 @@
 44738: Fix merging of JkOption ForwardURI* between virtual 
hosts.
 Patch contributed by Toshihiro Sasajima. (rjung)
   
-  
+  
 URI Map: Add extension attributes to uri worker map.
 Allowed are reply_timeout, active/disabled/stopped
 and fail_on_status.
-Usage currently only implemented for httpd. (rjung)
-  
+Usage currently only implemented for httpd and IIS. (rjung+mturk)
+  
   
 URI Map: Make dynamic reloading atomic and free memory
 not needed any longer. (rjung)
   
-  
+  
 Configure: Don't use post httpd 2.2.0 API functions when building
 with new --enable-api-compatibility configure switch. (rjung)
-  
+  
   
 Apache: JkAutoAlias does not work in combination with JkMountCopy
 if there are no JkMount in virtual host. (rjung)
@@ -143,22 +156,22 @@
   
 LB: Optimize state macros to improve performance. (rjung)
   
-  
+  
 Apache: Allow dynamic setting of reply timeout using the environment
 variable JK_REPLY_TIMEOUT. (rjung)
-  
-  
+  
+  
 Status: Add manageability for ajp parameters of ajp
 workers and ajp lb members. (rjung)
-  
+  
   
 Status: Change parameter names of update action to
 make them more easily distinguishable from other parameters. (rjung)
   
-  
-Status: Add non ajp worker statistics also for
+  
+Status: Add ajp worker statistics also for
 workers, that are not lb members. (rjung)
-  
+  
   
 AJP: Refactor factories, move ajp13/ajp14 common parts into
 ajp_factory. (rjung)



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

svn commit: r701543 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c native/common/jk_lb_worker.c native/common/jk_shm.h native/common/jk_status.c xdocs/miscellaneous/changelog.xml

2008-10-03 Thread rjung
Author: rjung
Date: Fri Oct  3 14:43:59 2008
New Revision: 701543

URL: http://svn.apache.org/viewvc?rev=701543&view=rev
Log:
Add display of seconds since last statistics reset
to status worker.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
tomcat/connectors/trunk/jk/native/common/jk_shm.h
tomcat/connectors/trunk/jk/native/common/jk_status.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=701543&r1=701542&r2=701543&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Fri Oct  3 
14:43:59 2008
@@ -2576,6 +2576,7 @@
 if(p->maintain_time < 0)
 p->maintain_time = 0;
 p->s->last_maintain_time = time(NULL);
+p->s->last_reset = p->s->last_maintain_time;
 
 if (JK_IS_DEBUG_LEVEL(l)) {
 

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?rev=701543&r1=701542&r2=701543&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Fri Oct  3 14:43:59 
2008
@@ -1332,9 +1332,9 @@
 }
 if (p->states[rec->i] == JK_LB_STATE_ERROR)
 jk_log(l, JK_LOG_INFO,
-   "service failed, %sworker %s is in error state",
-   rec->s->state == JK_LB_STATE_ERROR ? "entire " : "",
-   rec->name);
+   "service failed, worker %s is in %serror state",
+   rec->name,
+   rec->s->state == JK_LB_STATE_ERROR ? "" : "local ");
 if (p->worker->lblock == JK_LB_LOCK_PESSIMISTIC)
 jk_shm_unlock();
 }
@@ -1607,6 +1607,7 @@
 if(p->maintain_time < 0)
 p->maintain_time = 0;
 p->s->last_maintain_time = time(NULL);
+p->s->last_reset = p->s->last_maintain_time;
 
 p->lbmethod = jk_get_lb_method(props, p->name);
 p->lblock   = jk_get_lb_lock(props, p->name);

Modified: tomcat/connectors/trunk/jk/native/common/jk_shm.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_shm.h?rev=701543&r1=701542&r2=701543&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_shm.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_shm.h Fri Oct  3 14:43:59 2008
@@ -94,7 +94,7 @@
 volatile int busy;
 /* Maximum number of busy channels */
 volatile int max_busy;
-volatile time_t  error_time;
+volatile time_t error_time;
 /* Number of bytes read from remote */
 volatile jk_uint64_t readed;
 /* Number of bytes transferred to remote */
@@ -109,7 +109,9 @@
 volatile jk_uint32_t  reply_timeouts;
 /* Number of client errors */
 volatile jk_uint32_t  client_errors;
-volatile time_t  last_maintain_time;
+/* Last reset time */
+volatile time_t last_reset;
+volatile time_t last_maintain_time;
 };
 typedef struct jk_shm_ajp_worker jk_shm_ajp_worker_t;
 
@@ -139,7 +141,7 @@
 /* Current lb value  */
 volatile jk_uint64_t lb_value;
 /* Statistical data */
-volatile time_t  error_time;
+volatile time_t error_time;
 /* Number of times the worker was elected - snapshot during maintenance */
 volatile jk_uint64_t  elected_snapshot;
 /* Number of non 200 responses */
@@ -164,7 +166,9 @@
 int lbmethod;
 int lblock;
 unsigned int max_packet_size;
-volatile time_t  last_maintain_time;
+/* Last reset time */
+volatile time_t last_reset;
+volatile time_t last_maintain_time;
 /* Session cookie */
 charsession_cookie[JK_SHM_STR_SIZ+1];
 /* Session path */

Modified: tomcat/connectors/trunk/jk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_status.c?rev=701543&r1=701542&r2=701543&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_status.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_status.c Fri Oct  3 14:43:59 
2008
@@ -244,7 +244,7 @@
"State" \
"Acc" \

"ErrCERE" \
-   
"WrRdBusyMax" \
+ 

Re: Branching connectors/jni for Tomcat Native

2008-10-03 Thread Costin Manolache
Ok, +1.

My remaining question - is it possible to generate a .so file for the JNI
library that includes both APR and JK ( or
2 libraries - in a way that the apr library won't conflict with an older
pre-installed version ) ?

Costin

On Fri, Oct 3, 2008 at 12:12 PM, Mladen Turk <[EMAIL PROTECTED]> wrote:

> Costin Manolache wrote:
>
>>
>>>  What is the apr version in common linux distros ?
>>>

  Depends, Httpd 2.2.+ relies on APR 1.3. SVN as well,
>>> so eventually distros will pick it up.
>>>
>>>
>>
>> Well, that's a bit tricky - people don't upgrade prod servers easily.
>>
>> My concern is mostly about possibility for binary releases, in particular
>> for linux
>>
>
> Can be done if someone is willing to make them and test
> them on multiple systems. Don't think we have the resources
> for that, but one day when ASF lab gets functional we could
> do it probably.
>
>  - and also mac ( a lot of people don't enjoy
>> compiling from source and dealing with dependencies ).
>> BTW - anyone knows what's the status on MacOS (i.e. the current apr
>> version
>> ) ?
>>
>>
> Apr 1.3 works on Mac. The previous versions didn't have
> sendfile support.
>
>
> Regards
> --
> ^(TM)
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


[EMAIL PROTECTED]: Project jakarta-tomcat (in module jakarta-tomcat) failed

2008-10-03 Thread Stefan Bodewig
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project jakarta-tomcat has an issue affecting its community integration.
This issue affects 7 projects,
 and has been outstanding for 26 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- commons-jelly-tags-ojb :  Commons Jelly
- db-ojb-from-packages-1-0-release :  ObjectRelationalBridge
- db-torque :  Persistence Layer
- jakarta-tomcat :  Servlet 2.2 and JSP 1.1 Reference Implementation
- jakarta-tomcat-coyote-tomcat3 :  Connectors to various web servers
- jakarta-turbine-jcs :  Cache
- test-ojb-from-packages-1-0-release :  ObjectRelationalBridge


Full details are available at:

http://vmgump.apache.org/gump/public/jakarta-tomcat/jakarta-tomcat/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Output [tomcat-util.jar] identifier set to output basename: 
[tomcat-util]
 -DEBUG- Output [tomcat_core.jar] identifier set to output basename: 
[tomcat_core]
 -DEBUG- Output [tomcat_modules.jar] identifier set to output basename: 
[tomcat_modules]
 -DEBUG- Output [facade22.jar] identifier set to output basename: [facade22]
 -DEBUG- Output [core_util.jar] identifier set to output basename: [core_util]
 -DEBUG- Output [jasper.jar] identifier set to output basename: [jasper]
 -DEBUG- Output [container_util.jar] identifier set to output basename: 
[container_util]
 -DEBUG- Output [tomcat.jar] identifier set to output basename: [tomcat]
 -DEBUG- Dependency on jakarta-servletapi exists, no need to add for property 
servlet22.jar.
 -DEBUG- Dependency on jmx exists, no need to add for property jmxtools.jar.
 -DEBUG- Dependency on ant exists, no need to add for property ant.home.
 -DEBUG- Dependency on jsse exists, no need to add for property jsse.home.
 -INFO- Failed with reason build failed
 -DEBUG- Extracted fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/jakarta-tomcat/jakarta-tomcat/gump_work/build_jakarta-tomcat_jakarta-tomcat.html
Work Name: build_jakarta-tomcat_jakarta-tomcat (Type: Build)
Work ended in a state of : Failed
Elapsed: 21 secs
Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true 
-Xbootclasspath/p:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/srv/gump/public/workspace/xml-xalan/build/serializer.jar:/srv/gump/public/workspace/xml-xalan/build/xalan-unbundled.jar
 org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only 
-Djakarta-tomcat-connectors=/srv/gump/public/workspace/jakarta-tomcat-connectors
 -Djtc.coyote.home=/srv/gump/public/workspace/jakarta-tomcat-connectors/coyote 
-Djaxp.home=/srv/gump/packages/jaxp-1_3 
-Dcommons-modeler.jar=/srv/gump/public/workspace/apache-commons/modeler/dist/commons-modeler-02102008.jar
 -Djmxtools.jar=/srv/gump/packages/jmx-1_2_1-bin/lib/jmxtools.jar 
-Djmx.jar=/srv/gump/packages/jmx-1_2_1-bin/lib/jmxri.jar 
-Dtomcat-util.jar=/srv/gump/public/workspace/jakarta-tomcat-connectors/util/build/lib/tomcat-util.jar
 -Dant.home=/
 srv/gump/public/workspace/ant/dist 
-Dservlet22.jar=/srv/gump/public/workspace/jakarta-servletapi/dist/lib/servlet.jar
 
-Dcommons-logging.jar=/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-02102008.jar
 
-Djtc.http11.home=/srv/gump/public/workspace/jakarta-tomcat-connectors/http11/build
 -Djsse.home=/srv/gump/packages/jsse1.0.3 main.lite 
[Working Directory: /srv/gump/public/workspace/jakarta-tomcat]
CLASSPATH: 
/usr/lib/jvm/java-1.5.0-sun/lib/tools.jar:/srv/gump/public/workspace/jakarta-tomcat/build/tomcat/classes:/srv/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/jakarta-servletapi/dist/lib/servlet.jar:/srv/gump/packages/jsse1.0.3/lib/jcert.jar:/srv/gump/packages/jsse1.0.3/lib/jnet.jar:/srv/gump/packages/jsse1.0.3/lib/jsse.jar:/srv/gump/public/workspace/logging-log4j-12/dist/lib/log4j-02102
 
008.jar:/srv/gump/public/workspace/apache-commons/modeler/dist/commons-modeler-021

Re: svn commit: r701507 - in /tomcat/connectors/trunk/jk/native/common: jk_ajp_common.c jk_ajp_common.h jk_util.c jk_util.h

2008-10-03 Thread Mladen Turk

[EMAIL PROTECTED] wrote:

Author: rjung
Date: Fri Oct  3 12:37:13 2008
New Revision: 701507

URL: http://svn.apache.org/viewvc?rev=701507&view=rev
Log:
Add retry_wait for AJP13 workers.
If a request fails, sleep a configurable time
before each following retry.
Remember: this has nothing to do with the lb retries.

+retry_wait = p->worker->retry_wait;
 for (i = 0; i < aw->retries; i++) {
 /*
+ * ajp_send_request() already locally handles
+ * reconnecting and broken connection detection.
+ * So if we already failed in it, wait a bit before
+ * retrying the same backend.
+ */
+if (i > 0 && retry_wait >= 0) {
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   "retry %d, sleeping for %d ms before retrying",
+   i, retry_wait);
+jk_sleep(retry_wait);
+}
+/*


Nice!
Although I'd change retry_wait to retry_interval.

I was thinking to use the retry_wait as absolute timeout
instead 'retries * retry_interval',
with some default step value (as inside lb
with JK_LB_MIN_RETRY_WAIT/JK_LB_MAX_RETRY_WAIT)

This would behave like:
Retry worker 'x' until retry_wait expires.
It would calculate the time spend in accessing
the network as well, and give the real timeout.
Right now we have sleep, but between them network
might introduce variable delays as well.

The same should be applied to load_balancer so that
we can exactly know how much time we'll wait for free
endpoint. So use retry_wait as a limit for retry
steps (they don't need to be configurable there)
Right now for lb we need insane high values for
retries (100 for 10 second wait on free cache entry)

Then retries would be used for their real purpose.

Regards
--
^(TM)

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