How to create a run mode for osgi factory service? | Community
Skip to main content
sherybedrock
Level 3
October 12, 2017
Solved

How to create a run mode for osgi factory service?

  • October 12, 2017
  • 4 replies
  • 3900 views

Hi all,

I have a osgi factory and each sling model is reading his correct service via service label. When factory is man cofigured everything is fine, but when I upload the config run mode it is not visible for the service. Any ideas?

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 sherybedrock

and there is a factory service. I created a nodes from which the factory will read different configuration. And configurations are there but the factory can't read it. Maybe it is something with the names. If you configure them manually everything is working.

4 replies

October 12, 2017

Hi Shery,

Can you please elaborate your question?

Is it possible to provide a screenshot or code sample to understand your question properly?

sherybedrock
Level 3
October 12, 2017

name of the node com.something.aems2.digitals2.pdhcomponents.osgi.ProductDataHubServiceImpl.ENGINE_PAGE.xml

config

<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"

          service.label="ENGINE"

          pdhEndpoint="https://productdata-int1.api.bmw/pdh/"

          pdhEndpoint="https://productdata.api.bmw/pdh/"

          dataVersion="enginepage/v1.0/dataversion/{0}/{1}"

          modelPath="enginepage/v1.0/model/{0}/{1}/{2}"

          modelsPath="enginepage/v1.0/models/{0}/{1}/{2}"

sherybedrock
Level 3
October 12, 2017

call from the model   

@Optional

    @OSGiService(filter = "(service.label=ENGINE)")

    ProductDataHubServiceImpl productDataHubService;

sherybedrock
sherybedrockAuthorAccepted solution
Level 3
October 12, 2017

and there is a factory service. I created a nodes from which the factory will read different configuration. And configurations are there but the factory can't read it. Maybe it is something with the names. If you configure them manually everything is working.