Re: Could someone add new component transaction to Bugzilla?

2004-11-18 Thread Serge Knystautas
Oliver Zeigermann wrote:
Could someone with the apropriate rights add Transaction to the
Components of Commons in Bugzilla, please?
Done.
--
Serge Knystautas
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VOTE] Promote Email to Commons Proper

2004-11-16 Thread Serge Knystautas
Matthias Wessendorf wrote:
your #1 should be the easiest way.
Btw. do you know if the JAMES-folks
have a facility like dumbster?
Sorry, what is dumbster?
--
Serge Knystautas
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VOTE] Promote Email to Commons Proper

2004-11-16 Thread Serge Knystautas
It'd be pretty easy to have James use the Null mailet as the first 
(and only step) in its processing logic.  This would cause James to 
spool the incoming messages to disk, and then always discard them.  That 
would be a much heavier weight solution though.

We use something slightly like this, at least informally.  There's a 
tool called Postal (http://www.coker.com.au/postal/) that does SMTP and 
POP benchmarking, and that has an SMTP sink.

--
Serge Knystautas
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
Corey Scott wrote:
Serge,
[Extract from the website http://quintanasoft.com/dumbster/]
The Dumbster is a very simple fake SMTP server designed for unit and
system testing applications that send email messages. It responds to
all standard SMTP commands but does not deliver messages to the user.
The messages are stored within the Dumbster for later extraction and
verification.
The Dumbster slots itself very easily into your testing strategy. As
long as your application talks to an email server using SMTP then the
Dumbster can be used to test the application with no code changes.
[End extract]
We have been using it to allow us to test send mails and do some
rudimentary verification of the sent mails in our jUnit tests.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Licensing

2004-10-06 Thread Serge Knystautas
Henri Yandell wrote:
I'll work to resolve the lack of published information. It's more than
just LGPL really, we need a page that lists all acceptable
OSI-accepted licences. LGPL is just the biggest issue as it's probably
the 2nd most common open-source Java licence behind BSD-like.
http://nagoya.apache.org/wiki/apachewiki.cgi?Licensing
This is on the old-soon-to-be-deprecated wiki, and it hasn't been ported 
over.

--
Serge Knystautas
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Moving from Bugzilla to JIRA

2004-09-03 Thread Serge Knystautas
Henri Yandell wrote:
The following is an example of a Commons like project in Jira. I encourage
anyone who's not used Jira to go have a look at this link and get a feel
for how easy it is to use, compared to the mess that is our bugzilla
installation.
http://issues.osjava.org:8080/jira/secure/BrowseProject.jspa?id=10010
As I have modelled each Commons-like component as a Component in Jira,
it's hard to know how many there actually are. You also can't have
separate versions for different components.
Henri,
We would not map Jakarta Commons this way.  Every JIRA project is a 
piece of code that is releasable, because as you suggest, a project has 
its own versions, components, changelog, and roadmap.

Look at some of the Avalon/Merlin breakdowns to see how they each have 
their own JIRA project to get a feel for how this works.

--
Serge Knystautas
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [lang] DateUtils.parseCVS

2004-07-06 Thread Serge Knystautas
Gary Gregory wrote:
I am not that crazy with anything of the form parseProduct. What if
there was, or surely going to be 2, then 10 such methods for CVS. Then a
CvsUtils or some such class would be better. Does this belongs in a
separate class if not in the sandbox?
Sorry for not jumping into this thread earlier.  The DateUtils is my 
submission, so I should probably explain parseCVS...

It does NOT parse any dates from CVS, so it isn't related to ant or any 
other tool.  From using CVS, you can checkout code as of yesterday, a 
week ago, or last Thursday.  CVS parses this human date expression 
and calculates that date for you.  That is the behavior I was trying to 
emulate... support a more human readable date parser.  It's not a great 
name, but CVS was the language parsing rule I was based on.

I've got no special urge to keep it in lang, if others do not want.
--
Serge Knystautas
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [general] How much to focus on minimising dependencies Was: [lang] Re: cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang Validate.java

2004-06-03 Thread Serge Knystautas
Henri Yandell wrote:
Siblings sometimes have to depend on each other, but it's the same type of
dependency as inter-project dependencies.
Allowing for a single class to be copy and pasted is too much though.
I agree with the above part.
I don't see how that simply making this statement is inadequate, nor how 
the suggested package dependency rules better codify those goals.  It's 
late for me though, so maybe I'm missing the point.

--
Serge Knystautas
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP Contribution: Replace System.out calls with Commons Logging

2004-04-19 Thread Serge Knystautas
Noel J. Bergman wrote:
I've been looking through the DBCP source this morning and have noticed
several instances where System.out, System.err and printStackTrace()
have been used to write error or status messages to the console.

I'm wondering if there's any interest in a contribution that would
replace these calls with calls to the commons-logging package instead?
YES!  :-)

At least on my part.  Honestly, if you're going to tie Commons Pool and DBCP
to Logging, also introduce the idea of levels so that we get debugging,
info, error, etc., appropriate messages.
How would commons-logging fit within the Avalon framework?  (James uses 
DBCP now).

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DateUtils.equals(d1, d2)

2004-02-17 Thread Serge Knystautas
Todd V. Jonker wrote:
I like your idea of calling getTime() and rounding to the second.  That
should work in all cases.
Not exactly that... more like this:

long ms1 = d1.getTime();
if (d1 instanceof Timestamp) {
//First we remove milliseconds
//  that some Timestamp implementations include
ms1 /= 1000;
ms1 *= 1000;
//Now add milliseconds based on nano seconds that all impls have.
ms1 += ((Timestamp) d1).getNanos() / 1000;
}
--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DateUtils.equals(d1, d2)

2004-02-17 Thread Serge Knystautas
Serge Knystautas wrote:
Todd V. Jonker wrote:
I like your idea of calling getTime() and rounding to the second.  That
should work in all cases.
Not exactly that... more like this:

long ms1 = d1.getTime();
if (d1 instanceof Timestamp) {
//First we remove milliseconds
//  that some Timestamp implementations include
ms1 /= 1000;
ms1 *= 1000;
//Now add milliseconds based on nano seconds that all impls have.
ms1 += ((Timestamp) d1).getNanos() / 1000;
}
Actually, why not also add DateUtils.getMilliseconds(Date d) so people 
stuck with bad drivers can effectively get reliable getTime() behavior?

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [lang] RE: DateUtils.equals(d1, d2)

2004-02-16 Thread Serge Knystautas
Gary Gregory wrote:
I've also added a test to ObjectUtilsTest to show this time issue.
Gary,

Are you suggesting ObjectUtils should handle this Date comparison?

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DateUtils.equals(d1, d2)

2004-02-16 Thread Serge Knystautas
Todd V. Jonker wrote:
Serge, I'm not sure that your proposed method will do what you want.

You can't compare the results of java.util.Date.getTime() and
java.sql.Timestamp.getTime() because the latter is only precise to the
second, not the millisecond.  Likewise, java.sql.Date.getTime() is only
precise to the second.
I understand java.sql.Timestamp is a bit screwy, but if you read the 
javadoc for getTime() method, it says, Returns the number of 
milliseconds since January 1, 1970, 00:00:00 GMT represented by this 
Timestamp object.  So it should return milliseconds even if it is 
structurally holding something different underneath.

Regardless, it would help my situation... I'm using a db mapping layer 
(hibernate) and it sets a java.util.Date object from the ResultSet.  My 
app code then prints to user, parses the data back, and I set the Date. 
 I want to check whether the value is changed, and I'm actually only 
expecting resolution to date usually, sometimes to minute.

Just my two cents from painful experience...
You may want to revisit the JDBC drivers that put you through this.  The 
ones I use now all do getTime() as milliseconds, and some of them used 
to do just seconds as the class-level javadoc implies.  Maybe this was 
clarified in one of the more recent JVMs, dunno.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [lang] RE: DateUtils.equals(d1, d2)

2004-02-16 Thread Serge Knystautas
Gary Gregory wrote:
Also note that the behavior is different b/w java 1.3 and 1.4. Please see
ObjectUtilsTest.testDateEquals() and turn on the // comments for an example.
Excellent, thanks... I understand what your earlier comment was now.

The calculation for 1.3 isn't too bad.. a bit laborious, and you have to 
throw in a JDK detection in there (nicely available in SystemUtils). 
I'll try to get the testcase and the code written up tomorrow.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


DateUtils.equals(d1, d2)

2004-02-13 Thread Serge Knystautas
There was a bugzilla issue opened about this, and a brief discussion 
about such, but I wanted to move it to the list for better visibility.

Basically if you have 2 date objects (e.g., java.util.Date and 
java.sql.Timestamp), ObjectUtils.equals() will return that they are not 
equal even if they represent the same point in time.

Unless someone objects, I was going to add DateUtils.equals(Date d1, 
Date d2) and the equality check will be what's returned from each date's 
getTime().  Just as an example:

long now = System.currentTimeMillis();
Date date = new java.util.Date(now);
Date ts = new java.sql.Timestamp(now);
ObjectUtils.equals(date, ts) = false; (as of 2.1)
DateUtils.equals(date, ts) = true;
Anyone have a different idea or think this is a bad idea?

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [JIRA][Bugzilla][HttpClient] should I stay or should I go?

2004-01-30 Thread Serge Knystautas
Oleg,

Sorry, I thought many of these points were addressed in the general 
discussion about commons and JIRA.  I will respond specifically to each 
of your questions below...

[EMAIL PROTECTED] wrote:
* Do you actually encourage migration from Bugzilla to JIRA? Will it
make the task of to administering and supporting projects'
infrastructure (issue tracking in the first place) easier for you?
No, we will not encourage.

* Can existing bug reports (including closed ones) be migrated to JIRA
in their entirety, if at all? What kind of data would not be migrated
automatically? Would existing user accounts be preserved?
Yes, existing bug reports can be transfered in their entirety.  There is 
a data migration process.  All accounts would also be preserved, 
although after the conversion, if you change your password in one place 
(JIRA or bugzilla), it won't change in the other.

* We (HttpClient committers  contributors) have been in fact quite
satisfied with Bugzilla so far. It has served us well. The only thing we
have found constraining is the release management (versions, milestones,
etc). 
Agreed, release management is really the kicker for why I wanted it for 
the James project and why I've been (slowly) getting JIRA running.

 As an alternative to migration to JIRA would it be possible to
promote HttpClient from a component of Jakarta-commons project to a full
fledged top level project with its own set of versions and milestones?
HttpClient has already got its own mailing list. HttpClient related
content constitutes 20-30% Bugzilla entries for the Jakarta-commons
project. I believe this might be the best option, as least as far as we
are concerned. I am just not sure it is technically feasible.
I don't know who or if anybody maintains the bugzilla info.  I would 
send just this request to the infrastructure mailing list and hopefully 
someone can help.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [codec] [vote] JIRA

2004-01-12 Thread Serge Knystautas
Tim O'Brien wrote:
If you'd like to vote -1 on this product because someday, someone will 
lament the lack of an OS issue tracker.  I only ask you to focus on the 
fact that there are a very few active committers who spend large amounts 
of time regularly doing things like release management, site publishing, 
and infrastructure.  And, people like this have expressed an interest to 
move to Jira.  It would great if, one day, we could move to a issue 
tracker covered under an Apache Style License, but that day is not 
today.  Yes, OS projects should try to encourage other OS projects.  
That is an interesting idea, but I don't see people flocking to the 
Scarab project.  I'd welcome the day that we could see a viable 
alternative to Jira, but I just don't see it right now.  Alternatively, 
I see an issue tracker that does not allow us to clearly express version 
numbers and sub-components for projects in the Jakarta Commons.
Because of how Jakarta commons is setup in bugzilla and would need to be 
setup in JIRA, the transition process doesn't lose anything 
(infrastructure side) from a partial move.  Individual projects in 
commons will need to know the right bug tracker to link to, but we've 
also discussed setting up http://issues.apache.org that would host the 
current bugzilla and scarac installs along with the new JIRA install.

Honestly, we have enough projects to migrate as is.  I don't see a need 
to encourage projects.  I say let's just manage the projects who have 
already requested it, then every project can potentially use JIRA and 
see whether they like it or not.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Commons Multipart MIME?

2004-01-11 Thread Serge Knystautas
Noel J. Bergman wrote:
Mark R. Diggory asked:
Shouldn't [mime] be dependent on JAF?
Why?
Looks like others already stated this, but here's my why/why not:

why: it's an established API that doesn't have anything to do with MIME 
handling.  JAF handles creating Java objects from streams.  (This was 
listed as one of the tasks for this initiative, and I don't think it 
really belongs).

why not: it's really really painful to use.  It has a a decent idea of a 
data handler, but it's just way to complicated

I would prefer JAF and otherwise object instantiation from streams be 
unrelated to mime.  The reason it current works this way is so you can 
nest MimeMultipart objects, but I think there's a better way to wrap this.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: sandbox 'article'

2003-10-21 Thread Serge Knystautas
Henri Yandell wrote:
I was rambling through the sandbox and wrote up some notes. I'd like to
post the url to the users list, but first wanted to see if anyone on the
dev list had any views on it:
http://www.generationjava.com/article/apache/StateOfTheSandbox.shtml

Most importantly I need suggestions on whether projects are in the wrong
category, or I have facts/names wrong.
Great stuff!

What would it take to get threadpool promoted?  I'd be willing to 
support it.  Anyone else?

Also, I'd like to get JRCS mentioned on the sandbox page.  I think I 
just have to edit jakarta-commons/xdocs/sandbox.xml and generate 
accordingly, right?  Once Juan has his other project setup, I'll update 
to point to that project as well.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VOTE][Pool] Release Commons-Pool v1.1

