摘要
介绍了目前针对Spring声明式事务延迟加载问题的常用处理方法,在分析比较各方法优缺点的基础上,以ZK框架和Spring事务整合为例提出一种新的基于访问者设计模式的表现层代码基础架构,并讨论了实现细节。新架构能够有效解决表现层注解与Spring事务代理混合时产生的冲突问题,降低了事务边界对表现层流程控制代码的影响,从而提高代码的可读性和可维护性。
In this paper, four commonly used methods for solving lazy loading problem for the Spring declarative transaction are introduced. On the basis of analysis of the advantages and disadvantages of each method, A new visitor design pattern -based presentation layer code infrastructure is proposed and the implementation details of the integration of ZK framework and Spring transaction is discussed, for example. This infrastructure is able to avoid the conflicts arising in the presentation layer annotation with spring transaction agent mixed, minimize the impact of transaction boundary on the presentation layer flow control code and improve code readability and maintainability.
出处
《宜春学院学报》
2013年第9期57-59,共3页
Journal of Yichun University