1 / 13

Enterprise JavaBeans

Enterprise JavaBeans. By Yung-Chien Chen. Topics. What is Enterprise JavaBeans Three Types of Enterprise JavaBeans Benefits. What is Enterprise JavaBeans (EJB). EJB is a part of the Java 2 Platform, Enterprise Edition (J2EE) Distributed Objects Server-side software components.

latoya
Télécharger la présentation

Enterprise JavaBeans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enterprise JavaBeans By Yung-Chien Chen

  2. Topics • What is Enterprise JavaBeans • Three Types of Enterprise JavaBeans • Benefits

  3. What is Enterprise JavaBeans (EJB) • EJB is a part of the Java 2 Platform, Enterprise Edition (J2EE) • Distributed Objects • Server-side software components

  4. J2EE Application Server API Stack • EJB – Enterprise Java Beans • RMI and RMI-IIOP • JNDI – Java Naming and Directory Interface • JDBC – Java Database Connectivity • JTA – Java Transaction API • JMS – Java Messaging Service • Java Servlets • JSP – Java Server Pages • Java IDL • JavaMail • JCA – Java Connector Architecture • JAXP – Java API for XML Parsing • JAAS – Java Authentication and Authorization Service

  5. Three Types of EJB • Session Beans • Actions by remote method invocation • Entity Beans • Data Objects • Message-Driven Beans • Actions by messaging

  6. Session Beans vs Entity Beans

  7. Entity Beans Session Beans Account id=0 Amount=100 FindAccount Deposit Withdraw Transfer Account id=1 Amount=200 Database Employee id=0 Position=CEO FindEmployee Promote Transfer Employee id=1 Position=Manager

  8. Session Bean Types • Stateful • Functions that require multiple requests • Stateless • Functions that can be complete with one request

  9. Two Ways to Persist Entity Beans • Bean-Managed Persistence • developer writes code to perform persistent operations • Container-Managed Persistence • EJB Container generates data access code base on deployment descriptor • Harder to debug

  10. Message Domains • Publish/subscribe • Point-to-Point Producer 1 Consumer 1 Topic Producer 2 Consumer 2 Producer 1 Queue Consumer 1 Producer 2

  11. Components of a EJB • Bean class • Remote Interface • Home Interface • Local Interface • Local Home Interface • Deployment Descriptor • Vendor-Specific File

  12. Benefits • Heterogeneity • Openness • Security • Scalability • Clustering • Redundancy • Failover • Transparency • Transaction

More Related