Re: svn commit: r1410764 - in /tomcat/trunk: build.properties.default java/org/apache/jasper/compiler/JDTCompiler.java

2012-11-19 Thread Peter Roßbach
+1
Peter

Am 17.11.2012 um 21:25 schrieb Konstantin Kolinko:

> 2012/11/17 Mark Thomas :
>> On 17/11/2012 19:27, ma...@apache.org wrote:
>>> Author: markt
>>> Date: Sat Nov 17 19:27:33 2012
>>> New Revision: 1410764
>>> 
>>> URL: http://svn.apache.org/viewvc?rev=1410764&view=rev
>>> Log:
>>> Update JDT complier to 4.2.1
>> 
>> Thoughts on back-porting this to 7.0.x?
>> 
> 
> +1
> The compiler in Eclipse 3.7.2 was crashing for me when compiling
> Tomcat 8. I switched over to 4.2.1 a week ago and the problem
> disappeared.   Someone else with Java 7 could be experiencing a
> similar issue, so it is better to upgrade.
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: [VOTE] Release Apache Tomcat 7.0.28

2012-06-17 Thread Peter Roßbach
> [x ] Stable - go ahead and release as 7.0.28 Stable

Test websockets changes

Peter

Am 15.06.2012 um 11:14 schrieb Mark Thomas:

> The proposed Apache Tomcat 7.0.28 release is now available for voting.
> 
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.28/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-243/
> The svn tag is:
> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_28/
> 
> The proposed 7.0.27 release is:
> [ ] Broken - do not release
> [ ] Stable - go ahead and release as 7.0.28 Stable
> 
> Cheers,
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: svn commit: r1310693 - in /tomcat/tc7.0.x/trunk: res/maven/tomcat-jasper.pom webapps/docs/changelog.xml

2012-04-07 Thread Peter Roßbach
I know,

but this is the current tomcat used ecj version

# - Eclipse JDT, version 3.2 or later -
jdt.version=3.7.2
jdt.release=R-3.7.2-201202080800
jdt.home=${base.path}/ecj-${jdt.version}
jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
# The download will be moved to the archive area eventually. We are taking care 
of that in advance.
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops/${jdt.release}/ecj-${jdt.version}.jar
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops/${jdt.release}/ecj-${jdt.version}.jar

Peter

Am 07.04.2012 um 14:09 schrieb Olivier Lamy:

> Hello,
> 
> 3.7.2 ?
> 
> I cannot see the version here
> http://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/
> 
> 
> 
> 2012/4/7  :
>> Author: pero
>> Date: Sat Apr  7 08:20:45 2012
>> New Revision: 1310693
>> 
>> URL: http://svn.apache.org/viewvc?rev=1310693&view=rev
>> Log:
>> update to ecj 3.7.2
>> 
>> Modified:
>>tomcat/tc7.0.x/trunk/res/maven/tomcat-jasper.pom
>>tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>> 
>> Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-jasper.pom
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-jasper.pom?rev=1310693&r1=1310692&r2=1310693&view=diff
>> ==
>> --- tomcat/tc7.0.x/trunk/res/maven/tomcat-jasper.pom (original)
>> +++ tomcat/tc7.0.x/trunk/res/maven/tomcat-jasper.pom Sat Apr  7 08:20:45 2012
>> @@ -49,7 +49,7 @@
>> 
>>   org.eclipse.jdt.core.compiler
>>   ecj
>> -  3.7
>> +  3.7.2
>> 
>> 
>>   org.apache.tomcat
>> 
>> Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1310693&r1=1310692&r2=1310693&view=diff
>> ==
>> --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
>> +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Apr  7 08:20:45 2012
>> @@ -64,6 +64,13 @@
>>   
>> 
>>   
>> +  
>> +
>> +  
>> +Update to Eclipse JDT Compiler 3.7.2 at maven tomcat-japser.pom. 
>> (pero)
>> +  
>> +
>> +  
>>  
>>  
>>   
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>> 
> 
> 
> 
> -- 
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: svn commit: r1310712 - in /tomcat/tc7.0.x/trunk: res/maven/tomcat-catalina-ha.pom res/maven/tomcat-coyote.pom res/maven/tomcat-embed-jasper.pom res/maven/tomcat-util.pom webapps/docs/changelog.xml

2012-04-07 Thread Peter Roßbach
We must download maven-ant-tasks-2.1.3 and jsch without maven tasks and then we 
can use it!

Peter

Am 07.04.2012 um 11:16 schrieb Mark Thomas:

> On 07/04/2012 10:14, Peter Roßbach wrote:
>> cool remove a point of my TODO list
>> +1
>> 
>> I have checked that also new maven-ant-tasks-2.1.3 works.
>> How we can download this jar and jsch?
> 
> I assume updating the init-maven task in the mvn-pub.xml will do that.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: svn commit: r1310712 - in /tomcat/tc7.0.x/trunk: res/maven/tomcat-catalina-ha.pom res/maven/tomcat-coyote.pom res/maven/tomcat-embed-jasper.pom res/maven/tomcat-util.pom webapps/docs/changelog.xml

2012-04-07 Thread Peter Roßbach
cool remove a point of my TODO list
+1

I have checked that also new maven-ant-tasks-2.1.3 works.
How we can download this jar and jsch?
 
Peter

Am 07.04.2012 um 11:00 schrieb ma...@apache.org:

> Author: markt
> Date: Sat Apr  7 09:00:47 2012
> New Revision: 1310712
> 
> URL: http://svn.apache.org/viewvc?rev=1310712&view=rev
> Log:
> Add missing dependencies
> 
> Modified:
>tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom
>tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom
>tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom
>tomcat/tc7.0.x/trunk/res/maven/tomcat-util.pom
>tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
> 
> Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom?rev=1310712&r1=1310711&r2=1310712&view=diff
> ==
> --- tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom (original)
> +++ tomcat/tc7.0.x/trunk/res/maven/tomcat-catalina-ha.pom Sat Apr  7 09:00:47 
> 2012
> @@ -52,5 +52,11 @@
>   @MAVEN.DEPLOY.VERSION@
>   compile
> 
> +
> +  org.apache.tomcat
> +  tomcat-util
> +  @MAVEN.DEPLOY.VERSION@
> +  compile
> +
>   
> 
> 
> Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom?rev=1310712&r1=1310711&r2=1310712&view=diff
> ==
> --- tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom (original)
> +++ tomcat/tc7.0.x/trunk/res/maven/tomcat-coyote.pom Sat Apr  7 09:00:47 2012
> @@ -28,5 +28,11 @@
>   @MAVEN.DEPLOY.VERSION@
>   compile
> 
> +
> +  org.apache.tomcat
> +  tomcat-util
> +  @MAVEN.DEPLOY.VERSION@
> +  compile
> +
>   
> 
> 
> Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom?rev=1310712&r1=1310711&r2=1310712&view=diff
> ==
> --- tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom (original)
> +++ tomcat/tc7.0.x/trunk/res/maven/tomcat-embed-jasper.pom Sat Apr  7 
> 09:00:47 2012
> @@ -28,5 +28,10 @@
>   @MAVEN.DEPLOY.VERSION@
>   compile
> 
> +
> +  org.eclipse.jdt.core.compiler
> +  ecj
> +  3.7.2
> +
>   
> 
> 
> Modified: tomcat/tc7.0.x/trunk/res/maven/tomcat-util.pom
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/res/maven/tomcat-util.pom?rev=1310712&r1=1310711&r2=1310712&view=diff
> ==
> --- tomcat/tc7.0.x/trunk/res/maven/tomcat-util.pom (original)
> +++ tomcat/tc7.0.x/trunk/res/maven/tomcat-util.pom Sat Apr  7 09:00:47 2012
> @@ -21,4 +21,18 @@
>   tomcat-util
>   @MAVEN.DEPLOY.VERSION@
>   Common code shared by Catalina and Jasper
> +  
> +
> +  org.apache.tomcat
> +  tomcat-juli
> +  @MAVEN.DEPLOY.VERSION@
> +  compile
> +
> +
> +  org.apache.tomcat
> +  tomcat-api
> +  @MAVEN.DEPLOY.VERSION@
> +  compile
> +
> +  
> 
> 
> Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1310712&r1=1310711&r2=1310712&view=diff
> ==
> --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Apr  7 09:00:47 2012
> @@ -69,6 +69,9 @@
>   
> Update to Eclipse JDT Compiler 3.7.2 at maven tomcat-japser.pom. 
> (pero)
>   
> +  
> +Add missing dependencies in pom files. (markt)
> +  
> 
>   
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: svn commit: r1310707 - /tomcat/trunk/java/org/apache/catalina/websocket/WebSocketServlet.java

