Hi,
I don't think this is an "init" specific issue. To me, it's more about how
to define dependencies for components. If one component A is required to be
initialized before component B, it hints that Component B has a dependency
on Component A.
I remember that Jeremy was proposing to use maven style to lable composites
with group/artifact ids so that a composite version can be identified and
loaded. I guess the maven dependency declarations can also be applied here.
Thanks,
Raymond
----- Original Message -----
From: "Jeremy Boynes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, July 14, 2006 12:43 PM
Subject: Component start order
The Java implementation model allows components to designate that they
are "eager" init which means that they will be initialized when the
composite they are in is started rather than on first use.
One problem that I ran into with the extension stuff is that the
specification does not say or even allow a user to say in which order the
components will be started.
One option would be to follow a lexical convention and say that
components will be started in the order that they appear in the SCDL. I
have a few reservations about this:
* users may have other criteria for laying out the file (for example
grouping components together)
* this can be confusing in the presence of include elements - users may
want to group
components together in an include that would fit in different places in
the start order
Instead I'd like to propose we support an init-level indicator like the
run level from Unix systems. Components would be started in ascending
order of the init level they provided.
This could be done as an attribute on the <component> element, something
like:
<component name="start2nd" initLevel="20"> ...
<component name="start1st" initLevel="10"> ...
This would also allow us to eagerly initialize components without having
to use an @Init annotation.
Seem reasonable?
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]