2003-10-20 Thread Serge Knystautas
Dirk Verbeeck wrote:
This is a call for a vote to release version 1.1 of Commons Pool.
After a three week review/test period, it's now time to make the final 
release. There are no unresolved issues, more info below.

your votes, please:

Release Commons-Pool 1.1
-
[ ] +1  I support this release and will help
[ ] +0  I support this release but am unable to help
[ ] -0  I do not support this release
[ ] -1  I do not support this release, and here are my reasons:
+0

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VOTE][DBCP] Release Commons-DBCP v1.1

2003-10-20 Thread Serge Knystautas
Dirk Verbeeck wrote:
This is a call for a vote to release version 1.1 of Commons DBCP.
After a three week review/test period, it's now time to make the final 
release. There are no unresolved issues, more info below.

your votes, please:

Release Commons-DBCP 1.1
-
[ ] +1  I support this release and will help
[ ] +0  I support this release but am unable to help
[ ] -0  I do not support this release
[ ] -1  I do not support this release, and here are my reasons:
+1

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [VOTE][DBCP] Release Plan for Commons-DBCP 2.0

2003-09-28 Thread Serge Knystautas
Dirk,

I thought I'd link to the change since it was useful for me to review:
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/dbcp/release_notes.txt
My vote: +1

Version # preference: 1.1

