Endeavor JavaBeans .

Uploaded on:
Category: Product / Service
Enterprise JavaBeans. Ruslana Svidzinska CSE690. What is EJB?. An EJB is a specialized, non-visual JavaBean that runs on a server.
Slide 1

´╗┐Venture JavaBeans Ruslana Svidzinska CSE690

Slide 2

What is EJB? An EJB is a particular, non-visual JavaBean that keeps running on a server. EJB innovation underpins application advancement in light of a multiplier, disseminated protest engineering in which the vast majority of utilization\'s rationale is moved from the customer to the server.

Slide 3

Server Components Server segments are application parts that keep running in an application server.

Slide 4

Java Application Servers A Java application server gives an upgraded execution environment to server-side Java application parts. A Java application server conveys an elite, exceptionally versatile, strong execution environment particularly suited to bolster Internet empowered application frameworks.

Slide 5

WORA The Enterprise JavaBeans engineering characterizes a standard model for Java application servers to bolster "Compose Once, Run Anywhere" (WORA) movability

Slide 6

Component Portability EJB innovation takes the WORA idea to another level. EJB totally convenient over any seller\'s EJB agreeable application server. The EJB environment consequently maps the part to the basic merchant particular base administrations.

Slide 7

Overview of EJB Technology EJB Component Model Enterprise JavaBeans segment show coherently extends the JavaBeans part model to bolster server segment. Server parts are reusable, prepackaged bits of use usefulness that are intended to keep running in an application server. EJB can be amassed and redid at organization time utilizing apparatuses gave by an EJB-agreeable Java application server.

Slide 8

Simplifying Development. The EJB engineering gives an incorporated application structure. An EJB server consequently deals with various precarious middleware benefits in the interest of the application parts. EJB part manufacturers can focus on composing business rationale instead of complex middleware

Slide 9

