Search in sources :

Example 1 with HTCoordinationDAOConnectionFactoryJDBC

use of org.wso2.carbon.bpel.b4p.coordination.dao.HTCoordinationDAOConnectionFactoryJDBC in project carbon-business-process by wso2.

the class DatabaseUtil method createDAOConnectionFactory.

public HTCoordinationDAOConnectionFactoryJDBC createDAOConnectionFactory() throws DatabaseConfigurationException {
    String daoConnectionFactoryClassName = CoordinationConfiguration.getInstance().getDaoConnectionFactoryClass();
    if (log.isDebugEnabled()) {
        log.debug("Using DAO connection factory class for B4P module:" + daoConnectionFactoryClassName);
    }
    HTCoordinationDAOConnectionFactoryJDBC htCoordinationDAOConnectionFactoryJDBC;
    try {
        htCoordinationDAOConnectionFactoryJDBC = (HTCoordinationDAOConnectionFactoryJDBC) Class.forName(daoConnectionFactoryClassName).newInstance();
    } catch (Exception ex) {
        String errMsg = "B4P module DAO Connection Factory instantiation failed!";
        log.error(errMsg);
        throw new DatabaseConfigurationException(errMsg, ex);
    }
    htCoordinationDAOConnectionFactoryJDBC.setDataSource(getDataSource());
    htCoordinationDAOConnectionFactoryJDBC.setTransactionManager(getTnxManager());
    htCoordinationDAOConnectionFactoryJDBC.setDAOConnectionFactoryProperties(getGenericDAOFactoryProperties());
    htCoordinationDAOConnectionFactoryJDBC.init();
    return htCoordinationDAOConnectionFactoryJDBC;
}
Also used : HTCoordinationDAOConnectionFactoryJDBC(org.wso2.carbon.bpel.b4p.coordination.dao.HTCoordinationDAOConnectionFactoryJDBC)

Aggregations

HTCoordinationDAOConnectionFactoryJDBC (org.wso2.carbon.bpel.b4p.coordination.dao.HTCoordinationDAOConnectionFactoryJDBC)1