Hi Stanley

"Stanley M. Ho" <[EMAIL PROTECTED]> wrote on 25/06/2007 10:04:08 PM:

> Hi Glyn,
>
> Glyn Normington wrote:
> >
> > Yes, but my point was that separating lifecycle out in that way would
> > make it harder to enforce constraints like "if a module's state is
> > initialised, the module's activator completed successfully".
>
> The mechanism I suggested is simply for informing the application that
> something has happened. This is a notification only and does not change
> the state of the module system in any way.

That's what I expected.

>
> If we want to enforce constraints like you mentioned, one approach is to
> execute the activator code in the custom import policy. If this is not
> sufficient, then we'll probably need a different mechanism to handle
> this use case.

I don't think calling the activator from the custom import policy would
work.

The main problem is that it would require any module needing an activator
to supply a custom import policy, which we want to avoid in most cases.

Also, the custom import policy runs in a peculiar 'half-resolved' state
(the module is unresolved at the start and hopefully fully resolved at the
end, so on average, it's half-resolved ;-) ) and we wouldn't want
application code proper, such as an activator, to have to support this
state.

>
> - Stanley

Glyn






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





Reply via email to