Disable OSGI Components & Bundles as part of Application Configuration | Adobe Higher Education
Skip to main content
neerajg29767140
Level 2
September 28, 2017

Disable OSGI Components & Bundles as part of Application Configuration

  • September 28, 2017
  • 2 respuestas
  • 4534 visualizaciones

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:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"

xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

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:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0"

xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

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.

Este tema ha sido cerrado para respuestas.

2 respuestas

smacdonald2008
Level 10
September 28, 2017

Thanks for the community post

rupalig70586203
Level 2
October 23, 2018

Can you tell how to persist existing values which are added to this configuration(Component Disabler) as part of another project on the same instance?