基于EJB的WEB数据库应用研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着Internet技术的迅速发展,传统的企业管理系统和数据库系统由于开发平台、开发工具和数据库系统的差异,随之带来的繁琐工作无法避免。而基于Intranet和Internet技术应用系统的迅速开发,它跨越了几乎所有的操作平台。这样,数据库技术向WEB领域发展有了很大的空间。各式各样的工具和软件相继出现,如:客户端的JavaScript和VBScript,还有嵌入式的软件组件,如JavaApplet、JavaBean和ActiveX等;在服务器端,各种各样的强大的运行环境也开发出来了,如CGI、ISAPI、JSP、Servlet、ASP、PHP等,为Web数据库的应用开发提供了坚实的技术基础。但各种问题也相继出现,或是运行速度, 或是开发困难,或是操作繁琐。
     于是,从分布式对象和组件技术发展起来的分布式组件技术以其优异的可靠性、可伸缩性已经得到越来越多组织和厂商的支持,正逐渐成为开发WEB数据库应用新一代的标准技术。
     本文就是基于此,针对分布式组件模型原理和体系结构的研究,探讨了它们在WEB数据库开发中的应用,着重讨论了其中的OMG组织的CORBA和SUN公司推出的基于Java的分布式J2EE平台。
     同时,并对EJB(Enterprise Java Bean)技术进行了详细的讨论和分析,并在此基础上开发了一个基于EJB的网上股票交易系统。在本文中基于EJB的分布式的网上股票交易系统是使用了JDBC作为数据库访问接口,使用EJB技术实现了网上股票交易系统的基本功能,包括:股东帐号管理、委托买入、委托卖出、委托交易查询、执行交易等。
     整个数据库系统有三个业务实体:股东帐号(t_account)、股票(t_stock)和交易(t_tx)。在服务器端定义了三个业务实体的实体bean(acountBean、stockBean和txBean),与三个业务实体相对应。系统的业务逻辑则封装在三个会话bean中:用户帐号管理(accountManageBean)、委托管理(consignManageBean)和交易管理(txManageBean)。三个会话bean通过远程接口来访问和操作实体bean,实现业务逻辑中数据库操作。客户端使用JSP和JAVABEAN
    
     武汉理工大学硕士学位论文
    来实现对服务器的访问,所有对服务器端组件的访问都封装在
    AccountBean对象中。其他一些辅助功能有:在对数据库连接中,实
    现了一个简单的数据库连接类DBHelper,用以初试化数据库连接和
    分配数据库连接:使用了Val ue对象来减少实体B ean的内容在远程
    接口上的传递。
     从而基本上实现了在WEB环境下使用EJB技术实现网上的股票
    交易系统的基本功能。
With the development of Internet and the difference of design platform, tools of development and databases, the traditional MIS and database system make the designer have to pay much time in them. While the application systems based on the Internet and Intranet have been quickly increased, and such patterns have spanned almost all operation system. In this circumstance, it gives a widely develop space. And many tools and software emerged at the same time, in the client port, such as the JavaScript and VBScript, and the nested discreteness, Java Applet, JavaBean and ActiveX. And in the sever port, many operation circumstances also emerged, such as CGI, ASP, JSP, ISAPI, PHP and Servlet. They provide solid base for the design of web database. But many problems come at the same time, which in the operation speed or in the difficulty of design or in the overloaded with details.
    Whereupon, distributing discreteness technology has been widely supported by many organizations and firms by the excellent tangs of security and retractile. And it gradually become the new standard of web database development.
    This paper; with such condition considered, researched the principle of the distributing discreteness model and system form, discussed the ways of the application in the design of web database. We focus on the J2EE, which presented by OMG, CORBA and SUN.
    Contemporary, we practically discussed and analyzed EJB (Enterprise Java Bean) technology and designed a web stock exchange system. In this paper the web stock exchange system which based on EJB used the JDBC to be the database accessing port, and used the EJB (Enterprise Java Bean) technology to realized the basic function of stock exchange by web, which including the management of the stockholders' accounts, entrusted buy in, entrusted sell out, search of entrusted exchange and exchange administer. Accordingly we realized
    
    
    
    the basic function of web stock exchanging by the use of EJB (Enterprise Java Bean) technology in the web circumstance.
