oracle.jcr.xdb

## Class JDBCConnectionCredentials

- java.lang.Object
- - oracle.jcr.xdb.JDBCConnectionCredentials

All Implemented Interfaces:
  java.io.Serializable, Credentials

    public class JDBCConnectionCredentials
    extends java.lang.Object
    implements Credentials

JDBCConnectionCredentials allows creation of a JCR session based on the user identity of an existing JDBC connection.

The JCR session created from the JDBC connection will use that JDBC connection to access the XML DB repository.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`JDBCConnectionCredentials(java.sql.Connection connection)` Constructs a JDBCConnectionCredentials.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.sql.Connection` `getConnection()` Returns the JDBC connection.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### JDBCConnectionCredentials

    public JDBCConnectionCredentials(java.sql.Connection connection)
                              throws RepositoryException

Constructs a JDBCConnectionCredentials.

Parameters:
  `connection` - the connection; required; must not have been closed; must not auto-commit
Throws:
  `RepositoryException` - if the operation fails

### Method Detail

#### getConnection

    public java.sql.Connection getConnection()

Returns the JDBC connection.

Returns:
  the connection

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