use of de.janrufmonitor.framework.ICallerList in project janrufmonitor by tbrandt77.
the class ThunderbirdCallerManager method createCallerListFromThunderbird.
private void createCallerListFromThunderbird() {
final String file = this.m_configuration.getProperty(CFG_MAB_FILE, "");
Thread t = new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(3000);
} catch (InterruptedException e2) {
}
File mso_cache = new File(THB_CACHE_PATH);
if (!mso_cache.exists())
mso_cache.mkdirs();
ICallerList cl = new ThunderbirdTransformer(file, true).getCallers();
try {
getDatabaseHandler().deleteCallerList(cl);
getDatabaseHandler().commit();
getDatabaseHandler().insertOrUpdateCallerList(cl);
getDatabaseHandler().commit();
} catch (SQLException e) {
m_logger.log(Level.SEVERE, e.getMessage(), e);
try {
getDatabaseHandler().rollback();
} catch (SQLException e1) {
m_logger.log(Level.SEVERE, e1.getMessage(), e1);
}
}
}
});
t.setName("JAM-ThunderbirdSync-Thread-(non-deamon)");
t.start();
}
Aggregations