Skip to end of metadata
Go to start of metadata

The JBoss Cache repository connector allows a JBoss Cache instance to be used as a ModeShape (and thus JCR) repository. This provides a repository that is an effective, scalable, and distributed cache, and can be federated with other repository sources to provide a distributed repository.

The JBossCacheSource class provides a number of JavaBean properties that control its behavior:

Property Description
cacheConfigurationName Optional property that, if used, specifies the name of the configuration that is supplied to the cache factory when creating a new JBoss Cache instance.
cacheFactoryJndiName Optional property that, if used, specifies the name in JNDI where an existing JBoss Cache Factory instance can be found. That factory would then be used if needed to create a JBoss Cache instance. If no value is provided, then the JBoss Cache DefaultCacheFactory class is used.
cacheJndiName Optional property that, if used, specifies the name in JNDI where an existing JBoss Cache instance can be found. This should be used if your application already defines a cache, or if you need to configure the cache in a special way.
creatingWorkspacesAllowed Optional property that is by default 'true' that defines whether clients can create new workspaces.
defaultCachePolicy Optional property that, if used, defines the default for how long this information provided by this source may to be cached by other, higher-level components. The default value is an empty string (or null) and implies that this source does not define a specific duration for caching information provided by this repository source.
defaultWorkspaceName Optional property that defines the name for the workspace that will be used in cases when clients do not explicitly specify the workspace name. If not specified, "default" will be used.
name Required property that specifies the name of the repository source, which is used by the RepositoryService when obtaining a RepositoryConnection by name.
predefinedWorkspaceNames Optional property that defines the names of the workspaces that exist and that are available for use without having to create them.
rootNodeUuid Optional property that, if used, specifies the UUID that should be used for the root node of each workspace. If no value is specified, a random UUID is generated each time that the repository is started.
retryLimit Optional property that, if used, defines the number of times that any single operation on a RepositoryConnection to this source should be retried following a communication failure. The default value is '0'.
updatesAllowed Optional property that determines whether the content in the connector is can be updated ("true"), or if the content may only be read ("false"). The default value is "true".
uuidPropertyName Optional property that, if used, defines the property that should be used to find the UUID value for each node in the cache. "mode:uuid" is the default.

One way to configure the JBoss Cache connector is to create JcrConfiguration instance with a repository source that uses the JBossCacheSource class. For example:

Another way to configure the JBoss Cache connector is to create JcrConfiguration instance and load an XML configuration file that contains a repository source that uses the JBossCacheSource class. For example a file named configRepository.xml can be created with these contents:

The configuration can then be loaded from Java like this:

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.