> On 10 Nov 2016, at 16:51, Benson Margulies <bimargul...@gmail.com> wrote: > > On Thu, Nov 10, 2016 at 11:16 AM, BJ Hargrave <hargr...@us.ibm.com > <mailto:hargr...@us.ibm.com>> wrote: >> Not really. Fragments are not bundle in that they do not have a class loader >> or a separate activation life. They can be attached to zero or more host >> bundles (non-fragment bundles). So to start them is not possible. To make it >> a no-op will break an invariant: After callings start, the bundle must be >> STARTING/ACTIVE or an exception is thrown to indicate failure to start. >> Since a fragment can not be started, that means an exception must be thrown. >> >> Generally, unless you are writing a management agent, you probably should >> not be starting/stopping bundles. If you are writing a management agent, >> then the distinction between fragments and bundles is important to to >> manage. > > I'm maintaining a device that launches an application, and maps from > Maven dependencies to a list of bundles to load and start, or not.
That sounds a lot like a management agent to me. > However, in any case, I'm not here to have an argument. There are good > reasons why it is as it is? OK, fine, I was just curious. Probably the best approach to take when up against BJ ;-) > >> >> -- >> >> BJ Hargrave >> Senior Technical Staff Member, IBM // office: +1 386 848 1781 >> OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788 >> hargr...@us.ibm.com >> >> >> >> ----- Original message ----- >> From: Benson Margulies <bimargul...@gmail.com> >> Sent by: osgi-dev-boun...@mail.osgi.org >> To: OSGi Developer Mail List <osgi-dev@mail.osgi.org> >> Cc: >> Subject: [osgi-dev] Why is 'start' an error for fragments? >> Date: Thu, Nov 10, 2016 10:59 AM >> >> Has there ever been consideration of making 'start' be a harmless >> no-op for fragment bundles? I keep having to write code to check the >> headers and avoid the call to start on fragments. >> _______________________________________________ >> OSGi Developer Mail List >> osgi-dev@mail.osgi.org >> https://mail.osgi.org/mailman/listinfo/osgi-dev >> >> >> >> >> >> _______________________________________________ >> OSGi Developer Mail List >> osgi-dev@mail.osgi.org >> https://mail.osgi.org/mailman/listinfo/osgi-dev > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org> > https://mail.osgi.org/mailman/listinfo/osgi-dev > <https://mail.osgi.org/mailman/listinfo/osgi-dev>
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev