You are on page 1of 8

PAGE No

ot \V
DATE /1

Fxplain entcp.ise
Joua beans.Archukechum th.dinga.am
a
Achitectume. icompased of
Jhe CJB
Semv
-An axchihuzc bean
Entepmise beancon.taio.c

Entupmse bean.s
Entezpmsc bean clienhs

EntexpoisebeanSever
ansachon SevLYItsuppaxts
I is a componen
maclelodevelopiog
the EJB Semver side Compo.nenE
enteapmselexeapplitahioo
and deploying dis mbuted
in amuli-tesdicnID2omeot:

t paorides
The pzameioofor cxe.ahogdeployi9g an manaqing
middle-tier Aogi
AD enviDoo.ment that allouos the execuhon op.cpplicabian
derclop tel uSin entcepnise Jarabeao.s (6JB)_compo.nens
he SB Sexvc tallea caxe o
Managing and CoOdioahng the allocahoo TAouee
Secomby-
Threads

Entpise bean container


Ihe eJB SexverpsDrides one or mare cantcincsox
theeblezpiscbeans whichs call& seB
Cootaioex
Emanaq.cb the cntepnse be.aos Con tained n it
/ PAGE Ho.

DAIE

elt is upaosiblepeci
Registeing objcck
ohjc
pvidng emote intaexene fer
Ceahng andcleshmylng obecia antuk
chectingccuriy forebjcc d
Mamging ochive state fr the obrt

ILLEniepmse beans
Business Componens dereloped using the EJB aTchik
a r cale d asenterpnse beang
t is Servc -side component that en.capsolotes th
cede hat pullpills he puapoce of the applicahion.
They Can be co.mbincd coith other aompon.ebts Cnd
apidlypanduce_a cultom oppicaho

IV Eoteupmise beaD client


An EJB clientis standt-alone applicatioohat
p2ovide tbe uaer-tptePace0gic DD a client mach
-lE makes calls o re mo he EJB compo.nepson
s e r o The EJeB clicot Deedg to b e n Poremed abauk
an
hoo to Piod EJB Sene3 attoo to intceact co Hh o
EJB Co.mponen.ts
Homenterac)
EJB Home Gntcupmis
client JavaBean Databas
EJB ob4cak componenf compon

c0.ntuinex
LRemote EJB
natae seve

EJB Arcbitercune.
PAGENo.
DATE

g2) Explaio types Scssion.


in JSP the Session1S hemog cq u lely uged
implici-objec op ypettp9elekLEismainly
Used t appa0ach all dcuta OsCOnh
SesSioois ach ve

Spes osession
Stateless 9ession
Pshatcpol &essim
9Sinqleton Sescion

Stateless egsidn
-hese Sessioos do 9ot emmbe anythinq abaut
the client behacen Callsop the methad3TE org.e
about clicot oDce the bacio es s poceas Complefcs
They can be uscd acxoss man cliebs

stat Session
Sateful sescion_Can arember convexsahon betoeen he
lienE-of the applicccionasd opplicationitsel
acrossHi methodcalls
hcg stredata that is clienk specific khcn client
Callsthe methods agaio qthe seesion 2membe th
clientsp.revious metood call
Only-osingle clientican usecastatepul.Session.ato
timcThe.state isTekained faz theduratiog of
theclient ScssiDn
theclient cmovra the bean or teminak the
SeSsionendand
the skatedisappcar
PAGE No.

DATE

l9ioqleton Session.
app.lic.ahoD nd exisk
instantiated once pe

for theipecucle ofcppLicahon


heeare helpRud oheroi a Sinqu enteup.st
aco S& Cnd concb YCnh
nskane cohicb a t gharrcd
acce.ss.ed by clien
applican.on
here is Only One Singauton bean pur
Therc s pto lopcateless session, any
tohich ma A pond to clicnt mquest

-Diven bean
3)EXplain lipe cycleop Messoage

Depend ehcuInjechon
PostConshuck callbcclci
on mcssage Readu
Does noE
Exiss
predleatoy eall bact

The EJB Container usoally Cocotel apool ot


message driven bean inslances For cach inshun
the EJB container pcrpcns these tasks
1 messaq driven-beao use dependeb.cy
Lnicchian,the Cobhainer ihjecks Hhese roparenc
bepoc inshantiahng the nstapceo
DThe container oalls he method annotcd
PastConshru.ck ang
PAGENo.
DATE

