Disable OSGI Components & Bundles as part of Application Configuration


ACS AEM Commons OSGI Bundle and Component Disabler config allows to shut-down OSGI Components and Services by configuration. This feature allows OSGI Bundles and Components to be disabled as part of application configuration and these can be well managed for different environments using run modes config.

OSGI Component Disabler:
Define a sling:OsgiConfig under project config node:
Ex:
 /apps/poc/config/com.adobe.acs.commons.util.impl.ComponentDisabler
<?xml version="1.0" encoding="UTF-8"?>
jcr:primaryType="sling:OsgiConfig"
components="[pid1,pid2]"
/>
Snapshots below for reference:
Components would be an array of the OSGI component PIDs to disable. CRX and OSGI view of component disable configuration.







OSGI Bundle Disabler:
Bundles would be an array of the OSGI bundle symbolic names to disable.
Ex:
/apps/poc/config/com.adobe.acs.commons.util.impl.BundleDisabler
<?xml version="1.0" encoding="UTF-8"?>
jcr:primaryType="sling:OsgiConfig"
bundles="[bundle1,bundle2]"
/>
CRX and OSGI view of bundle disable configuration.



That's it and we are done with the bundle and component disabler configuration and can be utilized in any AEM specific need.

Comments

Popular posts from this blog

AEM 6.3 | Apache Sling Content Disposition Filter | Hosting Static HTML in JCR

Image Component Customization - Image Size Restriction - Drag/Drop - Touch UI

Access OSGI ser­vice from Sightly WCMUsePojo | AEM 6.3