Ticket #203 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

OT/Equinox should be aware of bundle fragments

Reported by: stephan Owned by: stephan
Priority: major Milestone: OTDT_1.2.7
Component: otequinox Version: 1.2.6
Keywords: Cc:

Description

When a bundle declares an aspectBinding where the base classes to be bound reside in a bundle fragment, OT/Equinox requires the aspectBinding to be declared against the host bundle, not the fragment. This works because fragments are special in that they have no class loader but share the host bundle's class loader. Also fragments post no life-cycle events other than START_INSTALLING and END_INSTALLING.

While this works, it would be good if aspectBindings would explicitly support fragments so that presence of a specific fragment can be checked rather than badly failing due to missing base classes (which doesn't yield good error messages).

Change History

Changed 4 years ago by stephan

  • status changed from new to closed
  • resolution set to fixed

r19669 adds a new sub-element to the basePlugin specification within an aspectBinding:

  • requiredFragment (multiplicity: 0-*)

This element is only used for validation at runtime: if the required fragment is not present or is not a fragment of the specified base plugin an error is reported and this particular aspectBinding is ignored.

See org.objectteams.otdt.apt.adaptor for an example of an aspect bundle depending on a fragment.

Changed 4 years ago by stephan

  • milestone changed from OTDT_1.3.0 to OTDT_1.2.7

Correcting the milestone.

Note: See TracTickets for help on using tickets.