Download presentation
Presentation is loading. Please wait.
1
Introduction to Enterprise JavaBeans
2
Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java RMI –Microsoft.NET Transaction Processing –Accessed using RPC Asynchronous Messaging –Message-Oriented Middleware
3
Component Transaction Monitor CORBA (RMI-IIOP) –Communication backbone –Available services must be explicitly accessed by distributed object Transaction Processing Monitors –Resource-management instance swapping pooling object lifecycle –Concurrency, transactions, security, persistence, scalability, performance
4
Component Model Definition of Enterprise JavaBeans The Enterprise JavaBeans architecture is a component architecture for the development and deployment of component-based distributed business applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, and multi-user secure. These applications may be written once, and then deployed on any server platform that supports the Enterprise JavaBeans specification.
5
Why Standardize a Component Model? Implementation independence –Avoid vendor “lock-in” –Minimize proprietary extensions during development Growth in third-party products –Component libraries –Add-on Products credit-card processing legacy database access
6
Enterprise Bean Design Java Persistence Object (Entity) –Model Business Concepts customer piece of equipment an item in inventory Session Beans –Models Business Processes stock market purchase hotel reservation
7
Enterprise Bean Design Message-driven Beans –Models Business Processes –Similar in purpose to session beans coordinates tasks receives messages asynchronously
8
Programmatic Implementation of Entities Available as plain old Java objects (POJOs) Java Persistence API Mapped to tables in a Relational Database –Defines bean’s business concepts Bean class –Object representation in persistent storage –Tagged with @javax.persistence.Entity Primary Key –Provides pointer to a database –Designated using @javax.persistence.Id EntityManager provides interaction
9
Programmatic Implementation of Enterprise Bean javax.ejb package –Core of the EJB API Remote interface –Defines bean’s remote business methods Local interface –Defines bean’s local business methods Endpoint interface –Defines SOAP-accessible business methods Message interface –Defines methods for asynchronous messages Bean class –Implementation of business and lifecycle methods
10
Local interfaces and Server Generated Code EJB 3.0 specifies local component interfaces –local interface EJB 3.1 local component interfaces are optional –Bean instances injected into local clients Business and life-cycle methods exposed to beans co-located on the same EJB container No distributed object protocol Improves performance Stubs actually implement component interfaces, whether remote or local
11
EJB Architecture EJB Container bean remote interface
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.