Can we change the PID (Persistent Identity) for OSGI configs | Community
Skip to main content
October 16, 2015
Solved

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

  • October 16, 2015
  • 2 replies
  • 2404 views

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]

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

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.

2 replies

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
New Participant
October 16, 2015

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.

October 16, 2015

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.