Comment: I saw mention in STATUS.html of an integration document for 
DBCP and Avalon... I created a service in the James 2.2.x (not yet final 
release) that wraps DBCP into Avalon's datasource.  I don't have much 
time to write up docs but would suggest at least pointing to that code.
http://cvs.apache.org/viewcvs.cgi/james-server/src/java/org/apache/james/util/dbcp/

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
Dirk Verbeeck wrote:
I'd like to propose a vote on the following release plan
for DBCP 2.0.  This release plan can also be found
at:
http://cvs.apache.org/viewcvs/jakarta-commons/dbcp/RELEASE_PLAN_2_0.txt

Per the Jakarta/ASF guidelines (see
http://jakarta.apache.org/site/decisions.html), this
release plan must be approved via a lazy majority vote. The
voting period will end at 23:59:59 GMT on 1 October 2003
or when a clear majority has been established,
whichever comes first.
Here's your ballot:

 Please return this portion with your vote 
[ ] +1I am in favor of this plan and I will help
[ ] +0I am in favor of this plan, but I am unable to help
[ ] -0I am not in favor of this plan
[ ] -1I am opposed to this plan being executed,
 and my reason is:
 /Please return this portion with your vote 

I'll volunteer to be the release manager for this release,
but if someone else wants to, feel free to volunteer.
-  Dirk Verbeeck


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


Re: [vote] Move JRCS out of Jakarta

2003-09-24 Thread Serge Knystautas
Anyone know where it is getting moved to?  I use it and find it quite a 
nice library, and would like to keep track of it.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
__matthewHawthorne wrote:
+1

Juancarlo AƱez wrote:

Folks,

JRCS is practically invisible here, and no one has volunteered to make it
visible within the complex jakarta site setup.
I vote for the JRCS project to be removed from the Jakarta commons, so it
may have a life elsewhere.
+1


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


Re: [lang] DateUtils parseCVS with time format

2003-08-03 Thread Serge Knystautas
Steven Caswell wrote:
One of the supported formats for input to parseCVS is h:mm z. The method
parses the time correctly, but the date is left as the default of January 1,
1970. Does this make sense, or does it make sense to have it fill in the
current date? Since the API is silent on the expected behavior, it is
difficult to test the API for correctness.
Do you know how CVS works?  does it set the date as that time in the 
last 24 hours, or does it always set today's date?  There are some unit 
tests that are based on the current time, so I can put together unit 
tests and correct this behavior once I'm sure what it should be.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com/
p. 1.301.656.5501
e. [EMAIL PROTECTED]


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


Re: [lang] DateUtils round and truncate functionality with Calendar.AM_PM

2003-08-03 Thread Serge Knystautas
Steven Caswell wrote:
I don't know that rounding to AM_PM makes sense. I'm having a difficult time
coming up with any rounding scenario that makes sense. I think it makes
sense to say that the boundary is 12:00PM, and that times before that value
cause round down, and times after that value cause round up.
But what does round down mean? What does round up mean? Maybe someone
who has a use case for this functionality can provide a good suggestion.
Here's how I approached most of this logic... I treated truncating and 
rounding functions as eliminating all units below this order of specificity.

How to apply this to AM_PM?  Well, you'd keep the day unit and drop the 
hours unit.  So aside from the date, the two possible values are:
AM, 0 hours, 0 minutes, 0 sec, 0 ms.
PM, 0 hours, 0 minutes, 0 sec, 0 ms.

The first case is somewhat straight-forward... 0 hour is equivalent to 
12:00 AM.  The second case is a bit more confusing, but to be parallel, 
I would say it should be 12:00 PM.

So truncating would have 12:00 AM to 11:59:59.999 AM - 12:00 AM, and 
12:00 PM to 11:59:59.999 PM - 12:00 PM.  Rounding would then have 6:00 
PM to 5:59:59.999 AM - 12:00 AM and 6:00 AM to 5:59:59.999 PM - 12:00 
PM.  (I believe our convention is to always round up, so 6:00 AM - 
12:00 PM).

Does this make sense?  Probably not a very commonly used case, but seems 
like we should have predictable behavior is someone passes this unit. 
Or conversely it could throw an exception with an unanticipated time unit?

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com/
p. 1.301.656.5501
e. [EMAIL PROTECTED]


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


Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-22 Thread Serge Knystautas
David Graham wrote:
IMO, a design that allows users to plugin behaviors, be they connection
retrieval or otherwise, is the best solution.  Then the question becomes
whether to include a connection retrieval behavior in the DBCP release.  I
think that's far outside the scope of DBCP and encourages users to rely on
Jakarta code to fix their apps.  That is a poor precedent to set.
I'm not sure what you mean... supporting abandoned code will not fix 
code, and having Jakarta code fix (and encourage better design and keep 
people from writing their own bad implementations to common problems) 
are all great precedents.

There is _no_ abandoned code approach that will fix code.  Waiting for a 
finalizer to return a database collection will never result in an 
application behaving well.  The issue is having more control over what 
happens in this situation, such as preventing a rarely called piece of 
code from failing quickly (will fail slowly, ideally allowing you 
tolerate it until fix in an upcoming release).

I mean, c'mon, some apache developers are so full of themselves, I think 
they would welcome the opportunity to correct others code. :)

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-22 Thread Serge Knystautas
David Graham wrote:
This is absolutely not a DBCP code issue; it is a management issue. 
Applications that leak resources should have their own separate connection
pool.  When they run out of connections, only that app will break and
won't affect any other applications on the server.  It will be much easier
to debug the leak in the isolated app because DBCP won't hide it from you
and you won't have to search any other apps.

