public class JDBCPersistenceManager extends Object
Modifier and Type | Method and Description |
---|---|
void |
commitTransaction(Connection dbConnection)
Commit the transaction.
|
DataSource |
getDataSource()
Returns Identity data source.
|
Connection |
getDBConnection()
Deprecated.
|
Connection |
getDBConnection(boolean shouldApplyTransaction)
Returns an database connection for Identity data source.
|
static JDBCPersistenceManager |
getInstance()
Get an instance of the JDBCPersistenceManager.
|
void |
initializeDatabase() |
void |
rollbackTransaction(Connection dbConnection)
Revoke the transaction when catch then sql transaction errors.
|
public static JDBCPersistenceManager getInstance()
org.wso2.carbon.identity.base.IdentityException
- Error when reading the data source configurationspublic void initializeDatabase()
@Deprecated public Connection getDBConnection() throws org.wso2.carbon.identity.base.IdentityRuntimeException
org.wso2.carbon.identity.base.IdentityRuntimeException
public Connection getDBConnection(boolean shouldApplyTransaction) throws org.wso2.carbon.identity.base.IdentityRuntimeException
shouldApplyTransaction
- apply transaction or notorg.wso2.carbon.identity.base.IdentityException
- Exception occurred when getting the data source.org.wso2.carbon.identity.base.IdentityRuntimeException
public DataSource getDataSource()
public void rollbackTransaction(Connection dbConnection)
dbConnection
- database connection.public void commitTransaction(Connection dbConnection)
dbConnection
- database connection.Copyright © 2019 WSO2. All rights reserved.