OSGI is not invoking implemented code | Community
Skip to main content
New Participant
October 16, 2015
Solved

OSGI is not invoking implemented code

  • October 16, 2015
  • 2 replies
  • 2367 views

HI All,

I have created an new OSGI service XCreateCatalogCommand which implements PIM (cq-commerce-pim) com.day.cq.wcm.api.commands.WCMCommand interace. I have given top ranking for the service . Eventhough the API code is getting invoked instead of newly implemented service when i tried to do an rollout.

To test this i tried disabling the OSGI component com.adobe.cq.commerce.pim.impl.cataloggenerator.CreateCatalogCommand and my newly implement code got invoked when i did an rollout.

i am not sure what i am missing in code. i am pasting below the OSGI annotations written . let me know how to fix this issue

@Component(label = "Hybris Catalog Command", description = "Overrides the default Catalog Rollout", metatype = true)
@Service(WCMCommand.class)
@Properties({
@Property(name = "service.description", value = { "WCM command which creates a product catalog" }),
@Property(label="Service Ranking", name = "service.ranking", intValue = 1200, description = "Service Ranking", propertyPrivate = false)})

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 joerghoh

HI,

first of all, you do not specify which command you want to overlay, therefor your servlet is never picked up. And secondly, the WcmCommands are not supposed to get replaced/overlayed (at least from a coding point of view), as it does not support service rankings.

kind regards,
Jörg

2 replies

Kunal_Gaba_
New Participant
October 16, 2015

Could you please explain the use case you are trying to implement ?

joerghoh
joerghohAccepted solution
Employee
October 16, 2015

HI,

first of all, you do not specify which command you want to overlay, therefor your servlet is never picked up. And secondly, the WcmCommands are not supposed to get replaced/overlayed (at least from a coding point of view), as it does not support service rankings.

kind regards,
Jörg