Git and tomcat 7.x
Hello, I have lost the discussion, but remember one thing having been discussed today about the git repo for tomcat 7.x being broken because its trunk followed 8.0-dev instead (I did notice that but thought it was on purpose). Do 8.0.x and 7.x differ enough that I'll have to re-clone my repo and base my netmask filtering patches over the new repo? The trouble is that I don't feel like git svn cloning directly given that my bandwidth is very poor and the Apache SVN repo has a number of commits in the 7 digit range (even if the first of these 7 is "just" a 1)... -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git and tomcat 7.x
On Fri, Oct 14, 2011 at 20:08, Mark Thomas wrote: > On 14/10/2011 19:00, Francis Galiegue wrote: >> [...] The trouble is >> that I don't feel like git svn cloning directly given that my >> bandwidth is very poor and the Apache SVN repo has a number of commits >> in the 7 digit range (even if the first of these 7 is "just" a 1)... > > No. All patches will be applied to trunk (a.k.a. 8.0.x) first and then > back-ported. trunk and 7.0.x are very close. It should be a simple svn > merge. > > Don't ever git clone directly to the ASF svn servers. You are very > likely to be banned from connecting due to the high volume of requests > that would be generated. > Not that I'd have tried anyway, but thanks for the information ;) I'll keep going with my current clone, then. Thanks! Have fun, -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [RFC] Netmask-based filter and valve
On Tue, Oct 11, 2011 at 14:09, Francis Galiegue wrote: [...] > > Yes, I was kind of wondering whether the .get*() methods required > symmetry with .put*(). So, this is one of my questions answered. > > Along with the question of why Remote{Host,Addr}Filter cleared allow > and deny before assigning them... > > I'll rework this part, along with exception handling. > While all the points above have been addressed, there is a big issue: filters just don't seem to "error away" when badly configured. See the associated bugzilla entry at https://issues.apache.org/bugzilla/show_bug.cgi?id=51953: even with an existing filter, which is known to work, the context is reloaded anyway... In its previous state or so it seems, according to some "out of the head" tests of mines. In particular, nothing out of my log.error()s appear in any log file with a default Tomcat tarball generated by "ant release"! Next step is trying and applying the patch over the "real" Tomcat 7.x branch and see what turns out... -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Question regarding of an implementation of a custom Valve
On Fri, Oct 21, 2011 at 19:26, Gregor S. wrote: > Hi guys, > > for some reasons, I need to implement a Valve within Tomcat 6, and > everything's running smoothely. > > I put the Valve into my Context-definition, fire up Tomcat & there we go. > > However, I just don't see how I can access any parameters inside the > Valve-specification inside the Context-definition. > > Let's say I have the following Valve-definition inside my Context: > > path="somePath"/> > > How can I access the attribute "path" in the above definition? > > I looked up the source of AccesslogValve, but I didn't see any > browsing of the > > Is it that I just have to specify a getter / setter inside my > Valve-source for the corresponding attribute inside the > Valve-specification, and it will be picked up automatically? > Yes, exactly. In your case, .getPath() and .setPath(String). -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Enhancement review process?
Hello, It has been now three weeks since I opened this enhancement request: https://issues.apache.org/bugzilla/show_bug.cgi?id=51953 I am confident enough with this patch that I actually use it instead of the existing RemoteAddrValve (since my implementation doesn't get confused by ::1 just to cite an example), but it has now been ten days and I haven't had a single comment on things to improve etc. How are enhancement requests reviewed? How long does it normally take for such a request to be considered for inclusion? -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Enhancement review process?
On Wed, Oct 26, 2011 at 21:17, Mark Thomas wrote: > On 26/10/2011 20:07, Francis Galiegue wrote: >> Hello, >> >> It has been now three weeks since I opened this enhancement request: >> >> https://issues.apache.org/bugzilla/show_bug.cgi?id=51953 >> >> I am confident enough with this patch that I actually use it instead >> of the existing RemoteAddrValve (since my implementation doesn't get >> confused by ::1 just to cite an example), but it has now been ten days >> and I haven't had a single comment on things to improve etc. How are >> enhancement requests reviewed? > > Requests are reviewed as committers have the time and interest in the > features being implemented. > > Your own comments on that bug seem to indicate that the patch has issues > with logging and exception handling. As soon as I saw that, the issue > went to the bottom of my todo list until the issues were fixed (or at > least understood). > Well, to the best of my efforts, I couldn't get errors to be logged at all, which is why I was asking for guidance... Yes, guidance. I wasn't trying to sound alarming or anything, I was just being honest. So, at the very least, can you tell me how to achieve that? This is what I was asking, and I kind of expected "go see this and that source file"... I didn't know such a comment would just make me as desirable as the pest... > You may also want to look at my commit from earlier today regarding > handling of errors in security concious filters and valves. > Which, BTW, contains: + * @return true if a problem should trigger the failure of this ;) -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Enhancement review process?
On Wed, Oct 26, 2011 at 21:40, Mark Thomas wrote: >> >> + * @return true if a problem should trigger the >> failure of this > > So? > true. -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1189436 - /tomcat/tc6.0.x/trunk/STATUS.txt
On Wed, Oct 26, 2011 at 22:40, wrote: > Author: kkolinko > Date: Wed Oct 26 20:40:20 2011 > New Revision: 1189436 > [...] Ouch. My proposal has just become a lot more complicated :p -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
IDEA settings for Tomcat development?
Hello list, I understand some of you use IDEA for developing Tomcat. So do I. Can you share your project settings (I am thinking in particular about intention settings, code formatting, copyright etc) so that, when I'm ready to submit a new patch, this "basic" stuff do not raise any concerns? Have fun, -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: IDEA settings for Tomcat development?
On Fri, Oct 28, 2011 at 19:25, Konstantin Kolinko wrote: > 2011/10/28 Francis Galiegue : >> Hello list, >> >> I understand some of you use IDEA for developing Tomcat. So do I. Can >> you share your project settings (I am thinking in particular about >> intention settings, code formatting, copyright etc) so that, when I'm >> ready to submit a new patch, this "basic" stuff do not raise any >> concerns? > > Take a look at > http://tomcat.apache.org/getinvolved.html#Coding_Conventions > > Most of us use Eclipse IDE. I use "Java conventions" but changed to > use spaces instead of tabs. I think there would be something like that > in IDEA. > Yep, I have read this already. I was thinking more about intentions: IDEA has loads of them which pertain to coding practices, I use my own set which maybe doesn't fit the taste of core developers (for one, I do a heavy use of the "final" keyword, I sometimes create variables with a broad scope and so on). I'll start creating a custom profile with coding style only. I was wondering OTOH whether someone was using, for instance, the checkstyle plugin, what its settings were and so on... -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1198376 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
On Sun, Nov 6, 2011 at 15:13, wrote: [...] > > + tmpDir.mkdirs(); Why isn't the return code checked? Are you sure at this point that you can actually create the directories? What about ENOSPC? -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1198376 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java
On Sun, Nov 6, 2011 at 19:31, Olivier Lamy wrote: > 2011/11/6 Francis Galiegue : >> On Sun, Nov 6, 2011 at 15:13, wrote: >> [...] >>> >>> + tmpDir.mkdirs(); >> >> Why isn't the return code checked? Are you sure at this point that you >> can actually create the directories? What about ENOSPC? > Sure why not. > But as it's a subdirectory of the build output directory of the > current maven project, we can presume all karma are correct to write > those directories. Sorry, not for ENOSPC, no... -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat 7.0.23 startup freezes at "INFO: Deploying web application directory ..."
On Tue, Nov 29, 2011 at 10:19, ~ ~ wrote: > Nuances: > - no errors are displayed in logs > - tomcat process can't be shutted down with shutdown.sh script > - http request on 80 port wait forever > - it's a multi host configuration > - the same setup works well on all previous build, including 7.0.22 > - when lib/*.jar files of tomcat-7.0.23 are replaced with lib/*.jar files of > tomcat-7.0.23 - everything works just fine > Try and add this option to the JVM: -Djava.security.egd=file:/dev/./urandom (note: the extra dot is NECESSARY). -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: AccessLogValve enhancement
While AccessLogValve is the subject... Any chance we can do away with the default, unparseable timestamp format? With Apache, it is allowed to specify the timestamp using strftime(3)-like format, I'd like to be able to do the same with Tomcat's AccessLogValve using SimpleDateFormat patterns... -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[PATCH] Fix suspicious logic operator usage
Found by FindBugs. startService() and stopService() both return boolean, so it is likely that the '&' is a typo and '&&' was meant. --- .../tribes/membership/McastServiceImpl.java|2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java index 8569ed4..5e59700 100644 --- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java +++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java @@ -631,7 +631,7 @@ public class McastServiceImpl while (!success) { if(log.isInfoEnabled()) log.info("Tribes membership, running recovery thread, multicasting is not functional."); -if (stopService() & startService()) { +if (stopService() && startService()) { success = true; if(log.isInfoEnabled()) log.info("Membership recovery was successful."); -- 1.7.6.1 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Make the InetAddress object available via ServletRequest?
Hello, I have my CIDR matching valve/filter ready (still struggling to write unit tests, but it works in real-world situations), and there is something I find quite unoptimized: you have getRemoteHost() and getRemoteAddr() to get the remote host name and IP addresses as strings, but why can't you get hold of the InetAddress object directly? It would be much faster to do so... In my valve and filter, I have to .getRemoteAddr() and create an InetAddress object out of the string... -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[RFC] Netmask-based filter and valve
Hello list, Frustrated by the limitations of existing Remote{Addr,Host}{Filter,Valve}, I have coded an implementation of a Filter and Valve doing netmask-based matching. These valves can also do IP-based matching (just don't specify a netmask). Having quite some difficulties writing unit tests for now, I have instead tried it in "real life" situations, that is using both in a temporary install on both IPv4 and IPv6. They both work. But I need help. Not only with writing unit tests, which for now only exist for the base NetMask class, but also for error handling (what should be done when an illegal netmask is supplied, etc). You can see the whole patch here: https://github.com/fge/tomcat70/commit/79e276d13ba804d0ae06c75592d0364cb2110285 Those are new files, apart from the documentation. [yes, I know about coding style, I'll fix that, so please no comments about it: I want to get the code "in shape" first] Comments appreciated, -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [RFC] Netmask-based filter and valve
On Tue, Oct 11, 2011 at 11:41, Konstantin Kolinko wrote: > 2011/10/10 Francis Galiegue : >> error handling (what >> should be done when an illegal netmask is supplied, etc). > > I think the called method should fail with some RuntimeException. > > That is what will happen with existing RemoteAddrValve if you pass a > value that Pattern.compile() cannot handle. (See > RequestFilterValve#setAllow(String)). > > It would not be safe to operate a Valve that is misconfigured. > OK, I will update the code, post an updated version in the Bugzilla entry and add more questions over there (#51953). -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [RFC] Netmask-based filter and valve
On Tue, Oct 11, 2011 at 13:59, Tim Funk wrote: > Looks ok ... a few comments. > > RemoteCIDRFilter (most of the below apply to the valve too) > > setAllow = If nothing passed - This should clear allow > setAllow = If a bad "allow" is passed - throw exception. I'd think throwing > an IllegalArgumentException is OK so no catch is needed. Depending on when > this is called ... throwing an UnavailableException might cause enough > disruption to disable the webapp too. (depending on the exception > propagation) > > setAllow,setDeny - Should all the netmasks be verified before before > internal allow/deny is updated? If can be possible that only some masks are > applied before exception is thrown. Which causes a partial mask to be > working. Of course ... if the exception is thrown and the webapp is > disabled... this might not be an issue. > > setAllow,setDeny - call clear() before adding new values. With > embdedding,JMX etc - these can be called multiple times with different > values post startup. > > getAllow/getDeny - Needs tweaked since most would assume the output of > getAllow() can be used to do setAllow(). By using List.toString() - [] would > be added. > Yes, I was kind of wondering whether the .get*() methods required symmetry with .put*(). So, this is one of my questions answered. Along with the question of why Remote{Host,Addr}Filter cleared allow and deny before assigning them... I'll rework this part, along with exception handling. Thanks for the comments, -- Francis Galiegue, fgalie...@gmail.com "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org