So, there is no need for this feature in DBCP if the above process is
followed.  This makes everyone's life simpler :-).
I think business might be replaced with many situations in the real 
world.

I dream of well run projects.  Developers who follow processes that make 
everyone's life easier.  Ah, that would be nice.  Is there such a land?

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [DBCP] AbandonedTrace - Connection Recovery

2003-07-22 Thread Serge Knystautas
Juozas Baliuka wrote:
I like innovations, but try to implement and test it at home please.
I am sure there are not so many  situations in the real  world need this
feature.
It takes a few minutes to find connection leak and to fix it in any
applications, doe's not it ?
It does not.

I have 2 new clients in the past 3 months (one medium, and one huge 
highly publicized screwed-up government project) that both have 
connection leak issues that they have been working at for a long time.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com/
p. 1.301.656.5501
e. [EMAIL PROTECTED]


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


Re: [DBCP] cpdsadapter needs a Statement implementation

2003-07-06 Thread Serge Knystautas
Tim Anderson wrote:
On the subject of logging, are there any plans to implement
SQL traces? I have a hacked copy of dbcp which I used
to help track down a deadlock. If there's any interest,
I'll clean it up and submit it.
I think the sense moving forward is that DBCP will remain only a pooling 
implementation, and leave other responsibilities to other libraries.