引文
[1] 滕书娟,王立军,Web与数据库的连接技术,辽宁大学学报:自然科学版.2002,29(3).255-258
    [2] 雷超阳,刘军华,基于Web数据库访问技术的探讨,岳阳师范学院学报:自然科学版.2002,15(3),14-16
    [3] 余冬梅,张秋余等,JAVA在WEB数据库中间件中的应用,计算机工程与应用.2002,38(17).208-210
    [4] 郭银章,徐玉斌等,基于CORBA代理技术的Web数据库系统研究,计算机工程与应用.2002,38(17).211-212,217
    [5] 李小庆,基于Java Beans的Web数据库开发,中国金融电脑.2002,(9).69-71
    [6] 温琪,郭剑毅等,Web数据库操作的Java Beans实现,昆明理工大学学报.2002,27(4).79-82
    [7] 万常选,基于XML的Web数据库技术,计算机与现代化.2002,(4).49-53,57
    [8] 徐琨 刘志镜等,Web数据库访问的中间件技术分析与研究,计算机工程与科学.2002,24(4).54-56,63
    [9] 谢天咻 雷西玲等,基于Web的数据库访问模式的研究,计算机应用研究.2002,19(8),75-76,110
    [10] 左凤朝,基于Web的数据库访问技术探析,计算机工程与应用.2002,38(15).164-165,184
    [11] 李梦晖,Web数据库的访问技术及其应用,现代计算机:下半月刊.2002,(4).82-84
    [12] 李玉春 李治柱,基于Web的数据库发布模型的研究,计算机工程.2002,28(5).260-262
    [13] 董传良 杨虹等,基于分布对象Web的主流数据库集成系统,计算机研究与发展.2002,39(4).458-465
    [14] 张菁 张小真,基于CORBA/Java的多数据源Web数据库解决方案,西南师范大学学报:自然科学版.2002,27(2).156-161
    [15] 宋善德 郭飞,基于JAVA的WEB数据库连接池技术的研究,计算机工程与应用.2002,38(8).201-203,206
    [16] 张文彬 张浩宇,CGI与WEB的数据库的研究,哈尔滨理工大学学报.2001,6(6).92-95
    [17] 赵景林,Web数据库接口技术,微机发展.2001,011(004).29-33
    
    
    [18]庄明,Web数据库访问技术综论,微机发展.2001,011(006).41-42
    [19]王宇红,基于JDBC的Web数据库开发的实现,陕西师范大学学报:自然科学版.2001,029(003).35-37
    [20]吴云波,WEB数据库应用技术分析,西南民族学院学报:自然科学版.2001,027(003).357-359
    [21]潘立武 王保保,CORBA体系结构与实现机制,航空计算技术.2002,32(3).55-58
    [22]袁红辉 张华曹,用CORBA集成分布式应用系统,现代电子技术.2002,(1).91-93
    [23]李沛武,用RBAC实现CORBA中的访问控制,计算机工程与应用.2002,38(16).100-101,112
    [24]路新春 张子彪等,基于CORBA的多层Web应用模型,计算机应用.2002,22(8).1-3
    [25]高海洋 陈平,一种基于XML的CORBA/Web集成模型,计算机应用研究.2002,19(8).97-98,101
    [26]伍先俊 李志明,多层次Web应用系统的关键技术探讨,计算机工程与设计.2002,23(6).6-9
    [27]郑红 李师贤,可重用的分布式软件构件模型分析,计算机工程与应用.2002,38(15).68-71
    [28]徐长海,基于组件的多层数据库应用设计,计算机工程与科学.2002,24(3).55-57
    [29]陈静 冯学军,基于CORBA/Web技术构建三层体系结构的应用,计算机时代.2002,(4).21-22,24
    [30]谷和启,Sun ONE体系结构应用—J2EE/J2SE/J2ME,开放系统世界.2002,(9).114-117
    [31]刘冬 朱庆生,EJB技术及其实现,微型电脑应用.2002,18(7).43-46
    [32]王子君 范学峰,EJB技术的探讨与研究,计算机工程.2002,28(2).106-108
    [33]王强兵 刘广钟,基于J2EE的Web企业计算,计算机工程.2002,28(1).262-264
    [34]黄文,谢寄石,基于J2EE的数据库连接服务,电子科技大学学报.2002,31(1).67-71
    [35]阮彤,冯东雷,基于Java的应用服务器的设计与实现,计算机研究与发展.2001,38(8).939-946
    [36]马廷淮,赵亚伟,刘忠,用EJB开发J2EE应用,计算机应用,2002年04期
    
    
    [37]曹鸣鹏,赵伟,许林英,J2EE技术及其实现,计算机应用,2001年10期
    [38]黄贤英,在J2EE平台上使用EJB开发企业应用,计算机应用研究,2001年12期
    [39]Bastide, R., Sy, O., Palanque, P.: Formal Specification and Prototyping of CORBA Systems, in: Proceedings of ECOOP'99, number 1628 in LNCS, Springer-Verlag, 1999, 474-494.
    [40]OMG: The Common Object Request Broker: Architecture and Specification, Object Management Group, 2.4 editions, November 2000, http://www.omg.org/technology/documents/formal/corbaiiop.htm.
    [41]Nierstrasz, O.: Regular Types for Active Objects, Object-Oriented Software Composition (O. Nierstrasz,D. Tsichritzis, Eds.), Prentice-Hall, 1995.
    [42]W. Emmerich. Engineering Distributed Objects. John Wiley& Sons, Apr. 2000.
    [43]Rahim Adatia et al, Professionnal EJB, Wrox Press, ISBN, 1-861005-08-3, 2001.
    [44]Deepak Alur, John Crupi and Dan Malks, Core J2EE Patterns, Sun Microsystems Press, ISBN 0-13-064884-1,2001.
    [45]Vladimir Blagojevic and Rickard Oberg - Container architecture - design notes http://www.jboss.org/onlinemanual/HTML/ch12.html.
    [46]Marguerite and Willy Zwaenepoel, A Comparison of Software Architectures for E-business Applications, Technical Report TR02-389, Rice University, 2001.