Search in sources :

Example 1 with PropertyDAOImple

use of com.alibaba.cobar.manager.dao.xml.PropertyDAOImple in project cobar by alibaba.

the class XmlFile method initProperty.

private void initProperty() {
    String path = this.xmlPath + System.getProperty("file.separator") + "property.xml";
    init(path, "pro");
    PropertyDAOImple propertyDAO = new PropertyDAOImple();
    propertyDAO.setXmlFileLoader(xmlFileLoader);
    try {
        propertyDAO.afterPropertiesSet();
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        Assert.fail();
    }
    propertyDAO.addTime(1);
}
Also used : PropertyDAOImple(com.alibaba.cobar.manager.dao.xml.PropertyDAOImple) IOException(java.io.IOException)

Example 2 with PropertyDAOImple

use of com.alibaba.cobar.manager.dao.xml.PropertyDAOImple in project cobar by alibaba.

the class PropertyDaoTest method initData.

@Before
public void initData() {
    Assert.assertNotNull(xmlPath);
    propertyXmlPath = xmlPath + System.getProperty("file.separator") + "property.xml";
    xmlFileLoader = new XMLFileLoaderPath();
    xmlFileLoader.setXmlPath(xmlPath);
    propertyDao = new PropertyDAOImple();
    propertyDao.setXmlFileLoader(xmlFileLoader);
    XmlFile xmlFile = new XmlFile(propertyXmlPath, "pro");
    try {
        xmlFile.init();
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
        Assert.fail();
    }
    read();
}
Also used : PropertyDAOImple(com.alibaba.cobar.manager.dao.xml.PropertyDAOImple) XMLFileLoaderPath(com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath) Before(org.junit.Before)

Aggregations

PropertyDAOImple (com.alibaba.cobar.manager.dao.xml.PropertyDAOImple)2 XMLFileLoaderPath (com.alibaba.cobar.manager.dao.xml.XMLFileLoaderPath)1 IOException (java.io.IOException)1 Before (org.junit.Before)1