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:
13.13. Help application to prohibit the use of closed sessions
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. Multi-database Configuration
17.3. Single-database configuration
17.3.1. Configuration without DataSource
17.3.2. Dynamic Workspace Creation
17.4. Simple and Complex queries
17.5. Forse Query Hints
17.6. 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. Allow to share JBoss Cache instances
22.4. Shipped JBoss Cache configuration templates
22.4.1. Data container template
22.4.2. Lock manager template
22.4.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. Indexing in clustered environment
24.2. Configuration
24.2.1. Query-handler configuration overview
24.2.2. Standalone strategy
24.2.3. Cluster-ready indexing strategies
24.2.4. JBoss-Cache template configuration
25. JBossTransactionsService
25.1. Introduction
25.2. Configuration
26. TransactionManagerLookup
26.1. Configuration
27. RepositoryCreationService
27.1. Intro
27.2. Dependencies
27.3. How it works
27.4. Configuration
27.5. Repsitory Interface
27.6. Conclusions and restrictions
28. JCR Query Usecases
28.1. Intro
28.2. Query Lifecycle
28.2.1. Query Creation and Execution
28.2.2. Query Result Processing
28.2.3. Scoring
28.3. Query result settings
28.4. Type Constraints
28.5. Property Constraints
28.6. Path Constraint
28.7. Ordering specifing
28.8. Fulltext Search
28.9. Indexing rules and additional features
28.10. Query Examples
28.10.1. SetOffset and SetLimit
28.10.2. Finding All Nodes
28.10.3. Finding Nodes by Primary Type
28.10.4. Finding Nodes by Mixin Type
28.10.5. Property Comparison
28.10.6. LIKE Constraint
28.10.7. Escaping in LIKE Statements
28.10.8. NOT Constraint
28.10.9. AND Constraint
28.10.10. OR Constraint
28.10.11. Property Existence Constraint
28.10.12. Finding Nodes in a Case-Insensitive Way
28.10.13. Date Property Comparison
28.10.14. Node Name Constraint
28.10.15. Multivalue Property Comparison
28.10.16. Exact Path Constraint
28.10.17. Child Node Constraint
28.10.18. Finding All Descendant Nodes
28.10.19. Sorting Nodes by Property
28.10.20. Ordering by Descendant Nodes Property (XPath only)
28.10.21. Ordering by Score
28.10.22. Ordering by Path or Name
28.10.23. Fulltext Search by Property
28.10.24. Fulltext Search by All Properties in Node
28.10.25. Ignoring Accent Symbols. New Analyzer Setting.
28.10.26. Finding nt:file node by content of child jcr:content node
28.10.27. Changing Priority of Node
28.10.28. Removing Nodes Property From Indexing Scope
28.10.29. Regular Expression as Property Name in Indexing Rules
28.10.30. High-lighting Result of Fulltext Search
28.10.31. Searching By Synonim
28.10.32. Checking the spelling of Phrase
28.10.33. Finding Similar Nodes
28.11. Tips and tricks
28.11.1. XPath queries containing node names starting with a number
29. Searching Repository Content
29.1. Introduction
29.2. Bi-directional RangeIterator (since 1.9)
29.3. Fuzzy Searches (since 1.0)
29.4. SynonymSearch (since 1.9)
29.5. High-lighting (Since 1.9)
29.5.1. DefaultXMLExcerpt
29.5.2. DefaultHTMLExcerpt
29.5.3. How to use it
29.6. SpellChecker
29.6.1. How do I use it?
29.7. Similarity (Since 1.12)
30. Fulltext Search And Affecting Settings
30.1. Property content indexing
30.2. Lucene Analyzers
30.3. How are different properties indexed?
30.4. Fulltext search query examples
30.5. Different analyzers in action
31. WebDAV
31.1. Related documents
31.2. Introduction
31.3. Configuration
31.4. Screenshots
31.4.1. MS Internet Explorer
31.4.2. Dav Explorer
31.4.3. Xythos Drive
31.4.4. Microsoft Office 2003
31.4.5. Ubuntu Linux
31.5. Comparison table of WebDav and JCR commands
31.6. Restrictions
31.6.1. Windows 7
31.6.2. Microsoft Office 2010
32. FTP
32.1. Introdution
32.2. Configuration Parameters
32.2.1. command-port:
32.2.2. data-min-port & data-max-port
32.2.3. system
32.2.4. client-side-encoding
32.2.5. def-folder-node-type
32.2.6. def-file-node-type
32.2.7. def-file-mime-type
32.2.8. cache-folder-name
32.2.9. upload-speed-limit
32.2.10. download-speed-limit
32.2.11. timeout
33. eXo JCR Backup Service
33.1. Concept
33.2. How it works
33.2.1. Implementation details
33.2.2. Work basics
33.3. Configuration
33.4. Usage
33.4.1. Performing a Backup
33.4.2. Performing a Restore
33.4.3. Repository and Workspace initialization from backup
33.5. Scheduling (experimental)
33.6. Restore existing workspace or repository
33.7. Restore a workspace or a repository using original configuration
33.8. Backup set portability
33.9. RDBMS backup
34. HTTPBackupAgent and backup client
34.1. Introduction
34.2. HTTPBackupAgent
34.2.1. HTTPBackupAgent methods
34.2.2. HTTPBackupAgent Configuration
34.3. Backup Client
34.4. Backup Client Usage
34.4.1. Building application
34.4.2. Running application
34.4.3. Getting information about backup service
34.4.4. Starting full backup
34.4.5. Starting full and incremental backup on a single workspace
34.4.6. Getting information about the current backups (in progress)
34.4.7. Getting information about the current backup by 'backup_id'
34.4.8. Stopping backup by "backup_id"
34.4.9. Getting information about the completed (ready to restore) backups
34.4.10. Restoring to workspace
34.4.11. Getting information about the current restore
34.4.12. Restoring workspace and remove exists workspace
34.4.13. Restoring workspace from backup set
34.4.14. Restoring workspace from backup set and remove exists workspace
34.4.15. Restoring workspace with original configuation
34.4.16. Restoring workspace with original configuation and remove exists workspace
34.4.17. Restoring workspace from backup set with original configuation
34.4.18. Restoring workspace from backup set with original configuation and remove exists workspace
34.4.19. Restoring repository
34.4.20. Restoring repository and remove exists repository
34.4.21. Restoring repository from backup set
34.4.22. Restoring repository from backup set and remove exists repository
34.4.23. Restoring repository with original configuation
34.4.24. Restoring repository with original configuation and remove exists repository
34.4.25. Restoring repository from backup set with original configuation
34.4.26. Restoring repository from backup set with original configuation and remove exists repository
34.5. Full example about creating backup and restoring it for workspace 'backup'
34.5.1. Creating backup
34.5.2. Getting information about current backups
34.5.3. Stopping backup by id
34.5.4. Deleting the workspace "backup" and close opened sessions on this workspace
34.5.5. Restoring the workspace "backup"
34.5.6. Getting information about restore for workspace /repository/backup
34.6. Full example about creating backup and restoring it for repository 'repository'
34.6.1. Creating backup
34.6.2. Getting information about current backups
34.6.3. Stopping backup by id
34.6.4. Deleting the repository "repository" and close all opened sessions
34.6.5. Restoring the repository "repository"
34.6.6. Getting information about restore for repository 'repository'
35. Use external backup tool
35.1. Repository suspending
35.2. Backup
35.3. Repository resuming
36. eXo JCR statistics
36.1. Statistics on the Database Access Layer
36.2. Statistics on the JCR API accesses
36.3. Statistics Manager
37. Access Control
37.1. Standard Action Permissions
37.2. eXo Access Control
37.2.1. Principal and Identity
37.2.2. ACL
37.2.3. Notes
37.2.4. Example
37.2.5. Java API
38. Access Control Extension
38.1. Prerequisites
38.2. Overview
38.3. Access Context Action
38.4. The Invocation Context
38.5. Custom Extended Access Manager
38.6. Example of a custom Access Manager
39. Link Producer Service
40. Binary Values Processing
40.1. Configuration
40.2. Usage
40.3. Value implementations
41. JCR Resources:
42. JCR Workspace Data Container (architecture contract)
42.1. Goals
42.2. Concepts
42.2.1. Container and connection
42.2.2. Value storages
42.2.3. Lifecycle
42.2.4. Value storage lifecycle
42.3. Requirements
42.3.1. Read operations
42.3.2. Write operations
42.3.3. State operations
42.3.4. Validation of write operations
42.3.5. Consistency of save
42.4. Value storages API
42.4.1. Storages provider:
42.4.2. Value storage plugin
42.4.3. Value I/O channel
42.4.4. Transaction support via channel
43. How-to implement Workspace Data Container
43.1. Short intro about Workspace data container implementation practices:
43.2. Notes on Value storage usage:
44. DBCleanService
44.1. API
45. JCR Performance Tuning Guide
45.1. Introduction
45.2. JCR Performance and Scalability
45.2.1. Cluster configuration
45.2.2. JCR Clustered Performance
45.3. Performance Tuning Guide
45.3.1. JBoss AS Tuning
45.3.2. JCR Cache Tuning
45.3.3. Clustering
II. eXoKernel
46. eXo Kernel
46.1. eXo Kernel introduction
47. ExoContainer info
47.1. Container hierarchy
48. Service Configuration for Beginners
48.1. Objective
48.2. Requirements
48.3. Services
48.4. Configuration File
48.5. Execution Modes
48.6. Containers
48.7. Configuration Retrieval
48.7.1. RootContainer
48.7.2. PortalContainer
48.7.3. StandaloneContainer
48.8. Service instantiation
48.9. Miscellaneous
48.9.1. Startable interface
48.9.2. Inversion of Control
48.9.3. More Containers
48.9.4. Single Implementation Services
48.9.5. Configuration properties
48.9.6. Configuration Logging
48.10. Further Reading
49. Service Configuration in Detail
49.1. Objectives
49.2. Requirements
49.3. Sample Service
49.3.1. Java Class
49.3.2. First configuration file
49.3.3. Init Parameters
49.3.4. Service Access
49.4. Parameters
49.4.1. Value-Param
49.4.2. Properties-Param
49.4.3. Object-Param
49.4.4. Collection
49.5. External Plugin
49.6. Import
49.7. System properties
50. Container Configuration
50.1. Intro
50.2. Kernel configuration namespace
50.3. Understanding how configuration files are loaded
50.3.1. Configuration Retrieval
50.3.2. Advanced concepts for the PortalContainers
50.4. System property configuration
50.4.1. Properties init param
50.4.2. Properties URL init param
50.4.3. System Property configuration of the properties URL
50.5. Variable Syntaxes
50.6. Runtime configuration profiles
50.6.1. Profiles activation
50.6.2. Profiles configuration
50.7. Component request life cycle
50.7.1. Component request life cycle contract
50.7.2. Request life cycle
50.7.3. When request life cycle is triggered
51. Inversion Of Control
51.1. Overview
51.2. How
51.3. Injection
51.4. Side effects
52. Services Wiring
52.1. Overview
52.2. Portal Instance
52.3. Introduction to the XML schema of the configuration.xml file
52.4. Configuration retrieval and log of this retrieval
53. Component Plugin Priority
54. Understanding the ListenerService
54.1. Objectives
54.2. What is the ListenerService ?
54.3. How does it work?
54.3.1. Registering a listener
54.3.2. Triggering an event
54.4. How to configure a listener?
54.5. Concrete Example
55. Initial Context Binder
55.1. API
56. Job Scheduler Service
56.1. What is Job Scheduler?
56.2. Where is Job Scheduler Service used in eXo Products?
56.3. How does Job Scheduler work?
56.3.1. How can Job Scheduler Service be used in Kernel?
56.3.2. Samples
56.4. Reference
57. eXo Cache
57.1. Basic concepts
57.2. eXo Cache extension
57.3. eXo Cache based on JBoss Cache
57.3.1. Configuring the ExoCacheFactory
57.3.2. Adding specific configuration for a cache
57.3.3. Adding a cache creator
57.3.4. Defining a cache
57.4. eXo Cache based on Infinispan
57.4.1. Configure the ExoCacheFactory
57.4.2. Add specific configuration for a cache
57.4.3. Add a cache creator
57.4.4. Define an infinispan cache instance
58. TransactionService
58.1. Base information
59. JNDI naming
59.1. Prerequisites
59.2. How it works
59.2.1. JNDI System property initialization
59.2.2. JNDI reference binding
59.3. Configuration examples
59.4. Recommendations for Application Developers
59.5. InitialContextInitializer API
60. Logs configuration
60.1. Introdution
60.2. Logs configuration initializer
60.3. Configuration examples
60.3.1. Log4J
60.3.2. JDK Logging
60.3.3. Commons Logging SimpleLogss
60.4. Tips and Troubleshooting
60.4.1. JBoss tips
60.4.2. Other tips
61. Manageability
61.1. Introduction
61.2. Managed framework API
61.2.1. Annotations
61.3. JMX Management View
61.3.1. JMX Annotations
61.4. Example
61.4.1. CacheService example
62. ListenerService
62.1. Asynchronous Event Broadcast
63. RPC Service
63.1. Description
63.2. Configuration
63.3. The SingleMethodCallCommand
III. eXoCore
64. eXo Core
64.1. eXo Core introduction
65. Database Creator
65.1. About
65.2. API
65.3. A configuration examples
65.4. An examples of a DDL script
66. Security Service
66.1. 1 Overview
66.2. 1 Framework
66.2.1. 1.1 ConversationState and ConversationRegistry
66.2.2. 1.1 Authenticator
66.3. Usage
66.3.1. JAAS login module
66.3.2. 1.1 Predefinded JAAS login modules
66.3.3. 1.1 J2EE container authentication
67. Spring Security Integration
67.1. Introduction
67.2. Installation
67.3. Configuration
67.3.1. JAAS disabling
67.3.2. Enabling spring security
67.3.3. security-context.xml
67.4. Login portlet example
67.4.1. Building the portlet
67.4.2. Setting up the login portal page
67.4.3. Customization of portal login and logout urls
67.4.4. A look at the login page
67.5. Integration strategies
67.5.1. Replication
67.6. Integration with eXo portal
67.7. Security context propagation to portlets
67.7.1. Portal side filter
67.7.2. Portlet side filter
67.8. Conclusion
68. Organization Service
68.1. Overview
68.2. Organizational Model
68.2.1. User
68.2.2. Group
68.2.3. Membership
68.3. Related articles and how-tos
69. Organization Service Initializer
70. Organization Listener
70.1. Overview
70.2. Writing your own listeners
70.2.1. UserEventListener
70.2.2. GroupEventListener
70.2.3. MembershipEventListener
70.3. Registering your listeners
71. Update ConversationState when user's Membership changed
72. DB Schema creator service (JDBC implementation)
73. Database Configuration for Hibernate
73.1. Generic configuration
73.2. Example DB configuration
73.3. Registering custom Hibernate XML files into the service
74. LDAP Configuration
74.1. Overview
74.2. Quickstart
74.3. Configuration
74.3.1. Connection Settings
74.3.2. Organization Service Configuration
74.4. Advanced topics
74.4.1. Automatic directory population
74.4.2. Active Directory sample configuration
74.4.3. OpenLDAP dynlist overlays
75. Tika Document Reader Service
75.1. Intro
75.2. Architecture
75.3. Configuration
75.4. Old-style DocumentReaders and Tika Parsers
75.4.1. How to make and register own DocumentReader
75.5. TikaDocumentReader features and notes
76. Digest Authentication
76.1. Overview
76.2. Server configuration
76.2.1. Tomcat Server configuration
76.2.2. Jetty server configuration
76.2.3. JBoss server configuration
76.3. OrganizationService implementation requirements
IV. eXoWS
77. eXo Web Services
77.1. eXo Web Services introduction
78. Introduction to the Representational State Transfer (REST)
78.1. Introduction
79. OverwriteDefaultProviders
79.1. Motivation
79.2. Usage
79.3. Example
80. RestServicesList Service
80.1. Overview.
80.2. Usage
80.2.1. HTML format
80.2.2. JSON format
81. Groovy Scripts as REST Services
81.1. Overview
81.2. Loading script and save it in JCR
81.3. Instantiation
81.4. Deploying newly created Class as RESTful service
81.5. Script Lifecycle Management
81.6. Getting node UUID example
81.7. Groovy script restrictions
82. Framework for cross-domain AJAX
82.1. Motivation
82.2. Scheme (how it works)
82.3. A Working Sequence:
82.4. How to use it
V. Frequently Asked Question
83. JCR FAQ
83.1. Kernel
83.1.1. What is the best, standardized way to get the instance of a service ?
83.2. JCR
83.2.1. JCR core
83.2.2. JCR extensions
83.2.3. WebDAV
VI. eXo JCR with GateIn
84. How to extend my GateIn instance?
84.1. Introduction
84.1.1. Overview
84.1.2. Motivations
84.2. Prerequisites
84.2.1. Removing all the hard coded portal container name (i.e. "portal")
84.2.2. Removing all the hard coded rest context name (i.e. "rest")
84.2.3. Removing all the hard coded realm name (i.e. "exo-domain")
84.2.4. Making your Http Filters compatible
84.2.5. Making your HttpServlets compatible
84.2.6. Making your HttpSessionListeners compatible
84.2.7. Use init tasks if you need a PortalContainer to initialize an Http Filter or an HttpServlet
84.2.8. Making your LoginModules compatible
84.2.9. Avoiding static modifier on component dependency
84.2.10. Avoid component initialization based on component dependency in the constructor
84.3. FAQ
84.3.1. What has changed since the previous versions?
84.3.2. What is the main purpose of a portal extension?
84.3.3. What is the main purpose of the starter?
84.3.4. How a portal and a portal container are related?
84.3.5. How to define and register a PortalContainerDefinition?
84.3.6. How the platform interprets the dependency order defined into the PortalContainerDefinition?
84.3.7. How to change the ServletContext name, the realm name and/or the rest context name of my portal without using a PortalContainerDefinition?
84.3.8. How to add new configuration file to a given portal from a war file?
84.3.9. How to create/define a portal extension?
84.3.10. How to deploy a portal extension?
84.3.11. How to create/define a new portal?
84.3.12. How to deploy a new portal?
84.3.13. How to import properly a configuration file using the prefix "war:"?
84.3.14. How to avoid duplicating configuration files just to rename a simple value?
84.3.15. How to add or change a Repository and/or a Workspace?
84.3.16. How to add new ResourceBundles to my portal?
84.3.17. How to overwrite existing ResourceBundles in my portal?
84.3.18. How to replace a groovy template of my portal?
84.3.19. How to add new Portal Configurations, Navigations, Pages or Portlet Preferences to my portal?
84.3.20. How to add new Http Filters to my portal without modifying the portal binary?
84.3.21. How to add new HttpSessionListeners and/or ServletContextListeners to my portal without modifying the portal binary?
84.3.22. How to add new HttpServlet to my portal without modifying the portal binary?
84.3.23. How to override or add a Context Parameter to my portal without modifying the portal binary?
84.3.24. Where can I found an example of how to extend my portal?
84.3.25. How to deploy the sample extension?
84.3.26. Where can I find an example of how to create a new portal?
84.3.27. How to deploy the sample portal?
84.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?
84.4. Recommendations
84.4.1. Don't ship your configuration files with your jar files?
84.4.2. Using a dedicated workspace/repository for your extension?
85. How to use AS Managed DataSource under JBoss AS
85.1. Configurations Steps
85.1.1. Declaring the datasources in the AS
85.1.2. Do not let eXo bind datasources explicitly