Expand my Community achievements bar.

SOLVED

How to create a run mode for osgi factory service?

Avatar

Level 3

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?

1 Accepted Solution

Avatar

Correct answer by
Level 3

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.

View solution in original post

4 Replies

Avatar

Former Community Member

Hi Shery,

Can you please elaborate your question?

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

Avatar

Level 3

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

Avatar

Level 3

call from the model   

@Optional

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

    ProductDataHubServiceImpl productDataHubService;

Avatar

Correct answer by
Level 3

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.