You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Peter Donald <do...@apache.org> on 2001/03/22 04:10:50 UTC

Re: possible problem with scheduler and should Avalon have JDK style scheduling mechanism.

At 06:49  21/3/01 -0800, Harmeet Bedi wrote:
>JDK Timer class has scehdule methods and TimerTask.
>TimerTask is similar to Target in Avalon.
>The <schedule> methods control trigger/task invocation.
>
>Would it make sense to move the Avalon API towards JDK model.

>Here is a Proposal: Have interfaces such that a JDK or custom Scheduler
>could implement it easily. This could mean adding the scheduling methods to
>TimeScheduler and deprecating TimeTrigger. It would allow multiple
>implementations to plugin - JDK or DefaultTimeScheduler.

a few issues. Using the JDK assumes that only periodic timers will be used
which is not the case. The JDK also assumes a naive environment. However as
Phoenix is essentially a application server we have to worry about setting
up threads appropriately (ie set ContextClassLoader/Thread-specific
JNDI/security/whatever settings). While we could coerce JDK into doing what
we want ... I can not see a significant advantage in doing so - feel free
to do it yourself though ;)

>The advantage would be
>- Smaller and hence easier to maintain codebase.

which if it contains a bug would be virtually impossible to fix.

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: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org