Module system notification mechanism
Glyn Normington
glyn_normington at UK.IBM.COM
Tue Jun 26 01:53:51 PDT 2007
Hi Stanley
"Stanley M. Ho" <Stanley.Ho at SUN.COM> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/jsr277-eg-observer/attachments/20070626/e0c8f649/attachment.html
More information about the jsr277-eg-observer
mailing list