The open source mac-daddy of SQL tracing is at www.p6spy.com.  Great for 
tracking deadlocks and slow spots.  There's even a recent add-on that 
will analyze all the SQL tracing and suggest indexes for tables.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com/
p. 1.301.656.5501
e. [EMAIL PROTECTED]


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


Re: [DBCP] will someone add a piece for jakarta newsletter 9?

2003-07-03 Thread Serge Knystautas
robert burrell donkin wrote:
cool.

OT
i don't suppose that you'd be willing to add a few words about James 
while you're at it ;)
Ok, wrote up about DBCP, James, and a new committer.  If anybody cares 
to review, please feel free.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [DBCP] will someone add a piece for jakarta newsletter 9?

2003-07-02 Thread Serge Knystautas
robert burrell donkin wrote:
issue 9 of the jakarta newsletter is in preparation on the wiki. see http:
//marc.theaimsgroup.com/?l=jakarta-commons-devm=105716194315628w=2.
DBCP is gaining some real momentum now so i was wondering if anyone 
would like to volunteer to add something to the news letter. (the best 
way to volunteer would be just-to-do it ;)
I can add a write-up tonight if nobody else gets to it.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP status?

2003-07-02 Thread Serge Knystautas
David Graham wrote:
I know how you feel.  DBCP won't save you in these cases; training people
in the simple ways of cleaning up resources properly will.
Yeah, I have plans on how to spot these issues better ahead of time. 
Also, just starting to use p6spy as my magic bullet in the short-term...

