avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject Component Initialization (was RE: Fortres: async/sync init)
Date Fri, 19 Jul 2002 18:10:45 GMT
The Servlet spec has something that I think would be even more
powerful:

    <load-on-startup>1</load-on-startup>

I personally would turn it into an attribute, but this has two
benefits:

1) Familiarity with terminology used in another component architecture
   (servlets).

2) Allow the container to order the components based on a priority
   number.

The way this works with servlets follows:

1) If no <load-on-startup/> element exists inside the <servlet/>
   element, then the servlet is put on lazy initialization (i.e. on
   demand).

2) Otherwise, the servlet definitions are grouped according to the
   priority number.

   2.1) No specific order is guaranteed for servlets with the same
        <load-on-startup/> priority.

   2.2) The servlet container iterates through the servlets with
        the <load-on-startup/> set, in ascending order.  (That means
        lower numbers have higher priority).


That would work *very* well for Cocoon in those cases where they need
to ensure a specific order of initialization.  I.e. the case where they
hacked in the support for the HSQL database to be loaded....

On the other hand, they could have done better by creating a separate
servlet to start that up before the cocoon servlet got started....


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message