基于反转控制的有态POJO管理模型  被引量:2

Management model of stateful POJO based on inversion of control

在线阅读下载全文

作  者:张涛[1] 黄强[2] 毛磊雅[3] 冉鸣[1] 

机构地区:[1]四川师范大学计算机软件重点实验室,四川成都610068 [2]四川农业大学信息工程与技术学院,四川雅安625014 [3]西南交通大学信息科学与技术学院,四川成都610031

出  处:《计算机工程与设计》2007年第9期1998-2000,2017,共4页Computer Engineering and Design

基  金:四川省计算机软件重点实验室基金项目(00060510)

摘  要:目前会话信息的保存主要基于session进行直接管理,session机制基于无连接的HTTP协议实现了有连接服务,对保存客户端和服务器之间的会话状态有着重要的作用,但是session直接存储机制的固有缺陷将造成表现层的业务组件直接与session耦合,给系统单元测试带来困难,同时也不利于系统的会话建模。IoC(inversion of control)模式很好的解决了组件的耦合和测试问题,但是IoC管理的都是无态POJO(plain old Java object)。提出了一种基于IoC模式的有态POJO管理模型,将有态POJO的依赖关系和生命周期作为通用组件纳入模型的管理,并证明了有态POJO和无态POJO之间的引用完整性约束。通过对比可以看出,该模型有效地解决了传统session机制所存在的缺陷。Connection-oriented service is implemented by session mechanism based on unconnected Http protocol. It is important to preserve conversation states between clients and servers. At present the preservation of conversation information is mainly managed by the session. But the intrinsic defects of directly session accessing would result in tight coupling between the session and the business com- ponents of the presentation layer, and the difficulty of system unit test, as well as causing troubles in system conversation modeling. The components coupling and the test issues are solved well by IoC (inversion of control) pattern, but the objects managed by IoC are stateless POJO (plain old Java object) s. A management model of stateful POJO based on IoC pattern is proposed, by which the dependencies and the lifecycle of stateful POJO is managed as a common component, and the constraint of referential integrity between stateful POJO and stateless POJO is also proved. The defects of the traditional session mechanism could be effectively solved with this model by comparison.

关 键 词:无态POJO 有态POJO 耦合 反转控制 会话建模 

分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象