正在加载图片...
ooAD大报告之 Petstore中EB的设计模式分析 Some entities have a set of attributes that are always used together. In the Java Pet Store application, the contact information of a customer(city, state, zip code, etc. )is an example of one such group Suppose that in total, a customer's contact information is composed of 15 individual attributes, each accessible by a corresponding getXXX method in CustomerEJB.Then, every time a customer's contact information is requested, 15 remote getxXX calls will be invoked on the CustomerEJB, one for each attribute this will incur heavy costs in network traffic and ejb container resource usage The Java Pet Store application reduces these costs by adopting a coarse-grained view of the fine-grained contact information. It aggregates the contact information -related attributes of the customerejb into an instance of ContactInformation. This instance or value object, is then serialized and sent over the network to a requesting client, where the object is deserialized Subsequent read accesses go through the value object rather than the remote entity object. Since these accesses are local, they require no server communication and use fewer resources 作者:张玉平,吴小静,范簧梦,张麒,罗晟,张翅13OOAD 大报告之 PetStore 中 EJB 的设计模式分析 作者: 张 玉 平 , 吴 小 静 , 范 赟 梦 , 张麒,罗晟, 张 翅 13 Some entities have a set of attributes that are always used together. In the Java Pet Store application, the contact information of a customer (city, state, zip code, etc.) is an example of one such group. Suppose that in total, a customer's contact information is composed of 15 individual attributes, each accessible by a corresponding getXXX method in CustomerEJB. Then, every time a customer's contact information is requested, 15 remote getXXX calls will be invoked on the CustomerEJB, one for each attribute. This will incur heavy costs in network traffic and EJB container resource usage. The Java Pet Store application reduces these costs by adopting a coarse-grained view of the fine-grained contact information. It aggregates the contact information-related attributes of the CustomerEJB into an instance of ContactInformation. This instance, or value object, is then serialized and sent over the network to a requesting client, where the object is deserialized. Subsequent read accesses go through the value object rather than the remote entity object. Since these accesses are local, they require no server communication and use fewer resources
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有