public class RegistryHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
registerRepository(Context ctx,
String name,
String configFilePath,
String repHomeDir,
boolean overwrite)
Binds a configured repository to the given JNDI context.
|
static void |
unregisterRepository(Context ctx,
String name)
This method shutdowns a
BindableRepository
instance using the given configuration information, and unbinds
it from the given JNDI context. |
public static void registerRepository(Context ctx, String name, String configFilePath, String repHomeDir, boolean overwrite) throws NamingException, javax.jcr.RepositoryException
BindableRepository
instance using the given configuration information, and binds
it to the given JNDI context.ctx
- context where the repository should be registered (i.e. bound)name
- the name to register the repository withconfigFilePath
- path to the configuration file of the repositoryrepHomeDir
- repository home directoryoverwrite
- if true
, any existing binding with the given
name will be overwritten; otherwise a NamingException
will
be thrown if the name is already boundjavax.jcr.RepositoryException
- if the repository cannot be createdNamingException
- if the repository cannot be registered in JNDIpublic static void unregisterRepository(Context ctx, String name) throws NamingException
BindableRepository
instance using the given configuration information, and unbinds
it from the given JNDI context.ctx
- context where the repository should be unregistered (i.e. unbound)name
- the name of the repository to unregisterNamingException
- on JNDI errorsCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.