ejb overview celsina bignoli [email protected]. distributed business applications server db client...
TRANSCRIPT
EJB Overview
Celsina [email protected]
Distributed Business Applications
Server Server
DB
ClientClient ClientClient
DB
Server DBDB
Distributed Systems – Issues
• Remote method invocation
• Load balancing
• Transparent fail-over
• Back-end integration
• Transactions
• Clustering
• Dynamic redeployment
• Clean shutdown
Distributed Systems – Issues(2)
• Logging an auditing
• System management
• Threading
• Message-oriented middleware
• Object life cycle
• Resource pooling
• Security
• Caching
Middleware
• Each issue correspond to a service that needs to be addressed in serious server-side computing (middleware)
• A company can build its own middleware– Complicated to build and maintain– Requires expert-level knowledge– Completely orthogonal to most companies’ core
business• A company can buy an application server
– They implement the middleware layer– Allow developer to focus on the code specific to
the vertical industry
Component Architecture
• Agreement or set of interfaces between application servers and components
• Allows any component to run within any application server without changing code or even recompiling it
Enterprise JavaBeans (EJB)
• Standard for building server-side components in Java
• Defines a contract between components and applications servers, agreed upon by the industry
• Focus on vertical, rapid business development rather than middleware development
• Designed to support portability, scalability and reusability across any vendor’s middleware services
EJB as Business Tier
• Enterprise Beans are server-side components– Perform complex computations to code business logic– Access databases– Access other systems– Must run in a fault-tolerant, transactional, multi-user,
secure environment
• Enterprise Beans are NOT presentation components
• Sit BEHIND the presentation layer (and do the hard work)
EJB Ecosystem
Supply Tools
Construct
Enterprise Beans
Tool Provider(EclipseJDeveloperNetBeans
Sun’s Java Studio)
Build Application
Bean Provider
Application Assembler
Supply
EJB Container
Deploy System
Deployer SystemAdministrator
EJB Container/Server Provider(BEA WebLogic
jBoss, WebSphere, … )
J2EE Architecture
Browser
ApplicationClient
Client
Servlet JSP Page
Web Container
EnterpriseBean
EnterpriseBean
EJB Container
J2EE Server
Database
J2EE Technologies
• Enterprise JavaBeans (EJB)• Java API for XML RPC (JAX-RPC)• Java Remote Method Invocation (RMI-IIOP)• Java Naming and Directory Service (JNDI)• Java Database Connectivity (JDBC)• Java Transaction Service (JTS)
J2EE Technologies
• Java Messaging System (JMS)• Java Servlets• JavaServer Pages (JSP)• Java IDL (CORBA)• JavaMail• Java API for XML Parsing (JASP)• Java Authentication and Authorization
Service (JAAS)