cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject CommandManager issues [was Re: Releasing 2.1.1?]
Date Sat, 30 Aug 2003 13:20:45 GMT
On Fri, 29 Aug 2003, Bruno Dumon wrote:

> On Fri, 2003-08-29 at 19:55, Giacomo Pati wrote:
> if you add the following code before the closing bracket of the
> PooledExecutor.workerDone(...) method, then it --seems to-- work:
>     if (!shutdown_) {
>       if (poolSize_ < maximumPoolSize_) {
>         Runnable r= null;
>         try {
>           r = getTask();
>         } catch (InterruptedException e) {
>           e.printStackTrace();
>         }
>         if (r != null)
>           addThread(r);
>       }
>     }
> Could someone else also try this out? For your convenience, here's a
> compiled jar with this change:

I've patched the 1.3.2 Doug Lea utils myself with your suggestion above
and can affirm it works now.

Cocoon compiled and tested with sun jdk 1.4.2 as well as sun jdk 1.3.1
on Linux. To stop the Jetty running under 1.3.1 I needed two [Ctrl][C]
hits whereas the first hit reports "Shutdown hook executing" and after
the second one Jetty finally shuts down. If've made the tests with
Tomcat 4.1.27 as well where it behaves correctly as expected.

Now, there is still the double Ctrl-C on jdk 1.3. Can you confirm this,
Bruno (or someone else with a Win$ machine)?

Is someone on the Doug Lea list (if there is any) to report this?

I like the way how the Cornerstone Scheduler recently integrated by
Carsten more than the CommandManager way because of its
componentisation. Still, I like to see a Scheduler as a single component
definition in the xconf file. Today we need at least three component
definitions (Scheduler, ThreadManager, TimeScheduler) as well as one for
each Target. I think this can be made much easier, like:

  <scheduler logger="scheduler">
      <trigger name="mytarget"
        <timed type="crontab">
          <month> -1 </month>
          <weekday> SUN </weekday>
          <day> * </day>
          <hour> 9-17/2 </hour>
          <minute> */5 </minute>

In the above, triggers are handled as Avalon components and the
scheduler takes care of instatiation and the lifecycle stuff.

Unfortunately, the Cornerstone Scheduler toolkit doensn't offer a full
crontab like specification of defining trigger point in time like I've
used above (and I'd be happy to have).

My suggestion (which I can implement if accepted) is to have a
Scheduler that is able to do the above by use of the CommandManager
given someone can fix Doug Leas concurrent utilities with the patch
from Bruno.

Giacomo Pati
Otego AG, Switzerland -
Orixo, the XML business alliance -

View raw message