JBoss.orgCommunity Documentation

eXo JCR Developer Guide

Java Content Repository and Extension services


I. eXoJCR
1. Introduction in eXoJCR
1.1. JCR (JSR-170) API main concepts
1.1.1. Data model
2. Why use JCR?
2.1. What is JCR?
2.2. Why use JCR?
2.3. What does eXo do?
2.4. Further Reading
3. eXo JCR Implementation
3.1. Related Documents
3.2. How it works
3.3. Workspace Data Model
4. Advantages of eXo JCR
4.1. Advantages for application developers:
4.2. Advantages for managers
5. Compatibility Levels
5.1. Introduction
5.2. Level 1
5.3. Level 2
5.4. Optional features
6. Using JCR
6.1. 1 Using eXo JCR in an application
6.1.1. Obtaining a Repository object
6.1.2. JCR Session common considerations
6.2. JCR Application practices
6.2.1. Simplifying the management of a multi-workspace application
6.2.2. Reusing SessionProvider
7. JCR Extensions
7.1. JCR Service Extensions
7.1.1. Concept
7.1.2. Implementation
7.1.3. Configuration
7.2. Related Pages
8. eXo JCR Application Model
9. NodeType Registration
9.1. Interfaces and methods
9.1.1. ExtendedNodeTypeManager
9.1.2. NodeTypeValue
9.1.3. NodeDefinitionValue
9.1.4. PropertyDefinitionValue
9.1.5. ItemDefinitionValue
9.2. Node type registration
9.2.1. Run time registration from xml file.
9.2.2. Run time registration using NodeTypeValue.
9.3. Changing existing node type
9.4. Removing node type
9.5. Practical How to
9.5.1. Adding new PropertyDefinition
9.5.2. Adding new child NodeDefinition
9.5.3. Changing or removing existing PropertyDefinition or child NodeDefinition
9.5.4. Changing the list of super types
10. Registry Service
10.1. Concept
10.2. The API
10.3. Configuration
11. Namespace altering
11.1. Adding new namespace
11.2. Changing existing namespace
11.3. Removing existing namespace
12. Node Types and Namespaces
12.1. Introduction
12.2. Node Types definition
12.3. Namespaces definition
13. eXo JCR configuration
13.1. Related documents
13.2. Portal and Standalone configuration
13.3. JCR Configuration
13.4. Repository service configuration (JCR repositories configuration)
13.5. Repository configuration:
13.6. Workspace configuration:
13.7. Workspace data container configuration:
13.8. Value Storage plugin configuration (for data container):
13.9. Initializer configuration (optional):
13.10. Cache configuration:
13.11. Query Handler configuration:
13.12. Lock Manager configuration:
14. Multilanguage support in eXo JCR RDB backend
14.1. Introduction
14.2. Oracle
14.3. DB2
14.4. MySQL
14.5. PostgreSQL
15. Search Configuration
15.1. XML Configuration
15.2. Configuration parameters
15.3. Global Search Index
15.3.1. Global Search Index Configuration
15.3.2. Customized Search Indexes and Analyzers
15.4. Indexing Adjustments
15.4.1. IndexingConfiguration
15.4.2. Indexing rules
15.4.3. Indexing Aggregates
15.4.4. Property-Level Analyzers
15.4.5. Advanced features
16. JCR Configuration persister
16.1. Idea
16.2. Usage
17. JDBC Data Container Config
17.1. Introduction
17.2. General recommendations for database configuration
17.2.1. MySQL configuration
17.3. Multi-database Configuration
17.4. Single-database configuration
17.4.1. Configuration without DataSource
17.4.2. Dynamic Workspace Creation
17.5. Simple and Complex queries
17.6. Forse Query Hints
17.7. Notes for Microsoft Windows users
18. External Value Storages
18.1. Introduction
18.2. Tree File Value Storage
18.3. Simple File Value Storage
18.4. Content Addressable Value storage (CAS) support
19. Workspace Data Container
20. REST Services on Groovy
20.1. Concept
20.2. Usage
21. Configuring JBoss AS with eXo JCR in cluster
21.1. Launching Cluster
21.1.1. Deploying eXo JCR to JBoss As
21.1.2. Configuring JCR to use external configuration
21.2. Requirements
21.2.1. Environment requirements
21.2.2. Configuration requirements
22. JBoss Cache configuration
22.1. JBoss cache configuration for indexer, lock manager and data container
22.2. JGroups configuration
22.3. Shipped JBoss Cache configuration templates
22.3.1. Data container template
22.3.2. Lock manager template
22.3.3. Query handler (indexer) template
23. LockManager configuration
23.1. Introduction
23.2. LockManagerImpl
23.3. CacheableLockManagerImpl
23.3.1. Configuration
23.3.2. Simple JbossCache Configuration
23.3.3. Template JBossCache Configuration
23.3.4. Data Types in Different Databases
24. QueryHandler configuration
24.1. How does it work?
24.2. Configuration
24.2.1. Common requirements
24.2.2. Query-handler configuration
24.2.3. JBoss-Cache template configuration
25. JBossTransactionsService
25.1. Introduction
25.2. Configuration
26. TransactionManagerLookup
26.1. Configuration
27. JCR Query Usecases
27.1. Intro
27.2. Query Lifecycle
27.2.1. Query Creation and Execution
27.2.2. Query Result Processing
27.2.3. Scoring
27.3. Query result settings
27.4. Type Constraints
27.5. Property Constraints
27.6. Path Constraint
27.7. Ordering specifing
27.8. Fulltext Search
27.9. Indexing rules and additional features
27.10. Query Examples
27.10.1. SetOffset and SetLimit
27.10.2. Finding All Nodes
27.10.3. Finding Nodes by Primary Type
27.10.4. Finding Nodes by Mixin Type
27.10.5. Property Comparison
27.10.6. LIKE Constraint
27.10.7. Escaping in LIKE Statements
27.10.8. NOT Constraint
27.10.9. AND Constraint
27.10.10. OR Constraint
27.10.11. Property Existence Constraint
27.10.12. Finding Nodes in a Case-Insensitive Way
27.10.13. Date Property Comparison
27.10.14. Node Name Constraint
27.10.15. Multivalue Property Comparison
27.10.16. Exact Path Constraint
27.10.17. Child Node Constraint
27.10.18. Finding All Descendant Nodes
27.10.19. Sorting Nodes by Property
27.10.20. Ordering by Descendant Nodes Property (XPath only)
27.10.21. Ordering by Score
27.10.22. Ordering by Path or Name
27.10.23. Fulltext Search by Property
27.10.24. Fulltext Search by All Properties in Node
27.10.25. Ignoring Accent Symbols. New Analyzer Setting.
27.10.26. Finding nt:file node by content of child jcr:content node
27.10.27. Changing Priority of Node
27.10.28. Removing Nodes Property From Indexing Scope
27.10.29. Regular Expression as Property Name in Indexing Rules
27.10.30. High-lighting Result of Fulltext Search
27.10.31. Searching By Synonim
27.10.32. Checking the spelling of Phrase
27.10.33. Finding Similar Nodes
27.11. Tips and tricks
27.11.1. XPath queries containing node names starting with a number
28. Searching Repository Content
28.1. Introduction
28.2. Bi-directional RangeIterator (since 1.9)
28.3. Fuzzy Searches (since 1.0)
28.4. SynonymSearch (since 1.9)
28.5. High-lighting (Since 1.9)
28.5.1. DefaultXMLExcerpt
28.5.2. DefaultHTMLExcerpt
28.5.3. How to use it
28.6. SpellChecker
28.6.1. How do I use it?
28.7. Similarity (Since 1.12)
29. Fulltext Search And Affecting Settings
29.1. Property content indexing
29.2. Lucene Analyzers
29.3. How are different properties indexed?
29.4. Fulltext search query examples
29.5. Different analyzers in action
30. WebDAV
30.1. Related documents
30.2. Introduction
30.3. Configuration
30.4. Screenshots
30.4.1. MS Internet Explorer
30.4.2. Dav Explorer
30.4.3. Xythos Drive
30.4.4. Microsoft Office 2003
30.4.5. Ubuntu Linux
30.5. Comparison table of WebDav and JCR commands
30.6. Restrictions
30.6.1. Windows 7
30.6.2. Microsoft Office 2010
31. FTP
31.1. Introdution
31.2. Configuration Parameters
31.2.1. command-port:
31.2.2. data-min-port & data-max-port
31.2.3. system
31.2.4. client-side-encoding
31.2.5. def-folder-node-type
31.2.6. def-file-node-type
31.2.7. def-file-mime-type
31.2.8. cache-folder-name
31.2.9. upload-speed-limit
31.2.10. download-speed-limit
31.2.11. timeout
32. eXo JCR Backup Service
32.1. Concept
32.2. How it works
32.2.1. Implementation details
32.2.2. Work basics
32.3. Configuration
32.4. Usage
32.4.1. Performing a Backup
32.4.2. Performing a Restore
32.4.3. Repository and Workspace initialization from backup
32.5. Scheduling (experimental)
32.6. Restore existing workspace or repository
32.7. Restore a workspace or a repository using original configuration
32.8. Backup set portability
33. HTTPBackupAgent and backup client
33.1. Introduction
33.2. HTTPBackupAgent
33.2.1. HTTPBackupAgent methods
33.2.2. HTTPBackupAgent Configuration
33.3. Backup Client
33.4. Backup Client Usage
33.4.1. Building application
33.4.2. Running application
33.4.3. Getting information about backup service
33.4.4. Starting full backup
33.4.5. Starting full and incremental backup on a single workspace
33.4.6. Getting information about the current backups (in progress)
33.4.7. Getting information about the current backup by 'backup_id'
33.4.8. Stopping backup by "backup_id"
33.4.9. Getting information about the completed (ready to restore) backups
33.4.10. Restoring to workspace
33.4.11. Getting information about the current restore
33.4.12. Restoring workspace and remove exists workspace
33.4.13. Restoring workspace from backup set
33.4.14. Restoring workspace from backup set and remove exists workspace
33.4.15. Restoring workspace with original configuation
33.4.16. Restoring workspace with original configuation and remove exists workspace
33.4.17. Restoring workspace from backup set with original configuation
33.4.18. Restoring workspace from backup set with original configuation and remove exists workspace
33.4.19. Restoring repository
33.4.20. Restoring repository and remove exists repository
33.4.21. Restoring repository from backup set
33.4.22. Restoring repository from backup set and remove exists repository
33.4.23. Restoring repository with original configuation
33.4.24. Restoring repository with original configuation and remove exists repository
33.4.25. Restoring repository from backup set with original configuation
33.4.26. Restoring repository from backup set with original configuation and remove exists repository
33.5. Full example about creating backup and restoring it for workspace 'backup'
33.5.1. Creating backup
33.5.2. Getting information about current backups
33.5.3. Stopping backup by id
33.5.4. Deleting the workspace "backup" and close opened sessions on this workspace
33.5.5. Restoring the workspace "backup"
33.5.6. Getting information about restore for workspace /repository/backup
33.6. Full example about creating backup and restoring it for repository 'repository'
33.6.1. Creating backup
33.6.2. Getting information about current backups
33.6.3. Stopping backup by id
33.6.4. Deleting the repository "repository" and close all opened sessions
33.6.5. Restoring the repository "repository"
33.6.6. Getting information about restore for repository 'repository'
34. Searching index backup
34.1. Manual backup (file copy)
34.2. Consistency Requirements
34.3. JCR Backup Service
35. eXo JCR statistics
35.1. Statistics on the Database Access Layer
35.2. Statistics on the JCR API accesses
35.3. Statistics Manager
36. Access Control
36.1. Standard Action Permissions
36.2. eXo Access Control
36.2.1. Principal and Identity
36.2.2. ACL
36.2.3. Notes
36.2.4. Example
36.2.5. Java API
37. Access Control Extension
37.1. Prerequisites
37.2. Overview
37.3. Access Context Action
37.4. The Invocation Context
37.5. Custom Extended Access Manager
37.6. Example of a custom Access Manager
38. Link Producer Service
39. Binary Values Processing
39.1. Configuration
39.2. Usage
39.3. Value implementations
40. JCR Resources:
41. JCR Workspace Data Container (architecture contract)
41.1. Goals
41.2. Concepts
41.2.1. Container and connection
41.2.2. Value storages
41.2.3. Lifecycle
41.2.4. Value storage lifecycle
41.3. Requirements
41.3.1. Read operations
41.3.2. Write operations
41.3.3. State operations
41.3.4. Validation of write operations
41.3.5. Consistency of save
41.4. Value storages API
41.4.1. Storages provider:
41.4.2. Value storage plugin
41.4.3. Value I/O channel
41.4.4. Transaction support via channel
42. How-to implement Workspace Data Container
42.1. Short intro about Workspace data container implementation practices:
42.2. Notes on Value storage usage:
43. JCR Performance Tuning Guide
43.1. Introduction
43.2. JCR Performance and Scalability
43.2.1. Cluster configuration
43.2.2. JCR Clustered Performance
43.3. Performance Tuning Guide
43.3.1. JBoss AS Tuning
43.3.2. JCR Cache Tuning
43.3.3. Clustering
II. eXoKernel
44. eXo Kernel
44.1. eXo Kernel introduction
45. ExoContainer info
45.1. Container hierarchy
46. Service Configuration for Beginners
46.1. Objective
46.2. Requirements
46.3. Services
46.4. Configuration File
46.5. Execution Modes
46.6. Containers
46.7. Configuration Retrieval
46.7.1. RootContainer
46.7.2. PortalContainer
46.7.3. StandaloneContainer
46.8. Service instantiation
46.9. Miscellaneous
46.9.1. Startable interface
46.9.2. Inversion of Control
46.9.3. More Containers
46.9.4. Single Implementation Services
46.9.5. Configuration properties
46.9.6. Configuration Logging
46.10. Further Reading
47. Service Configuration in Detail
47.1. Objectives
47.2. Requirements
47.3. Sample Service
47.3.1. Java Class
47.3.2. First configuration file
47.3.3. Init Parameters
47.3.4. Service Access
47.4. Parameters
47.4.1. Value-Param
47.4.2. Properties-Param
47.4.3. Object-Param
47.4.4. Collection
47.5. External Plugin
47.6. Import
47.7. System properties
48. Container Configuration
48.1. Intro
48.2. Kernel configuration namespace
48.3. Understanding how configuration files are loaded
48.3.1. Configuration Retrieval
48.3.2. Advanced concepts for the PortalContainers
48.4. System property configuration
48.4.1. Properties init param
48.4.2. Properties URL init param
48.4.3. System Property configuration of the properties URL
48.5. Runtime configuration profiles
48.5.1. Profiles activation
48.5.2. Profiles configuration
48.6. Component request life cycle
48.6.1. Component request life cycle contract
48.6.2. Request life cycle
48.6.3. When request life cycle is triggered
49. Inversion Of Control
49.1. Overview
49.2. How
49.3. Injection
49.4. Side effects
50. Services Wiring
50.1. Overview
50.2. Portal Instance
50.3. Introduction to the XML schema of the configuration.xml file
50.4. Configuration retrieval and log of this retrieval
51. Component Plugin Priority
52. Understanding the ListenerService
52.1. Objectives
52.2. What is the ListenerService ?
52.3. How does it work?
52.3.1. Registering a listener
52.3.2. Triggering an event
52.4. How to configure a listener?
52.5. Concrete Example
53. Initial Context Binder service
53.1. API
53.2. Configuration
54. Job Scheduler Service
54.1. What is Job Scheduler?
54.2. Where is Job Scheduler Service used in eXo Products?
54.3. How does Job Scheduler work?
54.3.1. How can Job Scheduler Service be used in Kernel?
54.3.2. Samples
54.4. Reference
55. eXo Cache
55.1. Basic concepts
55.2. eXo Cache extension
55.3. eXo Cache based on JBoss Cache
55.3.1. Configuring the ExoCacheFactory
55.3.2. Adding specific configuration for a cache
55.3.3. Adding a cache creator
55.3.4. Defining a cache
56. TransactionService
56.1. Base information
57. JNDI naming
57.1. Prerequisites
57.2. How it works
57.2.1. JNDI System property initialization
57.2.2. JNDI reference binding
57.3. Configuration examples
57.4. Recommendations for Application Developers
57.5. InitialContextInitializer API
58. Logs configuration
58.1. Introdution
58.2. Logs configuration initializer
58.3. Configuration examples
58.3.1. Log4J
58.3.2. JDK Logging
58.3.3. Commons Logging SimpleLogss
58.4. Tips and Troubleshooting
58.4.1. JBoss tips
58.4.2. Other tips
59. Manageability
59.1. Introduction
59.2. Managed framework API
59.2.1. Annotations
59.3. JMX Management View
59.3.1. JMX Annotations
59.4. Example
59.4.1. CacheService example
III. eXoCore
60. eXo Core
60.1. eXo Core introduction
61. Database Creator
61.1. About
61.2. API
61.3. A configuration examples
61.4. An examples of a DDL script
62. Security Service
62.1. 1 Overview
62.2. 1 Framework
62.2.1. 1.1 ConversationState and ConversationRegistry
62.2.2. 1.1 Authenticator
62.3. Usage
62.3.1. JAAS login module
62.3.2. 1.1 Predefinded JAAS login modules
62.3.3. 1.1 J2EE container authentication
63. Spring Security Integration
63.1. Introduction
63.2. Installation
63.3. Configuration
63.3.1. JAAS disabling
63.3.2. Enabling spring security
63.3.3. security-context.xml
63.4. Login portlet example
63.4.1. Building the portlet
63.4.2. Setting up the login portal page
63.4.3. Customization of portal login and logout urls
63.4.4. A look at the login page
63.5. Integration strategies
63.5.1. Replication
63.6. Integration with eXo portal
63.7. Security context propagation to portlets
63.7.1. Portal side filter
63.7.2. Portlet side filter
63.8. Conclusion
64. Organization Service
64.1. Overview
64.2. Organizational Model
64.2.1. User
64.2.2. Group
64.2.3. Membership
64.3. Related articles and how-tos
65. Organization Service Initializer
66. Organization Listener
66.1. Overview
66.2. Writing your own listeners
66.2.1. UserEventListener
66.2.2. GroupEventListener
66.2.3. MembershipEventListener
66.3. Registering your listeners
67. Update ConversationState when user's Membership changed
68. DB Schema creator service (JDBC implementation)
69. Database Configuration for Hibernate
69.1. Generic configuration
69.2. Example DB configuration
69.3. Registering custom Hibernate XML files into the service
70. LDAP Configuration
70.1. Overview
70.2. Quickstart
70.3. Configuration
70.3.1. Connection Settings
70.3.2. Organization Service Configuration
70.4. Advanced topics
70.4.1. Automatic directory population
70.4.2. Active Directory sample configuration
70.4.3. OpenLDAP dynlist overlays
IV. eXoWS
71. eXo Web Services
71.1. eXo Web Services introduction
72. Introduction to the Representational State Transfer (REST)
72.1. Introduction
73. RestServicesList Service
73.1. Overview.
73.2. Usage
73.2.1. HTML format
73.2.2. JSON format
74. Groovy Scripts as REST Services
74.1. Overview
74.2. Loading script and save it in JCR
74.3. Instantiation
74.4. Deploying newly created Class as RESTful service
74.5. Script Lifecycle Management
74.6. Getting node UUID example
74.7. Groovy script restrictions
75. Framework for cross-domain AJAX
75.1. Motivation
75.2. Scheme (how it works)
75.3. A Working Sequence:
75.4. How to use it
V. Frequently Asked Question
76. JCR FAQ
76.1. Kernel
76.1.1. What is the best, standardized way to get the instance of a service ?
76.2. JCR
76.2.1. JCR core
76.2.2. JCR extensions
76.2.3. WebDAV
VI. eXo JCR with GateIn
77. How to extend my GateIn instance?
77.1. Introduction
77.1.1. Overview
77.1.2. Motivations
77.2. Prerequisites
77.2.1. Removing all the hard coded portal container name (i.e. "portal")
77.2.2. Removing all the hard coded rest context name (i.e. "rest")
77.2.3. Removing all the hard coded realm name (i.e. "exo-domain")
77.2.4. Making your Http Filters compatible
77.2.5. Making your HttpServlets compatible
77.2.6. Making your HttpSessionListeners compatible
77.2.7. Use init tasks if you need a PortalContainer to initialize an Http Filter or an HttpServlet
77.2.8. Making your LoginModules compatible
77.2.9. Avoiding static modifier on component dependency
77.2.10. Avoid component initialization based on component dependency in the constructor
77.3. FAQ
77.3.1. What has changed since the previous versions?
77.3.2. What is the main purpose of a portal extension?
77.3.3. What is the main purpose of the starter?
77.3.4. How a portal and a portal container are related?
77.3.5. How to define and register a PortalContainerDefinition?
77.3.6. How the platform interprets the dependency order defined into the PortalContainerDefinition?
77.3.7. How to change the ServletContext name, the realm name and/or the rest context name of my portal without using a PortalContainerDefinition?
77.3.8. How to add new configuration file to a given portal from a war file?
77.3.9. How to create/define a portal extension?
77.3.10. How to deploy a portal extension?
77.3.11. How to create/define a new portal?
77.3.12. How to deploy a new portal?
77.3.13. How to import properly a configuration file using the prefix "war:"?
77.3.14. How to avoid duplicating configuration files just to rename a simple value?
77.3.15. How to add or change a Repository and/or a Workspace?
77.3.16. How to add new ResourceBundles to my portal?
77.3.17. How to overwrite existing ResourceBundles in my portal?
77.3.18. How to replace a groovy template of my portal?
77.3.19. How to add new Portal Configurations, Navigations, Pages or Portlet Preferences to my portal?
77.3.20. How to add new Http Filters to my portal without modifying the portal binary?
77.3.21. How to add new HttpSessionListeners and/or ServletContextListeners to my portal without modifying the portal binary?
77.3.22. How to add new HttpServlet to my portal without modifying the portal binary?
77.3.23. How to override or add a Context Parameter to my portal without modifying the portal binary?
77.3.24. Where can I found an example of how to extend my portal?
77.3.25. How to deploy the sample extension?
77.3.26. Where can I find an example of how to create a new portal?
77.3.27. How to deploy the sample portal?
77.3.28. I get "java.lang.IllegalStateException: No pre init tasks can be added to the portal container 'portal', because it has already been initialized." what can I do to fix it?
77.4. Recommendations
77.4.1. Don't ship your configuration files with your jar files?
77.4.2. Using a dedicated workspace/repository for your extension?
78. How to use AS Managed DataSource under JBoss AS
78.1. Configurations Steps
78.1.1. Declaring the datasources in the AS
78.1.2. Do not let eXo bind datasources explicitly