小编kno*_*low的帖子

如何杀死在后台运行的IEDriver exe进程(Selenium webdriver)?

我正在使用selenium webdriver(用于Internet Explorer).它的作用基本上是在Internet Explorer中打开一个网页并进行表单提交.

我怎么能杀死在后台自动运行的internetexplorer.exe?

java internet-explorer taskmanager selenium-webdriver

2
推荐指数
1
解决办法
2万
查看次数

我们应该在哪里使用commit(session),在try或finally中?

如果我想在成功执行数据库操作后使用commit(session),那么最好将它放在try或finally块中?在这里我最后使用它,它应该在尝试吗?

public void delete( --- ) {
    Session session = init();
    try {
        ----
    } catch (HibernateException e) {
        rollback(session);
        logger.error("delete failed", e);
        throw e;
    } finally {
        commit(session);
        close(session);
    }
}
Run Code Online (Sandbox Code Playgroud)

java hibernate exception try-catch

1
推荐指数
1
解决办法
2012
查看次数