You should put API and implementation into separate bundles.
This decouples the specification (api) from one or even multiple 
implementations and allows implementation changes without restarting the 
framework (the osgi way).

When it comes to exporting, well you just export what you either really want to 
export (usually just api/spi stuff) or you imported yourself (known as package 
substitution).

There are hardly reasons to include the api into the implementation's bundle.
Instead you must be aware of class loading issues if you expose services.

"Do you even recommend to separate API and SPI on package level?" yes. same as 
above. (separation of concerns).

/Toni

-------- Original-Nachricht --------
> Datum: Mon, 2 Jun 2008 15:06:39 +0200
> Von: "Peter Niederwieser" <[EMAIL PROTECTED]>
> An: osgi-dev@mail.osgi.org
> Betreff: [osgi-dev] Put API/SPI/implementation into separate bundles?

> When building an OSGi-based system, do you recommend to put a
> component's API/SPI/implementation into separate bundles, or is it
> good enough to put them into separate packages (exporting only API and
> SPI)? Has the "separate bundle" approach advantages when it comes to
> updating/replacing bundles at runtime? Do you even recommend to
> separate API and SPI on package level?
> 
> Cheers,
> Peter Niederwieser
> _______________________________________________
> 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

Reply via email to