Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Can we change the PID (Persistent Identity) for OSGI configs

Avatar

Former Community Member

When creating a new OSGI configuration, under "configuration Information" there is "Persistent Identity (PID)" that is appending a dynamically generated random text to each configuration. I think this is done to uniquelyidentify each object. But my question, can we customize or change them to be more readable?

Our problem is that we have to register several configs and it is getting hard to identify by looking at them, we have to open each to know what it is. Appreciate any advice here.

 

Attached some screenshots.

[img]tti-osgi.JPG[/img]

[img]tti-osgi-detail.JPG[/img]

1 Accepted Solution

Avatar

Correct answer by
Level 10

that you cant change there in the configMgr. 

However, you can have your PID names under your config folder in /apps (eg: PID-test1, PID-test2). So you can refer that which will be user friendly to identify.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

that you cant change there in the configMgr. 

However, you can have your PID names under your config folder in /apps (eg: PID-test1, PID-test2). So you can refer that which will be user friendly to identify.

Avatar

Former Community Member

Thanks it worked. 

To summarize what i did:

1. Define an xml file for each OSGI config under 

..package-folders..\src\content\jcr_root\apps\abccommons\config

Sample:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:OsgiConfig"
    configuration.id="ezbillexportpost"
    service.url="/service/ezbillexport"
    service.method="POST"
    service.protocol="http"/>

2. Saved it as classname-servicename.xml

3. Did a maven build and deploy

4. Open CRX/DE and go to your /apps/package-name/config . We can see all the configs with the filesnames as defined in Step 2 above.