The repository-template.xml file is packed inside the file crx-explorer_crx.war (indicated by the "explode" character, !, in the path above). As its name indicates, repository-template.xml serves as the template for repository.xml. The file is only used when there is no repository present, in most cases this will be on a fresh CRX install. The repository-template.xml file is unpacked and copied to repository.xml, thus establishing the default configuration for the new CRX instance.
Within the repository.xml the <Workspace> section is used as a template when creating new workspaces. Every time a new workspace is created within the repository, the corresponding directory is created at crx-quickstart/repository/workspaces/<workspace-name> and the <Workspace> section of the repository.xml is copied into that directory as the workspace.xml file.
In the following sections, the changes to be made to the CRX configuration are described generically and can be applied to the repository-template.xml file, the repository.xml file or any one of the workspace.xml files.
However, changes made to these files have differing effects depending on what stage of the instance's lifecycle you are in. In general you should keep the following in mind:
- When a change is made, the repository must be restarted to apply that change.
- A change to an existing workspace.xml file will apply only to that particular workspace. Note that changing to an entirely different PM, or making another major alteration such as changing the location of the stored data, will result in the current content being orphaned and made inaccessible from within CRX (the actual data files or database storage will still be intact, but the workspace will not be able to access it). Minor parameter changes can be made without orphaning content.
- A change to the <VersionStorage> section of the repository.xml will apply to the version storage only. As with workspace storage, the results of changing these parameters depend upon the specific PM in use, and the magnitude of the changes.
- Changing the storage location in the <DataStore> section of the repository.xml will orphan the existing data store.
- Similarly, changing the shared path parameter in the <Journal> section will break clustering (See Clustering).
- A change to the <Workspace> section of the repository.xml will not apply to any already existing workspaces (since they are configured in there respective workspace.xml files). It will, however, apply to any subsequently created workspaces.
- In general, changes to persistence managers or data stores should be made before installation of a instance, by altering the repository-template.xml. However, in specialized cases involving migration from one persistence manager to another, changes to repository.xml or workspace.xml may be required (see Migration).