On 7/3/09 5:00 PM, Alan D. Cabrera wrote:
On Jul 1, 2009, at 4:17 PM, BJ Hargrave wrote:
Consider init() to be the first part of starting the framework which
leaves the system bundle in the STARTING state at start level 0 with
a valid BundleContext. start() then completes starting the framework
leaving the system bundle in the ACTIVE state and the start level
moved to the desired initial level.
Between init() and start(), the set of installed bundles can be
manipulated before completing starting of the framework with start().
I understand the reason for breaking things down between init() and
start(). What I find odd is that stop() undoes bits of both. It
seems that, imo, the set of methods is awkward just for the sake of
Framework implementing Bundle. What is the reason for that?
Well, I still think you are conferring more symmetry than ever existed
in the first place on start() and stop(). :-)
The main issue is getting hold of the system bundle's context, which is
needed to interact with the framework, before the whole framework and
every bundle is started. The init() method allows you to do that, which
is it puts the system bundle in the STARTING state, where the context is
available.
This is similar to how a bundle is in the STARTING state when its
start() method is called. The difference here is that the system bundle
has "activator" code that is on the outside.
The Felix framework actually handled this situation (and still can)
differently, it allowed you to pass in custom activator instances from
the outside which are integrated with the system bundle's
starting/stopping. In the end, though, it was serving the same purpose,
which is to provide something akin to an activator.
A lot of thought was placed into this design.
I'm sure that a lot of thought has gone into this design but if a lot
of thought needs to be placed in groking the new API then maybe too
much though has gone into the design. ;)
People grokked the Felix embedding API, which is the basis for this, so
I think it isn't too bad. But it is certainly true, that this is not
100% intuitive, because the framework cannot be exactly like a bundle.
-> richard
Regards,
Alan
----- Original Message -----
From: "Alan D. Cabrera" [[email protected]]
Sent: 07/01/2009 10:43 AM MST
To: OSGi Developer Mail List <[email protected]>
Subject: [osgi-dev] 4.2 Draft Framework Launch API
I find it odd that it is in init() that
- Event handling is turned in
- Framework services are registered
but it is in stop() that
-Event handling is turned off
- Framework services are unregistered
Regards,
Alan
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev