JCR Structure — Nodes, Properties, Hierarchy & Advanced Concepts in AEM
What is JCR? and its concepts
JCR Structure — Nodes, Properties, Hierarchy & Advanced Concepts in AEM
What is JCR?
The Java Content Repository (JCR) is the backbone of Adobe Experience Manager.
It stores all content in a hierarchical structure, similar to a file system.
Think of it like this:
Node — File
Content — PropertyFolder
Structure — Hierarchy
Core Building Blocks
1️⃣ Nodes (Structure)
Nodes are containers that organize content.
Example:
/content/my-site/home
content → root node
my-site → child node
home → page node
2️⃣ Properties (Data)
Properties store actual content as key-value pairs.
Example:
jcr:title = "Home Page" jcr:description = "Welcome to our website"
3️⃣ Hierarchy (Tree Structure)
JCR follows a parent-child model.
/content └── my-site └── home ├── jcr:content │ ├── title │ └── text └── image
Diagram — JCR Tree
/content │ ┌─────┴─────┐ /site1 /site2 │ /home │ jcr:content │ ┌─────┴─────────┐ text image
This is exactly how AEM stores and renders pages.
Real AEM Page Structure
/content/site-name/page-name └── jcr:content ├── root │ ├── responsivegrid │ │ ├── text │ │ └── image
Key Points:
jcr:content → actual content
Components → stored as nodes
Layout → managed via containers
4. Node Types
Define structure rules for nodes.
Types:
Primary Type
Mixin Type
Example:
jcr:primaryType = "cq:Page" jcr:mixinTypes = ["mix:versionable"]
- Namespaces
Avoid naming conflicts using prefixes.
jcr: → core
cq: → AEM
sling: → Sling
6. References
Link nodes using UUID.
myReference = "UUID-value"
Useful for linking assets or content reuse.
7. Versioning
- Track and restore content changes.
- Version history
- Restore previous state
Used in AEM page versions.
- Access Control (ACL)
Controls permissions.
- Read
- Write
- Modify
Ensures content security.
9. Querying (JCR SQL2)
Fetch content dynamically.
SELECT * FROM [cq:Page]
WHERE ISDESCENDANTNODE('/content')
10. Observation
Listen to repository changes.
Triggers events when:
- Node added
- Property updated
- Used in workflows.
11. Workspaces
Logical separation of repository.
Default:
crx.default
12. Path vs UUID
Type Description
Path /content/site/home
UUID Unique identifier
UUID never changes.
13. Transient vs Persistent State
Changes are temporary until saved.
session.save();
Visual Diagram — Full JCR Concept Map
JCR │ ├── Nodes │ ├── Node Types │ └── Mixins │ ├── Properties │ ├── Hierarchy │ ├── Namespaces │ ├── References │ ├── Versioning │ ├── Access Control │ ├── Query Engine │ ├── Observation │ ├── Workspaces │ └── Transient State
Why JCR Matters in AEM
✔ Helps in debugging ✔ Improves component design ✔ Enables efficient querying ✔ Supports versioning & security
Common Mistakes
Treating JCR like a relational DB Hardcoding paths Ignoring hierarchy Deep nesting
Interview Questions
🔹 Basic
- What is JCR in AEM?
- Difference between node and property?
- What is jcr:content?
🔹 Intermediate
- What are node types?
- Difference between cq:Page and cq:PageContent?
- What is sling:resourceType?
- How does JCR hierarchy work?
🔹 Advanced
- What is JCR SQL2?
- Explain versioning in JCR
- What are mixin types?
- Difference between path and UUID?
- What is observation in JCR?
- Explain transient state
- How do you debug missing content in AEM?
- How do you fetch pages under /content?
- How do you link two nodes?
Pro Tips
✔ Keep node structure clean ✔ Avoid unnecessary nesting ✔ Use meaningful naming ✔ Follow AEM conventions ✔ Always validate queries
Final Thoughts
JCR is not just storage—it’s a complete content engine that powers:
- Content structure
- Security
- Version control
Follow me for more AEM insights and interview-focused content. Let’s learn and grow together in AEM
메타데이터
- post_id
- f351f85a6cc4
- slug
- jcr-structure-nodes-properties-hierarchy-advanced-concepts-in-aem-f351f85a6cc4
- url
- https://medium.com/@swathikrishnamoorthi2001/jcr-structure-nodes-properties-hierarchy-advanced-concepts-in-aem-f351f85a6cc4
- canonical_url
- https://medium.com/@swathikrishnamoorthi2001/jcr-structure-nodes-properties-hierarchy-advanced-concepts-in-aem-f351f85a6cc4
- author_url
- https://medium.com/@swathikrishnamoorthi2001
- status
- ok
- fetched_at
- 2026-07-10 20:20:52