AEM Tutorial #31 | OSGi Config #1 | Create OSGi Configuration in aem

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

ความคิดเห็น •

  • @prasanthanandharaj5894
    @prasanthanandharaj5894 ปีที่แล้ว

    Hello, Since the purpose of OSGi configurable is to have flexibility of config modification even at runtime, Can you kindly clarify how can someone update a value on PROD Author instance and get them reflected to the Publish servers. I hope for a runtime change in configurable, administrators are not expected to change the OSGi configurables in PUBLISH instance. Kindly clarify.

  • @sushantsabnis5835
    @sushantsabnis5835 10 หลายเดือนก่อน

    Great explaination!
    I have one doubt though.
    If in @Model annotation, if the adaptable is changed to Resource.class from SlingHttpServlet.class, it doesn't work.
    Why does it happen?

  • @amazingshortvideos9922
    @amazingshortvideos9922 2 ปีที่แล้ว

    @Option is showing error its saying that there is no annotation like this

    • @AEMGeeks
      @AEMGeeks  2 ปีที่แล้ว +1

      Could you please add timeline in video, where are you getting this error. Means at what time this came(ex. 3:34)

    • @amazingshortvideos9922
      @amazingshortvideos9922 2 ปีที่แล้ว

      @@AEMGeeks Thanks sir It got resolved I just didn't imported @Option annotation

  • @dilleshkondala5825
    @dilleshkondala5825 2 ปีที่แล้ว

    Great Explanation!! Thank you so much for knowledge sharing.
    I have a question, how the OSGi config data is going to store under "/apps/system/config" consider this path as default for storing the config data. But how come the data will be storing, if we create a node with sling:OsgiConfig under "/apps/config/" ??

    • @AEMGeeks
      @AEMGeeks  2 ปีที่แล้ว

      If you add your configuration through system/console, these may store under "/apps/system/config". But real use case this won't happen coz you will add configs as part of code and in code you will define correct path.

  • @marvarlo
    @marvarlo 3 ปีที่แล้ว

    Nice video!!! I have a Question:
    Is it possible to read a Osgi Configuration from javascript?
    Let's suppose i Have a component with a config dialog form, and I need to read some Osgi configurations for that config dialog form with a javascript.
    Is it possible?
    Thanks!!

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      Yes, you can. It is not advisable to use osgi config in JavaScript. Let me explain how to do it.
      1. Bring configuration in component sightly.
      2. Pass/expose these values to javaScript/clientlibs from Sightly using tag.
      3. Now these config values will be available to javaScript/clientlibs.

  • @rajavlogs6099
    @rajavlogs6099 3 ปีที่แล้ว

    Thanks for the video. How I store a secure configuration like access_key. I am working on this now in my new AEM project, (Used environment variables in my Spring Boot project)

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      You can use OOTB encryption to encrypt your password in OSGi configuration.

  • @subashbosh7700
    @subashbosh7700 3 ปีที่แล้ว

    is it possible to show references or examples for getting data from cfg.json file for AEM cloud as service

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      Yes, I will explain in coming tutorials.

  • @prashanthpalakurthi8439
    @prashanthpalakurthi8439 3 ปีที่แล้ว

    Very well explained!!
    i have a question , if i save OSGI config as sling:OSGIConfig , and lets say as per requirement if i add a new field in JAVA code , should i need to manually add that field in crx/de as well ?

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      No, you don't need to do anything manually/crx/de in actual environment(stage/prod). Everything should as part of code.
      You OSGI config file should also do as part of code. So when you add new filed in java, Same time you can update OSGI config file as well with new field value.

  • @rohankalra3209
    @rohankalra3209 3 ปีที่แล้ว

    my service is not showing in Bundles console is it possible i can see it in my system config part but not in bundles

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      Configuration will be available in system configuration. But you can see service in your bundle.

  • @vigneshsekar8313
    @vigneshsekar8313 3 ปีที่แล้ว

    Can u explain that what is the use of enable=true, immediate=true inside the @component annotation?

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว +2

      enable=true(bydefault is true. So even if you don't write. it takes true)
      Controls whether the component is enabled when the bundle is started. The default value is true. If enabled is set to false, the component is disabled until the method enableComponent is called on the ComponentContext object. This allows some initialization to be performed by some other component in the bundle before this component can become satisfied
      immediate=true
      Controls whether component configurations must be immediately activated after becoming satisfied or whether activation should be delayed. The default value is false if the factory attribute or if the service element is specified and true otherwise. If this attribute is specified, its value must be false if the factory attribute is also specified or must be true unless the service element is also specified.

  • @ajayvijayakumar2582
    @ajayvijayakumar2582 ปีที่แล้ว

    Hello sir
    Pls can u tell me where the code in ur git hub repo

    • @AEMGeeks
      @AEMGeeks  ปีที่แล้ว

      github.com/aemgeeks1212/aemgeeks

  • @kamleshjambani3162
    @kamleshjambani3162 3 ปีที่แล้ว

    i coudnt see my file undr system/config but its showing in my services

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      check you project folder in apps. It should be there.

  • @jyothig1517
    @jyothig1517 4 ปีที่แล้ว

    Sir can you please make videos for workflow and tags concept in aem using sling models

    • @AEMGeeks
      @AEMGeeks  4 ปีที่แล้ว

      sure jyothi g, I will create tutorials on these topics.

  • @keerthikeerthi8162
    @keerthikeerthi8162 3 ปีที่แล้ว

    How to change existing osgi config values through code.

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      you can store osgi config file in code base as file.
      you can store as .config or as xml document.
      In latest version of AEM, you can store as .json(.cfg) file as well

  • @LeetcodeUser
    @LeetcodeUser 3 ปีที่แล้ว

    you are Awsome.

    • @AEMGeeks
      @AEMGeeks  3 ปีที่แล้ว

      thanks rajat

  • @lorenaportillo3705
    @lorenaportillo3705 2 ปีที่แล้ว

    Thanks a lot!

    • @AEMGeeks
      @AEMGeeks  2 ปีที่แล้ว

      🙏You're welcome!