Glce a slaBclass.9es.sion. bcan a m essagdxiven


bean is nevcPcasixatcd and i t has_oanly hoo
hat non existcnlt and rcady +o Teceive meSSag
AL the end op the Ripa cgcle ha_contauntu celle
the me fhod aunnD.ed C pTedes boy, any Th
bean'sins.hance 1S heb rcad4 0r gasbage
CelleckOn A

a4 t eiaishoxt nok eJarisaminq and diru


InLerlac
he JND) CJara Nla ming and Diecto nleuPace)
IS andpplicouhion Poa oming lnkuface LAP)
that pDvidel na minq cnd dizeckon onchionalih
to application 0iten in Jao paD 9amminn
Language It isdepined heindependent of
any Spe.cipic ddcctouSeice lmplem entahon
Thus, a Vaichyei dixcehomel -neue,cmerging
and alcadu deployed can be accessed in a
common cOay

Azchikeehumc
The JNp1 Architechre consisks of APIandL
SeicePxilurInteaPace cSP) Jaa applicaha.
ose the JND AP to access a Vaiet
Daming anddiecBom emvites The Splenable
aVaieh-op na.minqdircc.hyCLCCA to
beploq9ed io taransp.aretlythere by alloLaing
the Jaaappli.catiansi.ag thsJNDLAPL
acccsstheirservicu See he PallouOing
igue
PAGE
DATE

Java Applicoion

1 JNDLPLa

oming Mcnaqe

JNDL 9 P

LLDAPDNLGNgNDgeAL LeoRaA

Packing d bop nineL21CL


dNDIis iocludeID the Java SE plotfomm:To Us
theJNDL¢lasseg and onehar mre seryiu
pnoyidersThe JDk fnclodek srvio Provde
perpollotoing namingrldireckm semi
Lightuo eight Directoxy Arecess pmhcol (1DAP)
Common objeek Requet Ootes Archi tcchur CLORB
Common obeek seryice Ccog)
RMD
Jaya Remale Methnd )
Domaio Name Service CDN).

Cthe 3ervicprider ean be douohloodeol


o JNDI pagerebtain.ed om othu
Vendos

S2Explain lhot is Anound JnuokeMethod


Deines an Inferceptn method that ioterposeS
en boainessmehod.May be ap lied to an
nen-PLn.cu non-shahc metb.od coith Single
parameter ebype n e e e

the tmget i
gpe object ep
Intercep oy class
hDundlLnvcke-
a blic object Intercept CInxccahicnCne
Lhpos Cxcephon

A Class must not be declarc morchan eDE


AroundInvoke method
An AxoondInvoke m ethcd can Invoke ciny Componenl
Or TeauTcethat ae method i t iS bcrcepha4
Can nvolke anq Compo nent ox TLOUcce that
the method it is intcrcepinq cao
ivoLe
Apround lnvoke metthod InvocahonS OccUr witi
the Same bransachon aod
as
SecUrt_contcx
the method onahich hey 0r isBoposing
Axobndlhvo ke mehod h may - LO Cinu ecephon
that alloaed buthe thzoLas classe o
Lhe m ethooon ahich he CT
intepo.sing
Theymay Catrh_and SuPPTCASexcephon aod
Tecover bueallingTnvoca honlontcxk oceed C.
PAGE No.
DATE
/
rametex ebype Toracahonconlext and xeho
ype hject.e the taxget closs
or_of_Ciny
nerc.ep.hey class
AeundLnveke
blicohjectLotercept CInuocoationCon text ct _
khapeos GAcepkian t

AclaSsmust oot bre declare nmare than one


AreundInvake metho
An AxoundIvake methocl can
Invak.e cny Conmpoo.enb
-x aouncethatthe metha.clit is bcrcephna
can Invelke.any Campo.nentOxesaurcetha
the emetboditisinterceptinqcato Invoke
Avauedlnvoke method Invacatons Occor oitti
the am.e ransachon_and Security Contex
as the metfhad oncohichthey oreioltpasing
Aeundlnxa.ke metthad th may thoLo Cany ecephon
that coe ollataedby-the thaoLos clause e -
the netheccn cohich lhey Tintepo.sing
Che may caeb-andSuppreaS excephon aod
xecovar by-calliag Tavoca honContexE mceed).

You might also like