public class OracleRepositoryFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory
An OracleRepository is the entry point to a content repository. Each OracleRepository object encapsulates an OracleRepositoryConfiguration which describes how that OracleRepository operates against the underlying content repository. There is a different OracleRepositoryConfiguration implementation for each type of content repository. For example, an XDBRepositoryConfiguration encapsulates the JDBC OracleDataSource by which an OracleRepository connects to an XML DB repository.
Constructor and Description |
---|
OracleRepositoryFactory()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static OracleRepository |
createOracleRepository()
Creates a default OracleRepository.
|
static OracleRepository |
createOracleRepository(OracleRepositoryConfiguration repositoryConfiguration)
Creates an OracleRepository using the specified OracleRepositoryConfiguration.
|
java.lang.Object |
getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
JNDI factory method to create an object using the location or reference information specified.
|
public static OracleRepository createOracleRepository() throws RepositoryException
This method dynamically constructs an OracleRepositoryConfiguration and uses it to create an OracleRepository. The system property named oracle.jcr.OracleRepositoryConfiguration
must be set to the fully-qualified class name of the OracleRepositoryConfiguration.
The configuration of the selected OracleRepositoryConfiguration implementation may be influenced by additional system properties. For details, refer to the Javadoc of that class. If required, the OracleRepository may be further configured by calling its getRepositoryConfiguration
method to get the OracleRepositoryConfiguration object and then calling the appropriate configuration methods on that OracleRepositoryConfiguration implementation.
RepositoryException
- if the operation failspublic static OracleRepository createOracleRepository(OracleRepositoryConfiguration repositoryConfiguration) throws RepositoryException
repositoryConfiguration
- the repository configuration; requiredRepositoryException
- if the operation failspublic java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment) throws java.lang.Exception
getObjectInstance
in interface javax.naming.spi.ObjectFactory
obj
- an object containing location or reference information that can be used in creating the objectname
- the name of the object relative to nameCtx
, or null if no name is specifiednameCtx
- the context relative to which name
is specified, or null if name
is relative to the default initial contextenvironment
- the environment used in creating the object, or nulljava.lang.Exception
- if the operation fails