You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Peter Kriens <Pe...@aQute.biz> on 2006/12/07 16:03:49 UTC

Re[2]: Bundling interfaces and implementations

SEH> Peter Kriens <Pe...@aQute.biz> writes:
>> Packaging the spec interfaces with the implementation is not only
>> very easy with bnd, I also think that is the right way to go.  Last
>> week I worked on a demo and Felix jetty was the only bundle that ran
>> directly out of the box from OBR because it contained all its
>> interfaces;
SEH> By "its interfaces", do you mean interfaces that it implements, or
SEH> interfaces that it /uses/ expecting someone else to have implemented?

The one that provides the functionality should carry the interfaces.
Depending on the service specification this can both be the
implementer as the user of the Java interface. For example, log
implementer should contain the org.osgi.service.log that contains both
interfaces it implementes (LogService, LogReaderService, LogEntry) and uses
(LogListener).

SEH> For instance, should that every bundle that uses (as a client) the
SEH> OSGi LogService include all of org.osgi.service.log? Or do you just
SEH> mean that the Felix Log implementation includes all of
SEH> org.osgi.service.log?
Yes.

Then again, this is a choice. It makes the bundle standalone and
capable of providing its functionality in every environment without
requiring other bundles, exactly the way I like it.

However, these choices you make when you design the packaging and you
can set it up in many different ways. This is just my personal opinion
of best practice, feel free to do it differently.

Kind regards,

     Peter Kriens
     


-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599