最新305设计模式课件.ppt
- 【下载声明】
1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
3. 本页资料《最新305设计模式课件.ppt》由用户(晟晟文业)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 最新 305 设计 模式 课件
- 资源描述:
-
1、1/29/20232lDesigning Enterprise Applications with the J2EE Platform,Second EditionlArchitecting and Designing J2EE Applications,SL-425lCore J2EE Patterns1/29/20239lMultitier Application ScenariolStand-Alone Client ScenariolWeb-Centric Application ScenariolBusiness-to-Business Scenario1/29/202310lMul
2、titier Application ScenariolStand-Alone Client ScenariolWeb-Centric Application ScenariolBusiness-to-Business Scenario1/29/202311lClient components Applet Application client Java Web Start-enabled rich client Wireless clientlWeb components Servlet JsplEJB components Session bean Entity bean Message-
3、driven bean1/29/202312 J2EE平台提供一系列服务,并允许以统一的方式访问这些服务l平台服务(Platform Service)简化编程的工作,允许在部署时间对组件和应用程序进行定制 应用程序或组件可以使用被部署环境中的资源l服务技术(Service Technologies)允许应用程序以统一的方式访问各种服务 标准的API,供组件开发人员使用服务 标准的SPI,供J2EE产品提供商实现服务1/29/202313lNaming services 可以在不改变组件源码的情况下定制组件 使用一个名字访问数据库连接,其他的组件等资源lDeployment Services 在
4、打包和部署定制应用程序/组件 部署描述符 J2EE.ear=client.jar+web.war+ejb.jar+connector.rarlTransaction Services Flat:不允许嵌套事务 Distributed:支持分布式事务lSecurity Services 认证(Authentication)授权(Authorization)1/29/202314lJava Naming and Directory Interface(JNDI)lJDBC API JDBC 2.0 Core API JDBC 2.0 Extension API,连接池和分布式事务支持lJava T
5、ransaction API and Service(JTA,JTS)JTA JTSlJava Connector Architecture(JTA)连接J2EE平台和EISlJava API for XML Processing Technology DOM:Document Object Model SAX:Event-based Model XSLT1/29/202315lInternet ProtocolsTCP/IPHTTP 1.0SSL 3.0lRemote Method Invocation ProtocolslObject Management Group ProtocolsJ
6、avaIDLRMI-IIOPlMessage TechnologiesJava Message Service APIJavaMail APIJavaBeans Activation Framework APIlData FormatsHTML 3.2Image filesJAR fileClass fileXML1/29/2023161/29/202317为创建为创建 EJB 服务器端服务器端组件,组件,Enterprise Bean 开发人员提供了开发人员提供了两个定义两个定义 bean 商业商业方法的公共接口方法的公共接口Remote接口和接口和Home接口(或者接口(或者Local接口
7、接口和和LocalHome接口)接口),以及真正的,以及真正的 bean 实现类实现类Bean Class。客户机使用客户机使用 bean 的的公共接口来创建、操作公共接口来创建、操作 bean,以及从服务器,以及从服务器除去除去 bean。bean实现类在运行时实现类在运行时被实例化。被实例化。1/29/202318Bean实现类实现类:Entity Bean的实现类的实现类实现实现javax.ejb.EntityBean接口。接口。Session Bean的实现的实现类实现类实现javax.ejb.SessionBean接口。接口。Message-driven Bean的实现类实现的实现类
8、实现javax.ejb.MessageDrivenBean接口。接口。Bean实现类要实现实现类要实现Remote/Local接口中接口中定义的商业方法,以及定义的商业方法,以及Home/LocalHome接接口中定义的创建、破坏口中定义的创建、破坏、查找方法。、查找方法。1/29/202319EJB2.0中中Session Bean和和Entity Bean可可以有两种客户端视图以有两种客户端视图Local Client View和和Remote Client View:Remote Client View适用于分布式环境,对适用于分布式环境,对Remot/Home接口方接口方法的调用都是远
9、程调用法的调用都是远程调用,因此对性能有一定的,因此对性能有一定的影响影响(特别是在细粒度特别是在细粒度的情况下的情况下)。Local Client View避避免了远程方法调用的开免了远程方法调用的开销,但是客户端和服务销,但是客户端和服务器必须存在于同一器必须存在于同一JVM中,同时失去了中,同时失去了分布式环境带来的好处分布式环境带来的好处。Remote Client ViewLocal Client View1/29/202320Home/LocalHome接接口:口:FactoryHome接口继承接口继承javax.ejb.EJBHome接口。接口。LocalHome接口继承接口继承
10、javax.ejb.EJBLocalHome接口。接口。Home接口中都要定义接口中都要定义bean的创建、破坏、的创建、破坏、查找方法。查找方法。1/29/202321Remote/Local接口:接口:Delegate供客户端调用商业方法供客户端调用商业方法的接口。的接口。Remote接口继承接口继承javax.ejb.EJBObject接口。接口。Local接口继承接口继承javax.ejb.EJBLocalObject接口。接口。两个接口中都要定义两个接口中都要定义bean的商业方法。的商业方法。1/29/2023221/29/202323ejb-jar.xml Hello examp
11、les.HelloHome examples.Hello examples.HelloLocalHome examples.HelloLocal examples.HelloBean Stateless Container 1/29/202324lRemote/Home接口及实现类的class文件,实体Bean还包括primary key classl代码中依赖的其他class文件,如参数、返回值以及自定义异常等类型l部署描述符(META-INF/ejb-jar.xml)1/29/2023251/29/202326在部署在部署EJB时,容器会为每个时,容器会为每个EJB:l根据根据Home接口
展开阅读全文