Skip navigation links

Oracle® Database XML Java API Reference
11g Release 2 (11.2)

E10769-01


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
protected static XDBRepositoryConfiguration createXDBRepositoryConfiguration(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
          Called by XDBRepositoryConfigurationFactory, constructs an OracleRepositoryConfiguration from the specified JNDI reference.
 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.
protected  java.lang.Object getXDBRepositoryConfigurationState()
          Gets the internal state of this XDBRepositoryConfiguration.
 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
clone, equals, finalize, 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

createXDBRepositoryConfiguration

protected static XDBRepositoryConfiguration createXDBRepositoryConfiguration(java.lang.Object obj,
                                                                             javax.naming.Name name,
                                                                             javax.naming.Context nameCtx,
                                                                             java.util.Hashtable environment)
                                                                      throws java.lang.Exception
Called by XDBRepositoryConfigurationFactory, constructs an OracleRepositoryConfiguration from the specified JNDI reference.
Parameters:
obj - the Reference; required
name - the name relative to nameCtx
nameCtx - the context
environment - the environment
Returns:
the repository
Throws:
java.lang.Exception - if the operation fails

getXDBRepositoryConfigurationState

protected java.lang.Object getXDBRepositoryConfigurationState()
Gets the internal state of this XDBRepositoryConfiguration.
Returns:
the state

Skip navigation links

Oracle® Database XML Java API Reference
11g Release 2 (11.2)

E10769-01


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