Download presentation
Presentation is loading. Please wait.
1
Introduction to EJB INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA 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 EJB Container or JEE Application Server Database Desktop Client Web Server Mobile Client Web Browser
10
References EJB In Action, Manning Beginning EJB 3 Application Development, Apress
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.