It is not the pool's responsibility to clean up after poorly coded apps. 
There is a clear separation of concerns between the pool and the app.  The
pool maintains the connections, the app properly uses the API and returns
all connections when finished with them.  There is no sound algorithm for
determining when a connection is abandoned because DBCP doesn't have all
the information required to make that decision.  There are more but I've
stated them previously.
I disagree about the lack of a sound algorithm, but I have come to agree 
about this not being the pool's responsibility.  So I agree the pooler 
should just try to avoid opening connections each time (general pool 
issues), and not get into these application issues.

For some reason there are people against adding commons-logging to DBCP. 
I don't know of any good reason not to.
I think it's just because it's to keep the dependency tree thin.  I 
haven't been burned yet, but in some of my apps I have dependencies on 
common libs from 5 higher level apps.  I think eventually I'll get 
burned by 2 different apps requiring 2 different versions of 
commons-beanutils (just to pick one).

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP status?

2003-07-01 Thread Serge Knystautas
David Graham wrote:
The approach I took was this
a) support an optional max-active time threshold, which means there is a
time limit to how long a connection can be marked as in use.


There is a maxActive property of BasicDataSource that defines the maximum
number of open connections.  Adding a time limit is reasonable if step b
is changed below. 

b) if this threshold is exceeded, you close the connection.  The value 
of trying to return it to the pool is minimal, while the downside of 
returning a mid-transaction/statement connection to a pool is very bad 
and nearly impossible to track down.


DBCP should not close connections that have been borrowed from the pool. 
It should only log a possible error when the configured time limit has
been exceeded.
I *need* the pooler to close connections that have been borrowed from 
the pool and forgotten to be closed.  Can you give a) reasons why not to 
close them because of an optional parameter and b) suggested workaround?

I'm ok with this as long the stack trace isn't logged like an exception. 
It will be confusing for people to see a stack trace that isn't really
associated with an exception so the message should indicate that it's
identifying a possible connection leak location.
I think there's a relunctance (including mine) to create a dependency on 
commons-logging (or another logger), so I was thinking about a 
PoolListener service.  There would be classes of events for:
a) creating a connection
b) grabbing a connection
c) closing a connection
d) a connection getting too old

...whatever else.  I haven't thought through all the types of events, 
but I think allowing an optional listener(s) to attach to the pool would 
be even better than spewing log messages out.  We'd want to provide at 
leats one debugging pool-listener that prints debug messages.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP status?

2003-06-30 Thread Serge Knystautas
David Graham wrote:
The problem was that DBCP was trying to track and recover abandoned
connections.  This isn't just an implementation problem, it's a philosophy
problem.  Pool semantics dictate that client applications behave properly
when checking out and returning pool resources.  The pool is absolutely
not responsible for fixing poorly behaving applications.  This led to
bugs, questions, convoluted inheritance hierachies/code, and promoted the
idea that users didn't have to bother writing their applications properly
because the pool would fix their apps for them.
The pool should keep track of how long a connection has been checked out
and log a message when it passes some configurable threshold but it should
never try to grab the connection back from the application.
I agree trying to recover connections is bad.  I've found it leads to 
problems that don't show up during a test phase become very confusing 
and challenging problems in production once under high-load.

The approach I took was this
a) support an optional max-active time threshold, which means there is a 
time limit to how long a connection can be marked as in use.
b) if this threshold is exceeded, you close the connection.  The value 
of trying to return it to the pool is minimal, while the downside of 
returning a mid-transaction/statement connection to a pool is very bad 
and nearly impossible to track down.
c) support an optional debug step that will create a Throwable when 
getConnection is called.  Then if the max-active threshold is hit, we 
can print the stack trace of where the aged connection was grabbed, and 
in development/testing, quickly resolve the errant connection.

Does this seem reasonable?

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP status?

2003-06-23 Thread Serge Knystautas
Shapira, Yoav wrote:
I wouldn't rush to declare DBCP dead.  Database connection pooling is
not exactly the most revolutionary development area right now: DBCP is
good at what it does, is being used widely, and I personally am not
aware of anything that required a DBCP release within the past year.
That's somewhat encouraging about Tomcat using it (or at least mentions 
it first).

Since James really does need a new connection pooler, and I'm stuck 
having to invest some time into making **some** database pooler more 
robust, is the DBCP project open to this?  I'm not sure if there are any 
committers remaining, or what exactly is the next step.  Basically I 
would make the following changes:

