Package com.sun.identity.sm.ldap
Class CTSDataLayer
- java.lang.Object
-
- com.sun.identity.sm.ldap.CTSDataLayer
-
public class CTSDataLayer extends Object
Protected Static Helper Accessor class to Access the protected SMDataLayer. Allows us to securely hack around the accessing a package protected resource.- Author:
- jeff.schenk@forgerock.com
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.forgerock.opendj.ldap.ConnectiongetConnection()Obtain a Connection from the Shared Poolstatic CTSDataLayergetSharedSMDataLayerAccessor()Allow restricted Access by specific Class Caller without using Java Security.voidreleaseConnection(org.forgerock.opendj.ldap.Connection ldapConnection)Release an obtained Connection back to the pool.voidreleaseConnection(org.forgerock.opendj.ldap.Connection ldapConnection, int ldapErrorCode)Release an obtained Connection back to the pool, with a specified return code for clean-up.voidreleaseConnection(org.forgerock.opendj.ldap.Connection ldapConnection, Exception lastLDAPException)Release an obtained Connection back to the pool, with a specified Last LDAP Stack Exception for clean-up.
-
-
-
Method Detail
-
getSharedSMDataLayerAccessor
public static CTSDataLayer getSharedSMDataLayerAccessor()
Allow restricted Access by specific Class Caller without using Java Security.- Returns:
- CTSDataLayer - Wrapper Accessor Class for Shared SM Data Layer Instance.
-
getConnection
public org.forgerock.opendj.ldap.Connection getConnection()
Obtain a Connection from the Shared Pool- Returns:
- LDAPConnection - Obtained from Pool
-
releaseConnection
public void releaseConnection(org.forgerock.opendj.ldap.Connection ldapConnection)
Release an obtained Connection back to the pool.- Parameters:
ldapConnection-
-
releaseConnection
public void releaseConnection(org.forgerock.opendj.ldap.Connection ldapConnection, int ldapErrorCode)Release an obtained Connection back to the pool, with a specified return code for clean-up.- Parameters:
ldapConnection-ldapErrorCode-
-
releaseConnection
public void releaseConnection(org.forgerock.opendj.ldap.Connection ldapConnection, Exception lastLDAPException)Release an obtained Connection back to the pool, with a specified Last LDAP Stack Exception for clean-up.- Parameters:
ldapConnection-lastLDAPException- - Last up Stream LDAP Exception, can be null if no issues arose with the connection or operations.
-
-