主题:Spring事务管理与数据库连接
时间: 2020-08-27来源:ITEYE
前景提要
在without ejb中rod指出了事务框架的清晰结构:Separating these concerns leads to much cleaner architectures: Business objects demarcate abstract transactions without understanding involved resources, and data access objects fetch transactional resources without worrying about participation in transactions. 在spring的实现中也都是如此做的,bo只负责事务边界的声明(通过aop这个也可以弄出去了),dao只需要去拿需要的事务资源,资源创建和加入事务都由事务框架来做。 所以也就有了TransactionSynchronizationManager这个类,它负责将事务资源绑定到对应线程。包括对connection, session,persistensemanager的管理都是如此。

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行