skip to main content
Using the driver : Reauthentication
  

Try DataDirect Drivers Now

Reauthentication

The Oracle driver supports reauthentication for Oracle 8.1.6 and higher. The user performing the switch must have been granted the database permission CONNECT THROUGH.
You can configure a connection pool to provide scalability for connections. In addition, to help minimize the number of connections required in a connection pool, you can switch the user associated with a connection to another user, a process known as reauthentication.
For example, suppose you are using Kerberos authentication to authenticate users using their operating system user name and password. To reduce the number of connections that must be created and managed, you can use reauthentication to switch the user associated with a connection to multiple users. For example, suppose your connection pool contains a connection, Conn, which was established by the user ALLUSERS. That connection can service multiple users (User A, B, and C) by switching the user associated with the connection Conn to User A, B, and C.
Note: Before performing reauthentication, applications must ensure that any statements or result sets created as one user are closed before switching the connection to another user.
Your application can use the setCurrentUser() method in the ExtConnection interface to switch a user on a connection. Optionally, the setCurrentUser() method accepts driver-specific reauthentication options; however, no options are supported for the Oracle driver. Refer to "JDBC Extensions" for more information about the setCurrentUser() method.