|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.commons.AbstractRepository
org.apache.jackrabbit.core.jndi.BindableRepository
public class BindableRepository
A referenceable and serializable content repository proxy. This class implements the Proxy design pattern (GoF) for the Jackrabbit Repository implementation. The proxy implementation delays the instantiation of the actual Repository instance and implements serialization and JNDI referenceability by keeping track of the repository configuration parameters.
A BindableRepository instance contains the configuration file and home directory paths of a Jackrabbit repository. The separateinit() method is used to create a transient
RepositoryImpl instance to which all the
JCR API calls are delegated.
An instance of this class is normally always also initialized.
The uninitialized state is only used briefly during the static
construction, deserialization, and JNDI "referenciation".
A JVM shutdown hook is used to make sure that the initialized
repository is properly closed when the JVM shuts down. The
RegistryHelper.unregisterRepository(javax.naming.Context, String)
method should be used to explicitly close the repository if
needed.
| Field Summary | |
|---|---|
static java.lang.String |
CONFIGFILEPATH_ADDRTYPE
type of configFilePath reference address |
static java.lang.String |
REPHOMEDIR_ADDRTYPE
type of repHomeDir reference address |
| Fields inherited from interface javax.jcr.Repository |
|---|
LEVEL_1_SUPPORTED, LEVEL_2_SUPPORTED, OPTION_LOCKING_SUPPORTED, OPTION_OBSERVATION_SUPPORTED, OPTION_QUERY_SQL_SUPPORTED, OPTION_TRANSACTIONS_SUPPORTED, OPTION_VERSIONING_SUPPORTED, QUERY_XPATH_DOC_ORDER, QUERY_XPATH_POS_INDEX, REP_NAME_DESC, REP_VENDOR_DESC, REP_VENDOR_URL_DESC, REP_VERSION_DESC, SPEC_NAME_DESC, SPEC_VERSION_DESC |
| Constructor Summary | |
|---|---|
BindableRepository(javax.naming.Reference reference)
Creates a BindableRepository instance with the configuration information in the given JNDI reference. |
|
| Method Summary | |
|---|---|
protected JackrabbitRepository |
createRepository()
Creates a repository instance based on the contained JNDI reference. |
java.lang.String |
getDescriptor(java.lang.String key)
Delegated to the underlying repository instance. |
java.lang.String[] |
getDescriptorKeys()
Delegated to the underlying repository instance. |
javax.naming.Reference |
getReference()
Returns the JNDI reference for this content repository. |
protected JackrabbitRepository |
getRepository()
Returns the underlying repository instance. |
javax.jcr.Session |
login(javax.jcr.Credentials credentials,
java.lang.String workspaceName)
Delegated to the underlying repository instance. |
void |
shutdown()
Delegated to the underlying repository instance. |
| Methods inherited from class org.apache.jackrabbit.commons.AbstractRepository |
|---|
login, login, login |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jcr.Repository |
|---|
login, login, login |
| Field Detail |
|---|
public static final java.lang.String CONFIGFILEPATH_ADDRTYPE
configFilePath reference address
Reference.get(String),
Constant Field Valuespublic static final java.lang.String REPHOMEDIR_ADDRTYPE
repHomeDir reference address
Reference.get(String),
Constant Field Values| Constructor Detail |
|---|
public BindableRepository(javax.naming.Reference reference)
throws javax.jcr.RepositoryException
reference - JNDI reference
javax.jcr.RepositoryException - if the repository can not be started| Method Detail |
|---|
protected JackrabbitRepository createRepository()
throws javax.jcr.RepositoryException
getReference() method. The default implementation
returns a RepositoryImpl instance.
javax.jcr.RepositoryException - if the repository could not be createdprotected JackrabbitRepository getRepository()
public javax.jcr.Session login(javax.jcr.Credentials credentials,
java.lang.String workspaceName)
throws javax.jcr.LoginException,
javax.jcr.NoSuchWorkspaceException,
javax.jcr.RepositoryException
login in interface javax.jcr.Repositoryjavax.jcr.LoginException
javax.jcr.NoSuchWorkspaceException
javax.jcr.RepositoryExceptionpublic java.lang.String getDescriptor(java.lang.String key)
getDescriptor in interface javax.jcr.Repositorypublic java.lang.String[] getDescriptorKeys()
getDescriptorKeys in interface javax.jcr.Repositorypublic javax.naming.Reference getReference()
getReference in interface javax.naming.Referenceablepublic void shutdown()
shutdown in interface JackrabbitRepository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||