- Allow the pool to optionally close a connection on a SQL exception 
(since that will often corrupt the transaction and/or indicate the 
connection is boofed).
- Change some default values so it doesn't block indefinitely to open a 
connection out of the box.
- Maybe support a connection factory constructor that can take a String 
for a driver name, rather than require you to do Class.forName() separately.
- Maybe implement login timeout.
- Maybe implement logging via commons logging so you can catch events 
rather than just use a writer.
- Make a formal new release (either 1.1 or 2.0, I don't care), just so 
the examples, test code, and javadoc (in distro and website) all have 
working examples.

Any feedback on these changes, or people I should talk to before heading 
down this road?

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com
p. 301.656.5501
e. [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP status?

2003-06-23 Thread Serge Knystautas
David Graham wrote:
I took a crack at fixing DBCP for Struts 1.1 and decided it was in such 
bad shape that we (Struts) should just drop it.  If other people are 
willing to fix and support it, I'm +1 on moving to db-commons.

Here is my wish list for DBCP in no particular order:
Thanks David.  I'll add these to the list of changes I posted and will 
get it done shortly.  They all seem very reasonable and helped confirm 
that there was unnecessary duplication in the codebase.

--
Serge Knystautas
President
Lokitech  software . strategy . design  http://www.lokitech.com/
p. 1.301.656.5501
e. [EMAIL PROTECTED]


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


Latka notes

2002-03-05 Thread Serge Knystautas

I was just talking with a coworker about how to build some automated tests
for our webapp, and sure enough Latka does a lot of what I was thinking.  I
had a few other todo items I might contribute, assuming I can get my client
to pay or can otherwise find the time.  I thought I'd bring up the ideas
first to get some feedback on whether this is going in a good or bad
direction:

1. meta process for test definition generation/maintenance
I'd like to define a meta XML file for a webapp that could declare
something like all HTML pages and JSPs in this webapp should be tested.
Then new meta process code would use that meta XML to check that the Latka
test definition meets these requirements... it would the recurse through the
files in a webapp and look for them in the latka test file.

If there were gaps, the meta check could either a) fail with a list of pages
that aren't included or (my preference) b) add them to the test file with
some comments (and stop before running the latka test).  By default it could
just require 200 status codes for those newly spotted pages.  The tester
could then look at the bottom of the latka test file, and cut and paste the
definitions up to suites or to more understandable places in the file, and
otherwise flesh out the validations.

2. JTidy for HTML validation
I would really like to be able to validate that the HTML in a site is well
formed.  I've tried doing it with a servlet filter, but using Latka would
make much more sense.  Ideally we could define the JTidy settings for a site
and whether to test all by default, and let individual requests override
that.

3. Better ant/junit integration
I'd have to see what's already there, but as I use ant to do my builds
already, I'd like to have 2 custom taskdefs that will a) do the meta
checking that the latka tests are complete and b) run the latka test.

Comments?

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/


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




Re: Latka notes

2002-03-05 Thread Serge Knystautas

I don't think I explained my idea 1 very well based on comments.

The issue I'm facing is making sure my latka suite stays current with the
site as developers maintain the site.  For an initial import, I might have a
webapp with 350 JSPs... I don't want to manually build the latka suite for
that.  More importantly, as the team of developers add more JSPs, I want to
know that some schmuck didn't add a JSP to CVS and not add it to the
functional test.

I would start with just a file system dir list, recursing through subdirs
and listing all *.jsp files.  (no link checking or wget or anything
complex... just pure dir.list() with recursion).  This would create a list
like:
/test.jsp
/index.jsp
/login.jsp
/contacts/list.jsp
/contacts/add.jsp
/contacts/edit.jsp
It would take these URLs and build the latka suite file.  If there already
was a latka suite file, it would append the files not already in there.
Really this is just a tool/script to maintain the latka suite file.

I was getting somewhat ahead of myself with the meta decription, but I was
thinking the filtering could get more advanced so that I included *.jsp
and *.html, but excluded everything in /include since those pages are
not directly called.  Maybe I should just fashion this as an ant task so I
can leverage it's include/exclude file pattern capabilities.

