-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the same PID for both pid and factoryPid attribute in @ObjectClassDefinition #6042
Comments
Not an edge case. Each conponent with a pid is implicit an factory pid Use the pid in configadmin to configured the factoryconfiguration E.g. the felix http.whiteboard
|
The problem is the existing persisted configurations with a PID not containing a |
If you make PR that changes this and it actually works (the creation of the Designate element seems problematic, but you'll find it out by trying. If you're not intending to make a PR, let's move this to abeyeance? |
Before starting to work on this I would like to get confirmation from someone more familiar with the spec that the duplicate id check in
|
factory pid This closes bndtools#6042 Signed-off-by: Konrad Windszus <kwin@apache.org>
factory pid This closes bndtools#6042 Signed-off-by: Konrad Windszus <kwin@apache.org>
factory pid This closes bndtools#6042 Signed-off-by: Konrad Windszus <kwin@apache.org>
I think the code is in error. As far as I can see the pid/factoryPid must be checked in separate namespaces. I can't see any reason why using the same pid for factory and singleton would be problematic. We're now using the set I'd prefer to close this because I find it an edge case but a PR is ok as long as this issue is closed I am happy :-) |
When using the following code snippet
Bnd bails out with
Duplicate pid com.example.MyComponent from class ...Config
when generating the metadata (e.g. withbnd-maven-plugin:bnd-process
). This validation happens inbnd/biz.aQute.bndlib/src/aQute/bnd/metatype/MetatypeAnnotations.java
Line 146 in fd296cc
According to https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.metatype.html#org.osgi.service.metatype.annotations.ObjectClassDefinition or https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.metatype.html#i1492258 that is not necessarily forbidden.
Although probably an edge case, sometimes the same component class should be used both via configuration factories as well as a singleton configuration (e.g. for migrating purposes from one to the other while staying backwards compatible from the configuration signature)
The text was updated successfully, but these errors were encountered: