May 9, 2020
Estimated Post Reading Time ~

Configuring OSGi in AEM

OSGi is a fundamental element in the technology stack of Adobe Experience Manager (AEM). It is used to control the composite bundles of AEM and its configuration.

OSGi provides the standardized primitives that allow applications to be constructed from small, reusable, and collaborative components. These components can be composed into an application and deployed".

This allows easy management of bundles as they can be stopped, installed, started individually. The interdependencies are handled automatically. Each OSGi Component (see the OSGI specification) is contained in one of the various bundles.

The run modes you can set for configs are:
  • config - for all run modes
  • config.author - for the author's environment
  • config.publish - for the publish environment
  • config.<run-mode> - as appropriate
CREATING THE CONFIGURATION IN THE REPOSITORY
To actually add the new configuration to the repository:

The structure is as follows: You can follow and create 



1) Use CRXDE Lite to navigate to: /apps/<yourProject>
2) If not already existing, create the config folder (sling:Folder):
config - applicable to all run modes
config.<run-mode> - specific to a particular run mode
3)Under this folder create a node:
Type: sling:OsgiConfig
Name: the persistent identity (PID);
for example for Customised property for requirement use com.eqsa.semicoll here.
4)For each parameter that you want to configure, create a property on this node:
Name: the parameter name as shown in the Web console; the name is shown in brackets at the end of the field description.
For example, for com.eqsa.semicoll use com.eqsa.semicoll.ID
Type: as appropriate.
Value: as required.
You only need to create properties for the parameters that you want to configure, others will still take the default values as set by AEM.

5)Save all changes.
Changes are applied as soon as the node is updated by restarting the service (as with changes made in the Web console).

Now you will get the configuration with the name " com.eqsa.semicoll " in ConfigMgr (http://localhost:4502/system/console/configMgr), as shown



and can set the properties for the configuration as follows 



Likewise, you can add as much as config properties in one configuration.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.