节点文献

实体Bean容器与容器管理持久化的研究与实现

【作者】 胡建华

【导师】 黄涛;

【作者基本信息】 中国科学院研究生院(软件研究所) , 计算机软件与理论, 2004, 硕士

【摘要】 EJB(Enterprise Java Bean)是为开发和部署基于组件的分布式应用而定义的组件体系结构。与其他组件技术相比,EJB组件具有可扩展性、事务性和并发访问安全性,而且EJB组件使用纯Java编写,具有更好的平台独立性,在分布式系统的开发方面有显著的优势。 实体Bean是EJB的一种。EJB规范定义两种实现实体Bean的方法:BeanManagedPersistence(BMP)和ContainerManagedPresistence(CMP)。使用CMP时,容器自动将对象操作转换为数据库操作,是一种典型的对象持久化技术。当前存在多种对象持久化技术,包括对象数据库技术、JDO技术和DAO技术等,但是它们都有自身的缺陷,不能高效的用于分布式应用的丌发。相比之下,实体Bean技术应用广泛,经过不断的发展,已经具备了比较完善的功能,并形成了全面细致的规范。 实体Bean规范规定了实体Bean的开发方法,实体Bean容器的功能和持久化管理器的功能。但是该规范没有规定后两者的实现方法。目前大多数的J2EE应用服务器都实现了实体Bean容器和持久化管理器,但随着实体Bean应用的推广,都暴露出一些缺陷,例如:没有完全遵守规范;并发访问效率较低;容易发生死锁;配置性较低等。此外,实体Bean规范也暴露出很多不足。 本文提出了一种实体Bean容器和CMP持久化管理器的实现方法。为了避免上述缺陷,同时获得较高的性能,我们在设计时除了考虑基本的需求,还重点研究了线程池、并发控制和死锁检测算法。在实现CMP持久化方面,我们使用关系数据库作为存储介质,通过选择最佳的映射策略能够保存实体Bean的对象特性,并通过优化数据库访问操作获得较高的性能。整个实现不仅完全遵守实体Bean2.1规范,还对规范中不方便编程的部分进行了增强,并具有较高的性能和较强的定制功能。 该实体Bean容器和持久化管理器已经在网络应用服务器OnceAS中实现,OnceAS遵守J2EE1.3规范。

【Abstract】 The Enterprise JavaBeans architecture is a component architecture for the development and deployment of component-based distributed business applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and multi-user secure. Programmed with pure Java, The EJB component is independent of the platform. For this independence, the EJB is more fittable to develop distributed application than other component-based technology.The entity bean is one type of EJB. Because it can persist its state, it is often used to represent the business entity. There are many kinds of technology that can be used to persist object, but none of them except the entity bean can be efficiently used to develop a distributed application. One reason is that they don’t have a complete specification. But the entity bean has one.The EJB specification defines how to develop an entity bean and what support is necessary for it to run. However, it is not specified how to provide those supports. There are many application servers that implement the functions defined in the sepecification. However, as the entity bean is more and more widely used, the deficiency and inconvenience is more and more clear. A better implementation is expected.This paper represents an implementation of parts of the specification for the entity bean. In the implementation, we try to avoid the known deficiencies. So we adopt the following mechanisms: an object cache, a configurable synchronize policy and a dead-lock-detection algorithem. Besides, we also try to improve the persistent mechanism by adopting the following: selection of the best OR mapping, optimization of the database-access operation. In one word, the implementation is high performance, EJB2.0 compliant and easy to configure.The implementation is a key component of OnceAS, which is a J2EE1.3 compliant application server developed independently by TCSE, ISCAS.

  • 【分类号】TP311.52
  • 【下载频次】115
节点文献中: 

本文链接的文献网络图示:

本文的引文网络