use of org.wso2.carbon.humantask.core.dao.HumanTaskDAOConnectionFactoryJDBC in project carbon-business-process by wso2.
the class Database method createDAOConnectionFactory.
/**
* Creates the DAO connection factory.
* @return : the connection factory.
* @throws DatabaseConfigurationException : If the provided config factory cannot be instantiated.
*/
public HumanTaskDAOConnectionFactoryJDBC createDAOConnectionFactory() throws DatabaseConfigurationException {
String connectionFactoryClassName = serverConfiguration.getDaoConnectionFactoryClass();
if (log.isDebugEnabled()) {
log.debug("Using DAO connection factory class: " + connectionFactoryClassName);
}
HumanTaskDAOConnectionFactoryJDBC humanTaskDAOConnectionFactoryJDBC;
try {
humanTaskDAOConnectionFactoryJDBC = (HumanTaskDAOConnectionFactoryJDBC) Class.forName(connectionFactoryClassName).newInstance();
} catch (Exception ex) {
String errMsg = "Human Task DAO Connection Factory instantiation failed!";
log.error(errMsg);
throw new DatabaseConfigurationException(errMsg, ex);
}
humanTaskDAOConnectionFactoryJDBC.setDataSource(getDataSource());
humanTaskDAOConnectionFactoryJDBC.setTransactionManager(getTnxManager());
humanTaskDAOConnectionFactoryJDBC.setDAOConnectionFactoryProperties(getGenericDAOFactoryProperties());
humanTaskDAOConnectionFactoryJDBC.init();
return humanTaskDAOConnectionFactoryJDBC;
}
Aggregations