>From the Bundle.stop javadoc:

7. If this bundle's state was ACTIVE prior to setting the state to 
STOPPING, the BundleActivator.stop method of this bundle's BundleActivator
, if one is specified, is called.

Therefore, BundleActivator.stop is not specified to be called is the 
bundle is stopped while in the STARTING state and awaiting activation.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]

office: +1 386 848 1781
mobile: +1 386 848 3788




From:
Mirko Jahn <[email protected]>
To:
OSGi Developer Mail List <[email protected]>
Date:
2009/07/14 06:41
Subject:
Re: [osgi-dev] stop() for Lazy Activation Policy
Sent by:
[email protected]



Just my interpretation, but I would expect the bundle to enter the
resolved state (removing the lazy activation flag) without further
changes. So, only the state changes from starting to resolved, without
going through the active state. Again, just my "interpretation". The
only "odd" thing is that this path is not described in the state
diagram, although pretty common, when shutting down an OSGi runtime
with not activated bundles. Well, maybe it can be interpreted as the
case when the activator starts with an exception, there you would have
the same behavior...

Cheers,
Mirko

On Tue, Jul 14, 2009 at 8:17 AM, Ikuo
Yamasaki<[email protected]> wrote:
> Hi all,
>
> I have a question regarding Bundle#stop() against lazy activation 
policy.
>
> Q. What happen , if Bundle#stop() is called for bundle A that is in
> STARTING state due to lazy activation policy ?
>
> According to javadoc of Bundle#stop() in either R4.2 or R4.1 spec,
> BundleActivator#stop() must be called if specified.
>
> However, IMO, it seems strange because Bundle#start() has not been
> called yet (even the bundle classloader has not been created).
>
> Best regards,
>
> =======
> Ikuo YAMASAKI
>
> # If needed, I'll open a bug report on the OSGi bugzilla.
>
> _______________________________________________
> 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

Reply via email to