Simplifying Development (cont\'d) RESULT: Application get grew all the more rapidly Code is of better quality.

Slide 10

What EJB Accomplishes You can take any Java class and with little exertion make it a dispersed , secure , value-based class You can take any information source and make the information source have all the earmarks of being an accumulation of Java items Eliminates qualification between information from a database and whatever other source All data is gotten to through Java questions All SQL is neatly embodied in Java protests genuine protest situated programming high reusability Database objects work with the full Java class library

Slide 11

What EJB Means to Us Developers can concentrate on composing business rationale instead of composing low-level framework like information get to, simultaneousness, exchanges, threading, and so forth. Decreases advancement time Reduces intricacy Increases quality and dependability The information about EJB is convenient among a wide range of items in light of the fact that EJB items depend on a typical standard Greater reuse on the grounds that code is situated in shareable, server objects

Slide 12

So....let\'s investigate Enterprise JavaBeans A detail from JavaSoft Enterprise JavaBeans characterizes a server segment display for the improvement and arrangement of Java applications in view of a multi-level, circulated question design The Enterprise JavaBeans particular characterizes: A compartment model A meaning of the administrations the holder needs to give to an Enterprise JavaBean, and the other way around How a holder ought to oversee Enterprise JavaBeans

Slide 13

Clients Enterprise JavaBeans Architecture The EJB engineering indicates the obligations and cooperations among EJB elements EJB Servers EJB Containers Enterprise Beans EJB Clients Enterprise Bean Enterprise Bean EJB Container EJB Server

Slide 14

EJB Server EJB Server Provides a Runtime Environment The EJB Server gives framework benefits and oversees assets Process and string administration System assets administration Database association pooling and storing Management API

Slide 15

EJB Container EJB Server EJB Container Provides a Run-time Environment for an Enterprise Bean Hosts the Enterprise JavaBeans Provides administrations to Enterprise JavaBeans Naming Life cycle administration Persistence (state administration) Transaction Management Security Likely gave by server merchant

Slide 16

Enterprise Bean Enterprise Bean EJB Container EJB Server Enterprise JavaBeans A specific Java class where the genuine business rationale lives May be designer composed or device produced Distributed over a system Transactional Secure Server sellers give apparatuses that naturally create dissemination, exchange and security conduct

Slide 17

Enterprise Bean Enterprise Bean EJB Container EJB Server Clients EJB Clients Client get to is controlled by the compartment in which the undertaking Bean is conveyed Clients finds an Enterprise JavaBean through Java Naming and Directory Interface (JNDI) RMI is the standard strategy for getting to a bean over a system

Slide 18

What\'s Unique About EJB Declarative Programming Model Mandates a holder model where normal administrations are announced, not modified At advancement or potentially sending time , traits characterizing the bean\'s exchange and security attributes are determined At organization time , the compartment introspects the Enterprise JavaBean properties for the runtime administrations it requires and wraps the bean with the required usefulness At runtime , the holder catches all calls to the protest Provides value-based, threading and security conduct required before the technique summon Invokes the technique on the question Cleans up after the call

Slide 19

Understanding EJB Components

Slide 20

JavaBeans versus Enterprise JavaBeans Enterprise JavaBeans is a structure for building and sending server-side Java segments JavaBeans is a system for customer side Java segments Conceptually related on the grounds that both are segments The determinations are distinctive The particulars don\'t expand on each other or depend on each other

Slide 21

Goals for the Release Roles and Scenarios Fundamentals (Scope of EJB) Session and Entity Beans Transactions, Exceptions, Distribution EJB Bean and Container Responsibilities API Reference What\'s in the EJB Specification ~200 Pages of specialized material for EJB sellers EJB Vendors Have to do all the WORK

Slide 22

Enterprise EJB Scenario Existing Enterprise Middleware EJB Application Server Clients Web Server CICS Programs EJB Container Browser Credit Card Servlet Shopping Cart Databases Inventory Application SAP Modules EJB Server

Slide 23

EJB Container EJBHome Interface EJBHome Class EJB Class Written by Developer EJBObject Class EJBObject Interface Deployment Descriptor Manifest EJB Server An inside take a gander at the different segments of EJB Bean Class is composed by the designer EJBHome and EJBObject interfaces and classes control access to the Bean class Deployment Descriptor and MANIFEST portray security and value-based attributes of the Bean Generated at Development Generated at Deployment

Slide 24

EJB Container EJBHome Interface EJBHome Class EJB Server EJBHome Interface and Class Used to get a reference to a bean\'s remote interface Provides bean creation administrations myFoo = fooHome.create() rather than myFoo = new foo() Supports numerous marks to make EJB examples Similar to class production line in COM and CORBA May be created by devices that accompany an EJB server Also oversees EJB: questioning (Entity Bean) erasing (Entity Bean)

Slide 25

Interface javax.ejb.EJBHome Home articles must actualize this interface Returns a reference to a bean by making or thinking that its Every bean has an EJBHome interface that gives strategies to getting references to at least one beans make strategies are utilized to make new beans there can be numerous make techniques, like a class having numerous constructors Provides a bean expulsion interface additionally The EJBHome Class execution is given by the EJB Server Provider

Slide 26

Sample EJBHome Interface open interface CustomerHome broadens EJBHome { open theoretical Customer create(String id, String name) tosses RemoteException, CreateException; open dynamic Enumeration findByName(String val) tosses RemoteException, FinderException; open conceptual RemoteEnumeration findStateByName(String val) tosses RemoteException, FinderException; open theoretical Customer findByPrimaryKey(CustomerKey pkey) tosses RemoteException, FinderException; open conceptual Customer findByPrimaryKey(CustomerKey pkey, int findSource) tosses RemoteException, FinderException; open unique CustomerState findStateByPrimaryKey(CustomerKey pkey, int findSource) tosses RemoteException, FinderException; }

Slide 27

Clients Client makes conjuring to EJBHome Class by means of the EJBHome Interface Client calls one of the make() strategies on the EJBHome Class. The EJBHome class can have different make() marks. EJB Container EJBHome Class make() EJB Server

Slide 28

Clients EJBHome Class instantiates the Bean Class When the make() technique is brought in the EJBHome Class, it is in charge of instantiating the Bean class. EJB Container EJBHome Class EJB Class EJB Server

Slide 29

EJBObject Interface and Class Intercepts calls to the EJB Class to include bolster for: exchanges security threading EJBObject class has an indistinguishable strategies from the bean and delegates to the bean for genuine conduct EJBObject class checks security and sets up exchange before assigning method call to the bean Clients can never get a reference to a bean\'s EJB Class, just the EJBObject interface EJB Container EJBObject Class EJBObject Interface EJB Server

Slide 30

Interface javax.ejb.EJBObject open interface javax.ejb.EJBObject amplifies java.rmi.Remote { EJBHome getEJBHome() tosses Rem

View more...