2012-04-07 Thread Peter Roßbach
Yes, but most Http-Header send with first uppercase letter.

is a cosmetic fix :-)

Peter

Am 07.04.2012 um 10:53 schrieb Mark Thomas:

> On 07/04/2012 09:51, p...@apache.org wrote:
>> Author: pero
>> Date: Sat Apr  7 08:51:44 2012
>> New Revision: 1310707
>> 
>> URL: http://svn.apache.org/viewvc?rev=1310707&view=rev
>> Log:
>> Send header with uppercase names
> 
> Why? HTTP headers are case insensitive.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: svn commit: r1310640 - /tomcat/trunk/test/org/apache/catalina/websocket/TestWebSocket.java

2012-04-07 Thread Peter Roßbach
Thanx Mark,
Peter

Am 07.04.2012 um 01:40 schrieb ma...@apache.org:

> Author: markt
> Date: Fri Apr  6 23:40:57 2012
> New Revision: 1310640
> 
> URL: http://svn.apache.org/viewvc?rev=1310640&view=rev
> Log:
> Fix typo
> 
> Modified:
>tomcat/trunk/test/org/apache/catalina/websocket/TestWebSocket.java
> 
> Modified: tomcat/trunk/test/org/apache/catalina/websocket/TestWebSocket.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/websocket/TestWebSocket.java?rev=1310640&r1=1310639&r2=1310640&view=diff
> ==
> --- tomcat/trunk/test/org/apache/catalina/websocket/TestWebSocket.java 
> (original)
> +++ tomcat/trunk/test/org/apache/catalina/websocket/TestWebSocket.java Fri 
> Apr  6 23:40:57 2012
> @@ -65,7 +65,7 @@ public class TestWebSocket extends Tomca
> 
> tomcat.start();
> 
> -WebSocketCLient client= new WebSocketCLient();
> +WebSocketClient client= new WebSocketClient();
> 
> 
> // Send the WebSocket handshake
> @@ -105,7 +105,7 @@ public class TestWebSocket extends Tomca
> tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
> 
> tomcat.start();
> -WebSocketCLient client= new WebSocketCLient();
> +WebSocketClient client= new WebSocketClient();
> 
> // Send the WebSocket handshake
> client.writer.write("GET /examples/websocket/echoStream HTTP/1.1" + 
> CRLF);
> @@ -142,7 +142,7 @@ public class TestWebSocket extends Tomca
> tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
> 
> tomcat.start();
> -WebSocketCLient client= new WebSocketCLient();
> +WebSocketClient client= new WebSocketClient();
> 
> 
> // Send the WebSocket handshake
> @@ -170,7 +170,7 @@ public class TestWebSocket extends Tomca
> tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
> 
> tomcat.start();
> -WebSocketCLient client= new WebSocketCLient();
> +WebSocketClient client= new WebSocketClient();
> 
> // Send the WebSocket handshake
> client.writer.write("GET /examples/websocket/echoStream HTTP/1.1" + 
> CRLF);
> @@ -196,7 +196,7 @@ public class TestWebSocket extends Tomca
> tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
> 
> tomcat.start();
> -WebSocketCLient client= new WebSocketCLient();
> +WebSocketClient client= new WebSocketClient();
> 
> // Send the WebSocket handshake
> client.writer.write("GET /examples/websocket/echoStream HTTP/1.1" + 
> CRLF);
> @@ -304,7 +304,7 @@ public class TestWebSocket extends Tomca
> return cc.toString();
> }
> 
> -private class WebSocketCLient
> +private class WebSocketClient
> {
> // Open the socket
> final String encoding = "ISO-8859-1";
> @@ -312,7 +312,7 @@ public class TestWebSocket extends Tomca
> Writer writer ;
> BufferedReader reader;
> 
> -private WebSocketCLient() {
> +private WebSocketClient() {
> SocketAddress addr = new InetSocketAddress("localhost", 
> getPort());
> socket = new Socket();
> try {
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: [VOTE] Apache Tomcat Maven plugin 2.0-beta-1

2012-01-31 Thread Peter Roßbach
Hi Oliver,

sorry for late testing the release:

+1 (beta-1)
 
I thing the plugin need more folks to testing.

:-)
Peter

Am 26.01.2012 um 19:05 schrieb Olivier Lamy:

> Hi,
> 
> I'd like to release the Apache Tomcat Maven plugin 2.0-beta-1.
> 
> The staging repository is available here:
> https://repository.apache.org/content/repositories/orgapachetomcat-142/
> The documentation site is available here:
> http://tomcat.apache.org/maven-plugin-2.0-beta-1/
> 
> Changelog: http://tomcat.apache.org/maven-plugin-2.0-beta-1/jira-report.html
> 
> Guide to test a staged release maven plugin:
> http://maven.apache.org/guides/development/guide-testing-releases.html
> .
> 
> [+1]
> [ 0]
> [-1]
> 
> Here my +1
> 
> Thanks
> -- 
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: [VOTE] Grant Olivier Lamy commit karma to the Tomcat repo (for the Maven plugin)

2011-08-27 Thread Peter Roßbach
+1
Peter

Am 25.08.2011 um 16:44 schrieb Mark Thomas:

> Subject says it all.
> 
> Here is my +1 to start this off.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Re: [RESULT] [VOTE] Release Apache Tomcat 7.0.19

2011-07-18 Thread Peter Roßbach
[X] Stable - go ahead and release as 7.0.19 Stable
Peter

Am 18.07.2011 um 11:32 schrieb Mark Thomas:

> On 14/07/2011 10:21, Mark Thomas wrote:
> The result of the vote is stable, with the following minor issues to be
> noted in the release announcement:
> 
> 1. AJP NIO connector does not use persistent connections unless an
> explicit timeout is specified. The default of "-1" results in an
> immediate timeout for the AJP NIO connector rather than the expected
> infinite timeout.
> 2. A typo in the tomcat.util.scan.DefaultJarScanner.jarsToSkip property,
> fixed in http://svn.apache.org/viewvc?view=revision&revision=1146623
> 
> Mark
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 



smime.p7s
Description: S/MIME cryptographic signature


Re: JK 1.2.32 release kick

2011-07-02 Thread Peter Roßbach
+1
Peter

Am 27.06.2011 um 20:03 schrieb Mladen Turk:

> Hi,
> 
> I have a time slot available so I volunteer as a 1.2.32 RM.
> Think we are good for a new release.
> 
> Comments, objections?
> 
> 
> Regards
> -- 
> ^TM
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


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



Vote: Add Checkstyle roleset and make code cleanups!

2010-07-08 Thread Peter Roßbach

Hi,

after the discussion about code style (http://tomcat.markmail.org/thread/2c7lkzmpcuxqpgjj 
), I think that we must vote for this fix:


https://issues.apache.org/bugzilla/show_bug.cgi?id=49268
It includes a starting point for a very limited checkstyle ruleset.

+1: progressively introduce checkstyle with checks for which a  
consensus exists (first TabSpacePolicy, @Version format)

0 : More discussion needed
-1: no checkstyle integration. Tomcat shoudn't have code style rules

Regards
Peter



Re: svn commit: r960104 - /tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java

2010-07-07 Thread Peter Roßbach

I totally argreed with Marc Guillemot.

It is time to more invest to the cosmetic things at the tomcat code  
basis.


Peter


Am 08.07.2010 um 07:37 schrieb Marc Guillemot:


Hi Mark,

Mark Thomas wrote:

...
There is nothing stopping you running FindBugs, Checkstyle or any  
other

tool locally. I use FindBugs on the Tomact 7 code-base all the time.


what about sharing the config and including it into the build?


What does the other developers think?
+0 providing we start with a *very* limited set of checks. There  
should
be very clear agreement amongst a significant majority of the  
committers

to add additional checks.
I'd like to see a proposed list of checks before this starts being  
used
on any of the Tomcat code bases. I'd suggest a single check for  
each of

Checkstyle and Findbugs to start.


The checks make sense if they are accepted by the majority of the  
committers as they should be integral part of the build. This is the  
reason why I've only proposed one check in patch 49268.


According to the negative comments on commits, everybody should  
agree on following checks

FileTabCharacter -> currently 146 failures
JavadocType (versionFormat) -> currently 539 failures

Following simple steps could be:
RedundantImport -> 11 failures
UnusedImports -> 53 failures
ModifierOrder -> 211 failures
RedundantModifier -> 1377 failures (seems that nobody knows the  
default visibility rule of a public interface)

LeftCurly -> 498 failures
EqualsHashCode -> 5 failures
FinalParameters -> 12763 failures
FinalLocalVariable -> 8201 failures (not so much Java developers  
really know how the power of the final keyword)


Additionally it seems that you pay attention at some warnings  
emitted by your IDE. It would be interesting to express these rules  
as checkstyle (or whatever) rule that can be checked automatically.  
Can you list the Eclipse style warnings you try to fix?


I agree that coherent code style is only cosmetic in a first time as  
it doesn't change the resulting byte code. Nevertheless it makes  
easier to concentrate on the important things: the code content,  
without being distracted by the form. Therefore it helps to find  
real problems and make easier to compare files, apply patches, ...


Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com


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





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



Re: svn commit: r960104 - /tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java

2010-07-07 Thread Peter Roßbach

Hi!

I miss the checkstyle and findbugs quality checks in the project.

Marc has contributed a good starting point at

https://issues.apache.org/bugzilla/show_bug.cgi?id=49268

Then I can check my personal problem with the tab/space replacement,  
before checkin code :-)
Currently we have in 144 files a tab instead a space replacement  
issue. Ok, I want to fix it.


Later we can add more checkstyles. Who wants to help, me?

In the last two years we made a lot of source code cosmetic changes  
and these help to get a more readable codebase.
I think that Marc Guillemot can help us to get more code and test  
quality to the project.


What does the other developers think?

Regards
Peter

Am 05.07.2010 um 11:34 schrieb Mark Thomas:


On 05/07/2010 09:27, Marc Guillemot wrote:

ma...@apache.org wrote:

Author: markt
Date: Fri Jul 2 21:13:25 2010
New Revision: 960104

URL: http://svn.apache.org/viewvc?rev=960104&view=rev
Log:
A few more FindBugs issues

> ...

why don't you integrate checkstyle (and FindBugs) in the build?


The Tomcat code doesn't follow any standards consistently so the  
number of warnings that would get reported is huge. As far as I am  
aware the actual problems have been fixed. The remaining issues are  
cosmetic. There may be some real issues hiding in there somewhere  
but if there are, they aren't things that users are reporting as  
problems else there would be a bugzilla entry for it.


I don't think (I could be wrong) there is much interest in investing  
a lot of effort in a bug code clean-up. Gradual improvement seems to  
be the preferred approach at the moment.



It's the only safe way to ensure quality


I don't think it is as black and white as that. These tools have  
their place and I think the Tomcat project has used them  
appropriately. FindBugs, for example, still reports 1000s of issues  
but the actual problems were fixed quite some time ago. The cosmetic  
issues were not.


There is a valid argument that fixing the cosmetic issues does more  
harm than good by making it harder to do diffs between major versions.



and to avoid useless style discussions.


I don't recall any useless style discussions. I don't think this is  
an issue we need to solve.


Mark



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






Re: [VOTE] Release Tomcat 5.5.30 Build

2010-07-07 Thread Peter Roßbach

+1 Stable

Test tar.gz with MAC OS X and it works fine.

Thanks,
Peter

Am 01.07.2010 um 18:11 schrieb Jim Jagielski:


The builds for Tomcat 5.5.30 are ready for testing and approval.
The candidates binaries are available here:

  http://people.apache.org/~jim/tomcat-5.5/

According to the release process, the 5.5.30 build corresponding to  
the

tag TOMCAT_5_5_30 [1] is:

[ ] Broken
[ ] Alpha
[ ] Beta
[x ] Stable
+++

1. http://svn.apache.org/viewvc/tomcat/tc5.5.x/tags/TOMCAT_5_5_30/

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





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



Re: svn commit: r960348 - in /tomcat/trunk: java/org/apache/tomcat/util/net/JIoEndpoint.java test/org/apache/catalina/core/TestAsyncListener.java webapps/docs/changelog.xml

2010-07-04 Thread Peter Roßbach

Hi Mark,

why you remove and doesn't correct the TestCases?

Please, explain how a AsyncListner can receive onTimeout ?

Peter


Am 04.07.2010 um 17:44 schrieb ma...@apache.org:


Author: markt
Date: Sun Jul  4 15:44:45 2010
New Revision: 960348

URL: http://svn.apache.org/viewvc?rev=960348&view=rev
Log:
Revert r958362, r960083, r958406, r960069. r958362 broke the TCK  
tests and the other commits were sufficiently tightly coupled to it  
that it was easier to revert all of them than try to unpick them.


Removed:
   tomcat/trunk/test/org/apache/catalina/core/TestAsyncListener.java
Modified:
   tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
   tomcat/trunk/webapps/docs/changelog.xml

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

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=960348&r1=960347&r2=960348&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java  
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java  
Sun Jul  4 15:44:45 2010

@@ -399,11 +399,6 @@ public class JIoEndpoint extends Abstrac
acceptorThread.setDaemon(getDaemon());
acceptorThread.start();
}
-
-// Start async timeout thread
-Thread timeoutThread = new Thread(new  
AsyncTimeout(),getName() + "-AsyncTimeout");

-timeoutThread.setDaemon(true);
-timeoutThread.start();
}
}


Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=960348&r1=960347&r2=960348&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==

