1 / 10

JEE Programming

INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA. Introduction to EJB. JEE Programming. Eriq Muhammad Adams J eriq.adams@ub.ac.id. Agenda. What is EJB ? EJB3 Simplified Development Model Distributed Computing Model The EJB Component Model Core Features of EJB Application Server

junior
Télécharger la présentation

JEE Programming

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. INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Introduction to EJB JEE Programming Eriq Muhammad Adams J eriq.adams@ub.ac.id

  2. Agenda • What is EJB ? • EJB3 Simplified Development Model • Distributed Computing Model • The EJB Component Model • Core Features of EJB • Application Server • Typical EJB 3 Application Architecture • How to use EJB within Glassfish ?

  3. What is EJB 3? • EJB 3 defined by JSR 220 • History • EJB 1.0 EJB 1.1 EJB 2.0 EJB 2.1 EJB 3 • EJB 3 Simplified Development Model • Distributed Computing Model

  4. EJB3 Simplified Development Model • XML and Annotations – free to choose between XML configuration or annotation. • Dependency Injection – inject dependency at runtime with annotation or XML. • Interceptors: Callback Method – support aspect oriented programming • POJO Implementation. • Intellegent use of defaults – configure explicitly when we need non-default configuration.

  5. Distributed Computing Model • EJB Roles – we can give privelleges. • Enterprise Bean Provider – responsible for defining and implementing the business logic and structure of an enterprise bean. • The Application Assembler - combines EJBs into EJB modules and entities into persistence archives, and then combines these modules together with other Java EE modules to produce an application. • The Deployer – deploys it to a particular EJB container.

  6. The EJB Component Model • We build three object types : • Session Beans perform business service operations and orchestrate transaction and access control behavior. • Message Driven Beans (MDBs) invoked asynchronously in response to external events, through association with a messaging queue or topic. • Entities objects that have unique identities and represent persistent business data.

  7. Core Features of EJB 3 Declarative Metadata - annotations vs XML Configuration by Exception -implicit default configuration Scalability - pooling, cache, optimistic locking strategy, avoid concurrency locking Transactionality- distributed transactions Multiuser Security - declarative method access control Portability - deployable to any application servers Reusability - loosely coupled components Persistence - POJO

  8. Application Server • Is a EJB container. • Host EJB Module or application. • Real implementation of EJB provide by application server. • Many open-source or propietary application server available for market, such as IBM Websphere, Oracle Application Server, BEA Weblogic, Oracle Glassfish. • We used Oracle Glassfish v3 in this class.

  9. Typical EJB 3 Application Architecture Web Server Web Browser Mobile Client EJB Container or JEE Application Server Database Desktop Client

  10. References EJB In Action, Manning Beginning EJB 3 Application Development, Apress

More Related