1、 I 摘要 随着因特网的飞速发展,在线商城实现的功能越来越多,承受的访问量越来 越大。相应地网上购物系统需要处理的信息量急剧增加,单台服务器往往无法承 受巨大的访问量,这时候就需要采用分布式系统。EJB规范定义了开发和部署基 于事务性、分布式对象应用程序的服务器端软件组件的体系结构,很适合用于构 建大型分布式网站。 关键词:Java,EJB 3.0,Servlet,分布式,网上书城 II Abstract With the rapid development of Internet, online store has to achieve more and more functions and
2、 serve more and more visitors. Accordingly, online shopping system has to deal with the rapid increase of the amount of information. A single server often can not afford a huge number of visits, then you need to adopt a distributed system. EJB specification defines the development and deployment of
3、a server-side software component architecture based on transaction and distributed object application, and it is suitable for building large distributed sites. Keywords: Java, EJB 3.0, Servlet, distributed system, online bookstore III 目录 1 课题研究背景 1 1.1 课题研究内容及意义 . 1 1.2 EJB 的历史及现状 1 1.3 从 WEB层访问 EJB
4、 4 1.4 论文内容安排 . 5 2 系统开发环境及相关技术 6 2.1 系统开发环境 . 6 2.2 JAV A技术简介 6 2.3 EJB 3.0 技术简介. 7 2.4 SERVLET技术简介 11 2.5 JSP 技术简介 11 3 系统需求分析 14 3.1 用例分析 . 14 3.2 活动图 . 17 3.3 时序图 . 19 3.4 E-R 图. 21 3.5 部署分析 . 22 4 系统设计 23 4.1 项目结构设计 . 23 4.2 类设计 . 24 4.3 WEB设计 26 4.4 数据库设计 . 27 5 系统实现与测试 . 30 5.1 功能实现 . 30 5.2 部署实现 . 38 5.3 系统测试 . 39 6 总结与展望 43 6.1 开发总结 . 43 6.2 未来展望 . 43 参考文献 44 致谢 . 45 基于 EJB3.0 的分布式网上购物系统 1 1 课题研究背景 1.1 课题研究内容及意义 网上购物系统又称为在线商城,无论是开设个人网上购物商店还是企业在线购物商 城,一套好用的网上购物系统都是必须的。网上购物系统拥有强大的商城功能,如商