On an unrelated note, I thought of two other validators... a) link checking,
and b) xml validation (if your servlet is supposed to output XML instead of
HTML).  Anyone else working on these kind of validators?

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
- Original Message -
From: Jeff Turner [EMAIL PROTECTED]
To: Jakarta Commons Developers List [EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 5:34 PM
Subject: Re: Latka notes


 On Tue, Mar 05, 2002 at 01:42:17PM -0500, Serge Knystautas wrote:
  I was just talking with a coworker about how to build some automated
tests
  for our webapp, and sure enough Latka does a lot of what I was thinking.
I
  had a few other todo items I might contribute, assuming I can get my
client
  to pay or can otherwise find the time.  I thought I'd bring up the ideas
  first to get some feedback on whether this is going in a good or bad
  direction:
 
  1. meta process for test definition generation/maintenance
  I'd like to define a meta XML file for a webapp that could declare
  something like all HTML pages and JSPs in this webapp should be
tested.
  Then new meta process code would use that meta XML to check that the
Latka
  test definition meets these requirements... it would the recurse through
the
  files in a webapp and look for them in the latka test file.

 How would you go about determining the URLs of all HTML pages and
 JSPs? Is this really *all* (ie you have inside information; it's your
 webapp you're testing), or just visible from the usual application
 workflow? Ie, is the list created by hand or created through a wget-like
 follow-the-links strategy?


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




Re: Updated Filters Proposal

2002-02-20 Thread Serge Knystautas

I think this was already mentioned, but most of these filters are going to
be a single class.  I'd suggest in addition to sub-filter projects, also
have a 'generic' package where all the single-class filters go.  There would
also be some standard support classes (like wrappers) that would go in there
as well.

When should I start committing? :)

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
- Original Message -
From: Glenn Nielsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 9:33 PM
Subject: Updated Filters Proposal


 Here is a link to an updated Filters Proposal based on input received
 today.


http://cvs.apache.org/viewcvs/~checkout~/jakarta-commons-sandbox/filters/PRO
POSAL.html?rev=1.2content-type=text/html

 Comments and corrections welcome.

 Glenn

 --
 Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
 MOREnet System Programming   |  * if iz ina coment.  |
 Missouri Research and Education Network  |  */   |
 --

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




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




Re: Servlet Filters Proposal]

2002-02-12 Thread Serge Knystautas

Lance,

I'm not sure how far along your cache filter is, but I wrote one based on
OpenSymphony's OSCache system (www.opensymphony.com) and it works rather
well.  Much of the heavy lifting was already done by the OSCache engine as
it was initially built for a JSP tag library, so most all of what I had to
do was improve some threading issues and get the cache to support binary
content and additional response information (like content type and
content-length).

Let me know when you have some code to share, and I'll be happy to look and
maybe help a bit.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
- Original Message -
From: Glenn Nielsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 8:37 AM
Subject: [Fwd: Servlet Filters Proposal]


 Here is the link:


http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/filters/PROPOSAL.html



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




HttpClient response size limit

2002-01-30 Thread Serge Knystautas

Here's a simple patch I needed to fix my problems connecting to a bad webcam
webserver (which would occasionally set the Content-Length header to 138 mbs
or something ridiculously stupid and bogus like that).  To the GetMethod I
added getter and setter methods for responseSizeLimit, and then if it's
set, it will cap the expected length.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/


Index: java/org/apache/commons/httpclient/methods/GetMethod.java
===
RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/GetMethod.java,v
retrieving revision 1.7
diff -r1.7 GetMethod.java
187a188,192
 /**
  * Response limit in bytes
  */
 protected int responseSizeLimit = -1;
 
265a271,284
 /**
  * Response size limit getter.
  */
 public int getResponseSizeLimit() {
 return responseSizeLimit;
 }
 
 /**
  * Response size limit setter.
  */
 public void setResponseSizeLimit(int value) {
 responseSizeLimit = value;
 }
 
383a403
 //This is set to the response size limit... defaults to -1 which means 
unlimited
394a415,417
 }
 if (responseSizeLimit  -1  (expectedLength  responseSizeLimit || 
expectedLength == -1)) {
 expectedLength = responseSizeLimit;



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


Re: HttpClient OutOfMemory continued

2002-01-28 Thread Serge Knystautas

Doh, thanks... obviously misread that line.

Well, any ideas then why the code is ignoring the content-length and just
reads from the stream until the JVM dies?

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
- Original Message -
From: Andreas Erz [EMAIL PROTECTED]
To: Jakarta Commons Developers List [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 5:07 PM
Subject: Re: HttpClient OutOfMemory continued


 Serge Knystautas wrote:
 SK HttpMethodBase Line 1055: calls getResponseHeader with
Content-Length...
 SK should be content-length since getResponseHeader returns all lower
case
 SK HttpMethodBase Line 1056: same thing, different header
 SK HttpMethodBase Line 454: same thing, different header
 SK GetMethod Line 387: same thing, Content-Length again, and I think the
source

 getResponseHeader consists of this line:
   return
(Header)(responseHeaders.get(headerName.toLowerCase()));

 The header names are converted to lower case before looking up the
 values, so this does not seem to be a reason for a problem reading the
 headers.

 --
 Andreas Erz


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




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