Christopher BROWN-2 wrote
> [...]
> With point 4, I'm guessing you mean that you effectively build bundles by
> extracting classes in wrapped libraries directly into your bundle, as
> opposed to Bundle-Classpath?
> [...]

that's what I mean.


Christopher BROWN-2 wrote
> [...]
> With point 9, another watchout if you use background threads to start
> stuff, especially if you hang on to a reference to the bundle context, is
> to be sure that your code can handle the bundle context becoming invalid.
>  This happens a lot when running unit tests with the framework, when
> starting/stopping the framework fast and frequently.
> [...]

You can handle this by adding a BundleListener. The BundleListener
interrupts the start- and shutdown-hooks if the bundle is going to be
uninstalled. You also can check if the BundleContext is valid
(bundle.getState() == Bundle.ACTIVE) or you can catch and ignore the
Exception. In UnitTests you can use mock-objects. Create a Mock-object of
Type BundleContext and whenever you want to call a methode of BundleContext
you "expect" a predefined ReturnValue.

Regards
Roland




--
View this message in context: 
http://apache-felix.18485.x6.nabble.com/How-to-improve-the-start-time-of-Apache-Felix-tp5004833p5005109.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to