Management model of stateful POJO based on inversion of control

Ran Ming · Jisuanji gongcheng yu sheji · 2007

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 de-pendencies 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.

Read the paper · More papers on PaperTik