摘要
会话外观是一种经典的EJB设计模式,其实现通常都是静态的,亦即要将EntityBean的LocalHome接口硬编码为会话外观SessionBean具体的实例变量,这在需要封装多个EntityBean时,会话外观SessionBean将变得异常复杂而难以实现和维护。本文通过对以上静态会话外观模式不足的分析,提出了一种基于Java反射机制和接口技术的、动态会话外观模式的实现策略,有效的解决了由单一会话外观来封装多个EntityBean的问题。
Session facade is a classis EJB design pattern, in it's implementation, the localhome interface of entitybean is usually used as a instance variable of session facade ,which is a static encapsulation, when encapsulating many entitybeans ,the session facade will become very complex and cann't been matainced. This paper contributes a dynamical session facade design pattern strategy,which is based on Java reflection and interfce technology, and has successfially soluved the encapsulating many entitybeans by only a session facade bean.
出处
《电脑知识与技术》
2006年第8期156-157,共2页
Computer Knowledge and Technology