Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
453 stars 600 forks source link

HTTP Cache Factories do not have correct names in /confMgr #1720

Closed davidjgonzalez closed 5 years ago

davidjgonzalez commented 5 years ago

Required Information

Expected Behavior

The names in /system/console/confMgr should be accurate and meaningful.

Actual Behavior

The names in /confMgr are the same for several

Steps to Reproduce

Install latest from master and goto /system/console/confMgr

image

Links

Looks like this is because OCD definitions are shared between impl's. Im not sure how to remedy this without copying the impl and updating the keys. In the case of the KeyValueConfig it seems odd these 4 HttpCacheConfigExtension would use the same one; ie I think this is a bug in the move to new OSGi annotations for HTTP Cache. Not sure about the first duplication.

/cc @niekraaijmakers

kwin commented 5 years ago

Could it be related to http://apache-felix.18485.x6.nabble.com/Using-webconsole-name-hints-with-OSGi-DS-annotations-td5020184.html?

niekraaijmakers commented 5 years ago

Nice find kwin, I will try this one. If not, I will have to duplicate the exact same generic OCD 4 times :(

kwin commented 5 years ago

To me it just seems that the necessary name hints are just missing (e.g. in ValueMapValueHttpCacheConfigExtension)

niekraaijmakers commented 5 years ago

I think your right. I will try this out once I got some time (should be soon) and let you know the result.. if it works we'll use it.

niekraaijmakers commented 5 years ago

I cannot get it to work. What about you Konrad? If not, we have to eat copy pasta for dinner I'm afraid.

davidjgonzalez commented 5 years ago

🍝

kwin commented 5 years ago

Sorry, I was not looking closely enough. This is about reusing the same metatype in the context of 4 different services (not about differentiating the individual instance per factory which would indeed work via name hint). I asked about this now via https://mail.osgi.org/pipermail/osgi-dev/2019-January/007382.html.

niekraaijmakers commented 5 years ago

Ah Konrad, many thanks. Not sure how long we can keep the PR unmerged for your ticket. But greatly appreciated.

davidjgonzalez commented 5 years ago

Fixed via and closing due to revert back to SCR: https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/1741