Getting OSGi services from a bundle in Sling/CQ

前端 未结 3 1624
野趣味
野趣味 2021-02-08 04:21

I am using Day CQ. I want to store some data in a SQL Server DB, using the connection pool available in the Felix console. I can do this from a JSP, by using the \"sling\" objec

3条回答
  •  猫巷女王i
    2021-02-08 04:43

    YourClass obj = this.getSlingScriptHelper().getService(yourclass.class);
    obj.whatever();
    

提交回复
热议问题