Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
I did a lot of this kind of bugs myself too and it is very trivial to fix. 1. Set maxConnections to 1 for testing 2. Use lazy decorator for connection to throw exeption from close 3. Use find/replace to remove all }finally{ connection.close(); } 4. Store decorator in ThreadLocal and close

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
Connection Recovery can not help to solve resouce leak and performance problems, but It can produce more problems. I can not let to break stable component to prove it. - Original Message - From: Hope, Matthew [EMAIL PROTECTED] To: 'Jakarta Commons Developers List' [EMAIL PROTECTED] Sent:

RE: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Hope, Matthew
I did a lot of this kind of bugs myself too and it is very trivial to fix. 1. Set maxConnections to 1 for testing useful 2. Use lazy decorator for connection to throw exeption from close ??? 3. Use find/replace to remove all }finally{ connection.close(); } ??!?!?!?! 4. Store decorator in

RE: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Hope, Matthew
a viewpoint I can sympathise with but I don't see how that effects the use case I outlined below. This is not recovery, it is logging that resources are not being cleaned up properly... -Original Message- From: Juozas Baliuka [mailto:[EMAIL PROTECTED] Sent: 23 July 2003 09:19 To:

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
You misunderstand me. http://www.springframework.org/ I have never used this framework, but I use the same ideas. I did a lot of this kind of bugs myself too and it is very trivial to fix. 1. Set maxConnections to 1 for testing useful 2. Use lazy decorator for connection to throw

Re: Posssible bug in Betwixt alpha

2003-07-23 Thread James Strachan
Betwixt uses BeanUtils's ConverterUtils to do type conversions. You could always register your own special converter object to handle the conversion of String - Date. Though I would have throught this worked out of the box as I thought java.util.Date was supported. Any chance you could create

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
Logging is useless in this case, it is not a problem if it doe's not inspire crap like autorecovery, but it was a mistake too and this dicussion proves it, does not it ? - Original Message - From: Hope, Matthew [EMAIL PROTECTED] To: 'Jakarta Commons Developers List' [EMAIL PROTECTED]

RE: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Hope, Matthew
I have only had a cursory read through this - using someone elses (hopefully better tested both in unit and real world) implementation is better than writing your own... ...however any system attempting to remove resource cleanup responsibilites from the developer either has to place extremely

Graph2 DFS patch

2003-07-23 Thread Tomasz Skutnik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! Here's patch against HEAD version of DFS algorithm in jakarta-commons-sandbox/graph2 package - it uses less memory, which is important for very large graphs (as in my case). Additionally DFS now can use lazy graph implementations without causing

Event/Listener proposal (was .. RE: [DBCP] AbandonedTrace - Connection Recovery)

2003-07-23 Thread Danny Angus
Well I never, There's been a lot of talk generated by my innocent proposal of using the Observer pattern, or in more java-esque terms events and listeners to arrive at a compromise in the Connection Recovery War. I'd like to clarify some points raised. In the first place to address the criticism

Re: [lang] StringUtils.sliceFirstRemainder behavior

2003-07-23 Thread Henri Yandell
On Tue, 22 Jul 2003, Phil Steitz wrote: sliceFirst(s^x^t, x) + sliceFirstRemainder(s^x^t, x) = s^t The question is, is this symmetry worth the strange definition (at least strange to me) of sliceFirstRemainder which returns the full string when it does not include the delimiter. Nope. I'm

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
It is true, some of resource menegement way have overhead, like Filter for web application, it closes connection after output is sent and uses connection too long, but it is not a problem if resources are managed by controler, it is very trivial to handle with struts. I use callback interface to

Re: Graph2 DFS patch