--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Jul  4 15:44:45 2010
@@ -98,14 +98,6 @@
  

  
-  
-
-  
-Start JioEndpoint timeout thread, to inform AsyncListner as  
async timeout is detected

-and application thread doesn't finished the request. (pero)
-   
-
-  
  

  



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





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



Re: Proposal: Some todo's at AsyncContext detected...

2010-07-04 Thread Peter Roßbach

Hmm,

Spec says:

public boolean isAsyncStarted() - Returns true if async processing
has started on this request, and false otherwise. If this request has  
been

dispatched using one of the AsyncContext.dispatch methods since it was
put in asynchronous mode, or a call to AsynContext.complete is made,  
this

method returns false.

===
But the example with Bug 49528 don't call directly dispatch, it calls  
AsyncContext.start().
At Tomcat we start doesn't start a Container Thread. We internally  
call a doInternalDispatch at StandardWrapperValve

with the callee thread.
...
   } else {
if (request.isAsyncDispatching()) {
//TODO SERVLET3 - async
 
((AsyncContextImpl)request.getAsyncContext()).doInternalDispatch();

...

I revert the fix, and correct the testcase.

Peter

Am 04.07.2010 um 21:23 schrieb Rainer Jung:


On 01.07.2010 18:42, Rainer Jung wrote:

On 01.07.2010 17:20, Marc Guillemot wrote:

jean-frederic clere wrote:

...
I run a daily test and just looked to what breaks it and complain.

Now I am looking to Peter's application to find what is broken.


so you're the continuous integration server ;-)

Can you publish break information or is it forbidden by the TCK
license/agreement?


Exact details are forbidden, but I'm sure there'll be some  
information


The symptom is: it breaks

"If this request has been dispatched using one of the  
AsyncContext.dispatch methods since it was put in asynchronous mode,  
this method returns false."


which is part of the spec description of "public boolean  
isAsyncStarted()".


Regards,

Rainer


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





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



Re: svn commit: r960283 - in /tomcat/trunk: java/org/apache/catalina/core/AsyncContextImpl.java test/org/apache/catalina/core/TestAsyncContextImpl.java webapps/docs/changelog.xml

2010-07-04 Thread Peter Roßbach

Hi Rainer,

source of AsyncContextImpl has a lot of open checkstyle warnings. I  
check my eclipse

but all formatter use space instead tabs. Very strange...

Peter

Am 04.07.2010 um 01:17 schrieb Rainer Jung:


Hi Peter,

On 04.07.2010 00:48, p...@apache.org wrote:

Author: pero
Date: Sat Jul  3 22:48:16 2010
New Revision: 960283

URL: http://svn.apache.org/viewvc?rev=960283&view=rev
Log:
Fix Bug 49528 - HttpServletRequest.isAsyncStarted() returns false  
when a Runnable is started

Add isDebugEnabled statements.

Todo: Why we doesn't start directly a container thread with  
asyncContext.start()?

Currently we start user runnable as an internal forward.

Added:
tomcat/trunk/test/org/apache/catalina/core/ 
TestAsyncContextImpl.java   (with props)

Modified:
tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/ 
AsyncContextImpl.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=960283&r1=960282&r2=960283&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
= 
=
--- tomcat/trunk/java/org/apache/catalina/core/ 
AsyncContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ 
AsyncContextImpl.java Sat Jul  3 22:48:16 2010

@@ -253,7 +253,7 @@ public class AsyncContextImpl implements
 }

 public boolean isStarted() {
-return (state.get() == AsyncState.STARTED || state.get()  
== AsyncState.DISPATCHING);
+return (state.get() == AsyncState.STARTED || state.get()  
== AsyncState.DISPATCHING || state.get() == AsyncState.DISPATCHED);

 }

 public void setStarted(Context context) {
@@ -292,7 +292,8 @@ public class AsyncContextImpl implements

 public void doInternalDispatch() throws ServletException,  
IOException {
 if (this.state.compareAndSet(AsyncState.TIMING_OUT,  
AsyncState.COMPLETING)) {

-log.debug("TIMING OUT!");
+   if( log.isDebugEnabled())
+   log.debug("TIMING OUT!");


Style nitpicks:

- indentation wrong, maybe tabs involved
- spacing around "if"


 boolean listenerInvoked = false;
 for (AsyncListenerWrapper listener : listeners) {
 listener.fireOnTimeout(event);
@@ -303,15 +304,18 @@ public class AsyncContextImpl implements
 }
 doInternalComplete(true);
 } else if  
(this.state.compareAndSet(AsyncState.ERROR_DISPATCHING,  
AsyncState.COMPLETING)) {

-log.debug("ON ERROR!");
+if( log.isDebugEnabled())
+log.debug("ON ERROR!");


- spacing around "if"


 boolean listenerInvoked = false;
 for (AsyncListenerWrapper listener : listeners) {
 try {
 listener.fireOnError(event);
 }catch (IllegalStateException x) {
-log.debug("Listener invoked invalid state.",x);
+if( log.isDebugEnabled())
+log.debug("Listener invoked invalid  
state.",x);


- spacing around "if"


 }catch (Exception x) {
-log.debug("Exception during onError.",x);
+if(log.isDebugEnabled())
+log.debug("Exception during onError.",x);


- spacing around "if"


 }
 listenerInvoked = true;
 }

Added: tomcat/trunk/test/org/apache/catalina/core/ 
TestAsyncContextImpl.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=960283&view=auto
= 
= 
= 
= 
= 
= 
= 
= 
= 
=
--- tomcat/trunk/test/org/apache/catalina/core/ 
TestAsyncContextImpl.java (added)
+++ tomcat/trunk/test/org/apache/catalina/core/ 
TestAsyncContextImpl.java Sat Jul  3 22:48:16 2010



+private BUG49528Servlet createTestApp(Tomcat tomcat) {
+// Must have a real docBase - just use temp
+File docBase = new  
File(System.getProperty("java.io.tmpdir"));

+
+// Create the folder that will trigger the redirect
+File foo = new File(docBase, "async");
+if (!foo.exists()&&  !foo.mkdirs()) {


- spacing around "&&"


Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=960283&r1=960282&r2=960283&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
= 
=

--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sat Jul  3 22:48:16 2010
@@ -38,6 +38,10 @@
   
 
   
+49528: HttpServletRequest.isAsyncStarted() now returns  
true when a Runnable is started!

+Reported by Pieter Libin (pero)
+
+


- indentation
- no need for exclamation mark

Regards,

Rainer

-

Re: Proposal: Some todo's at AsyncContext detected...

2010-07-02 Thread Peter Roßbach

Hi Jean Frederic,

I also detect this strange behaviour. Then I fix it at JioEndpoint.
I check the async timeout feature today and it also works at  
NioEndpoint.


Can I check the APR Connector with a normal TomcatTestCase?

Peter




Am 02.07.2010 um 16:49 schrieb jean-frederic clere:


On 07/02/2010 04:11 PM, Peter Roßbach wrote:

Hi Jean-Frederic,

had you check my test case TestAsyncListener?

Can you checkin or send me your test case.


Normally the setTimeout will call the connector
(ACTION_ASYNC_SETTIMEOUT). Which I think it does but the timeout  
doesn't

occur, at least with the code I am testing.
...



Cheers

Jean-Frederic



Peter

Am 02.07.2010 um 15:15 schrieb jean-frederic clere:


On 07/02/2010 03:08 PM, Marc Guillemot wrote:

Rainer Jung wrote:

...
Exact details are forbidden, but I'm sure there'll be some  
information

as soon as someone had time to dig into it.


this was exactly what I feared. This is an additional argument  
for an

open source test suite.


I think that patch is wrong... According to my tests the thread is
created but the timeout doesn't happen... I need more time to come  
with

another patch.

Cheers

Jean-Frederic



Cheers,
Marc.



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





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








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



Re: Proposal: Some todo's at AsyncContext detected...

2010-07-02 Thread Peter Roßbach
I am very sure the NIO and APR Connector affected, but I don't have  
find a fix.


Peter

Am 02.07.2010 um 19:48 schrieb Mark Thomas:


On 02/07/2010 15:15, jean-frederic clere wrote:

On 07/02/2010 03:08 PM, Marc Guillemot wrote:

Rainer Jung wrote:

...
Exact details are forbidden, but I'm sure there'll be some  
information

as soon as someone had time to dig into it.


this was exactly what I feared. This is an additional argument for  
an

open source test suite.


I think that patch is wrong... According to my tests the thread is
created but the timeout doesn't happen... I need more time to come  
with

another patch.


Some random comments having glanced very briefly at this.

I'm tempted to revert the whole of r958362 but since it might only  
need a tweak to work correctly I'll leave it for now. Note that if  
we get to the next 7.0.x release and it still breaks the TCK it will  
have to be reverted.


Why only the BIO connector? Are NIO and APR/native not affected?

The threads are not daemon threads so Tomcat no longer shuts down  
correctly - I'll fix this in a sec.


Mark



Cheers

Jean-Frederic



Cheers,
Marc.



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






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





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



Re: svn commit: r960069 - /tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

2010-07-02 Thread Peter Roßbach

Many Thanks and sorry :-)

Peter

Am 02.07.2010 um 19:50 schrieb ma...@apache.org:


Author: markt
Date: Fri Jul  2 17:50:56 2010
New Revision: 960069

URL: http://svn.apache.org/viewvc?rev=960069&view=rev
Log:
Make new timeout thread a daemon thread so Tomcat will shutdown  
properly


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

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

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=960069&r1=960068&r2=960069&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java  
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java  
Fri Jul  2 17:50:56 2010

@@ -401,7 +401,8 @@ public class JIoEndpoint extends Abstrac
}

// Start async timeout thread
-Thread timeoutThread = new Thread(new AsyncTimeout(),  
getName() + "-AsyncTimeout");
+Thread timeoutThread = new Thread(new  
AsyncTimeout(),getName() + "-AsyncTimeout");

+timeoutThread.setDaemon(true);
timeoutThread.start();
}
}



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





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



Re: Proposal: Some todo's at AsyncContext detected...

2010-07-02 Thread Peter Roßbach

Hi Jean-Frederic,

had you check my test case TestAsyncListener?

Can you checkin or send me your test case.

Peter

Am 02.07.2010 um 15:15 schrieb jean-frederic clere:


On 07/02/2010 03:08 PM, Marc Guillemot wrote:

Rainer Jung wrote:

...
Exact details are forbidden, but I'm sure there'll be some  
information

as soon as someone had time to dig into it.


this was exactly what I feared. This is an additional argument for an
open source test suite.


I think that patch is wrong... According to my tests the thread is
created but the timeout doesn't happen... I need more time to come  
with

another patch.

Cheers

Jean-Frederic



Cheers,
Marc.



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





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



Re: svn commit: r958362 - in /tomcat/trunk: java/org/apache/tomcat/util/net/JIoEndpoint.java test/org/apache/catalina/core/TestAsyncListener.java webapps/docs/changelog.xml

2010-06-30 Thread Peter Roßbach

I am highly interessed why does my fix is wrong :-)

Is my fix really wrong, you can revert my checkin. Today I present the  
new Tomcat 7 release at Java User Forum Stuttgart (Germany).


Many thanks,

Peter

Am 01.07.2010 um 08:20 schrieb jean-frederic clere:


On 06/30/2010 09:15 PM, Peter Roßbach wrote:

Hi Jean Frederic!

Why does my change break the TCK? Is the current 12/09 servlet spec  
not

correct? How must the async timeout functionalty work?

Can you comment my other findings, please?


I will have a look today to the stuff.

Cheers

Jean-Frederic




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



Re: Proposal: Some todo's at AsyncContext detected...

2010-06-30 Thread Peter Roßbach

Hi Marc,


Am 30.06.2010 um 20:03 schrieb Mark Thomas:


On 30/06/2010 17:01, Marc Guillemot wrote:

Hi,

What you write means that the freshly release Tomcat 7 doesn't fully
implement Servlet API 3.0, isn't it?

Interesting to see that nobody reacts :-(


If you were following the dev list you would have seen that Jean- 
Frederic has already vetoed the change Peter made on the basis that  
it breaks the TCK. That suggests that Peter's analysis of the  
current situation is not 100% correct.



Which of my findings aren't correct?

Peter

My recollection is that the last thing that Filip implemented for  
Servlet 3.0 was the necessary timeout features. I'd be surprised if  
Filip, as a member of the Servlet Expert Group that wrote the spec,  
missed something fundamental. I wouldn't be surprised if there were  
some edge cases missed. I do know that Filip tended to leave a lot  
of the Servlet 3.0 TODOs in the code, even when he had implemented  
the appropriate feature. Those certainly need cleaning up.





Looking at Peter's test case - along with the other issues folks  
have raised in Bugzilla for the 7.0.0 release - is on my todo list  
but like the other committers I have a day job. Whilst many of the  
committers are fortunate enough (me included) to be able to allocate  
some work time to Tomcat development, it doesn't follow one of the  
other committers will immediately have the time necessary to look at  
Peter's e-mail and comment in detail. I can't speak for the others,  
but my free time is currently occupied with another Tomcat 7 issue -  
namely http://tomcat.markmail.org/thread/25g353eqvqfqniiz


Like any area of Tomcat, help is always appreciated. If you are  
interested in this issue and would like to help out I would  
encourage you to look at Peter's test case, compare the expected  
behaviour to what the spec defines and offer your view on whether  
there is a bug that needs fixing or not. If there is an issue,  
patches would be even better.


Mark




Cheers,
Marc.

Peter Roßbach wrote:

Hi!

I detected some Todo's at AsyncContext

- AsyncContext.createListener
We don't make a resource injection or make it configurable!

Servlet 3.0 API comment:
"This method supports resource injection if the given clazz  
represents

a Managed Bean. See the Java EE platform and JSR 299 specifications
for additional details about Managed Beans and resource injection."

- I miss the is[Started,Completed] methods at AsyncContext interface
The only way to detect a completed state at AsyncContext inside an
AsyncListener is:
if (ac.getResponse() != null)
AsyncListener got an event, with empty state... -- Very strange!

Can't we clear all AsyncListener after send complete and before we
refresh the AsyncContext state?
How can a user handle a completed situation?
see o.a.c.core.TestAsyncListener

- AsyncContext.start() dosen't really start a thread!
We create wrapper of a Runnable, but we don't start a thread...
Error handling seam a little bit strange.
We only throw a RuntimeException(ex) and log an error!

Servlet API comment:
"Causes the container to dispatch a thread, possibly from a managed
thread pool, to run the specified Runnable. The container may
propagate appropriate contextual information to the Runnable."

How can we implement that?
Start everytime a new thread without pooling?
Use the connector executor pool from request?
Then we must extend the ProtocolHandler interface with getExecutor()
signature.
Use a separate Executor pool per Engine/Host or Context
How do we have to implemented the error handling?

- JioEndpoint has a timeout detection thread, but we don't start it!
I easy fix it with revision 958362,
but the polling strategy is slow and ineffectiv.
I didn't make a test at NIO/APR-HTTP or AJP-Connectors.

- After the timeout event is emitted, the completed method is
automatically called!
Servlet API 3.0 Spec says:

■In the event that an asynchronous operation times out, the  
container

must run
through the following steps:
■ Invoke the AsyncListener.onTimeout method on all the  
AsyncListener
instances registered with the ServletRequest on which the  
asynchronous

operation was initiated.
■ If none of the listeners called AsyncContext.complete() or any  
of the
AsyncContext.dispatch methods, perform an error dispatch with a  
status

code equal to HttpServletResponse.SC_INTERNAL_SERVER_ERROR.
■ If no matching error page was found, or the error page did not  
call

AsyncContext.complete() or any of the AsyncContext.dispatch
methods, the container MUST call AsyncContext.complete().
===
I miss the implementation that we call the error page!

- Currently a AsyncListener can't reinit a async cycle!
see o.a.c.connector.Request.startAsync
... L1555ff
if (asyncContext==null) {
asyncContext = new AsyncContextImpl(this);
} else if (asyncContext.isStarted()) {
throw new Ill

Proposal: Some todo's at AsyncContext detected...

2010-06-27 Thread Peter Roßbach

Hi!

I detected some Todo's at AsyncContext

-   AsyncContext.createListener
We don't make a resource injection or make it configurable!

Servlet 3.0 API comment:
"This method supports resource injection if the given clazz  
represents a Managed Bean. See the Java EE platform and JSR 299  
specifications for additional details about Managed Beans and resource  
injection."


-   I miss the is[Started,Completed] methods at AsyncContext interface
The only way to detect a completed state at AsyncContext inside  
an AsyncListener is:

if (ac.getResponse() != null)
AsyncListener got an event, with empty state... -- Very strange!

Can't we clear all AsyncListener after send complete and before  
we refresh the AsyncContext state?

How can a user handle a completed situation?
see o.a.c.core.TestAsyncListener

-   AsyncContext.start() dosen't really start a thread!
We create wrapper of a Runnable, but we don't start a thread...
Error handling seam a little bit strange.
We only throw a RuntimeException(ex) and log an error!

Servlet API comment:
"Causes the container to dispatch a thread, possibly from a  
managed thread pool, to run the specified Runnable. The container may  
propagate appropriate contextual information to the Runnable."


How can we implement that?
Start everytime a new thread without pooling?
Use the connector executor pool from request?
Then we must extend the ProtocolHandler interface  
with getExecutor() signature.

Use a separate Executor pool per Engine/Host or Context
How do we have to implemented the error handling?

- JioEndpoint has a timeout detection thread, but we don't start it!
I easy fix it with revision 958362,
but the polling strategy is slow and ineffectiv.
I didn't make a test at NIO/APR-HTTP or AJP-Connectors.

- After the timeout event is emitted, the completed method is  
automatically called!

   Servlet API 3.0 Spec says:

■In the event that an asynchronous operation times out, the container  
must run

through the following steps:
■ Invoke the AsyncListener.onTimeout method on all the AsyncListener
instances registered with the ServletRequest on which the asynchronous
operation was initiated.
■ If none of the listeners called AsyncContext.complete() or any of  
the

AsyncContext.dispatch methods, perform an error dispatch with a status
code equal to HttpServletResponse.SC_INTERNAL_SERVER_ERROR.
■ If no matching error page was found, or the error page did not call
AsyncContext.complete() or any of the AsyncContext.dispatch
methods, the container MUST call AsyncContext.complete().
===
I miss the implementation that we call the error page!

- Currently a AsyncListener can't reinit a async cycle!
see o.a.c.connector.Request.startAsync
... L1555ff
if (asyncContext==null) {
asyncContext = new AsyncContextImpl(this);
} else if (asyncContext.isStarted()) {
throw new IllegalStateException("Already started.");
}
...

What does this spec definition really mean?
=== Ch 2 Page 18
■public void onStartAsync(AsyncEvent event) - Is used to notify the
listener that a new asynchronous cycle is being initiated via a call  
to one of the

ServletRequest.startAsync methods. The AsyncContext corresponding
to the asynchronous operation that is being reinitialized may be  
obtained by

calling AsyncEvent.getAsyncContext on the given event.


-   AsyncListener doesn't receive a onStartAsync event.
We don't implement it.

At AsyncListenerWrapper fireOnStartAsync is missing
As AsyncContext.startAsync method doesn't emit an event

- ContextClassLoader at AsyncContext.dispatch is not set!
I can't see that we correcly set the application  
ContextClassLoader before
we dispatch the Request. What must we do at a CrossContext  
dispatch?


- After first complete async cycle, an AsyncListner receive  
onStartAsync as code start next async cycle?


Why doesn't the Servlet 3.0 TCK check basic AsyncContext  
functionalities?
It seams that we better start a open test suite implementation at the  
new Servlet 3.0 API.


Regards,
Peter


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



Re: [VOTE] Release Apache Tomcat 7.0.0 as beta

2010-06-20 Thread Peter Roßbach

+1 beta

Peter

Am 14.06.2010 um 00:15 schrieb Mark Thomas:


The propsoed 7.0.0 release is
[ ] Broken - do not release
[ ] Alpha  - go ahead and release as 7.0.0 Alpha
[x ] Beta   - go ahead and release as 7.0.0 Beta



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



Re: tag 6.0.27 on Monday

2010-06-14 Thread Peter Roßbach

Hi Jean-Frederic,

only the last 6.0.26 release has a wrong normal juli.jar. Can you  
correct this? Please, made a check after

tomcat 6.0.27 maven publish.

No regression...

Many thanks
Peter


Am 14.06.2010 um 08:57 schrieb jean-frederic clere:


On 06/13/2010 11:09 AM, Peter Roßbach wrote:

Hi Jenn-Frederic,

at the 6.0.26 Release we have deployed a wrong juli.jar at the  
maven repo:


http://tomcat.apache.org/dev/dist/m2-repository/org/apache/tomcat/juli/6.0.26/juli-6.0.26.jar


This jar is the commons-logging/log4j juli package.


hm not really sure what is wrong. That is not regression what do you
except there?

Cheers

Jean-Frederic

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





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



Re: tag 6.0.27 on Monday

2010-06-13 Thread Peter Roßbach

Hi Jenn-Frederic,

at the 6.0.26 Release we have deployed a wrong juli.jar at the maven  
repo:


http://tomcat.apache.org/dev/dist/m2-repository/org/apache/tomcat/juli/6.0.26/juli-6.0.26.jar

This jar is the commons-logging/log4j juli package.

Cheers,
Peter

Am 10.06.2010 um 07:59 schrieb jean-frederic clere:


Hi,

I plan to tag 6.0.27 on Monday (European morning) and  start the  
release

process.

Comments?

Cheers

Jean-Frederic

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





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



Re: [VOTE] Release Tomcat 7.0.0 based on Tomcat 7.0.0-RC4

2010-06-11 Thread Peter Roßbach

+1 I VOTE BETA

Peter

Am 07.06.2010 um 16:38 schrieb Mark Thomas:


All,

The next Tomcat 7.0.0 release candiate is ready for testing. 7.0.0-RC4
can be obtained from:
http://people.apache.org/~markt/dev/tomcat-7/v7.0.0-RC4/
The svn tag is:
http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_0_RC4/

Please test this release candidate and provide feedback.

The 7.0.0-RC4 tag is
[ ] Broken - do not release
[ ] Alpha  - go ahead and release 7.0.0 Alpha based on 7.0.0-RC4
[ x] Beta   - go ahead and release 7.0.0 Beta based on 7.0.0-RC4
[ ] Stable - go ahead and release 7.0.0 Stable based on 7.0.0-RC4

The following issues were noted:
-

Thanks,

Mark



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





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



Re: tag 6.0.27 on Monday

2010-06-11 Thread Peter Roßbach

+1
Peter

Am 10.06.2010 um 07:59 schrieb jean-frederic clere:


Hi,

I plan to tag 6.0.27 on Monday (European morning) and  start the  
release

process.

Comments?

Cheers

Jean-Frederic

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





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



Re: Draft of first blog post announcing TC7

2010-05-17 Thread Peter Roßbach

+1

my improvements for the list.

rewrite the internal component lifecycle management
easier tomcat embedding
used only java executor API at all connectors

Peter


Am 17.05.2010 um 16:41 schrieb Mark Thomas:

I have drafted an announcement of the upcoming TC7 release for our  
first

blog post. It can be previewed here:

http://blogs.apache.org/preview/tomcat/?previewEntry=apache_tomcat_7_released

Suggestions for improvements welcome.

Note the links won't work until we actually do the release.

Mark



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





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



Re: svn commit: r939253 - in /tomcat/trunk/test: org/apache/catalina/core/ webapp-3.0-fragments/ webapp-3.0-fragments/WEB-INF/ webapp-3.0-fragments/WEB-INF/lib/ webapp-3.0-fragments/folder/

2010-04-29 Thread Peter Roßbach

Hi,

I have debug the problem and it seams very strange.

Why zip file is closed?

I have build a standalone example with other files from scratch and I  
got my resource from bundled jar:/META-INF/resource/hello.jsp.
But as I use the resource.jar it not work and also my jar don't work  
with the testcase.


Bad...

Peter

Am 29.04.2010 um 12:24 schrieb kkoli...@apache.org:


Author: kkolinko
Date: Thu Apr 29 10:24:14 2010
New Revision: 939253

URL: http://svn.apache.org/viewvc?rev=939253&view=rev
Log:
Tests for Servlet 3.0 support of bundling static resources in META- 
INF/resources subdirectory of a jar file.
It is a separate web application, because the old "webapp-3.0" has  
metadata-complete="true".


The tests in TestStandardContextResources are currently failing,
and thus are disabled until a solution is found. See the comment in  
TestStandardContextResources.java


Added:
   tomcat/trunk/test/org/apache/catalina/core/ 
TestStandardContextResources.java   (with props)

   tomcat/trunk/test/webapp-3.0-fragments/
   tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/
   tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/lib/
   tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/lib/ 
resources.jar   (with props)
   tomcat/trunk/test/webapp-3.0-fragments/WEB-INF/web.xml   (with  
props)

   tomcat/trunk/test/webapp-3.0-fragments/folder/
   tomcat/trunk/test/webapp-3.0-fragments/folder/resourceC.jsp
(with props)
   tomcat/trunk/test/webapp-3.0-fragments/folder/resourceE.jsp
(with props)

   tomcat/trunk/test/webapp-3.0-fragments/resourceA.jsp   (with props)

Added: tomcat/trunk/test/org/apache/catalina/core/ 
TestStandardContextResources.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=939253&view=auto
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/test/org/apache/catalina/core/ 
TestStandardContextResources.java (added)
+++ tomcat/trunk/test/org/apache/catalina/core/ 
TestStandardContextResources.java Thu Apr 29 10:24:14 2010

@@ -0,0 +1,153 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or  
more
+ *  contributor license agreements.  See the NOTICE file  
distributed with
+ *  this work for additional information regarding copyright  
ownership.
+ *  The ASF licenses this file to You under the Apache License,  
Version 2.0
+ *  (the "License"); you may not use this file except in compliance  
with

+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,  
software

+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
implied.
+ *  See the License for the specific language governing permissions  
and

+ *  limitations under the License.
+ */
+
+package org.apache.catalina.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.util.buf.ByteChunk;
+
+public class TestStandardContextResources extends TomcatBaseTest {
+
+public void testResources() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp-3.0-fragments");
+// app dir is relative to server home
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+if (false) {
+// FIXME: These tests are currently failing. See  
comment in testResources2() below.

+
+assertPageContains("/test/resourceA.jsp",
+"resourceA.jsp in the web application");
+assertPageContains("/test/resourceB.jsp",
+"resourceB.jsp in resources.jar");
+assertPageContains("/test/folder/resourceC.jsp",
+"resourceC.jsp in the web application");
+assertPageContains("/test/folder/resourceD.jsp",
+"resourceD.jsp in resources.jar");
+assertPageContains("/test/folder/resourceE.jsp",
+"resourceE.jsp in the web application");
+}
+}
+
+public void testResources2() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp-3.0-fragments");
+// app dir is relative to server home
+StandardContext ctx = (StandardContext)  
tomcat.addWebapp(null, "/test",

+appDir.getAbsolutePath());
+
+Tomcat.addServlet(ctx, "getresource", new  
GetResourceServlet());

+   

Re: svn commit: r939221 - in /tomcat/trunk/test/org/apache/catalina/startup: DuplicateMappingParamServlet.java NoMappingParamServlet.java ParamServlet.java TestContextConfigAnnotation.java

2010-04-29 Thread Peter Roßbach

OK, I change my default.

A lot of tomcat classes has this problem. I found 861 java files at  
tomcat 7 with token "Revision"!


Peter

Am 29.04.2010 um 09:30 schrieb kkoli...@apache.org:


Author: kkolinko
Date: Thu Apr 29 07:30:29 2010
New Revision: 939221

URL: http://svn.apache.org/viewvc?rev=939221&view=rev
Log:
$Date$ was wrapped and thus broken in r939212

Replacing with $Id$ because of i18n and timezone issues that $Date$  
has

(http://subversion.tigris.org/issues/show_bug.cgi?id=2332)

Modified:
   tomcat/trunk/test/org/apache/catalina/startup/ 
DuplicateMappingParamServlet.java
   tomcat/trunk/test/org/apache/catalina/startup/ 
NoMappingParamServlet.java

   tomcat/trunk/test/org/apache/catalina/startup/ParamServlet.java
   tomcat/trunk/test/org/apache/catalina/startup/ 
TestContextConfigAnnotation.java


Modified: tomcat/trunk/test/org/apache/catalina/startup/ 
DuplicateMappingParamServlet.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/DuplicateMappingParamServlet.java?rev=939221&r1=939220&r2=939221&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/test/org/apache/catalina/startup/ 
DuplicateMappingParamServlet.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/ 
DuplicateMappingParamServlet.java Thu Apr 29 07:30:29 2010

@@ -29,8 +29,7 @@ import javax.servlet.http.HttpServletRes
/**
 *
 * @author Peter Rossbach
- * @version $Revision$ $Date: 2010-04-29 00:16:49 +0200 (Thu, 29 Apr
- *  2010) $
+ * @version $Id$
 */
@WebServlet(value = "/annotation/overwrite", urlPatterns = { "/ 
param2" }, name = "param", initParams = {

@WebInitParam(name = "foo", value = "Hello"),

Modified: tomcat/trunk/test/org/apache/catalina/startup/ 
NoMappingParamServlet.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/NoMappingParamServlet.java?rev=939221&r1=939220&r2=939221&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/test/org/apache/catalina/startup/ 
NoMappingParamServlet.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/ 
NoMappingParamServlet.java Thu Apr 29 07:30:29 2010

@@ -29,8 +29,7 @@ import javax.servlet.http.HttpServletRes
/**
 *
 * @author Peter Rossbach
- * @version $Revision$ $Date: 2010-04-29 00:16:49 +0200 (Thu, 29 Apr
- *  2010) $
+ * @version $Id$
 */
@WebServlet(name = "param1", initParams = {
@WebInitParam(name = "foo", value = "Hello"),

Modified: tomcat/trunk/test/org/apache/catalina/startup/ 
ParamServlet.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/ParamServlet.java?rev=939221&r1=939220&r2=939221&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/test/org/apache/catalina/startup/ParamServlet.java  
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/ParamServlet.java  
Thu Apr 29 07:30:29 2010

@@ -29,8 +29,7 @@ import javax.servlet.http.HttpServletRes
/**
 *
 * @author Peter Rossbach
- * @version $Revision$ $Date: 2010-04-29 00:16:49 +0200 (Thu, 29 Apr
- *  2010) $
+ * @version $Id$
 */
@WebServlet(value = "/annotation/overwrite", name = "param",  
initParams = {

@WebInitParam(name = "foo", value = "Hello"),

Modified: tomcat/trunk/test/org/apache/catalina/startup/ 
TestContextConfigAnnotation.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestContextConfigAnnotation.java?rev=939221&r1=939220&r2=939221&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/test/org/apache/catalina/startup/ 
TestContextConfigAnnotation.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/ 
TestContextConfigAnnotation.java Thu Apr 29 07:30:29 2010

@@ -28,8 +28,7 @@ import org.apache.catalina.deploy.WebXml
 * fragment.
 *
 * @author Peter Rossbach
- * @version $Revision$ $Date: 2010-04-29 00:16:49 +0200 (Thu, 29 Apr
- *  2010) $
+ * @version $Id$
 */
public class TestContextConfigAnnotation extends TestCase {




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





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



Re: svn commit: r937325 - in /tomcat/trunk/java/org/apache: catalina/ha/session/DeltaManager.java el/lang/ExpressionBuilder.java

2010-04-28 Thread Peter Roßbach

Add to my ToDo list :-)

Peter

Am 29.04.2010 um 01:09 schrieb Mark Thomas:


..

and also we can optimized the "for"-statement to
for(Valve valve: valves) {
if(valve instanceof ReplicationValve) {
replicationValve = (ReplicationValve)valve ;
break;
}
}


Not without changing when the debug message gets logged. Not sure we  
want to do that. I'll leave further optimisations of this but to you  
since you know the code better than I do.



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



Re: svn commit: r939143 - /tomcat/trunk/webapps/docs/changelog.xml

2010-04-28 Thread Peter Roßbach

+1 for that!

Makes life easier...

Peter

Am 29.04.2010 um 02:36 schrieb ma...@apache.org:


Author: markt
Date: Thu Apr 29 00:36:35 2010
New Revision: 939143

URL: http://svn.apache.org/viewvc?rev=939143&view=rev
Log:
It isn't practical to list every single commit that implemented  
Servlet 3.0.


Modified:
   tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=939143&r1=939142&r2=939143&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==

--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Apr 29 00:36:35 2010
@@ -36,13 +36,9 @@

  

-  
-939114: Provide web.xml and fragments overwrite  
annotation parameters
-(s. Servlet API 3.0 Spec at Nov 2009 Section 8.2.3.3 pages  
80-84).
-Check source at  
ContextConfig.processAnnotationsFile(File,WebXml)

-and testcase TestContextConfigAnnotation.
---not yet complete-- (pero)
-  
+  
+Update Servlet support to the Servlet 3.0 specification.  
(all)

+  
  
Improve and document VirtualWebappLoader. (rjung)
  
@@ -50,10 +46,6 @@
43642: Add prestartminSpareThreads attribute for  
Executor. (jfclere)

  
  
-Update Servlet support to the Servlet 3.0 specification. Note
-asynchronous support is not yet complete. (markt/fhanik)
-  
-  
Switch from AnnotationProcessor to InstanceManager. Patch  
provided by

David Jecks with modifications by Remy. (remm/fhanik)
  



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





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



Tomcat 7 ; Servlet API question - Spec 8.2.3 overwrite WebServlet annotation parameter

2010-04-28 Thread Peter Roßbach

Hi,

I have read the servlet 3.0 spec and play around with some simple  
examples.


I setup a very simple annotated servlet:

==
package annotation;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet(value = "/param", name= "param", initParams = {
@WebInitParam(name = "foo", value = "Hello "),
@WebInitParam(name = "bar", value = " World!") })
public class ParamServlet extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException
  {
PrintWriter out = res.getWriter();
out.println(getInitParameter("foo"));
out.println(getInitParameter("bar"));
  }
}
===

Next the with parameter overwriting don't work with current trunk!

=== web.xml

http://java.sun.com/xml/ns/javaee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd 
">


param
annotation.ParamServlet

foo
hello


bar
peter



param
/param1




I read the servlet 3.0 (November 2009 final version) chapter "8.2.3  
Assembling the descriptor from web.xml, web-
fragment.xml and annotations". At page 81 8.2.3.3.n) are describe  
following override rule:


n. Any metadata specified via an annotation that isn’t already present  
in the

descriptor will be used to augment the effective descriptor.
i. Configuration specified in the main web.xml or a web fragment takes
precedence over the configuration specified via annotations.
ii. For a servlet defined via the @WebServlet annotation, to override  
values
via the descriptor, the name of the servlet in the descriptor MUST  
match the
name of the servlet specified via the annotation (explicitly specified  
or the

default name, if one is not specified via the annotation).
iii. Init params for servlets and filters defined via annotations,  
will be
overridden in the descriptor if the name of the init param exactly  
matches
the name specified via the annotation. Init params are additive  
between the

annotations and descriptors.
iv. url-patterns, when specified in a descriptor for a given servlet  
name

overrides the url patterns specified via the annotation.
v. For a filter defined via the @WebFilter annotation, to override  
values via
the descriptor, the name of the filter in the descriptor MUST match  
the name
of the filter specified via the annotation (explicitly specified or  
the default

name, if one is not specified via the annotation).
vi. url-patterns to which a filter is applied, when specified in a  
descriptor

for a given filter name overrides the url patterns specified via the
annotation.
vii. DispatcherTypes to which a filter applies, when specified in a  
descriptor for

a given filter name overrides the DispatcherTypes specified via the
annotation.
viii. The following examples demonstrates some of the above rules -

I think this define that web.xml or a fragment definition can  
overwrite annotation defaults.

Also we must merge web.xml definition with annotation parameters.

OK!

But Tomcat 7 currently don't support this:

--- java/org/apache/catalina/startup/ContextConfig.java	(revision  
937984)

@@ -1890,17 +1890,34 @@

 protected void processAnnotationWebServlet(String className,
 AnnotationEntry ae, WebXml fragment) {
  if (fragment.getServlets().containsKey(className)) {
// Skip this annotation. Entry in web.xml takes priority
return;
  }

I am now start to correct the implementation.
Why the TCK don't show errors?

Peter


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



Re: .classpath and .project in src distribution (was: svn commit: r937993)

2010-04-27 Thread Peter Roßbach
The current setup of the .project and .classpath files works good for  
many years.
I think it was helpfull for user of the src distribution, also use the  
correct eclipse setup.


The license issue is really bad and we must fixit! We can do that with  
a little ant task.


To move .project and .classpath to temp files.
+1

Can we use eclipse.project.default and eclispe.classpath.default as  
names?


Peter



Am 27.04.2010 um 09:18 schrieb Konstantin Kolinko:


2010/4/26  :

Author: pero
Date: Mon Apr 26 10:46:01 2010
New Revision: 937993

URL: http://svn.apache.org/viewvc?rev=937993&view=rev
Log:
Include .project and .classpath files to src distribution.
s. http://ant.apache.org/manual/dirtasks.html#defaultexcludes to  
not include scm files!




The ".project" and ".classpath" files do not have ASL header. I do not
think that we should include them in the src distribution how they
are.

Eclipse IDE overwrites them from time to time, so keeping a header in
them looks like a lot of work, e.g. we did that once already:
http://svn.apache.org/viewvc?view=revision&revision=746405

One way to deal with it could be to make a copy of them under
different names, e.g.
".classpath.tmpl.xml, ".project.tmpl.xml", and ignore existing
".classpath" and ".project":
http://subversion.apache.org/faq.html#ignore-commit

What do you think?

Best regards,
Konstantin Kolinko

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





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



Re: svn commit: r937325 - in /tomcat/trunk/java/org/apache: catalina/ha/session/DeltaManager.java el/lang/ExpressionBuilder.java

2010-04-26 Thread Peter Roßbach

HI Mark,

your are right! But then we can use:

CatalinaCluster cluster = getCluster() ;
if(cluster != null) {
Valve[] valves = cluster.getValves();
..

and also we can optimized the "for"-statement to
for(Valve valve: valves) {
if(valve instanceof ReplicationValve) {
replicationValve = 
(ReplicationValve)valve ;
break;
}
}

And I think the replicationValve must be declared as volatile.

Peter

Am 26.04.2010 um 12:43 schrieb Mark Thomas:


On 26/04/2010 10:28, Peter Roßbach wrote:

Hi Mark,

bad fix! The method getValves() only exists at CatalinaCluster!


getCluster() returns an object of type CatalinaCluster. The check  
wasn't doing anything apart from wasting CPU cycles.


Mark



peter

Am 23.04.2010 um 17:09 schrieb ma...@apache.org:


Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=937325&r1=937324&r2=937325&view=diff

= 
= 
= 
= 
= 
= 
= 
= 
= 
= 



--- tomcat/trunk/java/org/apache/catalina/ha/session/ 
DeltaManager.java

(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/ 
DeltaManager.java

Fri Apr 23 15:09:58 2010
@@ -882,7 +882,7 @@ public class DeltaManager extends Cluste
if(replicationValve == null) {
if(container instanceof StandardContext &&
((StandardContext)container).getCrossContext()) {
Cluster cluster = getCluster() ;
- if(cluster != null && cluster instanceof CatalinaCluster) {
+ if(cluster != null) {
Valve[] valves = ((CatalinaCluster)cluster).getValves();
if(valves != null && valves.length > 0) {
for(int i=0; replicationValve == null && i < valves.length ; i++ ){








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





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



Re: svn commit: r937325 - in /tomcat/trunk/java/org/apache: catalina/ha/session/DeltaManager.java el/lang/ExpressionBuilder.java

2010-04-26 Thread Peter Roßbach

Hi Mark,

bad fix! The method getValves() only exists at CatalinaCluster!

peter

Am 23.04.2010 um 17:09 schrieb ma...@apache.org:

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/ 
DeltaManager.java

URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=937325&r1=937324&r2=937325&view=diff
= 
= 
= 
= 
= 
= 
= 
= 
==
--- tomcat/trunk/java/org/apache/catalina/ha/session/ 
DeltaManager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/ 
DeltaManager.java Fri Apr 23 15:09:58 2010

@@ -882,7 +882,7 @@ public class DeltaManager extends Cluste
if(replicationValve == null) {
if(container instanceof StandardContext &&  
((StandardContext)container).getCrossContext()) {

Cluster cluster = getCluster() ;
-if(cluster != null && cluster instanceof  
CatalinaCluster) {

+if(cluster != null) {
Valve[] valves =  
((CatalinaCluster)cluster).getValves();

if(valves != null && valves.length > 0) {
for(int i=0; replicationValve == null && i <  
valves.length ; i++ ){




Re: Using JIRA instead STATUS.txt

2010-03-14 Thread Peter Roßbach

+1

Peter

Am 14.03.2010 um 08:07 schrieb Mladen Turk:


Hi,

I would suggest that we use JIRA instead maintaining STATUS.txt files.
Each branch can then be a separate component and each status vote
JIRA issue classified as either bug, feature, etc...
Voting is supported except that one cannot vote for the created issue,
so that would be presumed.
However there is no -1 vote, so that would have to be done like
today by entering the comment with -1.

Nice thing is that patches can be directly attached without the need  
to

scp to the people.a.o.

If we decide on that I'll work with IT to allow only committers
write access.

Comments?

Regards
--
^TM

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





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



Re: JK 1.2.29 Plan

2010-01-06 Thread Peter Roßbach

+1

Regards
Peter

Am 06.01.2010 um 11:07 schrieb Rainer Jung:


Any objections to the following plan about JK 1.2.29?

- 15.01.2009
 make snapshot available for testing feedback like we did
 for nearly all previous releases

- ~22.01.2009
 tag 1.2.29 (exact date depending whether there's bug feedback)

Regards,

Rainer


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





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



Re: [proposal] remove worker based connector thread pools in trunk

2009-08-17 Thread Peter Roßbach

Cool refactoring!

+1
Peter

Am 13.08.2009 um 22:07 schrieb Filip Hanik - Dev Lists:


Here is why I think its good

1. Current pools can't shrink, so when peak has been hit, that's  
where were at
2. Current pools are unfair, synchronized (workers)  
{ workers.wait() }, executors are a bit more fair since they only  
hold a lock for a short period

3. Reduce duplicate code
4. Executors provide more flexibility
5. I have not found a performance difference anymore
6. Async implementation becomes much easier, since  
AsyncContext.dispatch() is easily handed off to an executor and  
releasing application thread. Otherwise we have to add an executor  
on top of the existing thread pool, which is doable, just not  
pragmatic


best
Filip


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




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



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

2009-05-10 Thread Peter Roßbach

OK,

I see the problem

Peter

Am 10.05.2009 um 04:03 schrieb Konstantin Kolinko:


+
+* Fix Close Stream at WebappClassLoader after read error
+  http://svn.apache.org/viewvc?rev=772872&view=rev
+  +1: pero
+  -1:
+


Nice catch, but what bugs me here
(in WebappClassLoader#findResourceInternal)
is the distance between opening the binaryStream and starting to use  
it.

There is a lot of processing, e.g.:
 if (!openJARs()) {
return null;
 }
 if (antiJARLocking).

I think that
1) the stream should be closed where it was before Peter's change
(reverting rev.772872),
but add setting binaryStream variable to null afterwards.
2) a global try/finally to be added around the whole method, closing  
the
stream in case of error or preliminary exit (e.g. caused by if (! 
openJARs())).


Best regards,
Konstantin Kolinko

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





Re: [ANN] New committer: Konstantin Kolinko

2009-05-08 Thread Peter Roßbach

Hello Konstantin,

Great work and very welcome in the tomcat team.

Regards,

Peter

Am 06.05.2009 um 09:52 schrieb Mark Thomas:

On behalf of the Tomcat committers I am pleased to announce that  
Konstantin

Kolinko has been voted in as a new Tomcat committer.

Please join me in welcoming him.

Mark

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