Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can an OSGi fragment bundle publish a declarative service?

I have a fragment bundle that I created to access some add functionality to a second-party jar. My fragment should register a service to expose this new functionality. It doesn't seem to work. Before I get deep into troubleshooting, I'd like to know if this is even allowed? That is, does Felix SCR's bundle watcher look at or ignore fragments?

like image 998
Chris Dolan Avatar asked Jul 13 '12 20:07

Chris Dolan


1 Answers

Aha, I found the answer myself in the spec, section 112.4.2: "A Service-Component manifest header specified in a fragment is ignored by SCR." This is consistent with 3.14.3: "The following list contains the headers that must not be used in a fragment bundle: Bundle-Activator"

like image 180
Chris Dolan Avatar answered Sep 19 '22 01:09

Chris Dolan