public class XDBRepositoryConfiguration extends java.lang.Object implements OracleRepositoryConfiguration
An XDBRepositoryConfiguration object is contained by a Repository object. When you deploy a JCR application, you can configure the Repository object and its contained XDBRepositoryConfiguration object for the application, then store the Repository object in a JNDI directory for retrieval at runtime.
The XDBRepositoryConfiguration object also records JCR's namespace registry and the list of XML schemas registered for use in JCR. This configuration data is updated using the methods of OracleNamespaceRegistry and OracleNodeTypeManager. Changes made using these methods take immediate effect within this Repository object. To make these changes permanent, rebind the Repository object into the JNDI directory.
Modifier and Type | Field and Description |
---|---|
static byte |
TRANSACTIONMODE_EXPLICIT
Explicit transaction mode.
|
static byte |
TRANSACTIONMODE_IMPLICIT
Implicit transaction mode.
|
Constructor and Description |
---|
XDBRepositoryConfiguration()
Constructs an XDBRepositoryConfiguration.
|
Modifier and Type | Method and Description |
---|---|
javax.sql.DataSource |
getDataSource()
Gets the JDBC data source for the XML DB repository.
|
java.lang.String |
getDescriptor(java.lang.String key)
Gets the value of the specified descriptor key.
|
java.lang.String[] |
getDescriptorKeys()
Gets the keys of the descriptors contributed to the OracleRepository by this OracleRepositoryConfiguration.
|
javax.naming.Reference |
getReference() |
byte |
getTransactionMode()
Gets the transaction mode.
|
void |
setDataSource(javax.sql.DataSource dataSource)
Sets the JDBC data source for the XML DB repository.
|
void |
setTransactionMode(byte mode)
Sets the transaction mode.
|
java.lang.String |
toString() |
public static final byte TRANSACTIONMODE_IMPLICIT
In this mode, calls to the save
methods of Item
and Session
and the copy
, clone
, move
, restore
, getImportContentHandler
, and import
methods of Workspace
are implicitly committted. When these methods are invoked, a database savepoint is created and the changes are applied to the database. If all changes succeed, the transaction is committed. If any change fails, the transaction is rolled back to the savepoint.
This is the default transaction mode.
public static final byte TRANSACTIONMODE_EXPLICIT
In this mode, calls to the save
methods of Item
and Session
and the copy
, clone
, move
, restore
, getImportContentHandler
, and import
methods of Workspace
must be explicitly committed. When these methods are invoked, a database savepoint is created and the changes posted to the database. If all changes succeed, the savepoint is released without committing the transaction. If any change fails, the transaction is rolled back to the savepoint.
The application (or J2EE container) is responsible for committing or rolling back the transaction. For local transactions, this can be performed using the commit
and rollback
methods of OracleWorkspace
. If the JCR session was created using JDBCConnectionCredentials
, this can be equivalently performed using the JDBC commit
and rollback
methods.
public XDBRepositoryConfiguration() throws RepositoryException
RepositoryException
- if the operation failspublic java.lang.String[] getDescriptorKeys()
Thd returned keys may be a subset of those returned by OracleRepository getDescriptorKeys
.
getDescriptorKeys
in interface OracleRepositoryConfiguration
public java.lang.String getDescriptor(java.lang.String key)
getDescriptor
in interface OracleRepositoryConfiguration
key
- a key in the set returned by getDescriptorKeys
public java.lang.String toString()
toString
in class java.lang.Object
public javax.sql.DataSource getDataSource()
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
- the data source; requiredpublic byte getTransactionMode()
TRANSACTIONMODE_IMPLICIT
(default) or TRANSACTIONMODE_EXPLICIT
public void setTransactionMode(byte mode)
Changes to the transaction mode apply to all sessions created by the Repository, both existing and subsequently created.
mode
- the mode, either TRANSACTIONMODE_IMPLICIT
or TRANSACTIONMODE_EXPLICIT
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException