Reputation: 743
Adobe's docs say:
When making a Factory Configuration append -<identifier> to the name.
As in: org.apache.sling.commons.log.LogManager.factory.config-<identifier>
Where is replaced by free text that you (must) enter to identify the instance (you cannot omit this information); for example:
org.apache.sling.commons.log.LogManager.factory.config-MINE
This implies the "free text" is an identifier, not just a name. I was hoping it would be the service PID.
I'm setting up an instance of the JDBC Connections Pool. I've got an xml config file in my /jcr_root/apps/<my-app>/config directory named "com.day.commons.datasource.jdbcpool.JdbcPoolService-mypid.xml". Installing the package containing xml file creates the expected, correctly-named sling:OsgiConfig node. This, in turn, does create a configured instance of the service, but the PID is com.day.commons.datasource.jdbcpool.JdbcPoolService.<random-guid>.
Is there some way to know what the PID will be in advance so that it can be referenced?
Upvotes: 3
Views: 1981
Reputation: 19626
Currently there is no way to know this id in advance. I aleady asked on the OSGi dev list if this can be enhanced. It would be nice to identify factory configs in a human readable way. Unfortunately the response was that it is not necessary or similar. Maybe if some more people ask for it :-)
Upvotes: 2