尚学堂手把手教程授课:李腾飞版权所有:尚学堂科技EJB3.0EnterpriseJavaBean3.0(EJB3.0)企业级JavaBean开发手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞课程大纲1、JavaEE技术体系2、EJB3.0技术简介3、EnterpriseBean(企业Bean)理论及实例开发SessionBeanMDB4、Persistence(JPA-数据持久化框架)EntityBeanEntityManagerEJB-QL(EJB查询语言)OR映射5、EJB事务处理(Transactions)及其与Spring容器事务的比较手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞JavaEE技术体系JavaEE版本发布的历史分布式多层应用架构与SSH架构的比较JavaEE容器JavaEE应用开发与实施过程JavaEE角色手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞JavaEE技术体系–版本发布的历史J2EE1.2(December12,1999)J2EE1.3(September24,2001)J2EE1.4(November11,2003)JavaEE5(May11,2006)手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞J2EE1.2(December12,1999)EnterpriseJavaBeansSpecification(EJB),Version1.1JavaServerPagesSpecification(JSP),Version1.1JavaServletSpecification,Version2.2JDBCAPI,Version2.0JavaNamingandDirectoryInterfaceSpecification(JNDI),Version1.2JavaMessageService(JMS),Version1.0.2JavaTransactionAPI(JTA),Version1.0.1JavaTransactionService(JTS),Version0.95JavaMailAPISpecificationVersion1.1JavaBeansActivationFrameworkSpecification(JAF),Version1.0手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞J2EE1.3(September24,2001)EnterpriseJavaBeansSpecification(EJB),Version2.0JavaServerPagesSpecification(JSP),Version1.2JavaServletSpecification,Version2.3JDBCAPI,Version2.1JavaNamingandDirectoryInterfaceSpecification(JNDI),Version1.2JavaMessageService(JMS),Version1.0.2JavaTransactionAPI(JTA),Version1.0.1JavaTransactionService(JTS),Version1.0JavaMailAPISpecificationVersion1.1JavaBeansActivationFrameworkSpecification(JAF),Version1.0J2EEConnectorArchitecture,Version1.0JavaAPIforXMLProcessing(JAXP),Version1.0JavaAuthenticationandAuthorizationService(JAAS),Version1.0手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞J2EE1.4(November11,2003)EnterpriseJavaBeansSpecification(EJB),Version2.1JavaServerPagesSpecification(JSP),Version2.0JavaServletSpecification,Version2.4JDBCAPI,Version3.0JavaNamingandDirectoryInterfaceSpecification(JNDI),Version1.2JavaMessageService(JMS),Version1.1JavaTransactionAPI(JTA),Version1.0.1BJavaTransactionService(JTS),Version1.0JavaMailAPISpecification,Version1.2JavaBeansActivationFrameworkSpecification(JAF),Version1.0J2EEConnectorArchitecture,Version1.5JavaAPIforXMLProcessing(JAXP),Version1.2JavaAuthenticationandAuthorizationService(JAAS),Version1.0JavaAuthorizationServiceProviderContractforContainers(JACC),Version1.0WebServicesforJ2EE,Version1.0JavaAPIforXML-basedRPC(JAX-RPC),Version1.0JavaAPIforXMLRegistries(JAXR),Version1.0JavaManagementExtensions(JMX),Version1.1Java2Platform,EnterpriseEditionManagementSpecification,Version1.0Java2Platform,EnterpriseEditionDeploymentSpecification,Version1.0手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞JavaEE5(May11,2006)EnterpriseJavaBeansSpecification(EJB),Version3.0JavaPersistenceAPI(JPA),Version1.0JavaServerPagesSpecification(JSP),Version2.1JavaServletSpecification,Version2.5JavaServerFaces(JSF),Version1.2JavaServerPagesStandardTagLibrary(JSTL),Version1.2JDBCAPI,Version3.0JavaNamingandDirectoryInterfaceSpecification(JNDI),Version1.2JavaMessageService(JMS),Version1.1JavaTransactionAPI(JTA),Version1.1JavaTransactionService(JTS),Version1.0JavaMailAPISpecification,Version1.4JavaBeansActivationFrameworkSpecification(JAF),Version1.1J2EEConnectorArchitecture,Version1.5JavaAPIforXMLProcessing(JAXP),Version1.3JavaAuthenticationandAuthorizationService(JAAS),Version1.0JavaAuthorizationServiceProviderContractforContainers(JACC),Version1.1WebServicesforJavaEE,Version1.2JavaAPIforXML-basedRPC(JAX-RPC),Version1.1JavaAPIforXMLRegistries(JAXR),Version1.0JavaManagementExtensions,Version1.2JavaPlatform,EnterpriseEditionManagementSpecification,Version1.1JavaPlatform,EnterpriseEditionDeploymentSpecification,Version1.1JavaAPIforXML-basedWebServices(JAX-WS),Version2.0JavaArchitectureforXMLBinding(JAXB),Version2.0SOAPwithAttachmentsAPIforJava(SAAJ),Version1.3WebServicesMetadatafortheJavaPlatform,Version2.0StreamingAPIforXML(StAX),Version1.0JavaDataObjects(JDO),Version2.0手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞JavaEE技术体系JavaEE版本发布的历史分布式多层应用架构与SSH架构的比较JavaEE容器JavaEE应用开发与实施过程JavaEE角色手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞JavaEE应用程序的组件构成(分布式多层应用架构)JavaEE应用程序由组件构成运行在客户端的组件运行在服务器端的Web组件运行在服务器端的业务逻辑组件WebClientsAppletsApplicationClientsServletJSPJSFSessionBeanMDBEntityBean分布式?VS集群?手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞WebClients(或称瘦客户端)一个web客户端包括两个部分:第一,动态的web页面包含HTML/XML等标签语言,这些内容由运行在web层的web组件产生;第二,一个web浏览器,它负责接收和解释从服务器端传送过来的web页面。手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞Applets从web层传送的web页面可以包含Applet,Applet是:用java语言编写的小应用程序运行在被安装于web浏览器的java虚拟机中但由于web浏览器的安全限制,Applet只能执行有限的功能。手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞ApplicationClients(应用客户端)应用客户端一般是由swing或awt技术编写(但也有可能是命令行客户端)。应用客户端直接访问在业务逻辑层的JavaBeans(EJB),当然,它也可以发出HTTP请求,访问web层组件。手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞客户端与JavaEE服务器的通信客户端组件与运行在服务器端的业务逻辑组件通信时,既可以直接访问,也可以通过Web层的组件访问手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞Web组件Web组件就是Servlet或由JSP/JSF技术创建的页面静态HTML或Applet不是JavaEE规范的一部分。那些辅助的工具类也不被认为是web组件。在Web层,也可能会借助于辅助的JavaBean来处理用户的输入,并将数据传输到业务逻辑层。比如现在流行的SSH架构,就是存在于Web层的辅助工具类手把手教程版权所有:尚学堂科技EJB3.0尚学堂授课:李腾飞业务逻辑组件业务逻辑组件与其它组件的交互如下所示:手