AEM Core Components: OSGi, JCR, and Sling

If you’ve ever tried to explain Adobe Experience Manager to a non-technical stakeholder, you’ve probably said something like “it’s our CMS.” But under the hood, AEM is much more than a traditional CMS. Its power comes from three core building blocks, OSGi, JCR, and Sling, that together make the platform modular, scalable, and highly extensible.

For architects and developers, understanding how these three layers fit together is crucial. It not only helps in debugging and performance tuning, but also in designing solutions that actually align with how AEM is meant to work. Instead of fighting the platform, you can start leveraging it.

In this article, I’ll walk through these three pillars in plain language and connect them to what you experience every day as an AEM practitioner.

OSGi Framework and Bundles

Key points of OSGi in AEM context

Java Content Repository (JCR)

Apache Sling Framework

Key Sling concepts

OSGi Framework and Bundles

AEM relies on OSGi (Open Services Gateway Initiative) as its foundation for modularity. In practice, every AEM feature (components, services, workflows, etc.) is packaged as an OSGi bundle: essentially a JAR file with metadata about its dependencies. The Apache Felix container in AEM dynamically loads these bundles at runtime. This design solves the classic “JAR Hell” by isolating each component’s dependencies. Bundles can be installed, started, stopped, updated, or uninstalled on the fly without restarting AEM. For example, you could install a new image transformation bundle or update a business logic bundle while the server is running, with OSGi handling dependency resolution.

Key points of OSGi in AEM context

OSGi makes AEM extensible and maintainable, and new features can be plugged in as bundles, and existing bundles can evolve independently.

Java Content Repository (JCR)

Beneath Sling and OSGi, AEM’s content is stored in a Java Content Repository (JCR). AEM specifically uses Apache Jackrabbit Oak, a scalable, hierarchical content store, as its JCR implementation. Think of JCR as a database that looks like a filesystem: content is organized in a tree of nodes and properties. Oak supports versions, transactions, full-text search, observation (event listeners), and access control out of the box.

How JCR works in AEM

JCR (Oak) is AEM’s persistent content layer. All content authors and workflows ultimately read/write to this shared repository. Because Oak is designed for high throughput and can scale out (with MongoDB), it supports the demanding read/write patterns of large websites and media libraries.

Apache Sling Framework

On top of OSGi and JCR lies Apache Sling, the web framework that gives AEM its URL-to-content behavior. Sling treats the content repository itself as the HTTP content tree: every incoming URL is mapped to a node in the JCR and processed accordingly.

Key Sling concepts

Sling makes AEM a content-centric web server. It provides features like caching, authentication, and scripting support (HTML Template Language, JavaScript, etc.) to simplify building web UIs on repository data. For example, Sling lets authors create a JCR node for a “Text” component and author some text; the system automatically knows which component script to use when that node is requested.

Conclusion

By combining these three components, OSGi for modular services, JCR (Oak) for content storage, and Sling for web rendering, AEM delivers a flexible platform. Developers benefit from loose coupling (via OSGi), a powerful repository (with versioning and search), and a friendly content API (via Sling’s RESTful model).

Viktor Lazar

Director of Engineering