2003-07-23 Thread David Dixon-Peugh
Scooter, I didn't see the patch in your email. Can you send it again? Also, it turns out there are no DFS tests in the project. (It is still in the sandbox after all.) If you provide one, you will have our undying grattitude. Thanks, DDP --- Tomasz Skutnik [EMAIL PROTECTED] wrote:

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Glenn Nielsen
David Graham wrote: --- Laird J. Nelson [EMAIL PROTECTED] wrote: -Original Message- From: John McNally [mailto:[EMAIL PROTECTED] Why is this such a contentious issue? FWIW, because some users have business experience, and some do not. Those who do recognize that business *runs* on stopgap

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Glenn Nielsen
Hope, Matthew wrote: I would disagree on one point. The idea of logging when a connection is closed due to garbage collection finalization strikes me as a good one (assuming the pool used is using a weakly referenced mapping otherwise garbage collection release of resources is going to be a real

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Glenn Nielsen
John McNally wrote: [snip] On the implementation. I have not looked closely at the current implementation as it is not used by the pool that I added to dbcp and I was trying to start it as a simple implementation of the latest specification. But it would seem an implementation of this should

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
What happens is that the broken app ends up sucking up resources for each concurrent request being made to it which is waiting for the db connection timeout. Usually this is set to 5-10 seconds. This can suck up alot of resources. Memory, threads, etc. Web server with limited

Re: [lang] StringUtils.sliceFirstRemainder behavior

2003-07-23 Thread scolebourne
These make sense: (abc, z) = no match = end of abc - slice = abc - sliceRemainder = - sliceFirst = abc - sliceFirstRemainder = (abc, ) = first match at start, last match at end - slice = abc - sliceRemainder = - sliceFirst = - sliceFirstRemainder = abc (abc, null) ??? could mean the same as

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
/** * Get a db connection from the pool. * * If removeAbandoned=true, recovers db connections which * have been idle removeAbandonedTimeout. * * @return Object jdbc Connection */ As I remember we have decided to log stack trace, but not to break pool. Is

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Glenn Nielsen
Juozas Baliuka wrote: /** * Get a db connection from the pool. * * If removeAbandoned=true, recovers db connections which * have been idle removeAbandonedTimeout. * * @return Object jdbc Connection */ As I remember we have decided to log stack trace, but not to

cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java

2003-07-23 Thread dfs
dfs 2003/07/23 06:40:41 Modified:net/src/java/org/apache/commons/net/ftp FTPClient.java Log: Applied patch correcting oversight that prevented restart from working in passive mode. Revision ChangesPath 1.11 +5 -0

DO NOT REPLY [Bug 21815] - ftp transfer resume not working with passive mode.

2003-07-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21815. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread David Graham
Using a WeakHashMap might be a good solution. Connections are guaranteed to be closed when they are garbage collected so if a client doesn't return a connection and loses all pointers to it, the pool would lose its reference to it and the Connection would get gc'd. This is *much*

Re: [lang] StringUtils.sliceFirstRemainder behavior

2003-07-23 Thread Phil Steitz
[EMAIL PROTECTED] wrote: from:Phil Steitz [EMAIL PROTECTED] I assume you also agree that all slice functions should fix , null, i.e., slice[Xxx](null, *) = null, slice[Xxx](, *) = Yes, these seem like the simple cases. Stephen OK. Unless there are objections or someone else commits the

Re: jelly build problems...

2003-07-23 Thread Dean Hiller
thanks for the info and the link. I finally got all the jars. 'maven test' on 1.0 didn't seem to work(test failures due to missing files). Checking out just jelly doesn't work either. I had to check out all of commons and then it worked, because it was looking for the commons Project.xml.

RE: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Hope, Matthew
the weak reference should be to the true connection object itself or (making far easier to manage code) the finalize method on the class 'holding' the actual connection (this is not necessarily the ConnectionWrapper that manages putting it back in the pool - indeed it would be a good idea not to

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread John McNally
The current implementation recover's the abandoned connection based on an inactivity timeout. So it has to track the last time the connection was used. This more tightly couples it to DBCP. That sounds like a better implementation as it is unlikely to timeout long running transactions.

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread John McNally
I get the impression that some of you believe connection cleanup is difficult. It really is trivial to properly dispose of connections in a finally block. It is not always trivial. Yes, you can have some high level try/finally block to clean up resources, but you must make sure the code in

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread John McNally
Using a weak reference for pooled connections which are in use is a good idea and I am all for it. The only problem is that there is no guarantee when the weak referenced db connection pool object will be GC'd. That is highly dependent upon how the JVM implements GC. There is no

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
- Original Message - From: John McNally [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 8:54 PM Subject: Re: [DBCP] AbandonedTrace - Connection Recovery I get the impression that some of you believe connection cleanup is difficult. It really is trivial to

cvs commit: jakarta-commons/modeler build.properties.default build.properties.sample build.xml project.xml STATUS.html

2003-07-23 Thread dims
dims2003/07/23 13:41:02 Modified:modeler build.properties.default build.properties.sample build.xml project.xml STATUS.html Log: - Reflect the reality that modeler does not depend on beanutils (or) collections. - Ensure that build/test works even when

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread John McNally
Do not use broken code for production, but it must be possible to solve without broken pool. What utopia do you live in? I think it would be a close approximation to say that every piece of software in production use in the world today has bugs. And it is not a broken pool that allows the

[lang] Findbugs output for Lang 2.0

2003-07-23 Thread Henri Yandell
Taking current CVS I get the following as output from the Findbugs project. Lang output: http://www.flamefew.net/~hen/lang-2.0-findbugs-output.html Findbugs:http://www.cs.umd.edu/~pugh/java/bugs/ Just in case anyone's interested :) Hen

[VFS] [PATCH] DefaultFileSystemManager.java StandardFileSystemManager.java

2003-07-23 Thread Dyrdahl, Steve
For ease of integration, being able to effectively sub-class these two classes is very useful. Index: DefaultFileSystemManager.java === RCS file: /home/cvspublic/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/

[JELLY][PATCH] Focus and Key Listeners added

2003-07-23 Thread Sean W. Ferguson
Hi, This is my first ever attempt at a patch. If I am doing wrong, please advise. The purpose of this patch is to include new functionality in the jelly swing tag library. I added a FocusListenerTag and a KeyListenerTag and modified ComponentTag and SwingTagLibrary. In my zip are these

[VFS] ftp usage problem

2003-07-23 Thread Dyrdahl, Steve
I have encountered a problem where my starting uri is something similar to: ftp://user:[EMAIL PROTECTED]/dir1/dir2/ I would like to be able to do a listing on dir2 to determine what files exist. I have privileges to list dir2, but not dir1. I am using the resolveFile method which makes no

DO NOT REPLY [Bug 21838] New: - Weird HTML makes the pool example doc hard to read

2003-07-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21838. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.

DO NOT REPLY [Bug 21841] New: - [lang] Rationalize StringUtils slice functions

2003-07-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21841. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.

DO NOT REPLY [Bug 21841] - [lang] Rationalize StringUtils slice functions

2003-07-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21841. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.

DO NOT REPLY [Bug 21809] - [lang] maven-beta10 checkstyle problem

2003-07-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21809. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
Yes, my applications have a lot of bugs too, but I am not ignoring it and I am not going to break commons code to hide my problems . - Original Message - From: John McNally [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 10:54 PM

DO NOT REPLY [Bug 21809] - [lang] maven-beta10 checkstyle problem

2003-07-23 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21809. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
Please do not misunderstand me, it is not a recomendation, it will not help too, but you can test this workaround at home: 1. before to return from getConnection pool sets currentThread for connection. 2. if !connection.getOwner().isAlive(), it safe to reuse connection. It must be safe to

Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-23 Thread Juozas Baliuka
Please do not misunderstand me, it is not a recomendation, it will not help too, but you can test this workaround at home: 1. before to return from getConnection pool sets currentThread for connection. 2. if !connection.getOwner().isAlive(), it safe to reuse connection. It must be safe to

Re: RES: RES: RES: NTLM Error

2003-07-23 Thread Ortwin Glück
Andre Augusto de Oliveira Aragao wrote: Just for the records, when Eclipse detects the JRE, it includes sunjce_provider.jar. Running the app with the default Eclipse JRE renders JCE unusable. But, if you take sunjce_provider.jar out of the list, no problem. Andre Seems weird. Which JDK Version are

RE: URIException - Unbuffered entity enclosing request can not be repeated

2003-07-23 Thread George Gastaldi
Thanks for the quick answer. Bonus question: How do I let PostMethod class to buffer ? ;) -Original Message- From: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 10:27 AM To: Commons HttpClient Project Subject: RE: URIException - Unbuffered entity enclosing

RE: URIException - Unbuffered entity enclosing request can not be repeated

2003-07-23 Thread Kalnichevski, Oleg
Funny enough, entity enclosing methods buffer content per default. You must have configured your PostMethod to NOT buffer content. Basically all it takes it passing CONTENT_LENGTH_AUTO as a parameter to PostMethod#setRequestContentLength mypost.setRequestContentLength(CONTENT_LENGTH_AUTO);

Re: normalizing a URI with ..'s in it ?

2003-07-23 Thread Michael Becke
Though I agree this seems a little strange I am not sure it's a bug. URI.normalize() is using the algorithm defined at http://www.apache.org/~fielding/uri/rev-2002/issues.html which corresponds to the latest update(I believe) to rfc2396. This algorithm is defined below. 1) The buffer is

Re: normalizing a URI with ..'s in it ?

2003-07-23 Thread Michael Becke
Mike Moran wrote: Btw, I presume this is the algorithm given in section 5.2 of http://www.apache.org/~fielding/uri/rev-2002/rfc2396bis.html#absolutize? If so, this is just a draft (draft-fielding-uri-rfc2396bis-03.txt). It does actually differ from rfc2396 in how it handles abnormal URLs

Re: normalizing a URI with ..'s in it ?

2003-07-23 Thread Oleg Kalnichevski
Yes, this is the algorithm. We decided to upgrade to ensure that URI parsing was consistent across Apache. I think this was at the request of Roy Fielding. Oleg, is that correct? This is correct. Oleg - To

Re: normalizing a URI with ..'s in it ?

2003-07-23 Thread Mike Moran
On Wednesday, Jul 23, 2003, at 20:37 Europe/London, Michael Becke wrote: Mike Moran wrote: Btw, I presume this is the algorithm given in section 5.2 of http://www.apache.org/~fielding/uri/rev-2002/ rfc2396bis.html#absolutize? If so, this is just a draft

Re: using httpclient from tomcat

2003-07-23 Thread Michael Becke
Johannes, It seems that your servlet is running under some security manager, much like it was an unsigned applet in a browser. This is not standard behavior as far as I have experienced. Any ideas why this is the case? Mike On Wednesday, July 23, 2003, at 01:16 PM, Johannes Huettemeister

Re: DO NOT REPLY [Bug 16729] - Allow redirects between hosts and ports

2003-07-23 Thread Michael Becke
If my understanding is correct without looking at the source code, the purpose of HttpMethodSession is to execute several methods, or one method multiple times, in order to follow redirects. So how about HttpMethodChain or HttpMethodSequence? Or giving it a more personal name, like

Commons-HttpClient conflict with WebDAVClient

2003-07-23 Thread Daniel Joshua
Hi all, Got a question. My project uses WebDAVClient for remote file access. Recently I tried to add Commons-HttpClient 2 beta 1 to my project. This cause problems as WebDAVClient already packages an older version of HttpClient (version 0.9 I think). Anyone care to share how they handled this.

RE: Commons-HttpClient conflict with WebDAVClient

2003-07-23 Thread Daniel Joshua
Thanks. I am still not sure why slide packages httpclient classes in its jar. Does anyone on this list use WebDAVClient with Common-HttpClient 2.0 beta 1? Regards, Daniel -Original Message- From: Michael Becke [mailto:[EMAIL PROTECTED] Sent: Thursday, 24 July, 2003 12:15 PM To: