1EJB1EJB:: Enterprise Java BeanDCOMJavaRMIEJBEJBWebspereWebLogicEJBEJBEJBEJBEJBEJBEnterprise java beanEJBJ2EEEJBRMI:Remote Method InvocationRMIRemote Method InvocationJavaJDK1.1JavaJavaRMIJavaRPCJavaRPCJava RMI2EJB Entity Bean——Session Bean——Bean MessageDriver Bean——J2EEJMS3beanCMP,BMP?CMP entity bean beanBMP entity beanbeanbean4FindSelectFinderSelectbeanEJBObject(s),EJBLocalObject(s).().beanCMREJBObject(s)EJBLocalObject(s)CMP(),CMPCMR./homeBeanFindXxx()EjbSelectXxx—beanentity bean,beanBeanbean,home,.5?:bean,creatXxxsession bean.Click to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com2session bean.Entity bean0.FinderFinderentity bean,entity bean.entity beanhomefindByPrimaryKey,.Finder.HomeHomeentity bean.Home,bean.6?:EJBbean.bean,bean,,,.message drivern beanhome.enterprise beanbean..bean.7JMS?:(pointtopoint).(publishandsubscribe,pub/sub).8EJBEJB?: p192,p1939session beansession bean?stateful session bean../,.statelesssession,,,10?:JVM..JVM.JVM..,bean,,.11CMTMandatory,bean.Neverbean,java.rmi.RemotException.Requiredbean.RequiresNew,beanSupports,.Not Supportedbean.12ACID————Click to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com3————13Bean nostate——Bean pooled ——BeanEJB Objectready ——EJB Objectpooled14JMSJMSJava Message Service(JMS)JAVA APIMOMJMSJavaJMSpointtopoint——()P2PPublishandsubscribe(pub/sub)——15EJBSession beanservletjavaJava AppletJava16ORMORM(ObjectRelation Mapping)17EJB EJBSession BeanEntity BeanMessage Driven BeanJNDIRMIJAT18SessionBeanEntityBeanSessionBeanJ2EEEJBEntityBeanSessionBeanEntityBean19StatefulBeanStatelessBeanSession Bean Stateful Session Bean Stateless Session Bean Session Bean method Stateful Session Bean Stateful Session BeanStateless Session Bean Stateless Session BeanEJB Container Stateless Session Bean method Stateless SessionBean methods Bean Instance Stateful Session Bean StatelessSession Bean Stateful Session Bean J2EE Server Stateful Session Bean20EJBJAVA BEANJava BeanJava BeanJavaBeanJava BeanTomcatJava BeanJava BeanSerializableBeanJava BeanCOMCOMEnterprise Java BeanDCOMJavaRMIEJBEJBClick to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com4WebspereWebLogicEJBEJBEJBEJBEJBEJB21EJBSessionBean,EntityBeanSessionBeanStateless Session BeanBeanEJBBeanStateful Session BeanBeanStateful Session BeanBeanEntityBeanEntity BeansEntity beansEJBEntity beansEntityBeans BeansEJBOMGOTSSun MicrosystemsTransactionServiceJTSJava Transaction APIJTAX/OpenXA22EJBEJBSunEJBEJBEnterprise Bean ProviderApplication AssemblerDeployerEJBEJBServer ProviderEJBEJB Container ProviderSystem AdministratorRemoteLocalHomeLocalHomeBean23EJB24EJBSessionBeanEntityBeanMessage DrivenBeanBeanStatefulStatelessBeanBeanBMPCMP25EJBHomeHome26J2EEWAREARWAR:WebwebEAR:Hibernate1HibernateOIDHQLQBCSQL2 ForwardGlobalForwardForwardAction returnJSPActionreturnForwardGlobalForward3——newsession——session——session4——Click to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com5select——selectselect4ORMmanyone5P 4241236Sessionfind()QuerySessionfind()QueryHQLHQLHibernate3.xfind()QueryHQL7ibernate(hibernate.properties) hibernate.show_sql=true/flasetrue\false8SET:set(SQL)Name cascade key column onetomany inverse9listLinkedListArryListVectorLinkedListArryListVectorArryListVectorArryList10HibernateA BOID CORMDQBC ESQL FHQLC11.Customer.javaCustomer.hbm.xmlClick to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com612.12313. SessionHibernateSession14.Session(1)Session(2)SessionSessionSessionSession(3)Session(transaction)12HibernateXMLHibernateXML13HibernateJava1transientnewSessionJava2persistentSessionJava3detachedSessionJava14Session1Session2SessionSQLSessionSQLSQL15Hibernate11.select2.2Click to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com7select312select121617ORMmanyone18sessionsessionsession19.Session(1)Session(2)SessionSessionSessionSession(3)Session(transaction)20. ABCC ABB ACClick to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com8Jsp&servlet1StatmentStatment,PreparedStatementcallablestatment,2 Cookiecookiecookiccoolkiecookie3 servletTOMCATIDEHTML4.CookiesessionsessionCookie5.GetPostaPostHttpPostActionGetUrlb.Get1KPost6. servlet: Servlet Web Servletjavax.servlet.Servletinit, servicedestroyservletservletservletJ2EEservletinitserviceservicedoGetdoPostdestory7ServletJspServletJspServlet8.JSPModel1jspModel2jsp+javabeanjspusebeanjspModel1Mvcjsp+servlet+javabean9. JSPrequestGET/POSTresponsepageContextsessionapplication servletconfig servletout ()page JSPexception ()10.apagebsessioncrequestdapplicationClick to buy NOW!PDFXCHANGEtrack.comClick to buy NOW!PDFXCHANGEtrack.com911.MVC——MVC:MVCModelViewControllerModelJavaBeanEJBViewJSPControllerServlet11. JSP12JSPINCLUDEINCLUDEINCLUDEjsp:includeINCLUDEinclude,13. Fo