Skip to end of metadata
Go to start of metadata

The in-memory repository connector is a simple connector that creates a transient, in-memory repository. This repository is used as a very simple in-memory cache or as a standalone transient repository. This connector works well for a readable and writable repository source with small to moderate sized content that need not be permanently saved.

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

Property Description
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.
jndiName Optional property that, if used, specifies the name in JNDI where an InMemoryRepository instance can be found. This is an advanced property that is infrequently used.
name Required property that specifies the name of the repository source, which is used by the RepositoryService when obtaining a RepositoryConnection by name.
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 new UUID is generated.
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'.

One way to configure the in-memory connector is to create JcrConfiguration instance with a repository source that uses the InMemoryRepositorySource class. For example:

Another way to configure the in-memory connector is to create JcrConfiguration instance and load an XML configuration file that contains a repository source that uses the InMemoryRepositorySource 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.