Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Nível 1
Nível 2
Faça login na Comunidade
Faça logon para exibir todas as medalhas
Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Hi All,
I have been following Adobe Experience Manager Help | Reading Adobe Experience Manager OSGi Configuration Values for reading properties in my code.
When i runt he sample provided it runs fine and gives correct output but when i integrate the same nodes and classes in my project, my service doesn't get registered on activation of bundle.
Since this sample uses the deprecated felix annotations i tried modifying it to current standards , now my service is registers but the activate method is never called.
I also saw one acs sample code on github SampleOsgiR6AnnotationsImpl.java but unable to understands if it is related to my requirement, since i dont see any connection with osgiConfig node.
What i need is able to read properties based on different run modes in my java file on bundle activation.
Can anyone please suggest for the same.
Solucionado! Ir para a Solução.
Visualizações
respostas
Total de curtidas
The handling and injection of of OSGI properties, including the correct matching of runmodes should be left the framework. And from my point of view there is never a reason to bypass this. If you do, you are violating AEM best practices.
And if you really need to read the configuration for other environments (because otherwise the framework would it inject for you), something is wrong. Most likely you are using OSGI properties for a purpose they are not intended for.
Jörg
Visualizações
respostas
Total de curtidas
Hi,
Please check for sample osgi service and how to call from servlet.
AEM6.4 @Reference not working in SlingServlet
and for reading osgi config without service
Visualizações
respostas
Total de curtidas
Hi,
Seems you want to use the osgi configs per the run mode. It is usually picked in the AEM instance based on its runmode only. You can refer to public blogs like http://aempodcast.com/2016/apache-sling/demonstrate-slingosgiconfig-runmodes/#.XQo3npgzaUk to get more details.
Visualizações
respostas
Total de curtidas
The handling and injection of of OSGI properties, including the correct matching of runmodes should be left the framework. And from my point of view there is never a reason to bypass this. If you do, you are violating AEM best practices.
And if you really need to read the configuration for other environments (because otherwise the framework would it inject for you), something is wrong. Most likely you are using OSGI properties for a purpose they are not intended for.
Jörg
Visualizações
respostas
Total de curtidas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas