Skip navigation links

Oracle® Database XML Java API Reference
12c Release 1 (12.1)

E15981-09


oracle.jcr.xdb
Class XDBRepositoryConfiguration

java.lang.Object
  extended by oracle.jcr.xdb.XDBRepositoryConfiguration

All Implemented Interfaces:
java.io.Serializable, javax.naming.Referenceable, OracleRepositoryConfiguration

public class XDBRepositoryConfiguration
extends java.lang.Object
implements OracleRepositoryConfiguration

XDBRepositoryConfiguration specifies the configuration of an OracleRepository connected to an XML DB repository using the XML DB Content Connector.

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.

See Also:
Serialized Form

Field Summary
static byte TRANSACTIONMODE_EXPLICIT
          Explicit transaction mode.
static byte TRANSACTIONMODE_IMPLICIT
          Implicit transaction mode.

 

Constructor Summary
XDBRepositoryConfiguration()
          Constructs an XDBRepositoryConfiguration.

 

Method Summary
 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()
          

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

TRANSACTIONMODE_IMPLICIT

public static final byte TRANSACTIONMODE_IMPLICIT
Implicit transaction mode.

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.

See Also:
Constant Field Values

TRANSACTIONMODE_EXPLICIT

public static final byte TRANSACTIONMODE_EXPLICIT
Explicit transaction mode.

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.

See Also:
Constant Field Values

Constructor Detail

XDBRepositoryConfiguration

public XDBRepositoryConfiguration()
                           throws RepositoryException
Constructs an XDBRepositoryConfiguration.
Throws:
RepositoryException - if the operation fails

Method Detail

getDescriptorKeys

public java.lang.String[] getDescriptorKeys()
Gets the keys of the descriptors contributed to the OracleRepository by this OracleRepositoryConfiguration.

Thd returned keys may be a subset of those returned by OracleRepository getDescriptorKeys.

Specified by:
getDescriptorKeys in interface OracleRepositoryConfiguration
Returns:
the keys

getDescriptor

public java.lang.String getDescriptor(java.lang.String key)
Gets the value of the specified descriptor key.
Specified by:
getDescriptor in interface OracleRepositoryConfiguration
Parameters:
key - a key in the set returned by getDescriptorKeys
Returns:
the value, or null if the key is not found

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDataSource

public javax.sql.DataSource getDataSource()
Gets the JDBC data source for the XML DB repository.
Returns:
the data source

setDataSource

public void setDataSource(javax.sql.DataSource dataSource)
Sets the JDBC data source for the XML DB repository.
Parameters:
dataSource - the data source; required

getTransactionMode

public byte getTransactionMode()
Gets the transaction mode.
Returns:
the mode, either TRANSACTIONMODE_IMPLICIT (default) or TRANSACTIONMODE_EXPLICIT

setTransactionMode

public void setTransactionMode(byte mode)
Sets the transaction mode.

Changes to the transaction mode apply to all sessions created by the Repository, both existing and subsequently created.

Parameters:
mode - the mode, either TRANSACTIONMODE_IMPLICIT or TRANSACTIONMODE_EXPLICIT

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException

Skip navigation links

Oracle® Database XML Java API Reference
12c Release 1 (12.1)

E15981-09


Copyright © 2003, 2014, Oracle and/or its affiliates. All rights reserved.