【发布时间】:2011-06-25 16:13:59
【问题描述】:
我想知道如何在业务逻辑层(BLL)管理事务。
我已搜索此网站以找到我的问题的答案,但没有成功。
我想在我的 Web 应用程序中使用 hibernate 和 struts。
在 struts 的 Actions 中,我调用了 BLL 函数。
在 BLL 函数中,我想要这样:
Begin transaction
try {
Call DAL to do something
...
Call DAL to do something
Commit Transaction
catch {
Roleback Transaction
}
在 DAL 中,我使用休眠函数来执行操作。
但我不知道如何在 BLL 管理交易。
请给点建议。
谢谢。
【问题讨论】:
标签: hibernate struts business-logic