On 6/27/01 3:35 PM, "Rafal Krzewski" <[EMAIL PROTECTED]> wrote:

> Jason van Zyl wrote:
> 
>> Does anyone want to take a stab at decoupling the scheduler
>> from Turbine. I don't think a scheduled job should be a module.
>> I think that modules are responsible for the view pipeline and
>> nothing else.
>> 
>> If someone could come up with a simple interface for a job
>> possibly, or some way to get rid of Turbine references in
>> the scheduler service that would be great. I will do if
>> no one else steps up, but I don't really use the scheduler
>> so it might burp if I make the changes.
> 
> Job is similar to module in a way - you might want to use BSF
> service to have scripted jobs. I think that it is a quite
> nice feature.

Lots of things are similar to modules, but I think our standard
nomenclature uses modules to refer to the view pipeline. There
is a simple scheduler service that uses properties, and the peers
are even ok for now. I just want to get of the module part.
 
> 
> As for the interface:
> 
> public interface Job
> {
> public void run();
> public void terminate(Thread thread);
> }

Yup, simple enough.
 
> terminate is for asking the job to stop in an orderly manner
> (synchronous, or 'asynchronous but ASAP') when the system
> is shutting down. The thread parameter should allow access
> to the thread running this instance of the Job, in case
> the Job wants to use interrupt() or stop() (yes, this is
> neccessary in certain situations)

Yup.
 
> I think that commons have some stuff for thread pooling.
> You can also take my implementation of PoolService (you
> know where to look for it Jason). I can mail it to you
> with a 'code donated to the ASF' disclaimer.

I don't actually _want_ to do it myself :-) There's a PoolService
in Turbine already, I'll take a peek at using it if no one
else wants to give it a whirl.

Thanks,

 
> Rafal
> 
> --
> mgr inz. Rafal Krzewski
> Senior Internet Developer
> mailto:[EMAIL PROTECTED]
> +48 22 8534830 http://e-point.pl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



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

Reply via email to