At 01:58  21/3/01 -0800, Harmeet Bedi wrote:
>2. Wrote automated test to stess and relibly reproduce POP Server problem.
>Here is the test.

yay python ! ;)

>Got error response back. Modified code to dump stack trace.
>Here are the interesting stack traces.
>-----------------------------------------
>java.lang.ArrayIndexOutOfBoundsException
>at org.apache.avalon.util.BinaryHeap.percolateUpMinHeap(BinaryHeap.java:209)

this has been fixed by Ram just recently. I will update the jars to AValon
as appropriate.

>not as frequently, but this was another stack trace
>java.lang.NullPointerException

This could be a threading issue that was also fixed by Ram recently .. not
sure. Wait A bit and I will upload jars to jkarta-james and then you can
see if that fixes the problem.

>These stack traces don't occur if there is a gap in client requests or in a
>single client request. To me this indicates potential problems with
>DefaultTimeScheduler. Has anyone seen such traces.

yup - it was relatively untested code in one particular aspect - which of
course james stress tested ;)

>What Worked
>==========
>Wrote a new implementation of scheduler service. This implementation seemed
>to work. The tests above worked. :-)
>I am attaching the service for your review.
>There are some issues with it.
>1. It is based on JDK 1.3 java.util.Timer class. I think the server side
>code should be able to choose the environment, but this argument may not
>work for all. The JDK Timer based mechanism is similar(maybe derived) to
>TimeDaemon class from Doug Lea's  util.concurrent package. So it would be
>easy to make this backward compatible.

JDK1.3 is currently not allowed because we want to keep compatible with
with 1.2.

>2. The service assumes that TimerTrigger is of type PeriodicTimeTrigger. I
>found that this is the only trigger usedin the current Avalon and James
>codebase, except in tests.Needed to add these methods to PeriodicTimer to
>covert to JDK/Doug Lea type schedule manager.

but CronTimeTrigger is used in my own personal codebase ;)

>What are your thoughts. Have you seen simialar problems with scheduler. The
>JDK/Doug Lea Trigger mechanism is very different from Avalon. Should Avalon
>move and potentially reuse their model ?

actually there model is identical. If you look at the javadocs they use a
binary heap aswell and have all the same features (ie can scale to thousands).

>P.S: Request - I would appreciate if someone adds the modifications to
>PeriodicTimer. This solves a relibility problem for me. The changes to
>PeriodicTimer would allow me to plugin into the current codebase cleanly.

You never sent this - even in the second email ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


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

Reply via email to