www.tutorial4us.com
tutorial4us.com
A Perfect Place for All Tutorials Resources
Core Java | Servlet | JSP | JDBC | Struts | Hibernate | Spring
Java Projects | C | C++ | DS | Interview Questions | JavaScript
College Projects | eBooks | Interview Tips | Forums | Java Discussions
For More Tutorials Stuff Visit
www.tutorial4us.com
A Perfect Place for All Tutorials Resources
Spring
(Natraj Notes)
www.tutorial4us.com
05ir€ tebFrarne (l)dlKs ore can jusr develc'pg hjeb ofpllco$ctos '
LEing opn riarna coorri de dcro juot derrelop R{5i6krtre Logics'
t.lO;og 6frin3 toe CaD derclop Otl hrtaS oP lo$ic3 like Buaioeos l-ogic) Per5i5trffe l$t
lDrftrofiC'n logic, Prese'trc'ttcm Logic and erc'
otlorjlota
->
booFb '"
tfro.)g t.r''
6Frng 5.x
6pdDg j.'x
using 5txlo3 toe Cac)
fLoo - fire &{pl'r calloD 6 /
oP opplicnuf c'o6 ,iB€ 6kcrndolone o+Pn6.,
D;otribrrreJ aPPlicotloos, en'lcrPrl€€
"n" {*
&velop dl) Yjrrt6
oef oPPltcortoot,
sprDS
I
rgpe I jc,vcr-j EE Frarre tr:orr'
I APP)i cafioD FrarritooiK
Vcndtn: XntaP<.Ce Bt
G'tatc'r : hr. Qad Jhoo6c'o
OpeoSource Slrrl
'Io Dd.)r,lood elul I gdjpbad as zppire Roro '11^11^1'
5gt'ogftatrfrd E'65
V €T6i6o : 9.5 , 3. X ?.5(Gopolible eorrb .hrr'o +)
3':r ( tlmParble lDirb Jdrl'st )
doco crqJ FA&5 : wun. Sptn6ftarneoooK' ar$
dDlioe Tiahnial : blto<o. rgeirdia.Sr
Bood d{ricols i (a@co.&vc,,45 . coro { trca"" royf aro$ 'com {
u'@@' r)c.tafa z' lo
6pring iD Achcrn Eoro rDann;ng pL{_bti shcd
Coor..ing y moduteg. crrbere
.oS 8fxing e.^ Cookri r)6 6 (oo&rte6.
Cootcd oO P,o rr6duleS hrt $cr3 ore grd4ed iofo 6 roqicrr Cofr{-Acrries
O ver vietL, dlogrom i -
i6t
a)
ru{
t
l-ut
6p'jry Aop @
5Pilog e'l Ov€( vlei! Dtagraro :-
6pdog 3.x Ove{ vicu, Dlc.6ram '. -
{$.8 e'x JEElrbd(rle =
tt cot"
'-/
- (nvcl-&rocnl )
E@
t-] ---1lPc'ftletl lsttA"6 I
rrtl
Srrnqg J'. x Conttrf Dod'rle + fl iSc info "
&riog 4'x tocbhDod4le + 6PnDg 4'x at-bl4vd roodcle
plcrin trd.be io
ftntry tr wcb oodulc =
e) 5fn rg COte iS
sptn3 DAo I
$e base -gal"
("'
Sfrd$ 6D0o molrrle
?r,cdgt e6
ob,sttcrdc,n Ld4cr oYl
ol,l Ottct
Pn"^
d?$
ff_l F.]
@@
flr""-*""t-I
Aop
Tesl
&ufpa Pc'lst6f(nct,
lo6ic
:> Sf)riog ORh rroclole p6vide6 ab6rr1cHo'D :h}et co orld! Opn Fl(r)6 ao| allfjrl $ lo
deuelop O-y rcsfpiD$ fx{6;sttrx.e Lo6ic. lil<€ +hbcrDd^t-€
._
-1
gprtog AOp rrpclote is ginr) fo a?pl$ ispecr6(n'aaUo*t" Se"rvices)oO sprrog Affe'
---r^'r ' '' ^ ' '- a^;'n nooliC&tlcnr5 CorffitutuCo'ble P6"*'
-'4 4r'r€ VrEb rr,66odg i5 0iueD to rrnFc eprlns OfPlicadcto€
:
Ob c,xro fra-. eoorl.. slul a,"ilca}loo6. lire shru-ts c4pD / JsF cfto6 e,< '
- based urb .Pliccrrlcto'
;-
--+ gprirg c&nfcxb mcd'ref JFE fiodsle Prci'ldes
- terhmlogics llke JNDI, EoB/ Rllar J|19,
€r*etprise cr{Pn5 , Distrlbcrrcd AfPnS And
crlamadlco Ler6er orr roulHpla CcFe
lx{ollc.rl ana etc" '' &*}ap
O*er cl'tPucrfiona'
|,1;dd le&aye .%viceb &re addtllc'fnl
'
@Bcrool aoi co'nPr€ctro'de Se'flice5 I tqrcg oo a.v
opp)iccfirD6 -lz:
oape fbem
H'." 6€curi ru/ TraoSo$roo
rrnre 1-z'sec* and Oc.rrlcLle'
rngmt, bglng
z,falwt futw 6t@
rhe coboe sprinSa?i 6nd iE5 deryrttr''t iav P;re
--+ (stro$ e'5-b(r"e >  dior oatirg '
jctr {c{Y4erLl-g
-
is Zs1'rtogz'5 -b6rne
7 u u jaravrtn - cornroons cc'noYtoil6
-lqB;ng 'J <1 Y
-.-t-Ibe crasses and inrrfucc s oP sPnoX'ia{ us€5 fie clzrsses o* t*t"tt: op 0wmc'>t-laad"t
--+
1#'o1[l 5-home >clrrogelog' rrt u* &ta'tO alsrt Va'do&S vc-6g6o5 d? &;'n slt'
$prtng deffrnric.rr:-
+ 5prrng is o' &uabase d O1:eD 6oc-ry.€, l;€h, -trx{hi-i loo6elg
" ard dqrnderrg iqjedc,D based appl;co$on @itrva-JEE
oll Find6 of afflicc'fion6.
-+ O[PD€cxrr ce 5l(' rrEao S Tt ]5 mi
OPcsed to pY{IarDrrrls alorg
carple d, C.(5p€ el orierLk d
FrarffrrcY k fo derr-loP
or,lg Pree elto b'r-l- it6 Slrlrce cmte cpitl be
c.pirb io6t-cdlal"loD'
6pnng slca '
li€h-f-craflhJ
a+PD6'
fcl fetta,o Pre-deFrrd ctasges '
trirbcr.,-t crsing 3Pn'6APr
-+ fo,ql i,g lighr-DejBhf slco crnd
rqctr oe the 3Pin3
C{plico$cIn se-ruc-'r
resO(-trces o? sPnr5
colrre exauht^$
f6rt reollured
TeaSooS)
O Spti.g CantarrrrS aYe tlthj-&cJghr
ang o^ee tU i"sr creodn3 *fil6
NolE'.- Servld- Cctnfciff-'r/ J5? Anttlinar
z.s1.lrirg bome>rrc "{?.;rd".t Gpr€sen-r5 Sugce cvre,4
epting AWI)taHon5 ore
ood use
blluo tcoo comPonen'fs
,,J
')
o
@
-> A? the Degree oP
Ccrr4r-"crenf5 4ve
de{€nden% io less
loosetg Ce&pled '
*@epr'ng Terlno63 5 €163 1o leaxn
IF rhe &gree oF dq'e'"deT 15 )s rrrrrc bw ttoo
Aye telSturl3 -ccuped Carnponenrs -
Sprro$ 15 looselS ccrgltleJ 6ltrr' r€ozoos'
Q qxtq 4p ot'te- wnwas o'rb ffing
cJr r& rnetdple roodules
c-€ Cc.n inlqmle SPring coirb
tu garheJr'
Coe Cao ule Cj,rbett rtd;vd-PP! rltd4rlc-
6tbu 63aua rerlnd-qitg in appbtatlorT
erlr,yrArfrf|, Berorrse rtrl cc'obe 6'aivalzd
eLt€ be.t^i5.trigtlf Cenlarnert
a*lo crn be elcc,,j€d toi$'ocj- tt'€ hr"td *i5hJ-
and ebwuen 3ltos'
oLpplicc!$crq conkP &rrbPd
€{,'ti"3 c4prirafionS rrrrckr rneroor3 4d C?u fda'{c€S cct€
*rn uoe 66;rq e3 rk
ccso-{grtonj/s
tFffi tht &trnPon€nj's
. de,etop.qg.rl-, likei genl€f5, }r>P, $u-ttg, +iLe Dott aod ef.' "
''-, -4>(9 Evc-U Sfing rnodure PrDVideS abshracfioD Lagto o"r lxovidro$
roQtfiPle crre
-. +€cbno)%ies ond rnakea prragrctrrrrrcrr
p*s R"a &r'e tcclnolqies
bcsed
tlog{aminj cdrrte dareloping opplicaHons '
-+ Jt 15 oturcr5S -oc*'rer7.d t'o &elop$S$l"amr'lccitlano  enc&iliog roiddfecor
-'7 &xvrceS ire 6ecrrtirS,-IrcrnScrclicro
ff€ror ctod erc'"'
J
sp,,ng Fovi&s q neLo **'htd"q; u'ued BPr'n8AoP to ofplb fut'
roiddlebrrYe fervicgs on 6Pttog applicarxoDe'
t-z
-Th)s
rrnve6 rhe 4nn3 as Aat€{} or;ented '
+ Nh* is |tr dipperencc ulLo cleprdeoca lcoEt4 at',d &FcrlencS
Irsec-rlc'cr
9'
,
3re'cc bl.o utq! ug' u
*t*' od qorhe" s dqzrlet* volues
...---+
clePrrlenc! toolru?:- Rescrrce erpliciYl5 deaoaa4
-, Roro O*,e.s. (tixe otter rco-,rce s)
,..-., + in depen&ncx lorcrp y,e$)oyce pulls rtrevcd-'aes Prorn ottEtl
ih"',.
-'' E90'"- ip srrdcr.t ffi5 q4!9-ry+-9! croi aPrcr passlrlg 'rec#eat P^iY'abio @rkJ
kpendcn$ lmVtp o , JNDJtfttsr'U lccil-te,
E$@:- 1e ccag coe colect utagjlorc oh'trcj rePerence ktxn
'./
.., Degmdent-3 tooLu-{'
.r-, Mvknrc(ge:- ressr'6ce can gorbe'l oorg ql'ored glq'ode-,nrv*!'!/es'
-'?
D,5crdvuoK,-te:-
qsecrt(r shctild 3fr-nd Some time loguhc,r it dqryt'*ttva-br8
"/
V&rt( ctitizing ttewr
-.-+
kfrndeouJ frrtrctlcml- ffre urclc-tloging ee.rv&r OrtC*ttTAnU( Cw) PfLo Cct)P'tntlm(
-.., Ccir) aPec^at 'ltsffr!€ &ssign5 vrrlrre5 to tbc rrsccrrce au-toroarlczk and
v. $nornicoila.
-)
in Da..drrj Jrrrr'ticm forsoauea
c6 focLinver5roof crrrnorcl)*e ""a"tovnX
- &nrtarrcr to{ ) Se'.€x [d) Qunrrrne [tl) F[(r] and etc" pushes the vcrtrtcs to rt-e
Teid.{te'
a----1
r$::P ccrrlse nz<ric,{ i;; ossigrrd fo Sradenr *re ra-nroerr-h 6i<-l&rlt tr-$iore'ro R'r --
cr cfi-use is cofled Depeo&ncaa"ri*tlon,
Eg[-
-Ihe t,roJ Actlonfuwre+ .{r'dre.9 '€n'oJcttztto E:rttoBeec,ctats f/t-DPelrh<S
Eg(r:- The cocg Jv fl &016 c6tr5rr4cf(n orilaTafrfi'Ght:u 'Jo ci5ign #tw&F" s'',nol
colJs llkcXcte rrr-rhocl ,Service G'-) b el.Pdse
Serv lef PI€rctrD '
d.gndenr Volcres di"tt*l; ta'i|wJ qtu:'tg
Volu.5 tD oQject.
1'g@:- -rhe cm3 &.rv6rConiarrg
rc]Aerlt/ r(sgoose o[Pr3 ro oclI
Artvantr,Se a: -
r€sdlyce Can use the iniecled
tri ge* d-ero'
h rn<
o'r.lu**g"; . 1.vp gn*lFyorn.,-@& r''"3 )ogt 8'$
'vlr
on 0-rryd ll e u
thc- glrde'{IcoSin$ e'n
n€ress&rH { uoressonJ vdJ-a1es
n 4 &p/-* oT;;ff:" *
--, 6o'q s'pt'cts borh de5x-deng
iooF
.,nrcartxs ate;;t'"
l"rtn€o,t d+-&"fl rnfir-ttco c
6p'nog ogpliccorcrr t6 co'teA €&cayce. i8*'t[I[.ry{
-) A Fte to1) fr%rar') o'p an c4plicdl<tq
Y
&
l
A1r rr4id idvq pqiecrc o''c b'c(E€d c'D
J:t:J"iJ:'f"""*:*
1'1'--"-'->llelel
l^be-6-'----) [B'to3ic11*'sist"t'ce
lgrc ) (live lvtu."as offictt
)
v > t iun+el ------->
-
prcxnrctaoo
logic Cl)Ke &aL(t' ri c'q
)
C-----n (rrnrrolc'l bqpa ----+ JoEaIc.Ho'd' Lrgi 6 (coonedi";5 b5;a)
-+ The dnin lcfJlc OF he olpricc.rtcrrr ii Ccll€ d Business l-Oc;l c
-,,> pe.cisl-cnce loglc )5 u-gfut rrnfu- corzo opt"jrtc'ns on Dc'J.Bc6e
elcos
C--rc'rcore g--> t4'd trfe R-+Pead D --trytJt ^-
frw,.) '- (,sclctt) G&u{)
*--r precrr-krHoo lc6tz i6q1ug5 ute'riorcafa.cc {* errd&scr, to &-{,pPi3 to lnprs to apt}cat{,au
aod io v;cd 'resat$ c4 the PPll<tha
-r Jnfr$cttcrn lqic Ccynrrols crrd np.dkl'6 OA the of/ratkms opftre o44[calctn'
(nelcl )
t-
EJBisrorrBca. co"'P'EJBEorrrg geaclcarr.lP --=:f)$s/6
(f.roglc1 (Peratstcoce lo5i c)
( rrvle I
'l
-r
jsp-------------1 Seovto :--; EfB SesSionBeap GrnP
Cv) (c) (a.toei.; kli,i:;),,s,.1
"ana Ja'{a cld55 thar g;4loJts [€{3i5rcoc LLBic &ot', Orl^cr tqic5 c4 ttr-
app)icoftcrl., tD rmke lbe Pefsisrcnce bgia a6 the Pteniole k€i4fr, n^dlfr
Ofd fcusc$le lo8ics t5 Corred DAo(nrrc.Access O$af )
i''
mMet '
st'*sArp
----)
Eresersu[-Bfoncamp
-_-->
DAoctos6(Jruc) -------------*Ot
iSf --------------n 6errle, ---------------- JavaclosS / 'Iava Bcan > ogs),.tr
cvieul) (rcrnrrcrtler) (rroaer;
ioP -------------t Servlc,r
-=---> RHrA?p
[vieo; (crnrrotrer) (r,rodet)
J* -----------> fuvttt ---------+
/ ,i  [c')
t?/o:J rols
(6rs;sttnce logic)
(k'ait.toce 19t1.;
DAo C+tibctrpfc)
- - -- --- - -aDoslto
(itIs,'sKnce lqlic)
LV) tc)
-@
5I&IISAPP -------------)
tv) cc)
l-0o"**o
-
[a'togi.1
[o't41r.1
gPYrqg JEE A0P
[b'toglt;
. nrodel I
E B*.,FG;-"6*',0
--=--
D^o [uE ng4) "ae"l',u
lv; tc)
@
'vap?p
Cv)Cc)
- (,r)
-ipt'og wcbtlvc ---=)
cv) ct)
Ig,locJic)
($ tog'c 7 ( Pr'rsi sKnce l€lc )
#rnrdbJs-,vic€S Cornp
-_--->
pnofHibcYrerc) rDosltr]
CRrsishcnce loBJc)
*fflel t
S1r".{ gr NP + 3pr;og oRrl
J
m'o &4 "---- -4 DR s/to
fte Po6s;ble Techno lcgies o( vieo kqc'(
jsp
veoci lg
frce rcrtf l'€{
f;|ltt1- xro 8ig6bcE Lcrnguoge trt'rt(t*'r'noo)
Jasgcr ("&frrts /i e.ft'ts
(DsSble
Savref ,
SerrPrHt rer
PoSiUte Fc^rqecrrxus og' vieooLceter, conr@ftar laXerr ;-
6nurs
J5F
,.tclruotX
Cocoon
Tc,+shq
Netf4vC ard erc' - -'
P:*rru r.onoloat.* tt t-
EJBfusstorr Qec.n, Ncb?wiceg., JaJJaclasS ) Javr6ean ctar
Rtr, HWloofer fspriqs opn DisrrlxrreJ lel}'nol%g
) , CteBn,
efdng UEE and qe.--
l]ssrble -locto LaSor +a de6ne
,rJ
ODBC,
hltrYmlt'
OUB
io c
"ouo
(rnsr*ffc( Ae)
#*"ryg*" comPoo<rr6
-loPtio'
C'DO
igor-le
Stnog 9Ao
Qnng Oer 6nd etc"'
HiSb Lernl Praf$ Arab) trctur e
tf
Srltrrs - 9flno g - i-ii brr ocl€ Tnrt€retrlc,r)
t
oinnt, s5P, joaer rcp"rrs.,. ,,
Sovtd( Ailan&rrra )
5f),tn6 JEE 4p [q"nt e*,,r A?p,:
iliternorc / ep'ing oert
PAsish.n(e L{ic ta+rf L}1oddDr,€r,
oracle pg sl,
-> Att loreor Technologi€.s oF iova
Sapo*ng trJo/ f"rr rrnctel
ai lighr-c*i'gk.
POJo cio55 :-iFA jc..,rc,. ct6rsS tbo*
ba"d 6irPl-cDare aPP)iccuflcrrr
Jrrrcr&ces o? IW tec-hnolo69
L3- ig iala cdsb i5 taFen
errcoJrngr irnPlernenhnS $e
|ben ib i5 cCIled Poro cto35 '
FldrnPks:-
aod *eir larcst versicrob (rrefc,vd a6t.lt rco6) ore
pvogrqmlng To rrrake *e beohrbQ'e-g qft{ a4licollon5
is acln3 06 fesocrrce of ce{ftQ}n Tahnolog5
is not enEndiosi irnP'lerrrrLl-;n3 Prc&P;ned
clc'sl#b'
spec;$ic APr- rbcn it B la cc'ucd PoSo clos6 '
Gs Ksc(trce of srnng Gpplicalorr l@irboi.u*
p'e&Rned clas6/ nwWs oP ft""3fut
o Public C )as$ T?si " Test " i5
{-
3
Er.bic tlcrso Tesr atods kroo
t_
'0.*u iu nor ex rcnd;T Sro-
^t
ortB.r clc'rt -
Iest is p656 116t5
PaID c lcrss .
fr]
a------r
' 83.:- Publit cl&s$ Test erKnd6 Flt*?Sctr lef
7,
* orr"
]* rcr PoJo dctsb ' "'tesi' is Scrvler a+i degr'dent '
G) fru.b'lit clcrss Tesl erttods l>mo
0
1.
=
1
*u. clc155 Demo ext(rdg Gprcoic$.nttt
e
1
:
-Y
,'Test,, *
Dern o " ore not Pio CUsteS
Pujotl c clctS6 Test implerrer,rs Java'r rDi ' Qerootf I
5
L
.)
e
"rest" i5 rror PeYo. bcz Rernotc is a tclnologS
@ S Flbtrc clas6 Jest irnpLrocnrs jnva's4'l 'Dtue'r
{_
3
"Joua.r.yr.r--*o' [r; is p..,tt oljdut ta-brn1og1 ' so"Test" io mr P0J0 clas6 '
@ Rr-bl'fc clost -iLst iropleroe'ts .tnna'lot'6'Rtnoabte
t_2
=
3
patrt c(
" jo',o,on5. Qlnrnble' i,5 fie Coreisva ' so,Tfsf i6 PoJb
@ pu,blic cldss Tes+ e.r6Dd6
-IbreaA
u=
t
l
ilTest'i5
patb class bc-z java'laq'l6t"oa is pcrr 4 bs;'java opls
@ pubrtc r]ass Test
J
L
V..btit uoid ror()
t_I uses sFioS APt
3
7
r{
J
Test i5 ?oJo clctSs.
__ Sphog &rpp.rr6 PoJo / poJI
Pol:-
rrrrlcl prDgrarnln d,,e to rtus 6pnnXrr?P,,5 are lighrffl#"
l.lhq &dq innrft{ce i5 fab<n as tl,e reaatre of Cerain kdtnoloS, h.sed oppttceft6,
.,..., 61pe"'tlc- Aflrrs tA.^ ir l5 cattecl @rr
ElcroolPq ' -
0 innn fo< c '[est
1.
/i rtrrhod dectc'rarl cms
---l
1sg1,, i$ poJJ
J
- @ in€t6ag Lrt e^Erd6 Dern o
t "Dcrr,o'' is usar -dcgncd intcrPare ool- cxtc6din3 Orber iorer $area
.._, 1 &r "Tesr', i5 poJr
*
(O ,nr..* T$r 0xrnd6 javo.rmi. RermK
i
"l'::
t'T,st'is cnl- o- poJr. (kca,rrc joro.r-i.Qe.rrt ;J RHLafl inFr&trr
d
- O hwft,re 1.5; qnirnd 5 iava. io, &"Ufiz.tte
''.J
1 Tegt is p1-1 " ()ecalrc .rc.lc' io , Serrali?oJole lnrcrRrce is rrc! mur,lo
" LoJi'
t&.rr c{ &va+prb )
7 Feorures op 6fx,og:- 'v.
0 fo** pom/fiorr 6m&l Programing.
(q Sgrrng io righi -&reiqhj &gt oare . (nmt oP rbe spr'ng o?Pllcdfi6r'5
:"
tt *tT^
-1t*1
-
it€ heoq t,.n6ruf & nrbservet/ oo'u"** sotvtx) i
@ Srnn$ giws hrir*-in ,niddte.'&ye 6e.vice5 and Gtto*s to coorv coitb *nven
.J
foarngecl ond "lhird Parr"t &+prla roildlooare Seuvicei '
3i-n$ gil/e,s reo vrerhodolq5:s calred a'ot I nol""rl to o{Pb t;64teeoaw Serv ic€s ' J
'.J
it
d+etoprrrnr.
@ provrdes enviroqwai io prft,w UnitTetril on A?PlidxHoos'
rsEi- ;^grot-.ra Fshog on his otn Ppooe o? code ts c"ued uoit TeEHnS-
@ provicleb hrltr-in pt,flto6 *o rrore spnng c4pricorlcrra integro**te cD)rb orbc,/ ./
&vcr trchnolqX bose.d a+Pns '
0 Arr,*ou to derelog olr binds of c+dicofrots like Staodabne' koo-hre' rlnee-r're,
'-/
n-Ha dsniatrtcd cqgucahoos/ tdlo opptidrrtoni anf, Oe-' '
(9 A[t0co6 to daxfog off tdodc o( logic5 Ii {(t- pftserU-c.Ho4 lqle, f3osinerslogicrc,.q#.
151., __.,
ft3r5'lstcn6a lqP and e,e<...
O $lwS t5 o(r)n ox-bFcrmetdort Spnng hfbHvc to drrrrlog t"Wca axcFur€okry€.
bcsed uxb oppns.
@ pvta.s
copporK
M
o}Svacrtonl-crgex cln Othex kameoorlac liEe .l4ternott,0IB and €rc-^
Jarn/
trnxgrc*tort ctritb 6Zep fe{hnd%ies ond &r:c.hc.ul Fanrrewortr.@
o p.asg o lta.rq aftl use.
llodure -I
5p,;q Core Y16dctl8
-> Base fito.late Rr orte" rDodrl)e o9 sprng.
->. G;veb a ri$hj-*i3Lr g*rogGnl.ainex caued &lnflow "B*l-'Fotr("3'''
'---5 using this rrndule ,,e can deuelop or,)g €faod ctlrne apPlic&H(ms'
--) toe Con qse lhi6 modcrle to eodoaiand 5orrr,6&oo tiFeqcle rmroSerteaf c'nd
depnfenq JfpLhlon.
The Csrrcrrarc Ja1q cla,96 thor is Crnggured io Springosnftgure.Hcrn Bre and ;5Yoc5b
annotu$oos io Calted SfingBec.o. JavalSecrq cdn aci os furlng&an br} eiro's
SpttqBeen n(et nof to be a JavaBec,n.
--, sp,rng 8i!es 1(oo boltt-]o cctntrdner qpJ ti$Mrcel3l'r a'nta;nevS
(! Beor,Focr.rrg (anrerne,i (p*. ol (oe rrroclule )
TUOLTTCe .
ttot implernenx
CIAS5 ir,r?ler[.f,nli % &arrFaaf.rg
-,
To cctirictK ,h.pqnrwOr,r.xr ccrnt3ioc,{
75q c':bote i;k
L B;'* ro
d€ed.)
in o&1 M6 C",eote ohj tn j^o clcls rhJ- irnpktoux
CoDtcdner i3 c.r
-F[?qo.ru-
Ctcle oF gtucn
Ltite 6sb
3[r;rgconk1ioet6areguenpctft'rrn$trng&onLigecXtterrrarriScrrrnto"dtoFnFo-
Drrrndeocg rnjartco 6or forogeeon .
-t T0 acrivate &aoFacf.xg Cur-rt<dcfy lo GrI o4pliccrhorrS crcrR Cq.pcp QLi javctclol:
@ AppricaH-Ccn*lt Cmlainc{ ( prr oe qnrrrg Jrr[Cc'*er{- F'oc[u]e)
5o?t.nr€ A?n Co) Jlc.. closs rlot ccoo -Yc'Ye coce oP
org,rrrcrgftar*ocro' *nt: ft:clz,u' fu"AAG)
-,,,->
*prrse nt9 BeaoFalrut5 C6fl knf'e,/
&.1*",1, =*- &orBeroftrr-g (''aoj p;osng lo splog cg f'rc>");
0rg' SpringtrrmeoJoyt . CcoKxt. Apptrcarr.,oGrrur (r)
a-
Lrle CC,o't
&train
icDv@K
ctCrCSeS.
heorX ue,6hf &lvexs
,) Sprrng lnltrRrce (Ja1a-r*rcoft'ce )
+) Sprn3f,ian closs (joua"r",s )
3) sp,rng cfu f,te Cx-r P;tc)
4) cli.nj' APPlicaHo" ( .io'ra cbsa cois T nln roethod)
Spring lr*ofo1e
-)
--4
_J
-)
-)
ib can be a POJI
ibi6 oPHdnol t&LtxG 'B't rtcorrrnJed lo taFe
canrcdn6 dectc'ranoo oP B'r'uboctt/u*;li$ method's
! ^
-
ocrb os cr Gmmon <rnder,stund,ng doarrn * kJu€(tl Llcnt d}Pn.@.fict"
r+"meet-
it tiFc 6!.,sg ho.oalxr h*,ng dedotcr-Han a? topics[tr""r'' t^tt a.s a5fferr€rzr "'/
.J
du.,-re"rr Ulco facufft o9d Sf<,,&'r*). _.,
Spnog Bean
A &,f)("r(cr}( &vcr clas6' Cooftguwd in 5T'116.)9 Cooeguro$on €-te
-.-,
mbocts.
-"
Ccnk(dnS
Con be a JtoBean ..r
irnplerneru6 Spring I"*etftue OnJ prov;deS iaplerrrnfrdoo to Qp,lng inrcrfoa .-,,
EY-
folre""X., Apnrr(d$co Ccrrt€"i Fr. &rr..X- 1,$priciax*Qltre* r('<sp,'q,fu B,iyCtx = nelo
-t-I
+
Apdicattco C6dri+ inttr €c(c€
ilppt tcanonGnfe" t
Co.toi.rrr
C'rea-ring OQreom P"l
P{2 ur-oeed Fo 6l-o'rt-
&!!lcf CotLl6-rDe'{ , JsPCc'n}c'rne/(
bi
so, -Tirt ore bectuti tltigM conlz')ner6
+o ouiuo-fe lbese cirutzti nerrS '
hlr tPdn$ CcrrLfcnrKrS cL{e ti$hf -urighf rcvucr.rturrrrS
fupffA.rtfooG*uk Cbnfcarf'r i5 errlpncernenr 4 BeconFacro'i ccrnldne^/'
31rr'q Cotellodul. 4?plrcal'to',',
Cooidn6 tt-r -B'o-'n3 $est6@'
meftods, cmtruckod s"{f-ttq t+*&*f &j".-n*s '
--) CdnrcdnS artt$ rrcrtods
---) CdDlainb lipeL5cle roethocl5 '
"') Jb Cc.n Le poJocta55 (o) nan-{tSb clas5' '
-t rb can be prrcb$ned / c''sc"&Pmed/*'tno'-oj
s-tppricd ccrnc"^o'f,c
trH
----) Conta;n6 &rsrqe5 rqerhods ioptemcr,raicrn
hot'ing B'r*rnets Logic'
ffrnngCon€rgtrmlron
fftt' ei$en hl'{Qe:- Rtt Sprrog l&ans rrr-or be (onF;guved in
Xm) enrri€$ Co.{ )
- sRciPging *re drrors op resurvce thmugb xm) enhAeN tr'O Annot<li.orrs
to rrPlxs undevlcqltng conknnc' Cr) serw Ccl)Fm'rocrrt-: lecqlniz;ng tho.r rr:arvct
ls c&t-ted resrrftc coo prgt roficm
.1,"q,*fu"'"*_15 :-
-t oog 4ft1gt.prog7 -xrn) coo be 1a4D a5 6Pfio9 ch ftle'
'''> t/rle con one 6l mor€ 5grrog cq P-'res in cld SPYiol dPPS
t+lozlwts
o-+ SErnng kons rnet Ae cfu in Sporng cfi tsre '
.- + &nlc.ro5 ft{xctogltilecrcrn/ loc reLrred irErua$(rns
. - -+ Cooiainb lige odcle rf,etbods Con$6trratlcm
.-. --+ Chn be de^xfPea ei*rr based on OrOf s.rcr.n- rule6 ,
Cli(nj APPi;cc*ic/o : -
-.e A0;vafe Spnn1 Crm.tcnrK{ ug spedfu;og Spiog cfu Prre
.-- ----z Get Srrq Bcao closs Olj %- fu"g O"tarrn
'---'-"+ cjaJ) &rsioess -r)uhod,s C7q Sprtng&on class obi€4'
":-
' -' 0>''.,g Sq&ff5 brgp.e o? Dpendeng rqieodcrn
3) Inrcrft^ce JojecHcm
(b5 impternenllog
t) gttel lnierncrrr
(b1 uai,rg etXxx (-) o? @n &o.o closs)
?) Gnsn""o.n }qiectton
(b .rsT pcrawreldzed Corrstuator.g oP sp.lofl &ao closs
)
.J
'J
*S5ertclrelecHc,n:
.v-.f_.)."r*,o.ls outoroorico
and dSna-allfl
"
aP Sfniog cc'u'taloer csoS 3rrXrx t-) t'
tocosi6nvad.u.estort,.i,ornnt,co(rronrbr'vaniabtcs)oP6r'rnSkanc[!ss.rkn
iblb caJo€d &rl(t irr.rdot
Pxample ,5ternrio
Speqal inrcrftrce,s oq 6f'rloSBean class
)
ll To,&o.,' iova (Sr"rng &"n )
lrrdic ctasg
-lest&an
s{.
/10c,n ProF{trl
5ro'ng .165;
ll v,t,ire 5$Xxx [-) tuPFnftiT &rtcr r{eulort
pabli6 void cetilq (8t""n$ -uS )
I
tluS.rosg =rnsl )
b
lloloir. 0 mqbods
p-ibllc y614 bnnrt )
{.
" "'' lluse rorg herl
9
3
Deroo " xm I [sr.ng cPg frre ) @.rg Wy,rru
coo6garc+lao 4^ ll.m^ Irlicdon'
<bean6 z
zbedn ia="lb closs= Tesi8eon'>
L" ia f
o6rt,-. --IEE6.r,,.s I
f "O'
nU $sc,6 Coo [i3kr afi o')
'/" , ni...ra
4PmI,c.q
()rt
4lkan>"
beans>
' hello" /^>
--T---
I
L> Vattre to
narrr =''toff' Vrrlue =
f-s.*p*n*g
1)
Nhen 5f,.rg Cr'nr"rrt ;a
Gnr.rtrrr Crealq5 Te,g$on
Cou.6 tb'aerllsg ["he llo";
fhto,r3h SefftrfnJ€crtcm.
ctuivcrrcd bX giviog rhis spr;og 4a hte tbe Spaog
clc65 o5;.+ h"'rq ! " os fhe OPcr l.nrre and
to rhe koD PgfS rnfluh"llo"
fu )niccr rhe vcr-{ue
5pr;rgcaota;rcr nnc(nages rhe ohole tifeqpte oP sp'in6Beon inrber
iu Perft,rms d.a."d*i rnjeulcrcr on 5g'rogBcctn cla85 Wffitnnb
if Ctafe6 Spring{fuan clcrsb c'hie*'
PYDCeJS
fie rnrrnco^rt
S?edoi dqje4rs fo
projeuS Lo( rDcFe Sgong Coo{cunerr ir"JecfiDg
lize TdbcG'n*xoo'l
Oql -,
f,dbcbtmt otzrt, RmtBusirgs r.rbi anA ere-'-
tr; cworc SP;n6Bero c lors
'it is Calted Gtnstr&otrd ruq'b Perarncrevize
d Colrlshf&o}(If6
rl1ocs io 8€on t"06"*3t
*t)
@ Ccrosfrucrr-ry fqleOcrrr '"-
o$a ond tb Qs6i8n
iqF*lcm'
plcae iTr'rrcd''al€lg
in1ertltot taYe6
cr,Pte'"t
p'c,a
SYn€Ban
dzltt1 coifi
cJcrsg obFet
6P$ngBarn
C<Atton
c-laJs oQJe+
&rcr iq)eetro raveo
nl'rr^e rrg Canghzrokt{
(t'cnhon.
Example Ste my i0 i-
il t^v*r'.5avct [SP'rog Ben )
Frblic cldl5 TestBeon
5
'/f$ean?'on'3
Srrrng rrs$;
fl ltraretcr'zed Ccmsrruc,rct{
g1rputttng Ccmstrackt iqectic'nrt
R.ouc TestB€an C$t"U '6g)
i ft;5'rosg = nnr$ )
3
/[u'r";n B'nrerbods
Fbitc Void brDrt)
t ""
^^ - ^ uJe tos3 irte
3
3lt'ro's
Ptrno"xw-, (sVt'og cP6 fttc )
zbmrs
zb€oo id =' tb" C las6 =. Teslb€do >
L/:ylrtj-tvclr - (
- lg'o Prooa anrg l''r
4lbeooz
t;::
Spno$ tbn{-arrEr{ Lts€s oDe Pc($a'n
66o5irgtct-z^/
Spnng Beao clr*s ohjech anJ lo crssi6o votrre
ProP'ng '
!,.Jkn Srnogcoolcurrt )5 activc*ed Q gru;ng tbe. abow &nno'xrnl @€c%RLe'"..
rbe sptng6ntcrnar ci-€cLr-es
-I?srBa.n .t"rr'w*bao)og r.rroe*15'bg <rslo3
:
L-pccccrrn &nsaitlrt (Terra.o" tb=neul ?stBeao ("nt");
) --,
$. as,grrlog volrles drreurlx fo &on;rrrp"*iur lik-e rnroe - k)loe CIir"s ,
terghr car"pliog beft{r€a Braoprop*rer aod irs d.qrm&'nr mJ'ues ' }iss{gn}ng '..--,
hl-rca to fton propr,rtes b5 speorfolng rhe vo-lues in scnS co"fttuxonl *:-r;
%, oah*,tng dry-Jeoa3'lq;errron shoors ]oosec"q"5 "t'
BtanVDf^' -'
..'/
'-)
,.-J
--.,
J
J
,_)
ir_,
,
J
otre ti rne rbe. t-'
to av€(d€ t
-',
l,i
bdr to rnsg
U
aad 15 dcalr-dellt Vcr{.ue5.
16t Exc,rnple A{plita.6on oF Sg''ogCo'e rrnclule fo clerrrrosl^rcr-K &tt'6lruc&xc'o
ku
trsnt $ecq^lttctoq CcnlcrineT '
Srcp-r:- [tswlop fte €crr-rce cde as shc(Dn
Ter{Pg.xrol -'-------> Sp"ng cfu B'te cr'*e
TtotCtienr
-+
C tic",t At+ rrrrne
TestBec.n furgBean clctss rrlYne
Narniog Convenh'crrls
X-------.> 6fxiD0 inlcrftrce Dqroe
X0eao-------+ SpogBeoo c?oss nafl'f
XCfu.xmr ----; SProg cPg Bte nc.tte
XCIieni- --->
C,tu* A* nt-"
E0.'
-
-le5)
-->
af-% intc'ePcoce rrrme
Uetou:
EAPP5
/lmr")o ..tava (f'Dlr) (svt;osrruruft'te )
Public inwkce Demo
J
t
llg tarrto' ftclarak/ c'n / P. . - '
pcrtrlic Sr'iog g€ff.arwi5bl1s3
(br'lo9
o
t
.,o-.)',
ilD*o&,,.,'java ( Pofo cioss ) (srx;ogBean )
iro'rfrnf ia.ra. uHl ' )ti
Fbic clcrgs DmoBeon iroplerrrn'ts Dcm0
J
' i/B*., Potrrr,Q b hold idcc^tqt valrte
p'rvofe Sng Bg;
llgrt(r nffbod safpr'n3 Se*c.r iqecrLn
Pbuc vold 6ern5g (3rdog
b
u itl s , ro-,sq -- ffiD l
t
?
/i ;.opl.rocot 8'mu-bods
frr.blic 3r'r.,3
t
fJ gtt curr.or date aod hme
Gr,rdql 6l= CokndQr' g+Tosrraiocet)l
fl ger curren r l-*t + rte l"U
int tr- cr'8d(CaleDdql' H0up - or- Dn)) l
ligrtr..re Nisb rosg
1p([e= r>)
Ytl(lrn rn€+
€lse if [he=lc)
w}cdn rr€+ --> Cnmd APr<^ooon: lnarneJ
else iP (hr= rc)
" , Gd f,venlng et'+name ;refclln mtt --
€lse v
ftfL.YD -sgt --tGood NiJht l" rname)
3 //',*,*"a
Jl.r^,
., 0.,.,., o,' I -- :-:':i
^ll'
-; *':, y, ;:i:,*T ;:*:. :i ll,''?,.'" -
2lL{di.>6 > coll€* rtri 5 co,.-i r,,t R o"r, z,srrir€ -hrme>d isrrtlourres
v
z&at't id:"db" cla56--" ftro'o8eao'z
->
@ qnog-5tons*fl'o DiD ?ik '
ZOrrA'rr ry w.mc -*.m53" Vott'e ='huttO
'lz
->
g -,,
AbecrnZ DrooBrsn db:netrr DrrroB€qr,( );
i
/l&aoa>
db ' seli'153 1"berto"); 'J
'.j
*t) ?
P
ge,nerorcN,sr'[lsg
(Sr''n$ *-t )
t'--,
G*l ,*r' 14 ;" +,x^me 't
)
l/ Deto'o{i icnr' jttuc'
Pre
imtrrrt
iropr'n
irrfrryt
619 , 5r:.o6 ftomf,{D6rk ' hrc'r's' (Ltrq U*nfa'r'*1-: l-tr)
tgl 4",""g ft.,o*--u'bec'n5 ' A'"i"l' x-r' XtrE*F"d1; I ctl
"rX,t*n*"mecrrr
K are " io ' Fre6pr"-'Qtaou"c ' ll t'.)
Prrblic cl6s6 DIDoClitru
,,,16i6 rrrun lsrtrtglI arcss) -----------+(}
Fr"Sr$.-Pest"te f"Dtt"Cfu
' n-r" )
KnlBcdnFc.c-ru'B [rc);
651 Prorn $6rrioclCcrnz"oe'l
l
fl c.u Brne't,od
Srn"g {#$ =
"""'t'r'$'
oo oi-"-t t"tus.,;
re'*1fr;
I
s
srcp-t1} rrod tbe S'ccorq ? jo"t ?ires ro CLAT6PATH
26priog-horne> die r tpYiag'ieY ( rtu"jot Bre)
4€pri"u-lbme>  tiu icrtar*s- corrrwot *a1. truU;l|esxl'nr &r
t+ s|)ring,jc,{
6Kp-s:r CoroPile ol the jcvaf(socrrcis 6n{ g^ecu.rc the ct;cnt a-pplico*lra
f
Pttbl)c SzLltc
{
I f"r" Spr;og C<rnGiscrrci-l'lcrl
F;teSg.t -R.ao*.. res -- neo,
/l Aeuvate &o.,Fc,uz"g &f)EJne-'v
XrrBaqFo.ct-"rq &*rg = n*'
llsr+ Sp,i.,gBec,n cicrss
OU*t oUr = ftrr,,.rU. ger$eoo C"db I ;
-
@
/lbUpe cc,rring
De."o boU3 . lDerrn) oq;; --'qq
> jqvo.c X. javo
> jaVa Drrno(li{n/
Nhrn EeooFa$otg cor-rr'dncl i5
Gre co,rt be verr Pued 4 usi"g
cuivarcd tbe eotoeS oF
3M trrnr Porser
L S;tPte APr P..,r xr^t
lmd
n
Dcr"oBean " cl c's6
done in SPrrngCFg B'rc
to c'eott, '' ftrto8eoo''
6pt)D€ Ccmet€urafic'n
boscd cn rtre giwn &on id
c)crss ohjar ulnS
Ohjeu o6 = Focrorx ' gerBeon (" 4 u") :
@
EcctnFacroq Cor,rc.iner lo
,db" [6ing C$r,CiguraHoos
rrdc€6 Beonkcnq Gnh"r(ll
@-Param Consl(odr(^ .
@ Since "tag'' PtDrrntt i5 Corr€"gored usjng
Gorcdff-r Ccl.t-r.s se11153 ['hetto" ) rrrrhod
per€zm 6e*clIoie0H c'n
@P"r.5'ge8ec'"'l'au');rne$odreturnoftrnof&c'ri"ctc,.ss6qjatondtoe
afer<f.nrngtl-o'tObJe*usin$'lctvct"rcm3'Ol'it'iclcrrsree"obi"
!gl_E:- ger&c,nt) merhocl is rhe prrtde*ioed rnrrhoct in pred;fined Clcrss"&.e'"'
if oe uraot to $eh the Objerr (rt'.'ar") P.or {3eanFrct "y Ce'rtctheY cue erre rhis
ferBean[) rrr-rhocl, IP toe oru B'roefiod genelcd€l^iishllsg ( ) itie not [x,.lf oP he

pnde hne d dai5 oqle$,.,,
:}.1,'" ff;**l
tbt irnpl;-ent eloss of sPrioqJ"*trR'ce ' so
Ldr rrusl tu{,eccrsl tl-,"-'*befu bobrl = lftrno) o$ i
zpmperrgz ta3 rht BeaoFoJt
un D-oBeoo clas6 ohje-of
-> hjbtrl 9-r?occ65 rcft.,trte Vcr-riabe reRrs irs sr.l-bctass o4iet drcn cde tqn't
cq) direct r*rbocts oF gr-bcla-S( usil ftnt rtftrroce Van'iabl€ ftrrcLk4
*uf k^ppenlq$ oecc.sh Sno-t. r.g.n.n,a Vcqiable Q-rrhtl coirh g,$cloo* o!"
tr:ith inrcl?tce irnptcyntn&d b3 SaSclcr6 h*,ng rtrct{- Direarnerbocl dede,voucn)
Demo bo$ = (krn6) pq.f iS plcrced yo SaHSftJ atod 6la'bfrrrnl' iD ctrv
frttng aPPng.
$pvioq Grta;nc1 parorrng De&ndeoaJTniecttc'n cmll crm those SpntEBton
oaj€tts
*bn* ove clffoJd bJ rhe Sfrnng 0emJalne6 ib$elg '
'Ilzt mraos 3p'rngConrruot'" co" t pa&T
'n Depo^'de"9Iruecrlc'n on Sp"n90"""
doss oqpas ttnr art c,t..led bu P*St'-'*,d monucrl'l$'
ke.Ptog Dm reratcd 61 c}ema rdotd he'Ael Staterrerrs la SpdngCfu [tte
is mand;t6'! ' Bur *rtl oork ie 6pHonol in wb'xml '
-1i,nog cr{,nlicci}1o0 Pf':.o Sfrrxt toitb s'1aio eoAs toiib rnrrn tcmd€ Socs
t()
I ="*:ffi"-:-:'::
;il rast re''""r"ri3arftprenr*'
156 i"otu'l'r{ f
-> Nhto BeooetrcT y &rntc'incr is acJivoled
@e ib clsesn't clcc']cs Qn-X
Sring Barn clo'rs o$a*a, Tt LatdrcS
gp.,gBeot, closs onlerra anJ
Gmplew dq-d"*j iqf-tfic'T odX cnhr'n $W'"1f)muhod is cot0eJ '
DernoCfu. xcor
a
-
ExamPle Oppiicotlon OO C/Jnt;l.6 uhzrl iojecfircrr:..-
16lozl>or3
Saroe 0.6 prev icrr6 ol(.)pD '
&tw OA WLriaQB oppn. Bll" Odd rhe forra.:itr$ 7-- Patar]';, @r6lrccfzr
&mO..fuVCr
->&rncBeon ' java
->
Pq.blic
{
ft
hto&o"., ( St.S -uS )
tbis. rns6 : ro53 l
Sgsrc. . ord' l-riorlD (
t'
ft
"^&o.,
1-llaram 1o'l5ratu<n
"
))
--/
ZDftiYPE
LLxo.oS >
zbeao id --" db''
ZCcrrnr-ru clc'i -(Y$
zlfun>
zllv<ar,s>
61d..s ="ffi*n'' 2
value :'heilo" / >
DemoCticr,t.j,av a ------) €arrE, as Previdt''$
c?Pr''
t^lbne ccrnhgrrtng fririo6Bcaq fo Plc'ce o.n)g llxwYn]> tags croder zbec'n> Ffl
tbeq6p,rlogCoola;neiuse6O-PaYarncon6tr(rol-(dP".6PY;ngB€&nct't:'Sin'lar'fiat
ond olso uie.g SefietXxxk) or-*'oas &t €ettc'rjnieofion'oo kan prro;r"tt<:
lalb,te 6*6ru1ng Slt.gBean iP got' plorce crnlS Lcansftuld<lt - a{8> k'Xo und<"1
/can> tag fteo Sq,ogbtt&lwt u$e5 lx.{ame}crized
Ccmsnucrar & tu
Geok SpngBeao clc{ss ohfrr 4 to Frfi:rrrn Gnsrrucr<rl
J-41e$ton crrt
Eeon Prorx,r +ies.
- Nfr^j l-r,{xnr6 if borh eerrc1lnieulorr., &nosFrucf<nlqjecno-os
are enabled on
&iroe Bcan prupc-riies cf, spviogBrao rlassa.
-'
4: Srrnn$Gotainct &rat<s $r,rn6Bcatr class o{i€ct bY ustng Pc'rarrr-Fcrized
- kan po1,ctrg. Eecrrrrse 6ertc;t nrerhoc.l exear,tcs aPttr Gnsffaal$o*
. rht
So,"Vof..eS injemt q Consmrcfcrr1'$ec,tloo tDn be ggctriddeo ber-arle

fetkr lrjlartorr
4
TO CcDP,€11re de{bndenf- Value6 tb
049 <valoe > or value cLthlbc(t(
Ll
--+ To omBfaye
pofr*ies ctsc.
/ormo ..nva (ttat)
Poblic inrcrR ee &roO
.)
,J
u 5erdeA ntd 11cj5
Prfolegr(d cl05!
Ftbllc Vold
{
Siraple l-,".rn prp6n,rHes (r;re Sr-og, si'nple &fa epe 6 >
in Sping cfo Bre.
Orr Spriog Beao class Ohj a6 d€rlrdcrrt *:lllre O*:r't Synt$Beao clow
4a-B-z 0'r YeP afr;**e,
;P aoe SPdog &an ctcss ;s lord,ng qncltr{ $:rrrgBean ctcc.s dei tbcn ft aued
Bcr.nCollabrort on.
Erctrrf,le Applical'loo on Zrcf 7 */.e O-lfri&.t€ (BeaoGtlat*","*ttn)
p : Apns
!---------+ SPrlog
|+ $sa
F-------" Demo"iavc..
DerooB@r>'ia'a
legBeao " iavc
DernocPg 'rrol
DmoCiicr* 'iavc^,
{
lxrdic $rr"g 5agHeiloC);/e,,sioe.oflerb,ra
$
l/DemoBec,o' java ( R)JO ctrss )
irol-rm &va'attit' x;
ftrblic clcrss Dcr"o&ctn iroplaroe rrrS Derno
{
//bon Ptrt,r*o
,8w6 wo"7,
't inb age', lls;mprepropnj
<-TestBero tb;
Jr.fu.,.rr., lUpc profl,r.,es fu bold ohjerh
t!-- DaJ( d;J
//tntnin s.rXrxt-) rrr-r$o.ls s{prrio5 g*krrlieu w't
xrA6efinr crge)
tt'ris. age =@tgei
,
S'o' e ('' Derqof&an: e#ge(-) r'gtna "),
3
l2rlltc
{
fub]i. void rtTb(?v&oo rb)
c
1.
t?r.tS. Lb= tb i
3'o'P (" DcrrpBeao; sgTbCJ oxt+A' );
void serD ( Drc d
)
ilris-d = d ;
5.0.p t" proogean: 6rrD(, 'l.th'a"):
3
f iroPterrrnt Busirrrsllerboc
Frbtl c Sr,tng 6ag llel t o( )
{
*'n " Guodtl-nin6 " u " o3"' '+age *"tb="+tb+
'l="+d i
&
^rr,-'lt; obs., i5 lx.ssed 1o 5'O'P
( l src'tcr"erti' ro6vntg( )oritr bc cc',e2 o.^r
thcf ohiect auror'nHecdrd' r' mooro? rhe closses
pSr'rngtl tolt be cveoaAen
Jo dibptc* obre* durr'' toSr';ogc)
"*a';
Lelt'85t0 ;ara'rang'Qbi"o*c')
ll tesbloio'3ava ( hrrrlerrlfkan ru ftndto')
pc6ic cla>6
-kttkoq
t ll*on ttrDr,rru
Sx,ng mbS)
//nrrt Serttr rncrhoct ofl 6errcrs'tieo-rtcryr
wiL TwM,>pfu
Frbtic void cftNsg( 6"ng -E )
f
fhia .rrng
= 116g I
g 'o p ( " T.rro.o.,, gsrllsg C-) .rr*oa" ) i
1
J
F,brc Srng tSrrogt)
{
vetr,m
n'1s6lgean
. rnsg-- " 1ro5$ I
1
J
&
$-u lba'&'r la'r'lklt
CcI I aborcr.lzrr beata6NoIE'"- tlere Dcrobon, Te*Beo., clcrsseg aft Tavff) a6
becerrse fbe
*
tb" prrrpttg of
Ohpt.
DrnoBear, clas6 crn l^ptd ?st B e.,n {lccq.._-,
<l__ h.oC%.*rrrt __) .r
z-&oir6>
;lwoto i6=
t'dt" clcob:"iova'cr-rit'Dore > J
Axqr'r.Y yg6€="5cor' Vatue="ll6J>,.TcrF.s ir 6cs lqootng
J
zgotttt rFrrrf, ='rrrrril-r" 41-oe:t' b" l>' - i---, "Idvcgil as oioi
J
L(W,fty harne=" dare ' q.lue =">q" />
J
4beon>
Z; &v aor evt (flt't"'-'a
Lbcro 14='br" clasS =.Iesi&-aDu > -/
l{>wffi 1p6g="m6$' VcLl,{r€="betl6' I 7
_/
zf bon >
-,
Zbcab id=''db" clcr86 = DerruBon'> -/
z1opr{ry q1r.516 = cr$c' lr,lue ="d I ' .J
zryqxrrrb name ='tb' te|=" t.;'l
LWWU rqmtJ 4' yeP="dL" lz lt-,-or ZpvoPhr3 nd'rr.€::.d">
v
Ll&a',
* rLr - ev
'' '
,,^^l
u.aa'-_"dt lz -/
4prnf't1 > --> v
A*ars> J
il *tCiitnfr.iavq
Scfqe a5 13r 6ppllcafion bd Gdl
€uo"a,relnlrillsgt ) B'n"crhod '
S*iot resu# = bobj. s0€ He tto ( ) ;
,
S'o't' ( "l?.ru,n 15:*4rrsutr )'
J"
o-Hetto () g -rd-e.l ;rts<odo|J
-)
-)
J
,
,
-/
v,
-/
Jdbc ConoeatDRrol ;-
&bC Gnned'tcrnPool is ft'crctrg
&tflr6. Arrtcrnnec-et.l.o o)et6
rclo>lni13
ccrnlaios SeroF readglg availcr-bte Jd'bc a:nnedoa
fbe Crn rt'rga:icno {-oo I repwsen-16 Ccrt're d'" virS
J.tbc Corn(Lrion lnot Qn cno<'le
Jauc &lrt r
**
tb.rf
in
('ri$ Same (hn&,se dlur.
fuiasa,rceoQjccrnprraerrrsJabco^r,ecrrorr@looc|rLiccank[r:edtooccels
ildbc Cg.,nectlo'n OhjecfS &o- Corrnec$ao (-<r*ol '
Jdb. Dw3;x,urce o[l
fupued &va cld35
is rorhiog bc.r lt is thc o&t oF an&,rtgtog
tha.f irnpleroer,r6 Javcl4f 'D"ro&r.tcc (: )
Org,spnnggaro*oork. jdbc,dafagr,r.e , Divol'lcrn:gevl),kft.t"r-o closs 3ive.5 fi-bc funfim
dhj€ct r,indn' ta iauc crr,ne*rc'f, Pool
. ThiS Clas6 c'r€o,l.a3 odo- conn<t1c'cr firo I
ksed cm rhe iauc d.nrex demrto .grpplied to M,.n g'ofxtrt;u'
-lhe irnP^tct+ kan Ptol"xtdes
are
') &iveo C lassNar^e
9-) 1r{l
6) trselname
+) W6sro6{ d
le $e5€ proqnhel. a^f- f;',.a up urh Nade tt'n &ivt'v da";ts r1leo idtx-ca;rrn:to"
@:l % atude cairl be c'r&t<A.
Example aFlicaH(D 16 iqi€q jdbc ftra5&rr ( ohje$ *rtt |xiffs to .ti4bc
@
@
6n
@"
CD
@@7
Cqrrne4tcro Poo) to our futs8eo', Ecf,cndog .l'1ter*lcrn'
E: ApPd
f--------: 39rog
F-----r 6e6e
t---- OOoetatioo' iavq (Sp';ngf'ucr&ce )
r
,
DB0penanoo &ao . java (6^= t.c.",
6fnogcfn.xtol [spring Gnfig&ra],on e'le
)
D8Qrrotloo Clienf 'iav a f cUcnl- cppo
)
// ugOpcrooo ' ;au a (lo,rr )
ft'btic
Jdwce
DBo;x'"rro'n
(
pu^bric w ftm$,ro1(inr errpto );
& Prot'. 3o% Rr.r,Na-e ( inr emenoy)
o
J
*'R$inJe&lolt
,{ol )
'to
)
firrt e-nno )
brc
6^"t
//9.*-t".*- ohj fionn &'nnerrrc'n Fo I
Car)neu6t) gon'- ds' gerGr>neuto ()i
fl ga e-e '',*e
cmp colrm r.,.
,) t.erhpno=: )) J
IWO?"ono"V""'ict'o
lrorrrrr Jaw'4r' &',
-'
c,-rri'too l'ftrrfta*t"+
impon .laval . 81r' 1',
-Yo*osn,""
a"u
plblic clcrsg Dfy7ptan,"o}edn
ioplcrrr€rLr6 WQturau (/T'
J
t
ilB*n prDou/ru
Drr"&ot" d6,
//i^lr' ,. saXrx C-) t,Lt+'DA to siwt
ptbtic Votd *fiolDtl:&t*rc
e
L
this, ds --ds;
7
d
//impleroenr B' r'rrhode
ptrdia Sxng RrtlName
o
t
WoaSar.^r* b= cn'polt.tt6**t"tt1 l"*tttt etnmc &"0
-t.
P5,setJor( f,e-nno);
Qeutfu res= p5' ercorleCIcre"aC);
Dl-ring FErr€ = oul ll
iP( re.nex rC l)
i
.t
.t
else
{ ,,Q
Yhof = tealtc ool *cr'nd i
fetr^tl n Ddrne;
lt
d
Ccrlch CE (cpH 04 e )c
t
Terurrl " DB prpCrr-i';
I
$ll,**a
pLLbtiL ior ft**to"3 (tor evnoo)
s
' t# sLt-' o&
"
t"g
J
-
,nreL*6n ohi Po- idt'Jc
6n Pol
' ilgu *"a
Grrcricrn 1o' = ds'g'*Cot"rr*rnL)
"
llgr.t ev,e er't63
?"try.A3v,x*"* ps=cctt' ynpnt*"n' ("Arnt
ps"s.rltn fl,eroeno) i
llern't* rhe 1,trc"5
Re:urr5* T6= Ps. exetut<6"ouCD
lf p'ant1 tlx. At'fs
iP [re'nextcl)
&il-: rs .nrN*Lnt,
3 /lt"c
FErrr€ = ,S$u6f-nX(J)3
&t &on e^p oheot
(,
ZrrVnO=? )',
atcf,(Excpnon e)
{
a"ynrSz*lrare()i
I
d
tsfrqn tuL)
ltw*,oa
la^
I
/+tryr'tn
LWVltra
tpbry/{ry
"d-rdb " cl.r35 : org " 5P' iduc ' &tasQrtc ' Wufir'oo.saha"fuu..e
>
ronr.--"d;*Clr,saName' - *:Xffi,;##f:
Vr.){re--" 0r&dc"id,u '16*'flparul}trr'" bbo"''" connetnan @o1,J
f,reSgsml2s o*u (" aPncfu'xrnr o
,
"dob" a1a55
= ffiOp'an
^g.onu
> @
narne = db ' ref--" &&" I =
u aweLrb Ddasokrc€ &j tu wn
(Y |kt"Dn,pc'ry d+'
zt ftjcrtpE
/-Mo6>
zlkan z
z{ftaruru
tl&an>
z)Enns>
irnertt
imffi
l-l.6lic
.L
P
e
t
'
l,
wne= Ltll hlue=
"6ac'.otc<le-t|i'r,'. @rturthos'y
z 16zl
"
o{l >
(Drrf ='urtnome' voJ.e=" *^rf "
lz
rYrme= fxLs(/cM
- tJrrf =" Hgu'lz
,
'j
-Lhf.:cro id=
orfl's?' leans' F"to'l xrol ' *)
O$' S?' &rt ' i0 ' t ) - --, firc53sttm P'st!Q
'tQ''a
clasg DBognartoocticnr
6 v rn(Smng ..rgs[1)'f"'ttc,l" fiaccpdorrs
&rc
llto* SPr"ng &n ftgurafl on
FteSgatcmRt*'..
y15 = fl€u:
Il hcnu"*c BU"ft"xtry CrnrcnnLa
X'rBeanFarrory &ttuy X-rBeonFa.r*g (*r;;= fYJt
{t', Car.t(inc,lllXe- Syt,,g&""
ll au e,wn"da
= ( Dtfpi.n-arl ,^) Nocnr1 ' 6tfuon(.'dbg),' @
io" + bo[i' Pa"r''NTeJ
+O4;t
ll 2
"r,'tae
I jav d
It > iavo Dgorrnr.utititv
TkJafo'rrc dia"t lo
5grr.-'a,r'Pr;ntln (
t'EtoP 9'.la13 s
S u'P ( EmPmr"e
s l[
J llrrruq
J lluas
,i'io Bres in cLA55PAfi ;-
Q Sp,ing.jar @ Cb'rnrroo5- log;og'jav @ omuct+'.nt
ry:- io rhe a.bove o-44rt;rarlon Seir5ccrra'ncr
5 injeohog
c.]-r srrAngLenn c'ats rq"""tJ
" d3t'
x) <Pu-r'fg *rrre = d6' reP--" dld6' l- @tal.o be Nritrcn os
Lw,,4I. rnrne --"do" > z*? kr'n-''d-rdb /z zlorcttrt>
" assarc*d' b1n-le='l'5o
"
l' Cqn alsobe *T" *
*) L7TDWLJ rEme 7 Fsscrrla VLL-*L u-'
,l1No(rt'H7
Lpwpng rxifne = passaod'> Ltlnlr.u> lixot zlvawe> -t
'-> de can lrc.re Sp"oXcctn$gurallcTr
ffre Ptx $c'nFocre"Y
cr-'nrti'rr,{
bX udng
the -f;,'o.ng classes'
) Fre,9trsi.. Q.:o.ro.. f,aso [o16' sP " cc"t " 1 oy''xt''1t )
--'. locares $e SpnSCanhg..ralon Bre P'*^'fi' fuei}ed ?oh{ t't:";,
-'4 Ht,e uecen srtdfu Atsoli-rrc prh (ot; r€l&Hre v'j+t o? Sgnng crg rr'
NoK:- ap ft'res %tdel o( oor Gy"nputci hget+*r s coued 8t"96*en'
=:-
e) Chs Parh l?e,icurce Class
Crg
. re . 6,,"t " io ?}€ )
-; l-trc,rcs rle Sp,;ng cfu B,e ftorn tbe d;*utrg locarrons
'jt'r
f;'re's
Odd€d t0 cLAssP^rtt envicrnrruirud V"*c.,Ot< -
Ercrrple on EreSgatcrnResar.rce to lcc6tre lp;rgcfu $te "_
il['r, {d%ce3 B.re ia rhe"ain
' f ,,+rputa-e loAeo ond cpben c,ti<rrrcpp
l- atienl A0P'.-|,1- } i
l-ilebJrrcm llesoa{e
fi're$lsrcra Qocrrrce
t^96 = DelO
[0. )
ves ={rj-o
(,,t)
is rto.z in E '-  APPs sping Sesa €ot.i<,v .
trtefurr.-f?.so..rc e ('^ e z
/aepsI te,,r I epr;n5cf_s . r mr
.,
) I
Freforrc-Q.ra..c"
6|(p-r:-
3kp-n:-
8rC-X1:-
ger fie )ocrrHdo
CLA55?ATH
E1
or g6rring ConR'6tuoHcn
env'- ' t&niajc{ '
BLe ..nd add rbe locaHon to rhe
l-------.)lfp5
"f-------- 9v'rgcP6' xmt
m$c0ro[x*cr--+ prolrr*ies odvorped fuh ------"'> env voiriobtes------ tls"f sg'nt"
VarriaJde$ ----------) ariqble ncdne: SLASSPATH '--')oY--1o*
'---------:oK
fnlre ; E-.A003Km? ; 4e,i6tlo9vctfur€s>i "
keeP afx,og o4rPli@rlcrn tectd3
CLASSPArtl wsuaYae n gi&ur afPucr'ficrn
in cu.rLrApP
Cos5{LrhResoarcc reg = nerrl clogcfuihQescr,r," t'€P'tTgfa *,rrt" )i
Elocnpe @ on C$55 pA"t l-l resurce :-
€tc0 -r:-
use
kee.P 6pnng
prt1ar .ll
jcw hre to
ca{puaxH(In tt-adt
ftt" qffiturulng
CtAssPArH'
F,efor*Res*rce
E^o"'pte on UdtiaDg
( r'.t"nnst -e+"ngcea ,^-r )7
L_,> db6d dr parl,
rea =r.,,, Fre5tr*"-Qcc.'" (' .. : k-r spogcfo .rm r')i
. : r l_+rrcdi vE Fftl6frta5 40f,5
tuft'* t**' Sd-)
cLAS6PAf H r€coc.fcc:-
rJ
-/
J
add rhat-
.J
8le-il'" SprngCo"rrtqurarlon ftte
^a
k1
l-.---) APP5
H KtnP
6tr{-m;- UJe Clasfcrrh&sou'rce io cllcrd GPPn
in Clicnroppl^,
ChSsPa*,QeSCx.r ee re5 =rELn ChssPar6&sarr.. ( "5r"tngCfu ' tt r" ) ;
Glcoots rrc!-e8Gre d)3f Ct,'ttnr&off
ft afu Dtpendeni !6tr1e.sY0 dltP tuptso? kr'optugrlel uroted touse d;PPltp
Ond gjtri&,tt,s
Prcffr/tl fgpe
S;.rfrte dcrrrtrsPe
jwa'rang.5rnng
q-rTtr$
.tc.va'utt'Lisr
java.ur,'t . $et c[tst",*es+ .ct. )
io.m. urir' llc't
Beon tgne
JoVa,util " PnCr'nre'S
E:- Tb asign nul votlle t0 Seun p"og"ty
Z'{q)ut> o' ''rf'l'e"
/value > ol "Volcre "
Lli6r>
zlist 7
z'e*>
L6'oLP ?
1rc| > or "refi'
LlnoPS >
u.)e /ndtl> r4
er-Fhhils
dtulryJt(
dfhd 5c4(
-
Sp'rogCft'x'o 1
E t Appb rcrop > .i.{rr cp bes+.._ror
rD9coropx.c.,
-->
proprnflei ___--_+
advc.ocd klb -______--.>
VdriaHes Va/Liode (yroe l, CLISSpAT}
Volug ; E tA0p6 trmg test'jar
Nhite ucruog ott$ 6priryEnvirctnrne(tt
is added to Closspcu+rEnv " ladcrble
eov ,anialte -------------+ 1'Lser isgsKrn
3 luisdnclvali-res>'''--+
or-dltsZ
illEcriPae = EcliP6e +
I'l!EcliPse
,'rrr4 r)4rc'r(i:.io
FB.+
"-,--,#RT-'"ffi@
S:-39-.s77,
#^i:d",-J" 4zog"
-4''r:Dp
Builr-in Plugicl6
L, TO ruorU (Ili rb CrdvarLe6 tecl-rnologies.
tgPe ', tor slo fr" jr'va
Vendcn; EctiRse otg
Cornrrrrcicrf LDE
gives TLrncot as fu;tt-in 6e!el ond a15o fo cP<tr orhe exirddmr s''ive'rs '
verSion : to'x [crrnrnnble ulirb jarr'6+)
TOdoonloc,d Elco: r^lh]h],rrgelipaeide. corn CZodrgs hdt)
Procedu'e tu keep l"lSEcriose ror reod ln cr-r'r CornFtrci i -
instrrrl ll;Ecri pse 19 ' x (Ru-n |'lf0t'0 ' rrgecDpseide.'com)
Ger rhe c.rc,cl velohed t6 l15BcL;re to'x chror c-ode(ffiffiil
4nott the i66erur-hrcrL'9 ?r* b opplicoH o6 tauncl^ed I ri1q;plLtg
ond get l,icencg narne ( ti.errc k t
SKpIr- gi.bnrit tlte c,Xle li.cense dera;rs +S-f'tSErupst 'aDE
JIYJ . -t-LP" "
Mg Ecri p5.g rrr..,u ------------J GrL€ciptloo
f,nft ,,'s$ dn
---- ::m.t t=-.--- -
ok,
Qun.hrn fire. co-,rcb O"rrts bcz ap frcrcic g<rrcrJrtr'rr
rrnclule o{Pli.otlon in il6Ecxnse to"x tDE t|rf
oll t6irs 4 Bmn P*Y'ntcl
'
n-
h lr. -
6Kp1:-
9e tr""
lKfs i
6iENi
PlocduYE t6
@,r?:rlm5
g9:Ii lounch
br%)*
dcrcLop
g,t+-ut
SV."g Co'e
iqlecrt an dt.t
tlgEcliFe IDE 6Ptt;?Uin1
.Sltp-trI_ C.reore *,va prqierr in flgEcliPse
----^''--'
llle.--- oeu.t------, Jc.vc.ptultr > prqfrtrn'ne: lSp'iTP'aJ I =----nXt-
Fin-l(l)
*t{-n"; Alcl Snrio5 Catebil;elu ro tt^e poje+.
831*cL+o'npbjerl
-,
llyEclinr<'------+&U tV"nuryMtikt'ld .-> @sp'inr25---:
-xry)l '._-_-)
D-l
ft !l,l r)
hkxYslnce &*x
-Tltr A*" oehrr,r rlx
fDE.
lnaBds (oil) be sorrd
V SpnryTl &rc i;b,ern { ,------rqe(c _-, f] Aop B(itcle{ *----o Rre:
' - _q}cP-il;- odd SpriogDrLr.rfuce, SpnogBeoo class to fie &r for&,r c?rbe Prqie+
r;ghr cticl drl src %rde,r , Nlc{d ------, I"*cr ftice ---------, 1?lerrrne: &too*
Prblc SUng $dlblloC);
- Stq-g:- 6tr $pringBean clors
.- ",t* clxa crq ,t. fr146a ------r N&o---r chas----------+ Fterr'me;
{arbtic closs Elerno&qn irnpl{nrru.b Demo
Frbli c intcFrtce Derrro
j
t lle,.on DrorralHes
iot a|e)
hre dt
cntrr+shi9t +o f'jaclede
o'T*r-.
P*g*.t cePituJS:
See* qu {}:pnftofs*el --.---j tlsttl_cliclr+ Surrc€r gene@re &rKj6an'l
gelior , Effi-.;_l ---------> ost'fttonPciot F[e{or alpit<rJ3-__l
qher eerlr-r6 r"crhods
@ovor;de
'r*',. Sr'i"g sc'Stletto( )
{
*'., ",oocl r'o'ruo$' *
r'nam€
=
" +name 1 "ctJ. ='1ct9e
-t'd= i:*
'^
" g*"'="*-6t15a
''colrrs
="+ colorS &J+ "'"+colcrrSlrl+
-'-' 4
+ col 0{'5 Laf + " ph<rne's =
(
lpbane5 i' &'ru'l HcS
.-- " * P.,c,lln:.t
*#::'
3l).o'x+pa
3 ttrt*s
n
* Lisr ft*-tc;
 Stting Cotor6ll )
t1a.p &c"trua:
,gg- odd trru!n$ omlcnl in S!m CunR6urct$orn Pttt
(!-- De'rnCfu.x nn) --)
{bons gpnDg-bean-z'6.^bd 7
L&an id=-'dt" cnss="tiova'uril 'fure" l>
Zbeqn ia ='lJU" ClcrSS:" Dnc8ean''>
LproPer rrroe =nfnrre" vlag='Iqia" f t
LWWY ryroe=*age' yalue="Jo' / z
lpmpq lTrrat="6f'' Ycp="db'f >
lPr{xrry na,-r1g="frc"itg">
lli6t 7
Z'tc|lue> ofple zi)valuC >
/value> booanct lv alue>
L"4 hPno=-At"f>
/lttsr >
LIPYDVntXT
t9ngry ncrme=' calot6" >
zllsr >
4valut > Yed 4vcduez
zwlue > )ei I oo) u, htut 2
AtisfYl"'>
blue Avatutz
?a -0e- rc!5
..,
lww
1Xt>
LVcJlQe> Q+7]t56>l LIvalrL(
"
2yoLue7 77oD+qrb 4,]f.qe-2
Z YtP baa6 ="dtJ>
zlk-r>
QSxryny7
.D tl
ZtrrD1,tlrt/3 fll,,rrf= {rttul};cS >
LYnBQT
c lenlw7 , --.*+rn-r6 rq4rhe
elcrwnt
ri
t{)fr{,cnt5
ont
elemcM
tl?voSttrtt4z
Dctrne ="Pl'ronei" >
[
*:;7
zatue> raff's L]vdtue' 4w z e$+xsturs
F(B..'' -
I aolue> 0ava F<^citl*lva!ut>---:re1'rtgr$s
vdl"( 4 rtx e-0omc'nr
:-lkthv,
a-
zBeuT z.vctldeT {Qroo,nq Avaluez zlYal7
LaVeZ .Xfr&.r^Ltg Qvaluez
z)e4z
1eor'g>
LY%> LVcrue>
tceP |rycav--
tu&g 't-fuatuez Ak'd>
"dt"Iz
zlqpAz
Artn{t>
/-lpralxrtrXT
lprWNnJ narne= " CaQiraib >
-r ro java' r.rri1 . Pogries l-l"p &rasM'*
eterrrr* Lg rr,-l;tbe sta'.'J "ol
Vatite rnust bc 3rtn3 .
-+ rn O*'c. tlop darosrnn.ruw Ql<svnt
$fl* h aru &ura ohje* anl
4J!4 Can be 4nd &r-a ohlu'P-
LVbP67
refr'ctonts a lVrap
srr Usodl}
ZPOP
LW;P
zlprups >
,JavG
kt"nctict t
rn IStrrngl ] args)
Y-'B*nftttg d@ W=oeN Yrr&onfuoo'X (n.* crc,,ssParh Re;oar..
('Sp'4eX'x*'
")
);
/g.t SpnngB.on ohi
Dcnro 66 = lDcrno )h .
"'grrB"'n('eb'))
Iw B.mehds
lllnnuon &arr".r'* knknDel
keq ="AP'> b|t d z/ProP z
v Lk€{ L,r4lse
kt --'ll lr "> lltrmboi zlwPz
lren =" yp' , Sang lare .lwn'
4wr x,
zlbecrn >
Ll&Lo6>
&tp-m;- Gdd Clienj oppn tD Svc
- r,ghi&'&q gc ----+oettt ----+ dasb -------t
m'e I [6Joc]i'
/D,tnoCrt"*
FJclic Llltsb
{
P5 V
{
5gsrctrl (I.t"P'nrln (UoU,'SrgH.rfo C)) I
6)€lst + cdrl t srart -
Czr'tr ctpPtt 646 *1-
p_*,n"
Lae Can use iova 'utr' l '
1g lor I ucre uPPD '
SrPm:- e*o the a?pD.
R,6|u.u+ ir., $e f)q'noCr;c'*'iavq ----+ f2trO &5-=+
c klss
-> Nbite rulEing coirb
rupe b^n Ptprny L*-hro1vniz* ' rc sPecie'?d i,63, norne an d
lt*rc"ard,
W'r'fo $i'tngcPg'r{mt oe 6e66 anan ctn
{l^- Sfnrr€Cfu'lmt --Z
Ll.wryPEv.
Zbeonb> n l1oq",rD-fokne >'J
zbean id="drd6" cldsb=" ot6'sP' idbc'dcrc'$rrytc'
tJnuft
4'qulb rncoe ='dtivc'r C]as'sNone' aloe =' o"arle' iabc' &Iue,'' OatD,,- iY
l4nps]ryx nime='url' valQc=',lbc '" oracre
"
(I'ii"' @oto" f >
./
.n
lpnpo{fr^ rurn€-- COorrrttonl'tqrzrrtr'e-c Z J
lpto?s>
LPilP l€$="u'ser'> gotf 1lf'rqP-
 )
zltnp Ktt ='Pss.rrcu'r tig4 A|npz '-_/
4prpr 2 --) 'J
6-ar,rQ  Sr c 
4lw1xnry z .gt*ttrw- -' J
zfoot> J
-)
.J
-> To &55 6inrp16nd lin€ arBurn€/rr alc'es to Il6E trts l)E a-|,pr) "
Prghtc-rrcr. in rht &c,rtecoCe of aga --------rQuocrb -- Qunccrnfi5tlraflon6 -/
J
->
Aqurnenrs t4b
->
W3I'!$1ry4-- ../
Vqtt .{al A Wtl6.^--. Yal r)
orgsio: aqstr: a'gstzl drgslo-rl J
_)
Gna.t.rctol Lritrrot
-> 1F 5f-ogCo*arn<t ie trs;og Potamercrized CoosTtuck:t to cr@re Beanclass
"'q 4
t0 oJb)gn fxnden+ Vqluea to Bearr prorc'rticr tlrn ir is caued Cnsrtudwienn
-a Baced oq Z6cna lntcrcl -crrg ? lag QPecrYen ce ccuru uodet Zb?afi> la3
tt)e Spriog c-doi?rine,{ Plc]6rrp op4rrupn.fe Parom*cYized
con"ntt.,tun
tDP*{o'*
f6n6rrctCt4 iajddon.
Exqmple c{,pr) flmo.ictvo ---i Same ab ['€viocr6
crf'P n
Deon&ao.jctva
class Dro$*n inplcrnerurS Dcmo
I lthrrrapslt fxDfr4.{eJ
inr aXe;
$tnog namc;
Prmr saloYu:
FdCic
t
//F"qcmerctiz"a col.sr,a{dtr6 &{.0r,ax".^1
-(
plarr 5'fasrD costrurft/f
- ,.-br ,,.,r'. giep
-----+
S-lcl-f-All
6eter+Ba,o Pmw1c^-j#::licrorc
consrrtrcrzt usin$ keta
-
0K.
// irnelerrn* B,rs;n.s oYsbod
fxr.ldic
{
Shn, ery[J.,rro c )
''c$e-= '+49er ' ?r,.rnL= ' tnc.rn€ +'&tla"5'=
" + Salav! )
refurr)
zlbcrns:
{6pr)DScf€,xrol ,- >
<beztfr ;6='hb- closS=
"Dc,'Pgaon''t
lcttfistnuclw '@X V4)ue = "aO' l>
lUt6trs(fu-an Vetlue -"tqa" l7
<CtrrlgtuLftJr -an Valrrc = ;"4t5b3' 6c" l>
Alrr.arl>
There valurs roustbe syi;hd inrhe
0rde,r the pararnelrrs ctvt ctoqi I ab le "
in Gnsrrtrcrz,r.
tl"e$ rhe SF{n3 Grnfalnq utrq
thae P:r-ctm Ccnshlacfai fu
:> Sirre LtrtstLefur - crr8 > toX is ptctc< d {r'r a
i S,A&"n lnaranHc"tton and f"t
/iDoro Crt,"r",ic.uo-
Gnsr',...f,ot f'X eaff on,
Stoc os Fevidas c40"1
Nore..-
Nbire li{o!"n6 r'uith cdnshra/'rdl
in tbe c'tcle'{ tbe Pctrarncxrrs
-2
TP not infardel-cl trlt co"n
$er tgpe 4 Jnd^
irr rtle Cor'Sm-rcf,rr|
.
-, J-? Ctch Erc,rrg(r tgne i5 Ltrt1p'e ttrrrl
iru"rrloq toe rped to &m6gure &I''',et'l valt-t<l
arc ptaceA in the ccmEffLLc.f{,t
resowf fdenltb rrr-rrt'Ftttts eda*"1 ^
in SpnrgBcan
ittt O.Lbic )
F+. D{rl}r6€on (i.rt a,int b, int c )
1 tt5'o =o;
- *rre .b
=b;
, t ttr,5.C =C
:
DroB=n fror agcr Sl"r5 *'nt, -Pt* &tt'5)
{uo.oge =qe;
ltrls. narnt --Dorrre i
la.-
class*-'Dk,-'o&.^8 >
oP Onrfrcr*rt GnlarnS
*,arr s,'owx indexes'
tqfL -- 'ior " Yafute = 30
!J:-----
larr-- " Flot t.el/ae=
tgF -
"
&.ravo'tc.ntl'SmnS" !o!ttt'--
" YqoJ l,
tbCIt p.larnedr h'gu'l cot
Conlguta}l,crls '
l>
/Czrt*auxx - ct:rt1
l1oosrtu4ttx - @X
LLantt'ttst$ - 63
LIVan>
A*ans>
-> Il rn lFiPle f:tramelcrs
idcr,rifu tg,em bcded or)
6orrr fure *ren sraan roorrrer/
"!Lin fi*ndGnflguronaq S. h^t
E3'- ;n $Pn1&nnr
{us's.la"6 = salqry ;
i6 =''db"
coe cctn
'&to,b
CynStnrcfz,,t fqjel-Hc'n
- 3t56'171" f 2
in SrrnS&%uroicn
Z.I,tan,82
1bf0n
E$-"-
in 6P'ogCcnfigrr.*,- f;r.
LU{6lR'!ktt -d'r X
/Ccfi111.lj.ru -oYX
1Un#tnx -cr
Zbctn 16 ="dU" clc.5s? ftrno&ao' j>
in&x= !" h" Ya1u1="lo" f 7
tnde;^ ="C .vrilue='b"ni lz
inlex=" J'' uo1t4='w" l2
€6eS ho'ct"
9d +o "c'q
get to "b"
j
LllrrlnT
ltrc.osz
-> Jhere la no froviSl sn lb 5P4t b Bcao fiop.ttg rntn e
<CsndnttlEut'a.:t6> U'5. +*rhO reason ue rpcd
ei*Et thr*gh 6erY dat<P#s c-l irde'}€s
tor) Clmsrn rr<'r Parrafit'-rtf'{
name fo
*' ,t""tg 6nsrfltal:.i WaFfJ<r'3
i-2 -lhere io a provi 6;crn io crclivcrtq kc.oFrcfrg Clmlcr/nei bcrsed cro *a q|t"od1 cd;urrrd _
Qeonhoovg emr.;rrr, fn rhia pmcess the
the cUrd oyob)ncy/ arEt tr Frer8eonRctcru
Exampk, appl'totton: -
DemO . java
->
&Ift11. Ob f)rgvlcfls
afirn
// ftrm8eon. okva
impon jaltr.urir.Drc;
Grrllic ctcrss Dn'o&dr1 imderrrors Demo
s
t l-br" d:
Fllrtc void setD ( Dore d )
{ tr,.,=o,
3
B,tue Si'rog s'gblerro C )
{
..,etut b ''d= " td
"'
3

rDd BeanEcftrg
C.rn orrx4 A(;5
a
// DermCPgr'xmr ('ftner* ft tc)
Zb€ons
LWan id -'d t ' clcrsS
"
('
.b,va'uli I 'lnJ:-' I >
zl*ptns>
lDernoCPgg'xrnr Cchird B'rc ;
1lag65
L51ea1
'4
="db" Cl05S =
t@ltu mrne -'d"
t)ban>
zll,xaos>
/nn.o Clicnr.iavq
r(f)Fr(6
pblic closs DcrqoClien-r I
"Pr668can'>
) <v<? lacc'=i'dt' 12 z]PwYxrrr1 7
ds',$airrrl acfs a{
as pavcnrcanlrdntu,
P s v rn (Sttogt r aqs) [
i
clc,s ldrfi Rr.cc.*" (U'*@a- x r',rl
Ch,.ft,* R"*,'"t t. (' O.''.Cg a' I'i
);fto"gl
:
g- ZPofl'tr$ name
_-"d " > zwPbac.o =..d t.,/' e|prog,rtg
: 'rl.'ol" o'thisr]t Sectvches f*,t''" dtpe-dtrubeon igl dtdv€ffspln6cf1
(.ite
// D,rtnr geon F&r}<ry Contt.61
X.'BcooEL.'.t {Ltryr= n*o XrrB.nnft.t.'5("*
/ chrU facrna"rug
Cotta)N,l
Xmr&anFaomy -f=*,u, =.1._,- X*,BaorE h^g (r,"-
ll$ 56n6kan ck*s ohi
Droo 1165;
= (}',n)&d-ga. ger8frt C"db')},
So.p ( Resut i5''* bd*.scgHerrot)):
t
I
-
gl hJl^on io rhe d;Ff blr,r Bean anJ locor o*r;a'n o(- <"f z t"6 'l
.- Et" "kc,nu o-lhibcdr. soLrcp-s 6, *,. J,{r#€t,t kon i'' G$rcnJ Spngconet6ora}lc't
R'rt ond olso in Poreru
gprng CooFSc'rofan Bre'
.-
EJt lpn:yw,; narrg='d" > LteP locr.t="dr"/> lrrytrgz
'c' ygg='dt"/> i6 garoe as Lvq'.rtt norre'"d">zve? bLd="at'l7
zptrrrlr{l$ I'lctfrr = d wF= u' l ' 'n D'(rI !'L uu n-'-r - d 4prDpo^b )
NeOr., rcc.re €pnrng G,nrcdner tO keep SptingRean clcrsS orqjcUs iorhr SlrO-lo3
&otrt. Q Shgtcr.m
@ ltotrtut'
0 r"ltus t
@ &gicrn
Singnroo'.- crnrcr.inc/r crcc,r<J 6no)g one otu€lJ 4 8;rringBeon clcss €-&rn *,o.a3 h
rrrrhocl is Cclled ftT rrr-'ttiple tlmec crrirh SameBean id
.b0,,
elc($D = krr6ear," sr!{€='3ioBlefo,."
>
(,
z-ltr.anz p .. _/
[9 mrntup.i- crnrs,nu crec,lrs rrulhple obetrs f(n $-n6&on
o.* 4- 6gl6pletcrcrzrl'-
P.u-a. $,r&* t ) r,ffh.d csrlll hcl-rlng SorreBean
'id
'
Egi zuetufi id--"db' glcrtg =-prtoBean' ScoPe= PDhfSf'c
.J
P".r*U ge*Beocr t )
tr 6.-
{brectn id =
I
zlvan>
[f rq,.estt- GilJc]rx,r kfrf's 61-nlBeon clor ouje* os r€lAest
u$co4oo
closs = Dt"'okan'Egh /HAr' id =
dD
==
zllxc'o>
Sestion:- Contcrrr/ ktc0s $*A &on clcls oLj@r as f€ssioo
Ur<M+ln
Fgi .&an ;4="dO" closS ='Dcmokan' Sfope =
"SerJlot," >
=,
orl.aJiq rPlue ;o
L)l*sn>
NorE :- rcauost, Jtjsl0n &ops arc opptcalle $ onlJ i'"l Ucb €nvirdnmf'ru
-]be JaVa clcrgs tnl- attUco6 rrs lo creale on$ 6ne oc'E( oq)ecr lgf ovrr
Singleton Javo coss' Evto thutgh gcrvct tlos ctLlotos mctttip( odads c'rtdHcrrr
iF tlle cr.€ $<oltylg o.'ty 66a oUf* {.xtt rhtn itis net coile{ Siglek'n rJa.rtq cb-|{,
gSPa='re4uest":
cr-rtn'bule voLue rn
is co-r-tcd
-_ Nhen Sp'intqa,'n Scope is 3:n61eron Crr Springl3eoh ct4ss &esnor bec"re
Srr6nrur, jqva ctc6s.
-- -> 3;ogteton gope 6prDg BeoD5 canbe ccrnPigured us dependenn t6 Prut-otUpc
€qte gpiqfdean p[Tra"rH* c,od ricevc{sa.-. rn ilrut .obole PrDLers
Gntc"rnrr doesnoi chc.nge &,rp$ 4 c.ngBfoo,
.-'fteanbe plcrred o",r! pc.yamet(yized anarn cr<fts in 5Rr'ngBean
tDber' ctr{
PrDp{tties oF sprqBeo., are coo€;gure"l f- &r{'cr4ernvnl
- ryr Not ftbbibre,
^ Sfting
lScz Conrc,jrrx toolr5 tD Qse O-Pol&m consr{tlcr<r{ tcrcreccte the o}cre sp"'tn3
,
0con ctcrs5 o$e*.
ft ia enl-rtrrcemenr oP &orFoc-l-o9 c$nirdne{'
ttrir Contari^c,r i5 arctrGbe in SP'"''og Ccrnfext f We rcndq'te '
at i5 ol:o ligh'-ueiSht 0snfcrlrrtr to Aoivole rhis Crnrctrrtr 6ga-Fe
ouer* {r, o ccrss tho.l- irnplemerr} 6rX'5P'ftrnKxt'$ppticorrtm[c^rc"r
(r)'
thus Inrcr?ace i5 SLI inrc ft.rq o? OIt.SP. Le.ns- ft..r.r'l' Be"tF^m"j [r)'
thtw cr.e 3 impcrrcnr clcsses implernenlrrS Af?u*HcrnGrr,rex-r (r).oc Cc"n
trle rhis clc$Ses to qchvole d*rmrrooGnrcxt Cor*ornev
O F,.Sgro-X-r Amri carr"o Canrt*t for g' sF' canler r . &+rn* )
-: Autvc'tes !f"it3G"-"t by lw,-nng Srr.ngc*g
firtQstcrn. bAPo[c4Hor(on+€,.t
f;,. f*- $s ,?ec;ffed trth uf-
- pnQsrernYrnrrtdicanon fun.Fut ox--ner, Fu$g,.* XmrApplh"rt.m G"t '.r( m*od5.xn^r')
CD Chte&tf Xmrr4pptrcorronGnrcxr (o"€'sP' donftxt ' s,6ac'rt) , :-
-> Au;vcrrcr Snl"l Co'rla;rt, b5 lccr*rng 9*T tft 8'u fro- -the wh*t ctdded
t, A?:Pll (otl on c66,t"t c6rfd]Y4 .
tc' the ClosUarh env.. -, Vccrioble' '_.,
Ctoufun X' A1pu641* G"ru r *x = ne'D C las h* X-r Aeel:corrc'n(o'rc^r- (ntuq-2-'
O K.rLl.oApatrcanorGnrcx r [o.1'6.sf " L.rb- ccnrt^t . &rPi-" )
-) ff*ivc.rcr Appucorroncoru.".l cc.nldne,V in la,le.bolPllarltcrns
-' b"PP_5 C.o be t(lken ob skrric o rpn-st<rri c br rt erbo d
Gog Aocrrcartoo C'''rerr eoo*iro, uee' flxk:,n *:^:t::?#
+ar., R,, 6erFcr injeutcrn rrust be -taFro oa Y:84#&{
Y:;trfueaJzn
,rlrj]*g
the ettt,t
tikeAog llocucarto'o ci]t'rerr *'":^
,,-toA tz. *o&,rm od&e,ooot -R.,,nrt-r=l;t1.,
*;* hrr ir con be. olso used to P*fr*
J
i'
,l TilT'J,:i: Tft fi; *u*'o'.,n f;reg in sinsre insrancco*
Ccnntdrte/ aLnvcdrcrn '
O Abitlt to read *t* fu' P'DF"ltus
'
+) 3+P* f"r itnlhhe-r,j-l*'i:]
ul At* A grt"rlL'dl'X t"a crc'-"'
Nqil=i qurhesb,r 9"d.'n'a orc'Fr
T::rf""ffitrffi t cbnlcnn'Lt
All these ht'res ore erclclsw P
91r)h.r')Eovro0rfenlfr)(J,tsrrlc6f'nn$E@nsdeue!"ed4ffrrl$Plerra8lclrrprs
.,lir be 1cnfi5uted in d;Fk"c.r
gr"'n3 J"*'**o"
-
j::'
LDecon oLiva'tr
rpric.rro" Grurext dsnlcrlnc' 4 q''b'; dux *unpresr.,"3
t-ft8"*
fi't' /lnsuar. rpprrcorroGrx^r G'nrainarl
S*q Arr, = f
"De"tcql'*'tl "hta"r'ol"']:
Ooo&t [n,Appt't'n-G-"^; ct^=nso OnoPo*X*'Apf,icadon G"r*'. ("Ps );
NoJE'.- in &anft.txrg env"' 'lo coo'P cai r[ rrslt-iple CcrngStr"ctl-lon f,r'e (o( Deed
to ocrivox mLcthPe ir'lsl-aoces GF [!ot'k'"rc,'5 csn]ceirtr'tr'
-> IP sp"og &an oQjec.rS ct.r.( Crro,.€ d bJ drota;rrea io ttrc rr:crrrnl $rAng G"nloi oer 'is
Ocliolcd then ;y ;5 c@l0e{.1 Fre-inak n})cltloq oV
flpttcotionCer*cxr GrLtuirr,{ ;xrRrros pre -ir6tan$a}roo
Spn.gBeo"a;.
iP "proroqrd&.pe e6 sftrlr,9B€4n 6 fatseo qs Pqxo'derLtvcr-l'uet6
- q" Hhot l"rc+p".re
q:rloXBec.n'
crn' $ngletn Scoge''
*$l.gt.tr,"
&"rc SynrgBeao elars P-ftf 
El Cor*clrrv c.6'€o.tf5 pYDlotgPe ' &^',. SpiqBec.n ctcrls cbjd at'd Sngk-tt'o
SC"pe SpnjBean clasS ohjeLt tltmc'5 Pr€ -in6tctn hofic.rr
Confaioerr iS -4pe[ccmc'nG'rttxr
Ccrildnel'
ostc{nhaficrn Po(ess ip l-he
k l ib does not ct'an9J"&"rt"
oP
onx Bean' n p,^.,-o.N.*., firu.hp.,roo
ue
g dttpving E€ano are ccnP',6u"ed in Sgnn$ccnftgcrrc'tl*
;"ey ir ftrtvatl
enoble Pre-.icotarr*tcrfttrn
(qW- Cre'atlng obetfS v'jhen
only on &tr sptingBea0t'
 ^, ^.. *.5t-r-.' scr4e ana tctLe othea 6-6eana
*ffir3.;"l|':^::*** ** r'rDtuqpe
s'"rf, $d,".*'e@
&re rnt dqxmdcn*
to $qletzm &6pe ftnr5Beont
q- Nho, -opp"* uobe'|
fog;3ff"1-)
rs copea 1
= Ii]*: ...,"" ohJ&r iF st'nnae^ s-p" iJ!*totr€l
Arul Cyecf€J cuod .ltirnns €fingBec'n elo55
-
**
T""o.::'*^. ,-, Oi* ;F ,str.n1Bca'or
goqeis Snt't'"
c.rcrce/roarc5 c(Di rerarn3 sp'n3Bcon
i:il'
" I
6,- h/hu-hu*n*+ ,..' +#lT:"lf: '-ued
I
2=
-^' "tT:'?;-l"* o+' ir sr'vB!^ eoprs "PotutSF'
$ Cftat?2 aol reft:r'o.s 3y;"XBez'n cLc'vt
lorarc crnJ yerctr n tpr5&"^ cta,6 d6&+ iF ,qttj &^^ ra.- ts "stn k+^
The lert Ble $clt rqc ntrons
0'tteJ " Te^tP,..,pa.rics $11 'l
-> I? {r';ng *pnt;cott cm plac€d
it 5 yctocrded fb maFe
tDf Cftrc/ oPPL;to$orvs crr€
tle e*rie$ in rbe €"m oe
olcrn; c5rifi Ofhet
qr*r5 AirPticc*ton +o
csiol to CenrrctLiz€d
keu = volu. pctlr 6 ig)
is d"'t Ltd.c"de ar.xvcctotl
&of,tt Jt is rcccncrended to
the aurrdc"rA princpr oP 6[o indr'swg
qryr.,-Cr.rrco *n1- ale changabk- in the
thrse oluues to oqpticatlon (1,m c'rside fte crypliccof c'o Q lt'-t"; t'3
S*ppr/r.+ lbxtProrr'rrlcg {},. / r-l 8,"'
in c.t r
Poi6
the
feo},notogil lr'rc'l c'H'ns n
c4se Sarne latP""ne't
f;fc
Ccry-nrtLcm dala '
E,*pps' F-----+ SFng
t--------------
BeSS
DbO p",arron'jav< J' clcru
Dgofrr<.Ho"B€qt',;a^r^ | " crarl
sp;ngcP6.xm
an C5on-f .;am|'clau
Jdbcc{pllcatkh c-U bc&lefT€S{ . j c,-V a
Corrta.;n, JZ bc&i"vn, L,r l, u"^"1*.,*
,*r;; e';; rtr;:#:',#TDekr".ir' P'bP/4trq
aolor I rora
->T0
rrake 5p'icgcnPiS*rcrrl* Bre eP'rFA g"ihns cetkrrnvcrt,e:
g*;fiF;grc
-r
cr)e pkr(e ptr.'cebodc's sgec't5ln3 the keXs 4 rl"e P'Dtrr/ttc5
[ire (tire
ffi*)
T0 recrxrrze l,ltse placthol.lers ond to nnke corrlc'i'rr''r gar{*''ioi r'vr-trtes pr'rctnl&r '''2
^ o bosed .- ttr pbcehotde,{s lkd- ort SlxciFicJ {re need to Con?''lur'' -
{tort, pop,riaa 4ire
O'0.6p.bear,s. ft,.rt.c^83.P**rbplc.,clor/crG,npr7..ter
as s'nrybeor is Sp{n3cfutsic--
Scrrce code o? rbe olort afPucetlc''n
""
#idb. d",u." ood ,o deEi)5
''
or' ,"'*' = Orode ' idb'c ' dqivev ' Oao a D*lt'r
ti *, = idbc:trtc'c-te "
*':n: @tooff'osr
: l51l 3 olcl
roy ,d bure,r = 3o*
nnu 'dbR cl ' tige't
SPrring o4)Pt;catton
Dgorxrdfidn "iavc'. ------+ Sorne as tg I olleale
D0OErano'n &co'irava ------+ Savne cra t4
IWW-oiL,.W?_niq
raFeS &r(lrsr- OC'r tO YtCo? tu ?C
p)c.ceholde'6 {ProPuti es fit<
C{lty'r',
^,tI,cJ)PL
-"' -7
,e,t>s.fua.ory.con€+g,h
/,t,fflc1"tP1 - -" - 7 ---^a-,kors,t".,{Phd-l-ettle^/
" org,sP.b€arlb'rL'",e'u Gn6$rt"t
ZprcFirfg r0rne -- Lrrrvvrv'v
^ . I /- LPlacehotdc-r
z+tDlx,t! [)ur,'- - " J
t"t,U' drusc,, ]'' i >
I1lYrq1g flarfl( ='uxnnome' at[€-- +
t-W,'fr*H DoFnc =" paJscoo6l
" 1o1""=" $ l-f 'dbwnaJ"/
z
zl:tr-,urt>
zbeao id ="dob"
LWP(t{tb cP{me = " cls' reg=" &dt'' />
zlkc^n >
z-llrrccrns>
/ Pgor,,or,- eli'nJ''iava
iropo/t org "sf' conxxt' gqrpart' Xi
Fblic closs E80p<,rrrftorrCticru'
P 6 rl -[Su"rgl1 oqs)thvuos Ex+tt"n
{
//O*u.* &plicd}lon &mi-cxt
pre fon .nX*1[gpticr*lcxrGrrnftxt crx --rK.o
ConlidtP'l
Zt-- AWnCfu.xrnr --7
;;":,, id:"g:npccnB:
t'*-
nor,r.,",opc.r;es"/-
zpyDrrdrg rnrne ? toco$(rn" alue = ryjtfil;;-0j; io cl.l{rnidiredtlv.
/lbecro> ,,
-*. -p i,rh..dc0fa:s,."f ce, D-rvdlbna6erhnSx'rze
>
" los6='org'6P"idbc'd
zbeon ;6 ="drd6 , I q
-,. s.t,,tx' l>
-^J - - U . _t,
''dnve,rCtc,sNamc' Fdq€ --' {ry' ";Y-1./-]
cas6=' DBoPwalonBec'o" 6 >
fi re$srct Xrn r &rpucatloo
(o'ilft t (4'^5cfu
""'
i llger}yaogkas oht R"r.' @nh)nor
DBqrrotlon bob-l = fDeopctloo) erx" getkat' (''dob')"
/cau b, me-rtrods
S'o' P( " Ernp aalarg i,r " tbohi' ft"r'$a^g (r'{qq ))''
S'o'p t" Lrnp Netnneis" tbohi' fu.5frlame [14q1))''
Gllrt';')
3 i/*t, />iavac x'Ja'q
i> *lava DBoPcrc4rsrclluf,
b JDbc apPlrafioo :
/Jug.g"t *lcrt 'Javc'
iro;xrn .ic.Va' Sqt ' * ) -= +r"r orr'ax*'
irrrP"lt.lava'utit' *)
imfslt jata, io' l( i --r'!r{'c'lo
grbli c clcrss rJdbc8ele*Tesr
s
t P. t m [$';ngt ] *n) thwcos E'rolurn
{
Irrue*ics 8Le
Bs.nem pre.Inyrr6rreom f"D@";6' fno1,u,rn-eb^ )t
Fr.I"g"@* Ss.nem pre'Inyrr6rreom [""D@c;ts' [t/Dfc/h€-b J'
/lma the Conrql og pYDf/hYl frte to iova'uttt'ftope"rtt<6
cla''s Obi
ProPtrrric's P =nera Ptofrrfl'J t ))
p"road(fts);
iiread Core.,r fu* h.f.^* clous obj
Srrrng 61= P' gerPog*g (qrng' drftt^" )l
$-T e2= p. gerftupq ("m6'un " )'
SN"g  =p' gulnp't,a ("t5' dtrusc4
'') )
Swing S+=P. Sukugn^ q'rng 'A}naa" )i
//N'it Uutcoa"
Ctass" ,f.,rNam. L5t)i
Grrnnq Con -- Di*t' Manole,r' 3a Gnnnerrtcm f 8''' sl
'
Stt) )
Shr.r.ro !t2con' c*et*e Sktrtrlu* C) j
//lotote
!{hle(rs'next())
t
$.o, p ['ts'5erJ,rt(a) +
t
/oore iabc ohjs
'f6'cloi€t))
€'st' ctose( )i
Con'doseL rl
" & /ir*n
3/ ,Jar
-r Beaopec.torgCcrnrcrioe-x C1omt retottize Ood ose t:t:*Y
gwo thoag the SPecjc.r g"ot, "
P*,rS* T5 = Stj " g".c.,r"$&6? ("'** x Rorn Sr.aenr ');
" " ,s'g*SMngtr))1"+ts'getSnngL") + +1
/>Javac Jdbc&EtTest'iavco
4ist ''
AfrWuwAz
Llbeuo >
:-
=
.zlbeons>
o"d n""rdffi
i5 arc,0l1r'rtd.
-> ule con coo?igu"t rotrlhrpte prugmics ftre in SPrJnSEillironrnen-t'
IP *rts
*..ft9t.p'"Fnh's fttt c"nr.r'' so-" r"X to'* t-:;"tfi"t"t[
The values collec.l€d &o*' ostlg GnftS..ted frDfxxn(,
r''-
ood us.A lo zl-- q-iogch,xml--7
Egt zb€oos 7 1165s =.brg
.s? - tso.,s.
"*J#-tge/b€ttn ;6 ="PtPctnftg '
Arr,{rarrt na.-r. ='ry# 1,..Dp,.6{.
t"u' t^o'u"DsltJcd
ls4' q,oPtlte$'l'::-
/'laiutzDbDcr<'lls'
flDF#
z-5 tlwfuez
x) Lnrcrrnriomtizc,.ltcrn
Olnirg + Longtrc^ge
iauo'uri)' Locale
= locnl € .
clcrs5 '16 given &r c-oothng totrb locales
Eq:.try
en-Us , pr -FR , PI - Cn , hi -IN etL '' "
A-g'.nan cts it6 sPeak ;o cANADA '-)
moring oa'f o{pliceHoo cocxh}ng &' d;Pfu'""* lcco'lee is m*dog k* err'b'iling .J
iltn on rbe opptrcc.l.{on, Fo( *,i5 (ot o€ed }o -tctke oatre og- th" Pfs(ftfio"t '-''
l6be)5, rprr',bc,tfznrmm, ftrcP-wpts, Cu'rrerrX'{mbol5
and e'Fc" " J
Lwev'
"^t' 'locoles 5ve,;hc P-Pis8 'J
--r To enabte ittn on drl o?Pllco}lcnts cr rreeA mctnlr-
n ,,Pno ffeJ-}.)''3 l"bf-c) $re is &-J v
ff ;Hl.,n' ffi*'J: -,',#' ;;; B";q''.T:
h :
hB can use ffitc hon6loftn^ff .rn;cole gdittl taDlA togef gre*n*rrHsn lerkis
:
in d; F€.n<,.t o"udH * ,* ttE t-r":r'de nTY*,"re
rurrrtrrs 'Jin d;Fft"ent Enguclo' @ tb Zq "-l - .*,,,^_6Je rurrrtfrs v
rP hb.r con't be tgQed using Ergrtsb cttphobers $ef tbdt urvl -/
ard elpPued 'to fte ctpplicotlcna' 10 gei Uwc'de rutbers 'pntt" ct*"*o* J
YeBIonoI lar6ua-ner livg 'lau6u'thndi c'nd elx"' trr- 666 use Unicodeedro/ J
r:
procedcrrc jb 0cj- Unicode rurrlaer o Qn certain bindi ctfde aed  usirrtr
J
Unicode edircrr c'nd €elce furee' rntiveP"aecii rool 'J
J
p Dor:nloc.d unicode eclircn rcot Rorn urap'b'i8opi'cor'n '
@ Launcr,,''un,cgg-i&lz"t-@' rhu"rgh l^*-**tc.nd fuCIe
tle {btroc'r;q + v
biodi t wde F.1'
t)
5r?-6'.- cofx aHm +bindi twtdsrb Norcpad Kt Fle ' v
. -./
P1 -txb
- ..^-,.- &,o nh*.efr..nodl.€
yt6 trdcode'
_-/
T -
llolE:- Nh;te stdn$ thrs f;rc chd
l??t'z't
11t,
:'1
",|,l,ttt1
ilg
..-l
St p+'; USe r$iEeosdi 16-0 I f0 get Uritde nr.mkz&
cl€' o9' Ccrn ttx i " &rtr pcnt . Pesrrr,rBrna ptloro6eh$xrre .
iBrr,r'r*'try1)3-OveRc6cii _er€Odio$
hr;rt to r6e1 {13 p
9Ur cao rrnre ftpUcorto.oCorurcxt Conkdney oodg f*
rfe &'oong SpriogBeon lraoiog prDfxr/hes fir"
o,. Lx t Pa- tx t
T-*nt 11i< gtrrr c"rcd unlcole rrrrnb
rrpLe iten bg Crn Ftguri nX
mfrfJ,
Sftrg Uosea i6n frpp ts^arnPle apPn
E:Af?6
l---_SPtlQg
f---"--'- tT:-----.&p.progn;q
[br"se Bte )
AfP- Pr- cA' ;ruPnes
Af,p- Ae-oe' Prryxda
[PP.- hl -IN ' WDfrsYn'lc{
ftmoCft,rml
kmdtient'iotVc'
/ APp. p'op"te s [&:en re )
Srrr = del€-tC
SFTa : Scrve
th3=669
tlr4 -- 6ai641
ll NP - h-ce " Tolotnu ( F""cr"')
SHl- = EFFACER
Sftt = SAUF
St13 = ARBET
Sh+ = ANNULER
// nPP- de - DE ' P'oP(ll % [t*)
Sfri--- LOsOrrN
S}T i : DENN
Sn6 = zul,
Sh4 = AtSAc)tN
/tlttP -t,i- rN,Pnft'o{e [rctugu;
"
Srrt = uocx uontPuoqrst''ore
166r-rrcfaa
:::; : f aos ?'o"n P2 rrt e're
ttru -- --' J
t4u,',icde
n6ireser*afiorr ft" ft6lT1
NOTE:- ]be F;ternme oP Bose Fite is rocrsr be thcn in l.txofe.*ecjFic FtlanameS. --
+ crl pro1arfiea Sre must ccrnt-cno Sorne |.<gs horriry d;Pftrftnr Vo'l-ere6
<1.-- ErooCPg'rrDl-->
(beaob>
/.Wo;r' d=
LPtqtu{t1J
.Lli6l>
Lo"t.
l2es*.."&*t" -
f*rort&.*";
J
J
-i
,,J
,J
-/'
.J
)
---l
,J
.J
",r**ogSrrce " cl&sg ='or3'5P' Ccillext' 3t{?o6t-'
.'U
L' Pi xed kantd
rnrDe --'b'semrre6" >
zaloe? APP elrnue z
Avqlue> hPP- de- DE r-lvdcre>
/a!re> *PP- Pt - CA zlVoluez
zvolue> hP- 6i-fr'r 4wlttet
4lisr'
u) P^oF'rfg'
-rlbectn t
zltaors>
-
/lDernocllcnJ'iovq
iccrprvr ort' 5P ' c6nlt
^b'
su{9cxT " * i
irqpffi Jova' uli l' X;
irnfr3nt javax - Sjiog' *i
irnfurr "lava
- aot' x;
Publlc clcrss $-rn6Crrru [
P s v rn f3nngll a$s)thrDLos Eranrrrn {
(0(fts .
//Loc"le ouje* Ulql(BJr f
f ---J-:- -
langtrctr t
{= rtlo lo,ote [orgs[o], or3sli J J'
/i Annn"r" Apuc"ri"o oonrert c$lr-.Jy/,i r^ J
Cussh*X'nrA6'Uortt"rG*tx+
elx = her'r) ClatsPorhX'"rAppticcttrooGnre-tqW**"7
//g+ lltgs h..,r r-r{*ias Brtca'*'cu'"r[raro"k ',
S*"3 116g1 - ^x-gallersale("sttc,
t{'n,4pu-rr$1'',*^4i. **-l?:* -
S*"j msgz = *r'gerflrscrgelsrna', t*r,*ffi:rftuti :].'
not w' -
F"g mS03 =Cn. gaMessagq(Sta", null, "dek$
^35'fl1*".ou*st"tq msg+ - c*t" xoMerr.5't+3*i.f,k^rdtF" ms6rr') r))
// D*.top Srctng Farrre
JFlc.me jp = rrc,o JFrameL );
G.rrcutr^r Q =.tF " getGrrenrPc'ne t)i
/lL"tore bm6 b$ gLth"g lc.bela hro 6c$ru-ed
gc- = neo JBulktn (ro€'t);
62 = rgro fBurknn [rosg z ) ;
b6 : n€r, JBuilo''' Crnsg6);
[4 = Dcto Jl]if(I., (rtsg+) ;
aocs )r.€<,ro,<c ) Frfl
Snitet 21<'rr< . J
to< cs"'rii '
tV$< !lo<'*rce r"t-r''
XBurrcn
JBulkrn
[Bu-rfun
JBu"ttuo
cP'serl%oc,r (neto FhaL"Sr'+ t) ) :
cP. crdd Lbr)l
CP'add [ba);
cP'&dd tbs),'
Cf ' crd d Ll"'r) ;
jf,- Pl* C );
iF'shococ:j
$ //mc"n
3)lu"''r
I > iavac 0erncc-umJ'Javt' (pq *pp- h-FP 'P*t""ttq)
llz lav o ctetocu'Jnr f'' fto [uses fup.- h-FP'P'"{*JY
["T i'#:I'o: I' tuses hP"P'r"d"r)
...>Ctx"qct&ar)t.)givessPrx^€Beac,Cr&ssohje0tSirniue{xctr"getflctsc€e(-'-,-,)31.,€
Vdxre 4 lhe Wwa rtc3 Bre besed c't rhe gruan ket'
' Can gOcl ComFc.re &aoFaUzry Ccoiaine"{ crnd
Feorul e
' '
Nirin (l
betro J mrrrn l-i'r-H-
/ t-ffi ,*ng rnFr*r <m
Abiliru rD uxJtElDirh rrr,rriiple SPnrt cqg'leJ
[drh Single ln3iance oP Crnlc,ina .
Appticr*t ctn Cc'r*e
"
r
BeooFe.ctary
Yes
Ccrr*cct d,r, .
{pp[tofkm(onRxl
Yes
)esNo
spnog
pre-iosnrn$&tton g+ $eana ,o )es
Qecegnizattoa 4 phcebode'< anl pn4rt'rrofirts No Yet
i6N swpct No ^ie6
 .,. N0 )(s
*WtiotronEwru
llt,"aUg
4,ro*r1". 8ean fun P"ra,o.'{ re6+ht..Hc,"r No ) eS
4rrmnaiic EoonF.cn',jPxtPrucersc'l
redst'oxan N0 1 e8
coocruiicrn:* tdure usrn3 fing in rneoot."*:*
,Tff;-X,#P#-
L15mg Beo"FttaSCon'rcr;n'aa
(t'ses lert mern6$ ) ' cln u-L' v.
,pucc,$on &*cxt Cont<t'no{' ' the lrnae]l 4atat'rtt "'-
+ Actr,'&rft:r,ret - ;; cornfxmenr/"?T
is coJled
*Evr"i'
qic,gtpYre-,r,EY&trlspise-discc.$ea*!o**..oA.unt*.T0FrP.,,.Dttuspw.tth"dr5
tuX q1ed Etflrlistcr'Cx6
' vlhen tte $pU*f-* Conrc"t Corrt<t'oor 5 t+r'ttea 0r
Stcpwd the *wpucarrox]b'ent
cdi -l be raig,. .Je @nhr.nale
rhis APr,icartoEr,t'*'
Crre Cc." c,-se 4WUatrlc'nj-'*rer'
fnrtu: Prot'*
tDe 64$ rohce tl^r crncc'nhoP -
trrC ftc'r fne AfplfcoffcroCo*e"tGnrco-'ne'v
is *rre in 'f..on)n* mccle'
Exarople A0PlicaHoD"-
sia-f,".- Keep lsr alpn w"dt' ('sesl)
*,.f;t- Wi"€10? sPrrct'ffi L$eoo
cc'rs
/ llgl;srrnet"'lav a
imfr't org . SP " &tdext ' '(
i
irnfrnt iav& uh I 'X l
imelcrrnxlnj
on$' se' coYrrxi' ht'Y*!
'- R.Lbi c ctls6 llgLisrcd{ irop]errr.*s r!,p l; corr o.,Lisrcne,f
0
1
[1' .
tl:
;'' #*r..:l' - t"t'* ('h'errcr*r"r'Ert nt o')
{
'.
i-^,r
-.rr*
E,npsr zr*
' " '
S'o e 1'ooAfnlitatl6nEvt!-d
op l-1gLsttoc^t clcls ) )
i F (ae. h3r,i ogt ) . f ndex Qp (" CmxntP. r-,-s be d Evenr "
) I = -l ) il -Tl
.tffi'
{
$ttime =Sgsrcro - currt(rj-Tlme f'lirrle ( )l
s'o'e(" The Conr<';rsr i6 g'f6rvred c*" +rr''" brcO):
' ! ^ Apr ")l=-l)/nlt'&nfr')n'o
e6e tf (oe.roSniryL).in&xOP [''Conre*tC)oseaEwnt /'
'"" ,rstorto'r-
t ^ 'r: ,,lrir [);
endnrne -- Sgt*^' ccnronl lirnt
S'o'P ["Tt)t can'{d.,n?/, is sto?d a}'+ rr"i Doreo);
(.0.r,(,-IhreEr.FenfCodf,dw^)6intunnloSrrod'e&n-+Ccnar''.-s+ti'a
+''t,seas" );
] /lt"r*oa
t /1o"*Pp}carr
onEw"t l- )
& /Jcratl
' 6,.pg- cooggu'e the ot$re Lisrartr clc!45 io sp"n{€cfu
hrc'
4'-' f)etrnCtA'nml--7
z'trrttPi "-'z
LU:ao|7 " r1$Ll'rcre{",l Z
- 6k?fl; A4,l..le *pprlcc'ncmGnXxf
Cortdrx
' -+ gprrogBan cot, l^lau. trm crrv-de6rrd merbals qo Ukcgde rrerbode.
O inrt liftcXcre nt-rtrct
i Gotcrrrxrr execure fid5 rre$ocl r;5hr oPxl Eecn lnotrtnJn'aHctn aod kgrdeng inie
-+ ThiS mertnd is urefur lo cecr ororbe{ ryeorn D?gtthea cfll_ asalgned ton*>
J
voll€d vatue$ o. not. Tb i5 ols0 qjeRx to checl coeorhe'{ wnrd'tarl
J
bean ptopo'rrre6 ar< Asai6oed Dlrb VoJues ct6 not ,J
@ a.sr.og?il liPeqcte rra't^)od
rrerbod otco it i5 a-bdl} to desr'og ocrr 6pdo38ea"o*oy
cgde nerho€l rnr.r,st be sPecified io Spr;rX&an d"do$ conR6o''cin
Sf i"$ cPt $ re crsin g ioit - rrettro d , de*rro5-rrerhod arh;buru
Exorople nPPqg*tg-:-
/ *rrro'Java'
pudl c inrrkce
{ E*,. $n.,$
3
/DeqroDeao'java
//oscr -&$ned
prblia loid
-z Qqlciofa execuns *L}s
+ Th,is merbd is a:cfur to
Ye,lcurce6 cjlsbs61&tad
Dero0
ArXHel0()l
Sertt^a ( gefeae
r,allih beon prop'*tes c'od tel ease Dnn -Jo'a
u:irb Spngbeans (urte cltxin'tr <;dbc caat elal )
u( zbeon> la1. .J
Dr.ftttF-- vi^rrd(--)
' '/!l{t$dljf4
'qAt )
utd. y
Pr.,---+ S'll'"r' *arY
v a4:"(a'J* J
-These
too )i9e
r.l33
oge
i mPleornrs
Derno
RrDi c ctoas DermBean
t 1trt.o" trD?'{to..
povole Sr"ng
P"uot"
ir*
iru r l;Fe c-Nc[e $eAvol
roglnitt) ttrruos ErcePrkrn
{ ,.o O C'De.oogeun I rn3lorttl')I
V,r,&rr19 f if tas..=ollrns$==nu11 )
ffffi; t ffi- n,- fn..r,r* f"s.. p"1,'volaer to koo g'pr'g')t
ll use, -du?;rtJ deshraj C) tipe qjcle ,rsbod
Prbic vo;d deewog t )
o
t S o.P (" De'ooeon: roSDamSt)k),1
rtrouaro+ttt ( age= 0l I nulifurog
lt.g = eurt ; J Beon Pr4wtiel '
]
/lB r.r$oA
Pf,U.
rcr{/{ n
3
]
.irnPler-oenJcrH c^n
St'rina sag l-let to t )
,,rrr5g"= "+msg t'o'ge =t+aBe;
<l-r spnogch'xml-- 7
II.DACIIPL
Lknn s -
^;;"
ifl="db" clcrss= FrooBean
4/'J'Jtrl fvtYne ='aW
!, /-Wp4tttl nome ='msg-
.* tlrran
Abeaos>
/Droo c t; anr 'javc
&me ot $rst oPPliconttn (coo use
" init -rnef{iod ="mgJnlt
$lue="&'lz
{o[ue =" fello" / z
, .',
-']*psr'g;
" dgwa5 -rro-rnt(r - s
ao1 Ccsnfa'tnax)
F.6lic clos5 Drrdlien'|-
['
P 5 v rn (5w;r5ll args
')
(
dt
//A*ut* sPog cooktlnv
Clc.:st'jbXro r Applccri'ion&rnrrx r Cl>. =(Ylo
:l*)
// cau B'r*-rfud ..
S o'P (bobJ' sr'dHetoc));
// cld€ c(r-Idrc'l
. ? l clx'closeL );
ig- Co"*rki 'rt Appuconc'nContscxt Conlcrlne
iP *e C$nkai$el ft $ear,FoU.r,X CdrrJro,lhu
fpsskrM.nr @ a4tcoCanttt"r (i*";it
//9q ,$nngBe"n ct&ss ohje{-
kmo
"uoui
= i*o) ux' getf3ccrn f'db" )l
&d.t glx 'ctose( ) i o' the end '
then c.,q f."tot. duwo.y$ingteronsf ),'
lzrlb;re Cooftguriog pre-deFned, ftrrrd po*S 8.rpp)ied iata clc.sseS &s sft"r€E€2n5
__
in 6Pnog Coo€igurotloo Bte :aer*iftcoticn oP liPecacte cocrbods P"or'r
^
hr$. no.o? w;rhocts #nt art ooojlobte in clcrss i5 P?rcticcrut
t': tt^'n..-1
n6.telq lrr$ramrnol rmg &"rger fa don9iSue thete tiPec-Scfe nett'oda'
)
-.l0
Ovcrcorne *,rr p'rutt"n ib is recorrrodeJ to crape 3pnogBec'n cra6 -/
impleroer*irg fu)o Sfr..-i..1 iner&.cas(rrr*o-0-iziog$a'nlDist/o6ibteBto")'
-'
ond [Jc cen u;e rned^]ocls of these +cm interPace CI9 rr,ltunalr f,'v 't-'
. .i
trren-deftncd riFeqcle rrr$ocb (*o,r#&*.-.,tt)d$hrr' t,
I n o*to *"1"d v
O*€'5P' beans, &rm''y 'TniHalizir8&an inrcTk'ce gitca aP+cllrrynal(
,rq.sp beons. &*"1 Dxrx.,n.tsean inrctPece 3!us
#J;tl o,^u*noru+
-
Currm - dertrog Cf mer''a' a
' J
-->r,hl* tJfiung corh thesa tco ,'frF'eclg thre isno need 4 CoruPiXtontnl r
rmhoa n@rrr3 n 3da$cq hre' I -',
-, pOJr cIaA6 gxn acr os Bpa"gBea., h*itts not 6r'-n&roru *.',**errttu3p'{"3€e-'-
rrrurrt be a FIo clolS' ruf'c', S-^6Bram
clccrs irnpktrr'n6 tht-abn -/
Jtoo i^*rrk'Le-9 *'ao it c,.c*t ot mn-PoJo clal4'
:
-> r? sF^r5ftan crors irnplerrnrt * -*^
'Y:.* *"#'* -
Gw"tiPec6cte ftpkDda t+en bthuinbe €xe-ulta' tt-- - -''
geu|lt) a?r<^ gft<"ptq*'$uS<rt) t Cusn"n-dutn6*'fie^
exs'ru NH
v
dur'o6t)).
Egl4g-g0t',-
7 Du-o .jouo &mc ag pre,lliour o{pn
/ Denno{&an .iav 6r r
lr-rlCtc Cl&ss DrrnBeaD irnplcnncnfS Drmo, }rlBal.i-ang8eanrDfro.flCcBeen 'j
(
 ilfk"n Pqc*lrr ?:
PnwJ* SFirS ms3 '
Pnuara tn+ a1e'
-a
Senrs|Aatt<a
:
public sr,if g sc4Hertot ) t
. reJur ri rrrs$=" trns$ +"c,ge=" 1a$e I
grit' . Voicl d.^mog( ) ihruos f,rccpitan
a
9
' So p('l)rroBeca,, 4e"t5cj'))
afe= @;
rns$=Dtrtl)
3{-
frultic Voia ap+trP.q^oSatI tln"* LrtcEtlc"l
{
s'o nC }rrroBeao
,'
.,et'P,orn'o1*9*t
i'):
iP la3e<=O l rns6'= nutr )
g thrurl ntnr E'rc'crvtr("ser propvr'l-ues h Beo'n W'rU
3
Zl-- DeroocPg.xrnl--) Same ae fnevidr-s
G.pP')' blr dcr"r qrc'fo init-rrrrha:1,
derrrug- merhoc at+nbte8 '
//DerooCltnt'jcrva Same &s fre{ious o{pto'
aP 8$r€Bcan ctasS is not irrp)ernmHog Jrudd,ng&qn) Dis{bsideBean
"*.rft.ces
tho oo[ f?rink o-ba* Can$gurin6 Ce]talDvts%ocIs
ax
Crrstuyn-liPeqcle "yr$ocLs'
ft Contcnn6 oDlg &YJng fcqptied ilc'v4qa-Jt€J
$rn.e ftr;rd pawS *qplie cl cc1*e5, EF St4ptirJ clcLlt?-s Connol- implarrrs
Jn;rfo.Uzlng Btan, D;"&,nst6teBenn inrcvPcrres, So ConPg&ft CtrslcnDl;Pru'6Je
rrshods 6fule oohry 101$ @, those sP'tngBeoos'
$pr;og Ergprrs I rrrodea sP Jqizu)cro:-
,) &*tcl Inig*tcrn
U) Grrsrnrittl Jqjeotcn
3) lnrctk ce Jrueucr"
Xx*A,mre ;6,P1ftccs tlr can 8o &rr
q$t4 inrcrft.6a iqeuloo Loe can
PYDqrrneS
[xrAware lorcrfuces aYe
Jorcr&ce Sojeuicm '
iniecr onlg sPcfrt oi
Ot/oa/-L:
lo crle sPnngBeaVl cU6
t1
@
0q,59' b€4n6.{}.4 ' Be"tfom'9At""te a^;naBea' e)as
-, useR-o lo irllectr &aoPc'rroq ccnloi rr.d fu eYtr
gPri ngBean da'l
Or$'s9' ccr&tc^t' frpricctrron Cz"*c*t Aoow
---ruseftx to iQ)eoi A{Plca$croGtr*e^t
cdrfctr!"/ fo cr!'r qrongBean otox
penPcrrriog Intulace inianoo d-.'{ q7$nggeo'n
AT"liCorbdr'j
w
ctbtg o(.Js as rgn-l?soddJ3v
'J
J
(| 016'sF' kc.ns' &ci6'3' BeanName'koc're
to SPngbeao
c1o''rs
---ruseftr to i.Ue'-r Fanid Spnng bmn
tr*.itC
EromPe
n*"** -ta'&sx
A e#xibt&'w
xOIEl- 1y6rg1-, Zr*uft.re Qec-tloo uie ccm irlfc-t Undertagiog carilftJir*ta t-D
ftnoggean ond coe can uge rheee @old'.^o* *o ktrot'l ab<* d+fr VatrL
Setng &"rn Clrrrenj frninSBran c-'E,rs'
[O exArnPle o{ryn oo txl*.r(z,teateaf{crn .rePfi &pPtr'.(rdatrl vr'xrdituf smil.
i
J-4 IP U* ur.Dt.hD 1r1n;p Q61pfto1-rrHe$ VolidcrHon 1og;c crnd Jn-rncr"l-;ze,ficn', 165;.
&tilide rhe Spnng8caD cl&sses coirhqt d-;srn-d;og tbesu-uce cde 4
Qristing SpAngWnS *ro coe C1n &se Speoar &va cla'ss au)Dg a-b
S BeonPotrfioc.ssc"r. % *r;^ the cless rrxzst ;rnplcYDenf or5"sf'kao"'P-''Y!
, *-b*tl'",:::zg)
-n 1il5 frwrk'rc cc'rlfcr-ios ? rnert^,od6
O puuuc obre* posiP.c.,s&e.* In;*x'o*la''COaF' P'?t": @,,m-,- ref,."st',t6 qtdru06io Oqb-/
-- useftrr forrbdjftJ EaoT P'pr'xdq opv' d,.gtt*-u7fue4 a
(1) por;. obdr.i ;rrurP**rA?otrdrroliz"orc'D
(O*t-Lff'*"'*
ffJ '
---t
^A(&RS a?w ccrstorn ';ov n/:t'lvd'
'r"--- ' d-o{' Ltl..'loafr(
+ crscft.o a -o5fu tseon pop,rrt<5 c&rct ccnpleu:nit-tarzanorr-
|9f- Crrsrorn initt ) rrrrbod aod agr P*r'fr6fuc')
r€Jor€ct l6rce avt syra$cd to
onreSpnogroecrnd!r'eag$eBec'oPtftrDdsscd(*'"wntcl)or-/ir{{ils/eLotzd
{oqrs orc cc'flmcn4'r rrurlple SpqBrans)'
E,rElornpleolPllca$anan&anPcgtRocos<,/,.*"-.*-nka*ts'|Plrrnl-vuk<rrU
h.acr,t $v€n
on oi"loalrota
-:7 AppticcrlicrrrConrext'oolcdrE
acdoroolicao3'"t%-tt^t. "l--*'t*tt
BeooPootP,rcess.'  *ao3 )bB ctnfig*'L^ i'r giag&fi8urcrtton F;a '
hlhls i,3.nkjog ro,fi fJeo",Fc'ct*5 c6n-t6rn&4 *t
r":*t*:ej* 'flf'i.,t'
nrr6isrc.,,ed expildr h or"'9 P,''roir ' oaaBeo.-'PctP,octts
(-) '1!1
I
SprogBeanLlPecgcle DiaSrctrcr N'r' to BconFecto'U
6^k!lYtc,t'
b{
Hx<-- -t-
trF
3
,-----..--{ 
q
Fo
a
;F
g
d
c./
l.
ig=l lE Fl E-lAEl le *l 5
L, .! tF Xt
l.l rO I /11
I F -ai lA ^Fl rb
l?fl ree-61 s--'Izsl EdE Rvd9
a^. F
C c-c
J
r-;----1 lETl
I glt lF ?1
I E gl ih$I C Jl I tr dl
l?B lsEjI r-'l .(
'---+ ;
j
d '.--,
ts
l]
{
F.
I
o -./
g
<.vA
Fj
5
r
i..-.
/--"r 9l- f F-d I I
lr xl 4'u : l}+l I I
leq {1g' l}-B.i I I
l-. Fl t l^ F 16 El L_l
I ?l 9-' h' ,{3I t^l F .tr-
a
a
3l2DO13 9:21 AM
'l
2
3
4
5
6
7
8
10
11
12
13
14
15
16
17
'18
19
20
2'l
22
-23
24
z5
26
27
28
29
30
3'1
32
34
35
36
39
40
41
42
43
44
46
47
48
49
50
51
54
56
58
59
60
ol
62
bJ
64
65
66
67
68
Spring App on Interface lnjection and Bean posl proccessor lmpl
_Demo.java_*___
public interface Demo {
public String sayHelloo;
]
------.-------DemoBean.java--.----
import org.springframework.beans.BeansException;
import org.springframework.beans,factory.BeanFactory;
import org.springframework.beans.faclory.BeanFactoryAware.
impon org.springframework.beans.factory.BeanNameAware;
import org.springframework.contextApplicationContext;
import org.spdngframework.context.ApplicationContextAware;
public class DemoBean implements Demo,BeanNameAware.BeanFactoryAware,ApplicatjonContextAware
t //sp."iat Bean properties
-
tn*rat,* fu ffi-"', e";'l'ffi
private String bname;
private BeanFactory factory;
private ApplicationContext ctx;
String msg;
//setxI(c) for setter lnjection
public void setMsg(String msg) {
Systern.out.println(!!D€FroBean:setMsg(-)"):
this.msg = 659
)
//method of ApplicationContextAware(t)
public void setAlirjlioefctriqdffFtr(Apptieationconten dx)
throws BeansException {
System.out.println("DemoBean:setApplicationContext(_),,):
this.ctx=ctx;
]
//method of BeanFactoryAware(l)
public void setBeanFactory(BeanFactory factory) lhrows BeansException {
System.out. println("DemoBean:setBeanFrctoryC),') :
this.factory=faclory;
]
//method of BeanNameAware(l)
pub[c void setBeanName(String name) [
System.out.println{"Demodean,setgeanName(-),)
this.bname=name;
)
public String sayHetlo0 {
System.out.println("current bean id,,+bname);
System.out.println("current bean is singleton?,'+ctx.issingleton(bname));
System.out.println("current beab is prototype?"+ctx.isproiotypeibnamei);
System.out.println("all beans are',);
String idn=st(.gglgeanDefi nitionNames0;
for(int i=0;i<id.length;++i)
{
System.out.println(idfrl+"....1.
)
relurn "Good morning:msg="+rn59;
)/method
i//class
*----DemoCfg.xml----------------. --------------"
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.sorinoframework.org/schema/beans',
xmlns:xsi="http:/ wvw.w3.oro/200 ,,
xmlns:p="http://www. sprinqframework.oro/schema/p,'
roerlodS SrlPc'rnoi
nd +4Le lic*t oo
Page 1 of 2
69
70
71
72
73
74
75
76
77
78
79
80
81
82
84
85
86
a7
88
89
90
91
94
96
o-7
98
99
100
101
102
103
104
105
106
107
108
109
1 '10
111
112
113
114
116
117
118
'r 40
31212013 9:27 AM
xsi:schemaLocation="httg://www.sDrinqframework.orq/schema/beans hfto;//www.sorinoframework.oro/schema/beans/sorino-bear
'Ee!jq:ll4 {q$='My?r999!!g{/> ,'.J Beo Post ?roccssrrr ConPiS t'raH cm
<bean id="db" class="DemoBean" >
' <property name="msg" value="hello"/>
</bean>
<bean id="df' class='lava.util.Date"/>
</beans>
----DemoClient.java------------------------------
import org.springframework.context-suppoIt.FileSystemxmlApplicationcontextj
public class Democlient {
public slalic void main(String0 args) {
//Activate Spring conlainer
FileSystemXmlApplicationContext ctx=new FileSystemXmlApplicationContext('.srcDemoCfg.xml");
// get Spring Bean class obj
Demo bob.i=(Demo)ctx.getBean('db")i
// call B.method
System.out.println(bobj,sayHello0)'
)/method
)/class
r Prwess<r{
import java.utll.Date;
import org.springframework.beans.BeansException;
import org. springframework.beans.faetory.config. BeanPoslProcessor;
public class MyProcessor implements BeanPostProcessor {
@Override
public Object postProcessBeforeleitialization(Object bean, String bname) throws BeansException {
System.out.printlnC'MyProcessor; postProcessBeforelnitialization0")l
if(bean instanceof DemoBean )
t
DemoBean objl =(DemoBean)bean;
objl.msg="hello1"'
return objl;
)
if(bean instanceof java.util-Date)
t
Date obj2=(Date)bean;
obj2.setYear(130);
return obj2;
)
return bean:
)
public Object postProcessAfterlnitialization(Object bean, String bname) throws BeansException {
System.out.println("MyProcessor: postProcessAft erlnitialization0");
return bean;
]
)
Page 2 of 2
a- Fcrcrorg Becm : -
-> fP Norrrar 6ec(n i6
.Notmar 96..r-, class
ConP;6ured as De?eodepfBean fo
ohjed uirl be initucd d;rec*lg
Beon pop
h ka,o P1.?)Pcdtg
rescrr}crli ohieci otLro46' aP FactvgBeat
c|oss obect @il) Dor A(
Facr<q8ectt' r.r:itt bt
i5 si.rglercn ot rnf
Qocxrrces oF rbe aPPt'cafirm
r) fap6p,,lavc (sPingrntoFr'<
gftrnde.o,iava (sF""Sm
sJ ftmoCPg'rmt (sf,n'rd fitj
+; e*oBS' jara (cticnr Arr,.
G) TSi q€an'J&va (h.m'5Bc"n)
oalor/rora
e'rCTen
"---- l".rtog tsec.n s
a3
a bcan lbo-t 6enerarcs
ftpn&ntBeon tkn FectogBaaois con86u'rd
iai€Lted ro prufrr61g lx't lhe rgutkniBecrr) gc^'r'6c/.f€d bg
idet-rtd.
Eg:-
/*qfi id ="4b" class ='Testgeor''
/ z
Til5 inl(t%ce C6ofr'io5
Ne+Beao 5
tgw: [DEs)ur Pc'r &vc'
vendor'. 6uo11 5 (orc'cle aNP )
Ve{Sico: 6.1" I
66ren 50trr Ce
U'*U GtassFsb ex a5 beilts-io5el^al
to claorla'd slro : wNN'nerkan6'6{3
Po ducs, nnr^r' rrrbeans 'cng
0 g"rOhir.tc I
@ ouObtJTvt'L')
-----
@ isSi"gtto" L)
-t
L**cto id;''db' cla35 : PcnoBerto"Pz
zFrB^tts rp'me ="t1" r€P--'rb"i
7 ' I
zl&t'n>
"61" pro*'ag o? kmoBeon clrrss
iP "Iest8eap" nrrrd fi^mng!ec'n
+htn lbe El lrrutu"d
(oirl be lqjetrtd u'ifi 'TestB€on" cusS Ohj'
ip "Testgean" b s Facfo!$ Bron rben the "L'' P^ru"s oP
"*'::."
61619 toilt b€
lnr4Hi coirh rhe wsulhnJ obe{r $t''tn
b: TestBean
coss
o - - ( rl
SprrngBao brroroes F.oorg Bcar, ohn ib trnplerrrnr' O-'S''F ' bean6'fc'ct<l't
'
.latrr"iLia'n
' '
3 rrrrbods
r€rurns *. ,*'*1"1,trr".- *t
rerulr),5 rhe tgPa 4 rs
reJLc6n'9
tl earbe-r YLsa lKrLf o hiet*
, *) proredrrre io deaf orirt
derrlqarertn bb
Str'qg
ekpr: p"..ot${5pac"raf ( ---------tNCro _-____r J.amjtcdj -___-r c&ssNme: @ ]
,/-/resr Beas .3oyo
c-lars lestBcon inrplarfrr,is kchoqB€a.rx
gerobie$ t) thvdas Llceavtc,rr I
.t
.Y
P,ghrcrrcf ctn^ Sctuxc€plrX'---- rrle,:------+Jetacla-ss ------' cLo$Nj&rnet-@
//ormo{aeaDicsa
irnplernenrt [}- 0 $
Billic c&!S DerooDeatn
a
t
Obrrf ohi;
{a$h}clid{-_-+ lnso,tcod €
-)
g]l-KK
----+ok
ttMse*c.i nff6od &L1rpcrrttaS Sert"r-x irarerflan
prbri c V6'd €elobj t Ob#,j oUi )
{ ,tu.' 6*=cbj )
t
Fr.blc Sh"nO rl-UbleltuC) [-,,^,,
.' lef,uo "orcrrd rrrnlq --f*i .6ni'h$rogLl"
? I S.o.p{"Obj (rou naftf '+o$,gcrClat5() /:
Frbic
{
O hjett
"rt*@Yn
1r:irb use^deBrrd F-rt r'gBeaq
Fi)eHene-, Nerr---)prqjert
--
java--rjava oppttr.,u',-lJ Pvq.,@r^Jar'€lsY't"soi! ---
-,---, n (rro*c nain ctoss
- ----+ Fn's h
lg-a;- AddsP$aS L,Lrttlce l-o *x fr'{)qr
l-iUrc,'l<s g,anO
Righrcltzb.
"#f;H:f-_=* qdd L brcyd
---,a
6pangla.ro e u:nY 2 5
stcf-Il:- Add rbe alole 'javc. rescuxce6 to
*$rr..
Pl"gs&rdor cf $e PrDiet4.
Qinnrcff .fo on Sur(( P'g
-)NctJJ
--3&oof5rl'&ar-+a1or,
*Yn.., @
/1 Dero o 'J G! c'
llblic ir*crftrre Derrrr I
prrdrc. $*n, srgHrttoC))
$c0-AI
rrsrog
5l-c? -r :- creafe Jcvcr pyqje..r in Netgear)s tD E
oppn $0+ &als
rKtbeanS 6'+'r;-
puUit,
neo jc.va .utir , f)rre ( )- ----l rerc.vp5 Dafrclcrrs obr c'J the tIaqlicnr
'bi
pDrfc Cta:s get0bjcr*'13pe i1 i
refarn Dr.l^c-cloJs " , sp€cigica ttr tgp.
3- f1
p)ci c booler, n isbirg lctc1",i l l
eope is Slnglcfoo
o @.n tnre )--.gpecifi<5 rtre rrstrtrcru obje.t
3-
1
of rbe Qesclra* Obocc
f/ftrnro6rmr-;ava
fllldic C&sb DemoCUent
{
' P. u ,o Csrnngt I &*€ s )
t
the Qesc'lt rtr
S o. n (' obi (tc!l'J nam€ i!' + obj gcl Cl6$c)) i
/i6ou B'rnerhoas
8.0'P (" tesuti i5: '+rcvrlt);
6tcp-fl:
-=,
nex t r @ DrD -crrr'sla'{'t DoC4rne-rrf
-=+
n€lb '->':
l/A*'vor" sl'ioS conttinet .ffiffiy, 1ffiu,t',ca*lor(oruq.*;Cffiffi"X-rAqrlicrrhrm
Cavrlexr crx=neu)
/1$ct Spnng Wc'o ttLiYils
cr4s [,,1
ftmo bhi--(prno )ox - g.,B".12(g;
il..,.,,0 c# DenDoBecro
3r:dtotodtl f -O&.r ,uo = crr.6e*8n ., ("pj,"u n id
-
o? TesrBear)
ftFffi t0,ro-. oul - pnn*ln ("o4, aoll;sou; );g@q u , ^,- -,. -,..., ^,.*" '. " , -Lr ./, r ta l< C) ) :
Sr,;ng resrtt = bohl" 4gtlerro OJ
P-fl :* Add coog';gr,rotltol 'B'e ro tt'e WW
R'c cnn Sartce Pltg s ---t lrro
-j
ggftl..---> Xr"r L-- -axl{LDdqrrfn'f ==-,tr't*"t"t@
DrD
g{
strcl id t
-+
FntSh
Do&rrncr6 p*,: [-Ue"nS I
Zbeans >
z*rLy1 d:"tb" crast ="Test0aan' /z
z&n ;1 =
"do'' cl&ss ="Dcmo 0eonn >
,*i*., ;:Je; *e=
""1'r-ti:: l:Xl"'i5T3:tr,I)ak cx^is o,red os Qc{rtthr oba*. 9,
2.c dn iYLdat J
f"fr9l"J -1 Pun
-rn.,;^af^@,
*r6trnwr- fll-i6J-- ot+
&/*eA* o' 5'eP5
ff)p,t4Jic id : I -ilsPo.^.ro.D// 8€one'O/FNl;";
aLEcLn >
llkt'ns> ohi r,:itt 5q injuled ,rrt$ Dc*. crc.,rA5 oh-rtrr
t$"e
i; $(PvEt;- Tun +€ clicni o{'Pttcdt{dh
AilhlcfrdA io DernocuenJ ";cNQ -:
f)'nFte
the prrrdeAncd SirhgBrrrn Cl.o:Se:
troS Ond erc. ^ crre desiSrrcd cos
4
O OrB.sP .irtti . @D CrdiohjeltEctogBe c,n .
firuFruoryBeo.n
PrDr r€$5rrg kcltrvutJean arl exz" '
loset cornrmnd line oS(.rocftrs rc$e cq'Plico$an 4 rerBeon LDE
Bg*cticr cn frraierl ' irrofr/fitza ---=tBurl- ffYioclcss rr'rne :
rl-nr q'e del,Jorcd n g'1,u * %,*'u,
fc.cto"trBeant.
O*nocj tcru-
orqu-rneffs : laU tt 1 ,.' -ilrda---rft]-l.-a^
^t"r,r
&.in 1*, dr,r-
)
/Ltro t-tlirin$:-
'| '? '1^-11"r' "r' €eo.P'aer'kr is coged clir)Dd '
u
+ prfltnnnio$ fti,ccritndecr{ ArUe{-Foq ^ .**'-,^^
-'/
Tlere or{ loo rrrdcs to 6rrrhrniog
tLt ctiiq ' ")
0 Elpriclt @rring '.-
cor.,$gured e^rllcrh *r, coining ustng J
'+ heft
-1"o.'p"'6r'tt*s
Lo'll be ContiB({ccr -"t o
J
lsmg*t4>, z0.fwrt'chw-arg>
lc..3s
'J
@ *uto -'o,ng',- ..^^^rte conBgu,rzd sxpucttly Wy:^ .J
-r krr.t lroo po{unr1c5 @;11 oo
+r.r Lran V-{n'n"A
-, ffffi'T," itr ;:,ff"5..*-''Ie' otn^hj!<-Q
zvan>k$l
lirnik'fico orirb Aryldg ["
4,. .".^ s,-ptt, sl-ring popcrtles' -ftt'rocar'l'9
lsPoaslrole
:
0 A.rrotoiriog ir not l-tss)ble 6n Strnpk' Sl
anlg - rcfo'{eote tgoe fao Wft]'8 '/
@ &r*Crir,ng ft-pg Tise owbigtrcxrs Sitaolc'n -1ococ'rds &irnacnry J"6ecdons'
'''
O ro*;""; r',r, .,tt. Y€.odc'bllit, oe Gn€+.coc'1lo" f;re and &-'ua*{
Crzr/ oaJrore
e@ We Ccn rrrrxe 6priDgconr€dnet perfisrroing
@ h1ruo'-e (o,trroo,n =
"SNarne ")
dtrfocoirin$ ln 4 rrndes.
@
---+ Per{tnni $nricr lqiedioo based on kop pmprotics and &perrlerzt bec.na ias
ncroe5 rootchlr)9-
4lupe (qu-bdire ='bTuP"
''
)
---, Perft:n rrr Sertcr f4jeott arr bc'se d
fuPe r.rlf&-rng
an kon pvop'ni$ aod defendc6 bean dS
pa€n'rfetizf'l cotnsr(4(}trx'
@
(fl cootrrucrcr (cr.rrotol* t* carorru<tur " )
----+ perfisrmu 6l'{$ircffor Jtuealto"o  usiog
ddodclcc} (a,lro,uir. = "attroa"re<*
''
)
-, pe,r6,rr,s eiroer crns)[$#*rffi.-ffi) ir yc, ?cnma
---: a? Bc4o ccAS Cqlll
g&rff"*---) pe,r6,rr,3 eih.J crnsr,ttttt't |!9:J
orb$1,.r iJe 'rt Pcn Porm5 Crn srrud<rJ in'jerHcrn
Faample oppt;ccrllto j -
Ca*"Sl"tc k.-ce)
Deroo . jav cr.
---?
S&me a5 Ptati oug clpp o
kmokon. javc. fsv.ng 0e.,n )
Test8ean . java (Pae.de'.t 8eoo)
DernoCPg' xvor (st,'iogcfu Bre)
DernoCticr,t ';ava (ctrenr o{'nt)
// Deroo "xva
6aroe crs {"nevioq'4
/ftmo&c.n' .lrrvt^
fl$ic class Dr'ogtorr rmp'lemenr6
flro6
s
t
/i*., PrDWnl
JqtBec'rr tb;
l/o-toto* @nsnotrcr
Dean8eanC )
c
*, o,P (' D".6q"*n : e - lr.ftrn gnsw'ot<n") ;
zLJ
/10e.qoCPd-.*t
2b4o.9s>
/Uf,o$ id = fb Clcr!S-- Jefl,sc6rt /
.;;lt .til
*:,L*-="
l"lto' Iz
Si&i + rab$0e({
arrtrshfet i
i // l- Potaro C$nfiuj.rrl/
EemoBeao ( Ta,B*", rb)
{ 65.o=o:
S o. P [ ''
frnogs6e" 4- PararD
o
J
//rnerUocl &4 &Jfu e'q crl'lcr'-,
firbti c Void SerTb (Tes$er.n tb)
{
€ o P("cxmo$rrr' : sfTb[-) wtfiod "
),
lhlr. tb= Eb ,

{rrblrc SU"g *.gHa-ro 61
t
irgran tgtodan*r,]tt3 Tqhf&on'nzs $ = "+Bb;;
5
// IeltBtr.n ic.rra
ccsnsrnrohol ' ))
-
-/
Publlc
t
ccrss Test8ec.n
/&"o f"fg'nr
3i'rn5 r'ts3;
/ltrts .rsrroa &r se-tttnJ+jcrfirn
pubic y6i4 ,.rfitg [5r'r"g m$)
{
llrts ' msg -- n t3 i
]
/ imptemtn-r to $'lngL) rrr,rhoc
lnL{ic Sung tSh;n61;
a
t
Yefaln *t8i
L
l'
a- zlbeqo >
L*c$ id = "db" class = Denro Beao"
zlbec.o s >
//ftmo Cricnr -.pva.
pLtbic clo56 DerooCuen* [
p s v rn fSr*ngrl fttss)
a
L
l/ruivo-te SPYlnS Gmia;rr,t
ChssParbXrntftpticcrrr on C:n ru t
llner sg-rtg &r.n rihi
d-qfotoire =' 9 N<.m6" 1 7
-I ft" ttu a
'fra
D.,ooBe<rn class B€&o prDp<^!
ood TestBran c krss Bec..,; cl ( bb) rrrr ,-*.hC+
b)
or-l = rle&r 61og5paJb
rmr ftpp)rz''hl <rn Conlex- C'Y"fr
k
the kc'oid
Oaro o:ire =
Demo 5eq1 = (gemo) crx ,gelBean ('au' );
)t Col- a. rnettncl
S o. P (uou; . ssJHeuoL ) )j
I
;cr sPdogCcnr8gurc*krn Bre roel be
"4TuPe Codeing ssnngcPg krc".-
//in ktrncfu.xrnt
Zl0ocrype - -. -. z
/.beoe5>
zbecn id-'tr " c1c65 -"-lestBEoo' 2
zfrotl,.tg ,'11ens:"msS votueJha'l-o' I 2
lll.dln=
z-btsrt id =-db" clcas :' DerroBean " aitrbo@irr =''4'TUPe" / z
-
L[r'e rhe &a@oo-,a Lb'fune TastBeaD
zllaos2 ana rfre nn"UegrUh* "br" tgpe(rcstc<oo'
9n rnatiipc.fimes toirb Efa*"1-
Utt$re ict. otho<':lse q"{qt*),gy
nrJjJ Ic,i4 cumbi5urry
t.H9"
Noc""-
lilrn you CarrB5urc SomeTestBean cicrss
lSeooid's *reo fuTgOe mode c'P autur:rirtng
D
4xf6&rite : Gmshru(tl COdeing Sp,yingcFg fite;-
.{ l0ocrgpe
rnat YCriSe CrmbiSt-,.ti Ptod€ms
Zbcrra >
/hn-r,n id -' tr"
4Pr1J|,eftg
Ll?af)>
zlVons>
Oulo(I)il€ = or(fodeftCt
61q.q5 =" Te$B€c.n" )
rr!mez''rns8r1 Vakre-" t
"tNh
*t^.-*?:l*{  $'ov -r'n'4r.
,_-/
vt I
I/
I
c.lcrrs n& st l-r.rr .l--p<rmty;'
z&n id='hb" clors= EmoBa"'" crrl&ocoire = Consrru o-rcrf
--iR"for 61,d"SB-"
codo'ng 6frhg Ccm$SLtrafio'r -3re :-
lWo6'2
zb€on 'ld 1'tt' et&16 =''TestBeaD" >
Zl^D[s% rrirn€ --n55" 1t''tote:*bellb" /z
4beao>
Ltreun id=tb' c1435,=- DemoBean
zlVcoos>
fonevrratq lar-r ing Tat8rcn lns rt, e pdrc,rDfu,0e. J
Cfhc",<-olre S1-.6Got<,fnr'r y"tunS
:
arr-lotoire J ut*te"+ "
I z
-_-_-@-
C4mStrufL^/ th.ln SfrA nS Cclnt-cnrr,'t
grrfirtmO
- Qotnllrntilrn J4rurq
g Nho. l-{T'rx6 iPcoe coohgured lsrb c.drlurtn"S 4 sxpLiclrc41i'''n9 *
?ffi
ry * borh orJccoldn5 (taqlrct uridnS gtPtnta Sertcri{eooo rltq
ouiocniril in One Sp'lngB'eoD ctn'sS '
Onggrre C*ftoi. l$ofrnrf.g Pzn enpbcr't Urtnng crnd Centcrln Otbr'v prrqv'n]<g"',
b-,,iria3 1ai ll ePk l t +pu"a ) .
Curfooldng {e'gf'rc-l+
tolnnS ptfc,-tns Consracafc* i4.,n* tlO
1? 6*t CLrtooif.og g'rPorcns )r$Uaorr CLocl erptrcit coftlg fletfrnrs -
the o.grit mng t^ir eeftc4'
Coqsh-rlclor iticrHon fuZ ot tlise
S?rkl:s'{e*roo 14)rr bL e€&,kd "
fh.r the c,ll*n; fh"t fr"&t^n
$o'b 66nrcrrne6 (B€onfaqtduco*ccrru' { +oou** cc'ru-e}i csn{-cat.''^
) t,{rtos
gerko(
Vorsa
@ xf &.mo[&on c[r-snot conkan arrl ex{xicit
^
$!rrJ to.fe setu4%<rr16n
hle ccrn
f.
tre expict
aP both
Cu-tfooirYlU-
L0bite usiDg Spriog cortt, 6rbe'r Java tf.hnologies ib i5 fecorD€nded hr placa $e
logic o€ attiva-Fing SfJ'iog C{tor.dn€/l &nd g€tttn3 Sftnng Beato clcrls oQierr in
one F me exer'l-Lbl crn bloc.k ccri,l e d ccfn SYtucf&i tcrt) 6t Lri c b [ocr<
- + fi'n"U u,gbgL Ib i5 reroocnded to cc'rt EusiDess rnebocl C&6) SPnDg Eeao
Clio("d App
Awi/ tuing frame
Apprer / ctgp+
&rvter Prq
.)5P Pr3
6h{hs App
JsFAPP
P)ace ro o$ivale sPnng Crsoirrine4
ctnd ro getsP,loggean des6 ohj
&rostrc'cfol / S*rf . Ut.r+
ftrrsrrulcr / slzir..,. blook l initC)
CorDSr&aJz" I Storic b0+ f inirc )
z-t I PU.t]i c roid ispfnitt )
{_ _-
- ---'1 "/.>
cost&cfrd /Soui. blocta 64
gl-rat5, Acficm class
Gmthulru{
l*. btoc.!-dF
Homged Ber*n
Pace 16 corr b'roertrods
of sp*ng8enn
Eveo bandt'n g rn crbocts
&rqe
serv;ce(-,*) /
aoX^x e'J
L'/"
-"--"/.y
€xealre(-r-r*' -) "P
Errc*s Auron dass
b.rrrrfiod oP
llaocged Sear1
fP Java oleb o?pl)cction u6es opringAPI (rtr"d garg APJ) in tbe toeb rcsoerce pyoflrcrms
tben trne Sp6r€ Apr relarcd rrD; n iaY gle sboatd be cdde d l-o CLAIII;aI H oDd
6pnn{Ap1 retrfid rc4tn and dePeDdent iot Ftes sFnrrd !e crc{ded irr r,]EB-J^1F/ltb lot*',,,
jar eie e ddded fD C LAsnpAr H to)rl be used bg iovcr ComPt)e"r dtrr;og the (orfD'] idfi atl 0'f" .J
tncby€ Socc(.e pyDgramo L6en,ner ft35 ) to 'f.cq,n;ze Sf dng c.Pi. qjar Filee qdded )
NEB-INF  f iU ftraer Loirr be used  Se{vteJ Contdod /j5p confrd r€.( ho re<og nize ond v;
c6eg gpring api ')
Reglt 6<t ohieci i6 Dor a Serlaizable ohJect ' so' @e cod E seocl Qesurtgef ohleu
-7
ove( $e netaorv ' To solve 15''t problero lbe{e ore troo Goluhons -J
sola$onO :- ugs Roco6€-rs insrcod o? Be$t-trt$et
--2
--'' I?oarsers are Se'rl&li7&be ohiecrs ood u:e cGo 6e|-rl lhero over ftp nftocrt h - r
 -/'
Rocoters
-
->
All collec$(In fiornec'rc;r I"
orare*s . 50 Loe cctn €end rbero ove'r the r8-r{rrcnk '
,"__;, ;r;;.; ";-;;,,*
ou.r ru co,re,j'srrrlqroelrdk
Dcdas.{udq}e '-
r'r-t ?ft "' IdYf 6eft id't/zq,-ble-
0*a$rtuc-rures
(lire ArroiLl6t ord e-rc"' )o'e
Senia-t'rz<'l:teu
S0ltrdon@ it good
.'-^^ '{-,p. trkl coorc'n3 -
-> rP gan &re lbop,,nS 16 lrtPolm onl9 Read o1x'r'Ho"t
i^rn 1:
coirh Non- &nr,von'rzed
o*tt'-*.,*' R'r B**tPt*H;"i1^f I :
-,
Jp rou crye mgnq rd ?e'r*,,m borh Read
"tt.-:"#i::H"*"*:
ptn Smft:rr
rt tt{r{V-,o$ toth fuocbroruzed
96'655c'c'kc-rf
ror
--,,
(g3:- vecrt", tosbT&be ond erc " ' ; -/
-) frleo$ougb OeK,"(F- is rgt fiee ib is rtrt recornerded lo Scnd Pesurr5et o hie4' ftot.

&rrinorioolcr6cr to 6arrcelrrlcr d;rettg ' Xt it vt{zr.icnled rD keep rhe Ytr$(ds oe
:
pfsci,t*r;t In Col le*rcrrrFrarneux,rk hrr^err..cru< onl eenA rhaf Dc.tt 56-a t*r.t"e to _,
kem"Hct ).or1t^l .
urtdeteranding probtero ro coPg #)e records o? l2e sar r3+ o$ of ,{rraXlls t 0rra Srn^ct<r6
gFR r s (Res&{rgrr obj ) cl(
YAJ q IrSa -
V7-
<jb I ', Qfnq u,^Jl
ALa
E-ocb eemeoi
Reart t&t csntui n 5
e6ch, rtCcrd Of
Arra6l-i sr obj )
oP ArrcrdLi 6i Gllosro opl$ one ohje* or o h me ' Eacr' vecord oP
mutliPle vques incluct ing rrxJliible 6$e{5 ' so) toe carl c coPj
Qesrtr 3<-r to eoch) eleroeDt dF Arrog List dtreull .
----> To &lv€ 1hr aboYe
obreLh on& add IfBr
here, thts urel degned &vq cld56 ii genefoJrg q Jhvc{oec,n allli'ng
dn d ]b t5 crued cs v,o ' closs / D't' O ttt'*t
probero KeeP ec'cb f,ecurc{ vctlLr€s in USer Deened Jav aclcLs
ohjeif tD eocb elerncot oG orro4Li6i cts $roon bolur't
Cvoue Objeo ctess) (D*atrc'ns f<,r OhPtr
Qesul t 6cf obj rtcoxd e fo ,l"c'6 L;s f
clcrs s )
e leroeD tS Usiog V'o'tcrss/O"r;Po,
i4tc o -lroosFcl
Sr,tlenlBeao (o r'o ctossJv'o ctoss)
pabric ctos6 Srr,&nlBeon :prt=$-e"elA'gSE$e
f
L>maodi r(Icq
/bt6o ftruftt{-ies
int SDo;
SMng sr,&rne ;
Sfrir,g 6cdd ;
// t"ltite ser*s { gen'cnr
...
I
!9!E:- ohieLrs erdded to '*re elemenrS oF Coleu{6nFrarr€c:s6k
Drftt6n&cr''Ye
trrY€n c.5 Senncriznjcle Ohlerrs inatder to &nd Gratricrrframerl:O&
D:rro5wuGuYe Ovfi ltre nerrl:o.tk '
61q6t be
Logicto coeg rte recor.lo o? Re"urt& obu tu Att$!6I
, 6tt*ctfr rr.r
fiesurr Se-r
. fftrqList o'l- = n€ro
;1hre (t6 ne'rr () )
ftrrc.gList(;;
t
ll C* r" obo ft'r D'r'O/v'o clctss l'nving eoc-b 'recatsd ce Qautr&r ob5
6t : coo' t"r.ke 6tzrterreruC);
J = ur' ero."r"6'utol ('e'* * Ro,. St<'ae'rr"i'
ohj to rbe elero€nr6 f Ancrglisl
oUrs
)
olse
Single
611 [Awc,XLtsr o4eu
)
big Valtre bg Corobinlng rntlilp le
Objer and its cl&ss 16 ftrjel
5rt,a.nrBeoo 6i -*n€r' $i2d36-Qeoot) i
st. e*6",u (rs'gerlot tr)) ;
6t . sersrr,rne [ts'gu6]ong
C") ) I
6r. sersoaa (rs'get6!'t"g Ca))l
// ocrd eoc1., D.T.0 ctos6
/V'o ctass
ol-add c8r) j
l llroi'tte
'rs (Pescrrt6e-t ohit *)
,,---. Stnce,
lgg' Oq;€c ot ve4wserrtlng
/-" frrrilliplt SitoPle Vqlurs 4 YrT l$plf
indivrduat lolueg" so, it 15 (cille d
V 0, clcrsg
Eochr recot d cF
----"..R",iiid ftra is mcrnsPevrrg ku'n
it srrtrrnS 6oe singt biS lslue oh.ltlJ
ftrroiJU6t Th;{s " Sb' objert iS co.t'ted
D T o Lc.v'
Pesert,flt t-o Arro4Lisr in ulrclhs rce,.a
Thjs 6UJsf- is hcrlnsPta rbe oai"'tnxa
Dcrra Tr<.rrsttr cUlrr* orqd ts da*E s coUzd
Ya.ia bCd
55b rqrrrsb bCa
Scrdd:hUd
!1[ere clicl qou use co]l€c]i6nFlo Dcda SlTQctQYr 3 in 9(I'.f 1>m;eu'1.
o To Seo
- Qesurt 5et objed yeccr( d s ove'r tbe perLocn lc c{s discul secl d.bc|r
@ rLfirre garheriog JDBc propetries P'om PrDberries file roe need
iqva'uti i ' &oper ti es
@ ro rrnrnroro JNDI profr'1ieg uoe need !1"+ Dor€.SYtrt'cfilr€S
@
.i.o rrleiDf'uo nai  progrties ic'vct " uril ' fiop^ties closs
@ rr, sesstorilroct'io$ rc rnc'ok,,o ht^ge c''"o'nr oP Dcfa
*frff'ff::.
@ f,lh,t. d'eveloping S'{rniDg
c(Ppn5 io raratnt(err' buge q'-'61"1 Og tT::"t
@ -fu
mdu-Dt.dn hrrge ctrrccfoi oP cl..c'rc' tolrb 6c[f 96 5ltos
€) To &snstrcccf 6u&u c-tod ccdoe'
Arr:-
Aos'"-
Nh€re did gou use Javo0ectn in gcxl1 ?tDieuS
O A5 v'o ccts6 | D'r'o trt'"s c0blle copgiog
Gllecflcfn Frarnet'ct{k fLjasrrucfuYr
A5 t1c!cF ore1 Qesoc'rce tDhi le l)elelDPing
A5 sf$o$Bcctn in grxog ftPPf)s
A5 h lcfr rrcr Pe'{ 515.tr nJ ct'tsS in
!
116aFctS o? (&sctt ftr io
lvc r { tl'uca drcld tecf<rre
bcrr ed Pnrieus
G) +be"ndle
c.Pfm s
(rfUl re rrn^n{cr;ning
rrotue ).
bc.ge orroanf oP
-)
G)
^.
Helpelcoi6 in &ssicirJrc'c-t<n9'
DoJtt ct6 Sinqle &Saioo cd$rib(Ire
lnliniProietr irrPo ".-
J t is based on llvc? ard'itc$Lr{e
Spriog CcT e n'p'dute dPplic&rtdn acfS
JsP pYograms ctcl6 qs yl<rolc'xer
S&tet PrDgrarn ucl3 as Ccr"rrota
6s llodetLrqex
c'?PD
fes(Irl ccs
Lote1 T€sou{ce
" --)
(rrxgtaton
tqt. )(yierrrq{ er )
s€kaDesg:
|ff,o*TJ
@._4r.,_lrl!I_6.,l
^
:{rnng _ Errplogf e
uT<.qC DBs)@
Pnfie4].App
CrmrrDuC/dsnltq!)
qqr)Broro f<" t riodrxl
----+ Senl€r pfogram PctsSes dolz( tD Qesutt '
jsp
--- "tb€ Sptr.rgBeun cgss (modelB€qn) copt{s
using (t+rc$t otfYla!+ts.
fhe recarrdg Resurr3eJ obial lo
clca6 ohjerls ,
Enu;'tunwft(t"',et)
J
@
frwagList €lern&rt6  uetog EmpBe",n
closse.s
llr,n8eovtcr fu /.rlr,u
no.lq -;ouq
/,a,.*s j
> l'l o&t Eeon .& ta l"ctax _,
o ErnpBcon .kvq /,r)u^
Pr ' '-J
i* f;qq l! clAss pArH / l--' EmpBcan . clr.r
,r:- l---t ho*r O16.3. rr rrr J
-
rur lrib &rdc,r
hrp: //iqarhtst tto>olPntetlwJ morn' rtrtl v
Spnhg' js'l / commdns - logsrnq 'ic,/ oJdbcl+'ia{
-/
->
-to ese Jqva cless i., rrpwrtt*,-stbe pbrcd io rhe pocra.Se creard lerdescrrt
'*r#:
^*-:?;il:/;:::'"
S'a'r' Thar mecrns sP cao t ure rc,vc^.#"#1.#ff, nr'"'
. R" *te Sarre cocle of ohj€ &agy&rn ep<rr crlfrn @ 4 *e pc.feuo,
€g * @
NEB-INF
f--+ *.jotLz)
Neb. x rf) )
tto rurcr oP annorrioos
O Arpomriong &n ooct'-cn^rortan
-+ useRrr 6ri te gocrcfi o5 javc-'^ ePt dccsrr(nf cttl o't)
@Po-t, p;'*t g"ut'tt''* @F
-* @rh-'os
anl etc'^ '
--+ inlrodrrced &om idK!'i'
@ Anrprrruons 8'r Pnogcmmlog
-: useful &rr mercAotzt''rescutce
cft oFttolon S
@vetrtde @H,rohli"a @Pest"t @Fo"w*"r
anA eF"'
netr,.Dafa rr4og dc'tt ob* dcto"'
-
" *1,": ;:*;il{ nffi:l::' s'erkrr'ance
bcz
),$L paJsct{s c"r€ l'"*tl trrJSh' glos to P$cesg
Xmt dr-tr'rnerurs'
' --> Aoooraricrns
'ive
Bc.a Pre^iuititg 4 rncxuPict'trt'n
id'l tgood
pPtttr'nce '
--t AII Javc^ TeatnoloSes irnr arc desixr'c't bsed tm Jdv-l's+ ere skfPo/'lo$
: A,r'notc^tio's krsed Plogrornicn
-. ,. ,. o.y ,'{R?.x .
- Ej:- Sp;rya't + , Hlberrule 3'?+' 6tdut5 ?')" 8f,83'x ' $prvl€t3'xand
eic'-"
'---+ toe Con o.q/ptg ftnnofariocrs ol 3 leu€'l
v
O Besoarce loef ( on cass/InrcrP-re
)
: I nubod kr'et (^ j*c,*ahoct)
- EJ Ferd )euel ( oo llember vo rade )
-
and *q clre ott(rnc're P^ the Xm) ftte bc"se d
OF/ratlcrn5 .
It is tiKe xrn I
tlnder6taodiog AnretalioDs :-
AnnoruHonS Orc ic(va 6+arernea/-
lrorr'trr., Sesour ce Con€;SurccHcrn
Sgnrc.x :- 6 z Annotc*ioo -mme
>
---+'inrrod-uced fi.rq .rdr t's
Tg GnBgr-xc Sp.;ngBean crteccr) c^e the St'o-i.,3 anr,okrfionE:- o+loaluz
a) @Compooent
-> rrc.keg iovcl ctcrss os efrtng Eaon aod 616 &btc'ale fot 21ag6(bi
Pa tha*auocA inPctlon
b) @
govi"
recoroeod e d io use Rt, &o." Ia<^ 81''"'Xt*n/
(conra'rtiog !as;6<r.s l-ogit)
c)@ Rqrsi'ttxg
Ecme os @lornpcoe.* bL.t fo use fiii DAo s Bne S;mng
(crnla.,rng Peraisterne tqi c)
T0 Frf.rrm deff'ndcrg injewc'n cfus
vearnco/'ea
@
Be{i-h$
@vat,re --+
to iQfa'r $mt1g dile'/ arro4wlues, Llsi vcrtuaeE
@{b*ut , r fu lotcd o-lues to rePcYcoce lgPe bee'n p'Ffi-e{
@A*Wt".a
---------t to erxf,-ble olrbtoirlng crn b€o/n PrDfr,,/dq
' tDe 3. ,Stitt Annolaltn'
=a-
noi reodt to ,eg d"P&* bJttcs Era n"+,let)ga4( -'
fine bant PmPatt'cr'
x) In Sping enviroorrrer* ur 3eocru"0
use
tquth,ux ttl p*Rrrm llpn&nti I'gerttoos '
-7 F<n sprrng ?.b tased Ac.rot'.tiring *Pu alpn 0 oP rhe Saprirncnl<.ng h^&* .-
g,eo cln Or/oa/>ore
--> L? @rutoc,:;'rd
&nnohatloq is pc.ced e6 fie top oP serXxx [-) rhon il- ]s
SoPlr{
gertu( }Ydeo-tlcrq taseJ cru}oo:iring
ZP
@A,rm-i.red annofcilidr) is plareA cnrr rbe fap crfl
goP- CanstrLrct-q f,ru'.do Lued arriacoivin3
ff @A,ao"i"a r0nno6r6o, i< plater{ 6v rht t''t 4
&tkx lxe"ncn to-r"J aunotin; ,
brt Xr.,r P;rs c'nd z4n"oulong
parorn (crn5hrrcfor *len ir is
Fefa d.r,r1 t5u fu
or fas/roi3
I
'A
Spring 2.5 Applicaiton on Annotations (f OCl [41pf i rart.,o r )
3 ------19.U
/i // Testjava (Spdng lnterface)
' public interface Test
6{
7 public String sayHeltoQ:
*)
9 --------TestBeanjava_;, //TeslBeanjava
"- ' '-'- --
$"-
I : import org.springftamework.stereotype.";
->
g€ef/rce o').oro$ 6r)
1? import org.springframework.beans.factory.annotation..; _S@,{.*a.:rrea dnrDt<fl oo
' import java.util.r; + Rr D,E ','(*
t,
-
ii gsu*i". // lle cao dts6 place @rr,gonent fw.t es rte iJarl,r dors as SPong Bcan ./
16 public class TestBean implements Test
1? {
J:: // Bean property
'- Dated; r-'' iefu,rrnce $e Bra n pmgml
: W
tvpe) on bean property
.- {
?4 this.d=d;
f]*n
.f/ pubtic String sayHefloo
.: {
il _ return "good morning "+d.tostring0.
:.4(; )
jj)
: ---------Democfg.xml----
'I ' <beans xmlns="$p44g{€pugta!0cwotk.oro/schema/beans" ernce ire a}D't add @ $"uice , @orn2org4.r anmrcrr
air
ir! top 4 predeftne d laya.(t$t , bft clq)r . so,
':./
:i x1?:1ig'ff,t;"jflffi_ t,r .rr'st &n$6rre rlor oiax io spr,gcFX $re
.;l as Spnn5 Rzarn
1l lr$o:/,fwvw.sp4nolamewdfti sorino_aoo_2.5.xsd
i . !++tluv$*.sor!nolrame*o"l
:',. ''
ii 5gontextannotation-config /> f> rn4v/?t fie sF'iog&'nlai rt{ to €'ognj2e Goa cae 4Dnol-'rttoos
y; .t-?cond:comF6nEnEGn-uase-package=,'.,, /> -->
l: <bean id=,'tb,' class=',TestBean,,/>
{i <bean id=,df, class="java.util.Date,,/>
r"-r.: </beans>
'
,
// Testclient.java Jo,r Bt6 ln cllssp*ft+ :- spiog lcr/ coyr
r.l importorg.springframework.context.support.*;
: public class Testclient
i;,' 1
public static void main(Sking[ args)
' u FilesystemXmrAppricationcontext ch=new FiresystemxmrAppricationcontextc,oemocfg.xmr,,);
. I esr oeanobl=(l est)cu.getBean(,'tb,');
.: System.out.prinfln('tesultis',+beanobj.sayHe o0);
1".
tjt. Illmain
---------___TestClient.iava_____________
// Testclient.iava Jo" Bt6 ln cllssp*ft+ :- spnog lcr/ coynmrrt,s -,o56ln8.Jol
import org.springframework.context.support.*; (sPi"g z's )
public class Testclient
t
public static void main(Sking[ args)
t
FileSystemxmlApplicationContext ch=new FilesystemxmlApplicationContexl(,DemoCfg.xml,,);
Test beanobj=(f est)cU. getBean(,'tb,');
System.out.println('tesult is',+beanobj.sayHe o0);
Illmain
y/class
,l' Spring 3.x Application on Annotalions(toc)
. -------------Tesflnter.java-___-______
--,{rruglq.ra..) Page 1 of 3
#{''}-, sp",l"g Eair.e-*ionla,-1,urryc
3rl2013 9:46 AM
i0
72
73
?4
75
76
t'8
;9
30
32
{J ai
8$
arg
9',:
t5
ti{i
':i)l
".tt
':
li
i ir*
",1:
11-i
.,
ai
',Itt
i lt
':2. :
": 2?
:2.t
'?,;
:la
",2:
:21i
') l"j,
package P l:
public interface Testlnter
{ public String sayHelloQ;
TestBean.iava-----
package pl:
import iava.util.Date;
import java.util.List;
import javax.annotation.Resource;
imDort iavax.annotation.Resources;
imbort brg.springlramework.beans.factory.annotation.Value;
import org.springframework.stereotype.Componenti
import org.springiframework.stereotype.Service;
racomoonentc'tb") l-o
&on id
iirttic itass rdsTB.-ean implements Testlnter
{
//Bean Prooertv
i;;A;;;i;--, rcRhence TUp€ $er'n pnr[€r*5
@Value('1o") ql4)-
int no;
-J Sim0e tkc,n gn)ffrc5
iqje*s Valu a 1p ' to prop<rrq " no "
L*!13' $uo lNO",-"st'"'rt"' h *",1 t*, Il* ftrastqr*crv< ,ci( { b{ itiar--fD ti4aaDate d1;-*'' - ' /-:S#'.gEx0Y?ssl6r
t*
J]l- t u.r lx/o' q's*-w'-
@Value("fi (Sva.util.Arrays).aslist(' lndia','Bharat,'Hindustan'))")
String nicknamesfl;]l ]r% tU0e trDlv-f-j ^ -.*.,,,,* e-,
ffi11;.f'% 15 g$f!".""^srru*uvr frrrm o*"6 (ri;s List *,raStrr.,rlre Filt k i{t;ftI-fb (Dl
lJE nC&K td,'O fr 3)v.5 LisrDarrf,
@Value('S{f(iava.util.Arrays).ggtig!(Red','Blue','Green')]')
List colors;r-r jao.uJil. List rgr(
^ ^..0, --. t'^^,-),^-, -,-.*^ .-9.*arc np p-fYa
.--+ parforwrg *tltthnry -Jiclfl on vefax(n c( +Jt4
@ResburcL(name="sd') . 1,-',,-. ^^.,o,
ffiFi#=,0"'lj6'i[J.t?r-'€(.,(
l"iqc no I rsl
{
d1=d;
i
@Resource(name="Up') rt Y.gq lin€ no ' 13 tr
public void setu 1(UseiBean u l)
{
this.ul=u1;
]
public String sayHello0
t
System.out.println("no"tno) ;
System.out.println("dl "+d1 .toString0):
System.out.println("nicknames");
for(int i=0;i<nicknames.length;i++)
System.out.println(nicknameslil):
System.out.println("Colors="+colors.toString0);
System.out.println("u 1 ="+u 1 );
return "Good Morning";
)
1 :Jl package p1;
:. i import org.springframework.stereotype.*;
Cdn Gleo uie @(uopcnrer* OnnsrcU{on '
@service('ub) f w€
pi,rL5[iE-Essn-serBean
-- PaseT-i3-
3rl2013 9:46 AM
13? {
1 liB String msg="Hello World"'
.139
140 public Stdng tostringo
i41' t
.,42
143 ]
'i44 |.l
45 ----DateFactoryBean java--------
i40 package pl;
447
i 43 import org.springftamework.beans.factory.FacloryBean;
1 4g import org.springframework.stereotype.Component;
'!5-1 @Component('dfb")
return "DemoBean.msg"+msg;
'&xfcrob -3la [)i1'j<'r
. Cn clf, qr0{lcrt -e'l'O'PcI Jal
'{arc * l lo,-f.L!'ic'{
0lfrDeH r€d Fecnlg Beon ct., q Y€Jc{tnio t
*.!a.cr-ti t ' &rtE ctt6s ohjeat 'public class DateFac{oryBean implements FactoryBean
t
public Object gelobjecto throws Exception {
. retumjgllqye4!!.qqlq}
-> lcecrttn-t og€_rf
I
cornrDoDs - lo&io3 'i qr (cotterr ftom srdog r's )
o16 ' S$ - c,(Sh, - 3 .l 'o 'PLL" iat
or1. sf 'LeanS -3 'o ' gci 'ia{
157 public Class getobjectType0 {
i i;l retum java.util.Date.class;
j$9 )
i ait public boolean issingleton0 {
131 return false:
;-- i
1e:
'tta;, I
i 65 ------------Testclientjava---------
ie6 package p'l;
: -'rE import org.springftamework.context.annotation.AnnotationConfigApplicationConte)d;
.:
$9 import org.springframework.conlext.support.*;
':7Q
.7: public class Testclient
.::, fublrcstat'c
void main(strins s0)
a fttuHot 9&,"r +n'hrl"{""t
: 7i; AnnotationconligApplicationcontext ch = new AnnotationconfigApplicationcontext0;--a An**-
-'* ..*t-)).tc,l
ctx.scanf'D1"): //o1 is the oackaoe name - cl|q +r wrv -'
ck.relresh0;
--ci src'ns Ae ora-cb.a o( l>t ?oe!'a1a
"'l  Testlnter test=Cfestlnter)ctx.getBean("tb");
:!, I System.out.println("result is"+test.sayHello0);
':! I
-: ^ ) L-, To mar" Cr6arn€,( tocrli ra t{c cl"+e;
.. r e E:nrps
rj trdoq
F!ft?g5srr'06s€s ''r:il: ,r"r,il:f
+- *fu;'^' t'
'l-----r
'Y ' clors (F )
Jc,t *r.s ;n a-,ssPl'{it
r)
,")
3)
4)
s)
s)
6&i . sF
6r.;.+
6q.rf
i N"{}.1-
iur.e" "t
9xo,v,,r-r
oti*i1n
Polda t
Page 3 of 3
R" Sfriog 5 x
1l1rhs$ usiot
annofafions b,sed DepcnderrS ftieo-h'ctn crqptice-hlon bc'scd -
ong xrnr &tes Yee<,r 6{?n @ o( rrnrch ors Lnd,"cq
!
: @r.,iu.r ------+ h ctrnBgc're exPlicib depet'dtnca
r,'ie4lcro
,.- @PoatGn6irctti ----+ to ConPi€ure or'9rorD ioit rrrerhool
- @ P*esrroX > tT CooF€urc custom deswo5
T*'
, @ s,oPe -- ---- - -> to Qeo  springBe'on scope (sioglfgotorele )
'- @G.por.r*5con
to Y€cogni?e sprrng*eans
1d
csotrrces lbcrf are
ffi..f,*
4'r4 rc*ar""w^ A*
,, tr^..,n6crs
.,"ft,
- x) trol $prrogz'o bc'xd Ixplicit ftrnswoeRJ' )niecrtcro ru*"'tgh Arnror'$crs 'e
ft:/
v open $ o$ suPri'rrnrL'Ye [-nnao..t Si]encm
:::U:t" frT6 [" *d,**
x) Pt sPnn35 o onnotcr-Hons bascd exc'rnPle c{Pi'}co}lc.t Yerd
! lrc,nd{Xrl- $iucrn
c'f' otf oalrs
fie ifiFil€s. .^.. 1 a r.5flrn -deitrub .
x) ft., spxo33.o anrotrrHcros bosecl e^arr{re o{Prr custum -t' "' t / @P*rcanst'"1r',
rshods Ccm€rgurarton
re?"r capn@ 4 fte ot[ot[ re ..,nda-'r
ge"o"*l /
+) q.,{ gpi,n$3'O OnnouJdons bc'*ed frcrurgk c.nDa'itJoPm ct'ui-

onl idesrs it
aponQ)4 A m[or/rj
hdhdd,f
-+ Openiog ot*q C.recrhnS P'Die4t in llSEcliPse f,DE
File rrrcou ------+ irnpc* ----r Grcnercrl
----) EdisHnS PrDi€rfS io uo'r1aga<
o *x* &rewr,5 Fn;sh
NOIE:-
^n,'.
NoEioS tolth AnnorcrrlcrrBosed D#'odecq&jer-rlon' iF Dq."'Aenca
. ,l .--,1
;"rr **i***, arr dcnre diretdq erq Bu.nP'oror'rcr
**" tb*:
d
oo necucigJ 4 r,JntHng se*cx (-lrrrtoo., &il6rt-t."tu6 "'€-lcfea
to
.Iqle*tooS'
6tIoalzorl
T(sutfqrt [b1e-t-t- ro anotk',^l BeanCXerE Fotof1
*fu
i .krg".,",' .-"1
LjL c4l1 Glso cse Q.In;et annutafio4
otlobllr'ri
td ciJo Pt! Fcq €xpttar setlc. JqccFl oo lo rlDc e -rir- -fi"sb.rn.
. 3/0/2013 9:46 AM
>>>>>>>>>>>>Example Applications on Spring Annotations(lOo)>>>>>>>>>>>> Same as qPr' e "f
yt("y""'fl:lTi:lrt"T1--
-
-
&1 Pne6 in cLA6sPAft+"'-.pitlio"s @io'h'u on
public interface Dem -- /, tr.,] tnnm6Lar<s+ /jovox ' iqi..r 'i..'t'/z .,
t
public String sayHello0i
)
______DemoBean.iava__F_________
import javax.injectin;e-a-
-; &' @ tn;..*
import org.springframework.beans.factory.annotation.Value;
--)
li'| @ wt< e
i$8l1,if;3lli$TFilfll'i:*-t*"'component
-
R" @."-;("Li
public class Dedo*Efean implements Demo
{ int aoe: 1
' Stnn! name;l Bir nPo?ernq5
float avg; J
@lnject
public DemoBean(@Value('30")int age, @Value("Raja")String name, @Vatue("50.67")float avg) {
this.age = age; ---
this.name = name; ,rgre
@ varue GDnokrllo.t ir{Je(ts fie v..qe 6 t Pcrrc'met(rs oJ-rd $f i{
]
this avg = avg;
|nr&tlff(,| v.lt(rds &ye oJgitn€d b $rtn prq:c'rrl'! '
public String sayHello0
t
return "Welcome to Spring age= "+age+" name= "+name+" avg= "+avg'
)
)
DemoClient.iava-----
import org.springframework.context.ApplicationContext;
1
-2
J
4
5
o
7
I
I
10
11
12
13
14
15
16
17
18
'19
20
21
22
24
25
?6
27
29
30 import org.springftamework.context.annotation.AnnotationconligApplicationContext;
31 import org.springframework.context.support.ClassPathxmlApplicationContext;
32
34
35
36
39
40
4'l
42
43
M
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
ot
68
public class Democlient {
public static void main(String throws Exception {
Demo lir'e nO , ll
// calls B.method of SpringBean
String result = dl.sayHello0;
System.out.println(result);
3rl_R*1':g_ ::'i:il::_l Tri::_-15)
(5", envir obrhc'a
)
App.prop€rties
jdbc.driver=oracle jdbc.driver.OracleDriver
idbc.url=idbc:oracle:thin:@localhost: 1 521 :xe
db.user=noc1
db.pwd=nocl
-_---_-select. java____ _______
package p1;
public interface Select
t
public void readDBDetailsO;
)
--------SeleclBean.java----------
package p1;
imporl org.springframework.beans.faclory.annotation.Value;
AGrvatts -$,e anroralioos bsei
lin i
C/'jnfcttr(Jl '
jaretts in ct ss P4tr+ :- Sotr,e os appn@
6?-et
:Inicr-rs Vatoe Gtl4cltJ
import org.springframework.context.annotation.lmportResource;
import org.springframework.stereot
p rcr orso (,.e *,,*.5r'*#r"'co!flpl{"lh*t Brc(Bcz r,-g.r*s &re )a co6rX4""a #r"e)
@lmEIlBgsourcel"classpath :/SpringCfg.xml")
@ffiiGii1qgi.'rluoi,;r
public class SeleAE ean implements Select
t 3ir$eun@m:eQltffi+tu popnes p;re (rep<^ 1;n<
"'o"'
60)
Paoe 1 of 4
kc-- db-,-,s.. ' k 1 off. popotr.'.* h't ro " Lul4me pYDP"5.
3/8/2013 9:4&A
70 String pwd;
71 @Ovenide
privale @ValueC'${db.pwdl')
f,re6tlnano r s I
72 public void readDBDetails0 { ?
73 System.out.println("userName="+uname); b B "rrhod ,
74 System.out.println("t"""*o16="+pwd); I i-pt"t'rtu *
75J
76)
77
--springcfg.xml--
78 <?xml version=" 1 .0 ' encoding="UTF-8"?>
79
80
81
82
83
84
85
86
87
88
89
90
xsi:schemaLocationrillBJ&d€pgShg.ofg/colg http://cxf.aoache.orq/schemas/core.xsd
91 </beans>
92
---_--------Setectctientjava------_93 package p1:
94 import org.springframework.context.support.ClassPathxmlApplicationConlext:
95 public class Selectclient
e6{
97 public static void main(Saing0 args)
e8{
99 System.out.println('main0:Selectclient);
100 ClassPathxmlApplicationcontext ctx=new ClassPathxmlApplicationcontext("Spdngcfg.xml"):
101 Selectbobj=(Select)ctx.getBean('sb");
102 bobi.readDBDetailso;
103 i
104 ]
105 ------------
106 App3 (custom init-meihod and custom-destroy methods cfg)
107 --------------Demo.java-----------
'108 package p'l;
109 public interface Demo
11o {
11 1 public String sayHello0;
112 ]
1.13 __________DemoBean.iava__________
114 package p1;
1 1 5 import javax.annotation.Postconstruct;
116 import javax.annotation.PreDestroy;
1 17 import org.springframework.beans.factory.annotation.Value:
1 18 import org.springframework.stereotype.Component;
119
ii6 Pcornpon"n("C$;- B*dd
121 public class DenibBean implements Demo {
122 @Value('satya")
123 String msg;
124
125 @Value("1o")
126 int age;
127 DemoBean0
128 {
133 ,tto".
*t.orintln("DemoBean0:constructoc');
n ,oit t) cntJho<.
131 peo"rcon"t,ro
-' **J**gfnrtl) n(d as cct'sto'
133 public void mylnitO
134 {
135 System.out-println("lnit-Method")i
136 if(age<ox
Page 2 oI 4
'42
43
44
45
46
47
48
49
50
51
52
53
54
155
t56
t57
t58
t59
160
161
162
163
't64
165
166
168
'169
170
171
172
173
174
175
176
177
17_8
't79
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
196
197
198
199
200
201
202
203
20,4
137 age=18;
138 System.out.println(Age cannot be -ve,it is set to 18");
r39 )
lli '""."*r*, --> rr"aKe fte'SDestost) merhod os cssitn -dert'Db()
public void myDestroy0
t
System.out.println("Destroy-method");
age=0;
l
public String sayHello0 {
retum "Hello :" + msg+"n Your Age :"+age;
)
)
----------Democfg.xml---------<beans xmlns="http://www.sprinqframework.orq/schema/beans"
</beans>
--------DemoClient.java---------
package p'l;
import org.springframework.context.support.ClassPathxmlApplicationContext;
public class Democlient {
public static void main(String s[) throws Exception t
ClassPathxmlApplicationContext ctx=new ClassPathxmlApplicationContext('Democfg.xml");
// ask spring container to give springbean class ob.iect
Demo dl = (Demo) ctx.getBean("db");
// calls B.method of SpringBean class
String result = dl.sayHello0;
System.out.println(result);
clx.close0;
l
)
impori iava.text.SimpleDateFormat;
import java.util.Date;
import org.spdngframework.beans.factory.FactoryBean;
import org.springframework.beans.faclory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype-Component;
ff:H?q?:l[l*f,?** * -'q*d
qFa", obi rdir bt (reoF a
p-ubtic bislTesiBFan i mplemqnts Factory Bea n
{ L, nn.d;R'Y'
@Value("z1 11U2O12") J
private String dt:
public Object getobject0
t
Date d=null;
,S;i;-r,-,^("setobiectg:restBean"); Ir5'ct. c.^'dt Si"f}i}ffiP
J SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
t 14ry. . uli  ' VdF '
Ld = sdf.parse(dt); J
]catch(Exception e)
t
hF 61n avoid ttu6, xrnl Ble
bl *ln t Aroo<,uon Gnfrt; Apli tt'HcT rG*t"t
co{r.,n<, God 8l'€tr$lj)''"*'o
("tu *,,o r{ /"dilf l*"ar")
AoD4 {on Faclorv Bean ) /
-:-:---' ---te$qeeljeyeqFir<llpackage p1;
&an 6<rrercr,ti
n3 Drc ctals ohj Ys{'rtsocHo5 *t 6t"*
htv&4
Page 3 ot 4
2O5 System.out.println('ExceptionwhileParsingDf'+e);
206 l
;6; 'return d: - g'ves .krvh' cdtl' Dar€ (14s3 ohj€G
208
'-209 public Class getobjectType0
21O t
211 System.out.println("getobjectType0:TestBean");
212 retum iava.util.Date.class;
213 l
214 public boolean issingleton0
215 t
216 System.out.pnnflnC'issingleton0:TestBean");
217 return false;
218 )
219 I
221
222
223
224
225
226
227
228
229
230
231
232
233
2U
235
236
237
238
239
240
24'l
242
243
244
245
246
247
248
249
250
251
252
254
255
256
258
259
260
261
262
263
264
265
zob
267
22O _.---_-----.Demojava------
package p 1;
public interface Demo
t
public String sayHello0;
)
---------DemoBean java-------
package p l:
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.stereoiype.Component;
@Component('db")
public class DemoBean implements Demo
t
' taR".our.elname='tb'1-') rt?t,r llne no 1 lg1
Date dt;
public String sayHello0
t
return "The time is"+dt;
)
]
--------------DemoCfg.xml----------
<?xml version="1.0" encoding="UTF-8"?>
<context:component-scan
</beans>
--------DemoClient
java----------
package p1;
import org.springframework.context.support.ClassPathxmlApplicationConteld;
public class DemoClient
t
public static void main(String0 args)
t
System.out. printlnC'Hello");
ClassPathxmlApplicationContexl ctx=new ClassPathXmlApplicalionContext("DemoCfg.xml');
Demo bobt=(Demo)c8.getBean("db");
System.out.println(bobj.sayHello0);
)
l
Page 4 ol 4
T!!L-
-, To Provide Sloba
in Yegi6tY$ SltD'
Modue -a
DAO nodue
-
viSibilirg lo iova ohrer*6 ctrrl
f.ver3 crr-b 8e'6ve'{ / aeorlc'eulon
trlologic te3i5rt'J
-lorrrot A'e6i5hrS
,l
oq/03/20'c
rl'err €Pzrco ces coe kee+ drero
&NF{ $ives
orr rtg;or5 a)o'
PP S6 ) to ioltrc'cl Lo)rh DBsk
if$ &'t'Pl'go) 1" iDkYaLt
oirt' Rc6tsq I
java
ddvq
jauc,
Nebotic glves
-iomcCIj givgs
Grfcr*fisb gNes
JBcsl gives
6qrpicaltoob u6e
o{,Pticcfkm 6 Use
jndi ctp] Are Part
APP'
GtossFrb r6ist't
[np qist'X o{'A at'-'
jdocapi (huo* 'ql' €ra'g/l
jndi c.Pi ( iou".^ - rnm)og aod
a( JsE rrnd.rle ( jar sl'o)
A90a
- -)
I DeYt
0
c(Yc kDo rurts o P t"g; sr"g sl,-,1s
NcrminS Qe6terl dto
-----' t1.in talos info as keg vatucs
--4 @e rI.,usi lno(-o kctg lo 8o
8,3'"- {etepbc,ne hlr. f'earr;Pe )
Qmr t3;o
Co
"eglstg
Anl CJc'.-.
PcrY,5
r$e Va[ue8
Soqal
-->
obj ,4
&gq2. -----+ objl
-----:
obi1
e) drectcq fegiSl'Y
--", lloint&io5 in{b
&iHbcrl€
as keX - vatue p^irs crod Val(les Cah enytq prcVn,'s
f
to g+ tbe Valueg
(rear ti{e )
4,- Y.ttu.o Pages fcorcacry coise
hindoos filesgsi-cm
Nebl€;c Yegisr3
GtossFsb t ft"
DN6 Y€gl5q
Crnd erc' ' '
Neblogl c
hPe I AtPrirosoq
grver elur
Veocicr : grn fustcrns lOlc"re co"e)
&nnmefelcd slLo
lersicrn r ro'b (corryzrfiole oirh jcrr r'et)
, ^ ^^^7:?..
Glloco6 to c"reele clorrgjnS' Erer6 dcnnaln octs ds oDe aryucel*lct Sexuen
defuirrt Port :161
^ l.^,nse. ecornne-{ce . bect. ccrrn
fo doconlmd slco : tfiLl-D' oode" cf,rn
lG@
f,P murnple prolecm op a compaoX ore uslo$ Sorx Nebl.ogic then rhe
ltxbqi,c slco coirt 5e instarred onlttr once io a Cornmct c'fllwteq W
1o dorre'os cDilt be cnea}ed P"' loPtsieffi olr cme 1r,,t P.va1ttf
bas-i s '
---+ &r€ Coo u,se eirher kaf 5 31 P.xha
*) procedcrve fu C-l'eole L-!'Se.I deffne dtrrrorn ln Wellryi cio'3 kfuo{
Qcrealt-a n&{, urelDlo€ic donasn
Oroclenlcblogl
c- t 6oicSbfic''rl-
v.l
Prop,i'; eJ
o ,".)
J
6rcP-a".- 5kx ----------'t ffitrem5---------->
@cnethng 3tctrted mirh' Ncbt€ic '9;n.x-tt
------7 @Grt.oetctrc a doroain Conhgutd "'
DmcnnNc,-me N?xt ---t
Ukr N]aroe j4tvaboss
t-IerparScoora jcrvc.boss.l-
GlrlQxr. tlc.vlort jcdab665 j-
ll D.l
__--________-_) Nex b ------+ fi adm inlo' ofrlr.;.Fr4
Ltstenpcrr, @ ) Nexb ' -+ (zeat<
rbe u:<btogic re3;shg op rue,btog;e SPrr'cx
--------a ger f
prccedure- to ke
Srcpr:- 6rctyt fle obow flUDtrrdnl &d!?{
V'Jcbl€i. iosl-q,'n<
,lrcblogi - Dopova
prqtrorn6 ---------+ orooeNcbloStc----------+ useaPT4iefS
-*-+
llgDorodna
gitr,- OPrl odroio CrnsoE 4 fte obo/e hrrrdn &wd
6pn Birocrltx oirdoco --_--a h*pt // leorhosr i'Itll lcc'nsole
USern6rne : 6rvab6 S
P&sstoord : Jrooboss1 ---a
!6io
5FcP-s:- vieco tbe hr-btc6ic tr8iswt
.--.-.'...-
Qdroin Grosole ) Environrrfrri '9'rve{5
and
---+ Ne Can lxnftxm ingerr, UgCctre' lekrc'Vry
bg us;og idbc code '
-----,--4 Admi n &rtx,r ------l Viap Ord i
5et€0t -tlbc opexofians crn EB trtble
and list oPetrdficms drt
bind ----- keePiog o$
Uobnd -------.> trnoviog
qdroin Senrc-'r &tr r^r-btoglc
------r {€ Con perftrrm !ind, rebnd,unbiod' l0ol&+
JnAl rest'1 bg using jrr& code '
picrna-"J alicancrrne f
jtnt norot in rc€i'srntr
ftr. .%5t1
I
coiTh Oicrmme J
crtias narne
and Do s/co'
-I0 crecrre this Ctrn oh.ter cDen€ed jdUc prog'nrt* (U'W clrt(( rtrrn<' ctfl/
dbuser, du PcoJ ) o.r, these jdbc
*loc dt'uol I db slo uc use
corh
c,b€!f
qil!,,(, ------r qortrnng obar ft,* t Siswx
t5t $arbennS
611 [lndrogs fu* ,tlshl (nicr'nc'mes' oO;s
)
Telcrnd
jdbc Conoet}l6-o ohje(f refneseff6 Gnne*fr,rtS Ul(.o ic'Vaafpn
yrogxric.l coirl eVnnge baled o" the
lcrra opPn
tDBc Dnutr{ ;5 t1',g bidge olto ft.vao1pn and DB '5ltu'
Namtng llc,rn.ge 'iS
rhe
Toitic^f Grnfe*t Ohj rePr€serfs
lO cr€c$e *Li6 Jn'ulc,rConre*t
b*dge Olo Jcl,a apno ctn d
c{ronetrvit(i b[tl, jova olpn
Ohl Loe r^ped indi propt{c*
(9tnu
ond
slru .
r<6tstry riLr:
tt-rX a*e
D
r)
itere
T'iti"f Carntcxt fr'urry ctas s
?tovi&.'i url
jndi PmPtxnes
oill
Undetstz,n&og
root c(fnrex t )
(lJE.
cbange h*ed
Jndi Tfte
@toKr.f )
oo the refi't"Y Slco c-'le
(o--ouir) (urta;'g;
Ccu'rrut )
(u--"*iz; i
(c---,our)J
Ccunte*)
9--*oYliclc&rrr cor) s)dl oalne
aoA iE is paenr frm-ffit o( &rhnae,
&dU*_l
-----==-----;
-) Df3slLo
-l
.!)
,
JdbC Drlvcl
,Rgirt? slt^l> Namin q
Itanc,gci
1
$ibraor s $'!(onlext o? Sarbga CcrnFtnt
N0IE'.- 1o recrl Hme Prqi€.-r5 1be ftrra3o<rrce o$ed Tbof refresenfs JDB c
Comneui(m fsol tDitl be Pl&ced in
f* glCIbar visibitiB '
Jndt ptl*'6.s 6f lrJeblogic R"6ishY
weblr4ic ,.;r,ai ' NLJninarGrnrexrFc'uzng (wuutog;' '
j..n;
t3: // eboororrtne/ ret"aa'"ss > i
'W
t)6>
tt:/loco'tbusi: rt-tt
*@nrirca
ccroreQ$cnn blt-o JalaGPPn
on4 u*r"rtdcrre6isho
Jndi appn to esrabrish
// JndiConnlesi.javc.
Rqioq slLo h-tt nicFnoro-,€ fo.) cLLtQs Dc'n
JnrrialGmfcxr Clas6 noroe :
proridet Lrr I :
Eg"-
imgnt ,Javax.rr.,rniog- x : /i.t, oA
rrnrc-n O{!la
t*lt' * ;
flabtic Jodi Coon?s r
{ o, u -tStang argstl)
'fi*
ExcuPrtao
/ P..p.,te J"dj Pr"F,ttl % 4r:os,or.i o0 7
16hi.qr5h'"o>
l-lcsU.r.Ufetl;
lkof,r..ote' k)t = rrro
ht.fx,, (G*-t . lN1rrA L
- t:ot.lrrxlFAcroPY,
"'d-botl c'iti' t"l LJtuir;1
.,=--
Gni<x+cr*cxg ,7 '__T-
Jrin"G-x"iR *^g Ckcs oan
h.r*o (G"*t, PRovTDER - uPL: t3:/tocc'rbcr:111 ')j
obJ€g^
InrrrarG'nrcxt (l't;'
S'o'e (" Coonil-kloo is rr* estu-blishea ")'
etse
S'o'? C Cotn.rr*-, is est-zoushed " ) ;
!lt"*"
ffr"-  r,tty,ruE^r-to,rse'ruortiunrlto3''t-'
tleblogic . jar ( er^r.,utooir -home
I rnradeoare I "-'- io qcds Par(
/i C*"t" Iruuc,r Conxrt
In;riorCtrent ic -- rf,tt)
iF (ic== nutr )
liaao
ctas6 qives rbe 4lro.rirrg rrEiio4 ft: e,r{<nn .ind,' Oparo.tto5&,rcrx . rn-i og . ln;ric,rCoruenr
btna (-, -;
unlind (-;
asbind (-r-)
list t- )
looP''d-)
ulaalwt3
f'ftP Dofa6lt'adcrtY€
jnotf€r r3
yelaltd tD dS Et-d&4-|,C
iqr.
,_-/
Eoch, Mmeoasshil claS &J rcl,Yxar one blodlng (orcrrntoe'Oj)
.|:uror. noroirg , NhroiogEo<.roeror.t* (I) io &., ir*cl Asce o(- Jcrn.ool , EnunreratioorCf, ) .
@ prornple o{Ptialr}oo Oo Jndi tisr oFrd}lon'
/ Jn61 1-;5t 'iava
irDPdt javcrx " cnrnl 16 ' X',
imPc'4' java' ufit' r.;
{xLbic ccdt J'taiLlot
s
t
o, v ,', (6un6tl ongs)tmrne fxcr?ticnr
t
/ P.et"rc Jodi Ptog.^tl<3
-ll^t'rrol"tt < 6mng i string 7 bt -- rr-u '|-f*5p'ue asrn% ,,
5s437 ti j
'r
bt.e"r [c'"1.^r
. Jt{rrrA L
- coNTExT- FAcloP)
"'tntotqJlc'
i')cli' l'JI-rT ti#fr'51-
hrt.ed (cr*tur , PPOVrur-t - uRL ,"btt//l-oo'rb6t:
rl'l l")i
bt,r^* ( Grnrnt. Secutrriy - Parr'rcrPn L ,
" javoooss') ;
,.. ]:ffSr* '
h'p.'r f toiul-trt' SEc,Rf,TY - CREugrrrrrAI-S/
'
fttabosi!")iJ "^ **''-'
lrr;tr.dCcn*t^. , ,&=re..u lr-rrfrcl G.nr'"ot [ht)) i/eoinra
*n t*nf,fl,-
biod;ogr
bodioga
Lindiot3
i
.,ofi {@rbnt<}' r
l/ ?e, PuminX I isr opralt on
, ,,I_-
t'{reso ' -
/Nc'miogEnurrrraH@ re= ic'lisr(" ")" llA'uo ca rhe bi''d;ng 4 '**-
NarniogEnr,rn€rcr.tlcrn n€= ic' ri5' (''Jot't^^/ i-s') ; //gl*s our::t:H-f
Ph;re Ine'hc'tHoret))
3 /t's"
3 iiu*
gives clclss narDe { rbe o4Yr
o:tn !e rrsed
@r.
oP
€xample oppi'icoloo on Jndl oPenHon6 rek c Jb-stJ"ai , java, TeotJnatr+
{hteno's @r@
$6s6fisb
-t *, lotoaHoo &'vor slLa
veriw: &rone (Orooeccne) 
Vc'{s)cn: a.X (Co-fariule -'nq
-:drt'5t /
donoalo6 ' de&"t'rt &r'aio to d"ttolnl
I0 accesS admio 0rr6ole 4246
To accers hlcboQfticafloo i 8o8'd
caroes co,rb {lc*3eon,9 .IOp slcu iostrlloHon
NeTEoDeJDE '
Foce dure i0 crtci.fe User DeSesS DorfdD iD GtctsgFish'
erre++demaan
0[€nS(Irrce
anlu!6 to C'rcof.
defu*nt poftrn-'O :
C"rtcrgsFsb tlul tl^rrr
roirb or ulifio&t
rn#€roelo-e
-- cdroioFx t- -- 46+5 -- user= t€stus€r
mYlondoz
9iveo nicpnemc
O:srn$posavtruin7 oeodrnio c*a'te -&morn
proct'dur€
6tcp-J:
to &e GtassRb rqi6h? oe
- 6rr.o t mg&rra;n 2 .!i-r,',
0:5un APPtcrwxbto > Qsadr'}lr)
m5dorcc o t server'
st&r r -d omr.in mgduoai o R'
6rcP-n:-
Odmin
Jodi prop-'rrres 4
GtcsaF.b
GlossRsb
LWrtt oo>
+6+6
dppServ-rt'ic^r ond *uo Jr^r htc [rt"lt'S
=,s(,o
App&nrp(lib
ib &tao,
javaee. jar
i-rqir,sT(i' ia '--+ 0r st'o hp'r'rur^ lib iDst<'t-t o-netrawn
'T
@Stctr,.*,in$S"JsorPto{rcnicsogTesrJndi'ic^va/TesrJndir-'Jc'vqRtea
tr€(on pn(c,rrn Jr'lfrr ppexcrfiens cll Other *X;s'U slm's (nfa ruer.n:g.P
iioP
--r
intci irLK{net Ogb ?{uYoco
q)
f -oui* A"qrr., t Brcca.,r
5tQ-E:- OttD lbe ctdm'io Conote 4 rngdcnnciire *tnc"
o[,cn Byu,fc{ totndoco ----------r Tgce ths Sttuott'X t'"1
httP:// locorhoot "
t$+O
Usrlt)ctme : rcstulc'[
tOsruse,i _---+ !6inpns*ocnd i
giv€ $€ $)osstrsb
r€flisrr1 '
Coosote ---1 AgonraflonSttLrur --------i- Jndtbvacoin3 .#
*' -z(nttrsol-ish €€"rwI BiwB
,fl8ishr,J osrbe buitt-in "r"egrsrng Slrrr'
lincUConfc"t[crUu'X
c&ss n&roo :
prurtdcx ur) i
e$:-
fi6 closb it ovoitcLble in
wtlhpte deryndolt Jo, Frct'
opgnerv - admin 'ic'{
OflBerv - ee.jct
oppstw - ext' jar
iioP://zbcst>:
iioP;fJ tocotnosr '
--rb"J
OriGilable in
D:Sun Ar4sc"rt''r
JBcas
re /oa /,ro ,e
TuPe:
Vergic,n r
Veodor :
> 9ive5
A{icc*'rm Servcr elrO
S'x ( 6o-ponule trrirb jdr l't )
Apa,r,e [euanc*)
5 clektut t dorrrio 3
dePaurt (dePc,-rt )
hJeb
6l-ardar d
0.ll
minimGl
to Slarr $e ,grver/ ".
@ procedure 1o See the JnP rejishrS oP JBms 5'x sevu€{ '
St(P-r;- Sia.,r JBoSS Se'i't't
Ekp-n.- gpeq odrnio console o€ fBoS
OEn bYursq u;lrdcro v:rlrc forrao'ng o'Yl
'lodo&rntoad s/co : AS ziP krc Rorn hluro'ofxlr-be'or3 rnrlstc
Jb6s - 5;!-1'oo 'GA -JdK l'5
to instu-[ 61r-r] I etw(&t ap P;re toc^ &rtdert
deh-t+ Frrr no : 6otro Cfo o4"rs *e cboapllccrl'tcrn s )
toog CtO accrrb rhe jne r"6;sr'X
)
LJoo.s-born ) bioruo'bctl Ate
prDblerr6 &re raisej rten re moue
{(Io'bcf
Llse
(iP
BrnStr tocrrd
Bre crnrc,tu
)
P.t
hmr // lo@thost:toto / imr-ccmtole
99gt $;ue tbe jtPw6iore'ed roc,re d Jndi tre
Odmin Gnsol e ,grvice = Jrdii ie-'.!, -------------) Selerf 1l5t
-
opcntrHcrn ----------5
inv6l4. e
--,--: loor(lt Gtok^t Jndi Nanf,spa.e
tb€ irrdi PruFrrtte
5 oP CNP rqi*n1 ;
-*T"*1, y:*::'TWS
JnrntrrG,..mxtR*t clc65 name : otfl.inJ.inxrg'ces ' Na-in8G'r*c^#"f.,tF
-._t
provi der u{l : jng:
l/
zboat 2'. zptt'flo> irs *r*au,.'on
qh ihp i // toccLhost : toQl <ibosl-h.m€> ct;cn'til"'-rosi't
,ic,r RreS rerlcire d iD clrstF.rb to interacf crr;rb lnle.blo6tc re3 5lr"b 1 fapb)r4tc'ajax
j".r Brea ye+dred in Closspar$
-|o iDKYcL+ Loi$ GlassFsh reSisng :
App5erY -yt .jc.{
javaee.ja.r
aPffe.lv - udrnln'Ja1
OPP5e-trv - €e"jcr{
aPPServ - ert'ja"t
imq,jms'va'jav
,lrr Bret re+rired in cl&i,6pcrL ttl in*cracf c'oith UB0s6 r€ftshu:
jnp-cticr*, jc.r
itoss - logging - EPi'ia1
qs9!
->
Sprin$ jndi provides a5srta{}lcrn lctger c'n
Org' sprto6firc'rrsrtru' iod i' JnaiTempc'rc
pbnn Jndi
c tCrt6 ,
--- Ttrr6 Jndilkmplorc closs inf'rrrctl{ USes plolr, ,Todi ao d
pn4rot",rtl o64 tvitl.-,
6n I23"t'X elto'
S;r"pDPe rbe
.Tr,d;E nPtre ''La
6'
&feacare b3
Pr- Spno
Pkrin inai ryo6tommio$
-) PrePore Jndl PtoPrtlcl
-t C{€ol€ Jni nor Gmtcr"t oQj
--o p.nRnrn jndi oPuroHon S
-> tttvecotto?
[xcqHoo lbnding
lW15 itdi Pru€rcrm;og
u q* JndtTernpbre class oU
Af?: "#:,TfiL'
orp'ra*ons .,r. L€
pyDcrJs
"? P"ft"-t% f,ndi opr'rofion6
ryq Spdng Jndi ltltJtro to F's5 Jndi ProPonle-s
fliuq pruiuirrft of rrPd;ficottc'n '
gc*'f;5uroda" Sre
--> Sp"ng Jndi inicrr-)otl$ LrsfS ploinJndi btrr it rr-t-e"! rrr.L€-9 prDBroff,me4
t0 b*,ev &btut P[cdnJndi ( rtia it norhing htr ge*"g c''befrc'ctlcinl"d*)'
Clitrii o{tica}loD oF €pnn3 o4pticaHoo i6 ioVacl&rb, &T** ir can be
v toYen Gs Spring &on apd lt6 P'DPcnti€t can Le &t'$6t''""d 'R^
D1rt&,qlrgelrron
/-  ,..r,'h
+ JrraiTanplarc cl&sb gveS bind L,-),dgbiod f-'-), unbiod t-) ond looFu+c-) rrrthd
hrr it is not Biuiog tistt).
'*(D ft,r €xc.mple o4pn cto 6rn"6Jt'ai thor crsrs JndiTernPlaJe ctors *Pk"
..,
Page ruo, @4@** no:(!
..''
-, Spring Te$nol0gies provides o'bgtlc'cdcrn LoXer on plaro Terhnolqie-6'
Jorho pnaeJS iF spri..,6ner f;rirs ro &,ppof- cexfcuo 6rpe'ic*tero
lben c;:e
Gn use &r'ng &4Plied CalrBc'ct< lnutcrPoces t0 irnplaroent lhc'l
_
OProtlon b5 usiog plcun -Teabnolql APa'
---) fte inErPace t*rose rreAods irnplemearei in irnplerne-rrrorldn
cla!5
adred bt un&victroX c6'nidrr^ o*nvnttc."t is cal-led Glgs-o2
inrer P'ce'
Fxcrmp le SCenOrlO : -
Tbe Spog[ndl su4ptie d J''arlemporc cl3ss doas pmvide 'nerbode 'r0
l]e,Rnrn tist opcrcrtlon cm veEi'I'A ' Thi's caobe ochdurd { as)n$ JtaiGltb"'L
intcrk.ce. JndiGrrhrl. (r) gives dolnconrext t-) n{'ftod ' ln *us ,rrir'atnx co-n
t{rrit€ pfurrrr jndi Code 1-6 frr?.otn lbt ofrro]lcm'
o.aa N i naq.o Lis ren er (neto t.J inaorAatrutt
( ) t
RAIrc v"td';;Ct*i"3 [riinaooEu'nr
-t)
0q
u n ^,.r-1ogsrem'eri(o)
. 3l*rt"a
, ",, 5//ilnach.{
),llmc*laot
' .In'tbe alaove cod e I
o)
Onf, O[pr crs rhe
b)-) 1l^6+ ohjetr ls $e
lrltndoo Adt'Prev
c1---+ ThiS Anonocmocrs
hti''$ S:rne loglc
..-'
Oddbindno[5pv 1 ) me,rbcrf i6 c4{0ed hc.rrng vz,
&rturo(nt V4Lo/e
Obje'f og &nonorrrncrr3 f,-nt'r c-1acf drc'f exren;" %t
'-
caEs. J
Jnrrx c-loss is 6vortidd;nf
NinaooGosrotlh)
rncrboo
'J
.J
'J
trd,CoLtbacr' J:rtcr8c'ce to'ok*t
Af,Pr
)
aro.g  tlr"*a, Etccp{ortoI'
c*x= tt€-otc F.-ft*-Xt 'Av&^t*^w7
(ht cro'.torr)'
'--
O Excrmple A1p1ica'Bcn 6n ioF"eax-rn
the tat olxrc"tlo'n 4-rncnt.no-l;rg '
r;nws
*-, spno?
? Oemocfu . r.n t
ft mocri(n-t ia,ro l' Oa-rx
Dorc C Pg . xrnt gc.me as a0dD grneco" 5t
ll D"-uCtit'rt'&vo
i ro frn r otg' Sg' cort-rcx r ' &tf Po{t " * l
irorrI't Oq' SP'iodi " )r j
imPffi idvox-nc(mlo3 ' +) --'-"-4ProlnJodt tocrtt- trrirh C"t/Lllc&t-L|t
PrrU:c oosS DerooCticni-
{
,stnhic JnatTe-plare lrsnpLa-k "'
ItSert'n nltkrl 4* ett* nt
'
Wbt;c uo'U siTexnpla'te(JnoiTemptare
tt-plqtt)
{ *r'Kmplarre = ttsn]'re)
&
lernp)ofe. er(e&rr€ (ne@
P!b'ic eLP'f
JoarG,rboo<L) {
dor,,Gnre FCG+er-a! *3t .*:] 1Ez'c+
rt
"n
6', ve6 Tni tial Gn+e" t oUj
-'(D
t 11*. ploio Jndi CIpi to ,.,p'I,ott'* i't ort"t}t*'' lq;'
Mmir5 Erwnr:wnc,t rE. = cirliBt-C' ''
);
66[r, r e I ne - hu llore C: )
0
t
Mrne Clr.ssP.,;'t t')P= (NotttCrossP'v) ne ' nextC);
5' o' e ("e' 6.* Nc'nne t ) * "
-
" * n p' g er Clctss NhmeL) ) l
3 //ul'ite
TeKr{ D gul ]
3 /l dor"O*c.r(-)
J /llntet ctoss
) ; l exec"ie C- )
$ /lt"r.;n
3 fl.rots
&nonourtfus ihD€/i
CnarOub"u
r'''{<"e'
ct6ss is deP+ni''1
fer)i"3 ltt b
T
ll> ,1avac * 'ieva
/l r lava krocCticn-l-
llrrrire gr't thcr't hlz-btogic
fn St iog trnvi{crqrocnJ- iP
"rnrurdit tlt-n coe use
thtrt .nethocl
ger.ud s *rte io ruooirg rnole '
eae a sr.rqg dcsor csnrcnD croS ro''crhod
Spnng Jndr Cou bcdi|- Inrcrf<'ce to acterve
@ rcroplare ' exeau'rt t ) rrrtt'ocf is Coue
bg Lee-pin3 Ohfri o?
CIct69 irnple-rncn$n X
-lbiS Arono&rooki innet
dolnC-onrext (- ) merbo.l
P"P-q Lut oP'tc'tt on '
1e fti% Appt;ronon Loe CaD use'
O 6Pr:ng'a Brriirin Ccrnocctto.n
-) Ib 16 not reCoroeoded lo
@ rr-,a Pa:rt JDBc crn Pol
-' APode DB'P
CsPO
( P.rn*na"a 16 g'{e io
Ncbsene'r / fuoti.ort*
(Reronoeodea to use
Apcbe DBCP
dwaCr'ssNc'*e
initiatSize
P.ssdor
d
Ltt 
use{rEm€
framgle o{PicaHon
r: App5
h----_') sP"Dg
-
5 rgpee oP Jdbc coo XloIS
(Nrong co'rb Dn'vrflorrage{ &iaSq'Ke ctass
)
u.g becturse it drr.s Wl ft'e crYn o$s
Siz.od%lone sPog fues (*Pttc."n-s
Seflrr ltmged 5Pg6 6aro@l
rhe S;r',n3 amos atre de$ogable in
W* cL$aie
thc Sonrr ).
rbe gY/u)
fo1 acrmp)e lppsf'atqb Baitt-in Q'n pol cLtiuz4dlc/n vePr'r Fe'u w$app-n'
0
--+
.|UPe
: tblrd Pc'rtt
.inr 9;re I zpring-trome > llu ic'ravrto- ca*rtans corrrrooos
*
closs oafr€: orB' O{aahe ' cnrnrrsos'dbcp ' hgc}tra.fu'nce
imfortcnt PtDfdtl{}
clfl. Bosrcht''Scrtnce
clctK
dbce"ic.v
Apo*eDBCPAfe
''t*L DBffr,ranon ' iava -*"
? -
|--- Deor^orpnBeon'ia'ra I.*1r''|;.*" _
 - DBoraaarznckufl*
'Jtua J
I r SPnngcP6 'xrn
6prio6C&6 . xrnt
zl DocTlPL:
ia. gEs in cl}ssPlrlt:- jar ftres tn 6;a55prh
CmnrosDs -dbcf " Jc'l ->
zsPnog-ttnoe 7  )ib ial<c.-ttbcr -
spt'o€ .i"r
Cwnrncros -ltrying'iat
> ,lavac *'Java
) .lava DeoPtaHcnCliani
ye
bap., ttuna lxrfig idbc Ccrn Poo
sltl
"n,
ftre : l.slnog -*-". t;;i caPo  c'zPo - o9'l'e "rrrt
cl4s5 rAme ttnr giues
iroPorent FDFrrtlq
{xsstDord
[J,5e1
[nioPo16;ze
ffux?mt6ize
iduc Ur t
&iver Coss
zvxt)6> -',o,r,,arnrlc. (brnrrdns. dwp, fus;.fut.$ttott4 >
^*")*; ;6=.,dbcp,, cl&ss = org. d{ncf€.
ire,r,O,ouaD,i_,
zpljffr rrtrne =
" dri verCl&!9 Mrr€' blue ="Orcde'idbc'
at
zprrlrxrnrrtrrf=''url'Value=&bc:ora"le:rho;@taorho51:l$>ir{rrcl
zpmYfrb ftrrnd = t{sornerrE" hlcre ="&ott'/z
4nf tU mroe = WssouA" vrlrre='l;gw" )>
L{rtory]5 F)G.ro€ =' injticr-rSze- lalttz.'^ 6" lz
zllrcn>
ziao id ="dob' O4ab = DBgperaltcrn Bcctt' z
zIJnpW rsnne =
'd$ " re P='dkP' / z
z_lt3,.aoz
/-l&c'oE>
ao.--, 4u-tq
/ l
o
o
Pxarnple cfplic&lloD : -
, 6aroe 6g llrevio(rs Appn hrf Perkrrn fhe R,,or',rg oPgrcltktns. ...-.,
0 Add Srnutog erhirs iD ftv;ngCfu,xmr Sre, ...,,,
.
"Cot'rochange ' Ve' c6PO' Comuoblezlhradrcrce
2
L@o6, ,, -^-r..,nap.13, c6?o. Gmboftnrea fuaofat''<te" 2
'J
Ad3.l id ='db(P' cl&s6:
"ctrn'rncFon€e' lE:' r-or-(r -
c. - 'r, '-)
zp.Dqtr1;5 Doroe='6;q6Class" frlue =" Out'cJe'idbc' drivcr' O<rrel]''ev /> J
z,xqvrrb rxlrnc=''.1auctkr" alugz" 6dbc', orooe; {"': @ lDccrlbo6}-- )5>):ool>
11JrDWtrH ryLrDe2"tJtr,ru Vlr;c --*gn*" J> J
lqPe{g rxlnne= prssood' Value="figen" /t 'J
L'./fD..JIs narr€ =
''p61ipfol6'"zr'' "'laJte="6' )= --l
name>* rna"Rot5i="'' Vatcte=.)d'/z
ttrrrd
tr
$e'ruCr
4aPutU
zlwoo>
zlxan
zwr{rU oerne-- "d5" rt(='dtr.?" lz
zl*cio2
Zl&aoS>
odd <Spdo-h6rre>LIb cbPa capo- 0.9"1'?"'iat Bre to
Vc,rxrble o5 &dd,'rksrCIJ. j..t f; re '
0:- Uthot t$e JDBc Ccnnnaficrn trol $dk'i b hooe 113ef in
:
/rc,s; 1? gurr 4"ng pqiat is Stcodobne (cnl Desrtoq
iC--" &b" clasS =" DBopzTctHc'n
Eratt >
t-*t lvlcrnoned Oolne;rrlon?oo'l ' ftpocle Bcf
Sfyrrnt prrberi is lepo6eecble ucbatpticallon thcn
wraLncrled oDqC fo."rrnectcmpct)
'..-,/
_-/
J
CLAgPAI-]+ oovironrrrrf..J
_-/
$u,t'r pruje4 9 '--z
prDjqt flren use J
."?,
LLsE
anA alt- -
Undecrc.odiog rbe PioGsS op Worbiog coirb &.trrrr fla.,oXe d JDB c Ccrnne c,non Rn
(on'a io,re (
U6in9 JDoc ConrEcfid''o lli)l Ne
Dfi 6rt b9 usiog minirnkrn
A 6onnaaficro OhJt in 6*rrqd'{on Pool
D0 sor' Ey cDsc ConnecH6iP:o1
*sl C.rqnecfi on f}9l Ye0r€EnJS
h-i"3 nicKo&rne <r{ atlcs octYr€
hteb 6e{u<J.{
Jo8.Dara8o(]rte Ohu
aizl+l s orivw
4wf
Can rrrru.€ rnlre Ctjef* c,pplicc*tcn- in tcrc.artog coi*r
no.4 JDBc ccm ohj)6.
f{^"eKJiJ6 canreesvrrS rc'irb 5clroe
Orclde meaas o Coorearlon oql'a in
Dam6orrrce ohjecl
plclced in A:8,u"f
rPve6enr€ jnuc ccm pot
slio {t BloErr li6ibiri[
aod tils Dorc.6oeKe obj <oiLt 5e
e (e] Server trtokes Josc sctrctfouce ohituJr
ond kce?6 h&t $b;e* in fndt 'rt1;s
Ocrnnec$ui ry toirh Srme ord'cle DR sftl .rd'r
lqreseYlttns {0Bc Conneu{onPol
N t'to the Dicrgrorn ,
lo ond l_o
0 6e1ve{ uses t.lp" r | ?' I + | s &'/eY tD inK{coc-t trrl rh Drd s
crfole JDSC Cdnnedcm 1d |n'liog gpBa CorreLtidr' ob'js'
!@ @'
99o
€ofigo
->
futa $rlrtc O$
l,+ui"g nir'lnarn( funr) al'al nat't"
@ C[er,r oppti c&-hio Lrsec Ondl code to ge+ Darc.Sorrcc offil ko" 'frkh5
@(!O Cr;cnf &ppl)cadoo ger3 SDBC Conrfr,tlcro Ohjear P'ort CcDrDe4i<,r,poct -
ftmcrgh Darz. Satc o$e.!-'
@ C[an] opplicc,$on crles *,;a trDBc cenoel]icm
ohiot fa c.a'le orberr
f,DBc crhPtrs ond fo deur'Lap Der(gstenLe
l-'ogc
ocIeflfcrppliccL"Ho.ncajls6a5r1'coseL)rreilnocltorelec'seUD8cc6onesil.J.n
Chf* bc.dc ro Conne*tcrn Pool '
Thew are fcDo rufze oP idbc Ccmrrtficto ohi6
O D,rot JDBC ccm obi
u tv]5 $e JDOC 6on ob'j Lle$<a h tht progrcrmmg mcnucdld
( Cta" ' fuName ( otcore 'iauc ' d"iwr " Or6'le >"i'/€'{ "
)
j
1 - * {).,x1flcrno. et.g:tCa,'..cn..
j",r-ti"ooe: tttn : @toct.lrurt'l5rt;crt.-')'r
L( On ne*tort U:x "' uztt"t
hoted oOgc cdn 9bj
---i f,-t-i6 $e Jdbc Gtn obj Cofreted
Sra- $" &bc Corr Poot '
?L,{ O'iGc-le rogdornc,'nl terw
and OFn
'rr5 erdrnioCctt'so
le '
$Kp4r"-
Qdroir' Ctnsoe &'(eo ----> Sefldces JDEc----------+ kua6atv<es )
p4r6 __-----,a Name ; rngdsl Jndtmme t @-- -2ltriaBc.setype ;lo*.€l-
HrFo*.* Ott*^ tru tl g* se,rurc Conoeltl
^f ----n ncxt ) pax t
--DatcoBose Naroe-: FZa ft*toarne ,ltoc.'rnofl por,[6tll A*avte Utu'nrme;
[GrF 
TotG"69wcrlo^
@ Ptocedt.'" to
cf hkutq
A:L Statt ro6dr"'c"nr tsr'o(
Cteorc JDBC GenneaFcrr)
$ol
ic"
ft.sroord FrAf CunPcrQcrs kle,e ----r Dfut *--5
----iDexr
-'-"-t V AdminSrv<,t -----+ FtLtsb'
SK.iFg rbe JDSc Cnopoo Pctrarrffg'^
AdmlnGosot e -------------) Serrrices-------------' JDsc------r DatQ&)Lt{ceb
&moduloo ltoc +.,Jo
-
aotuJr'Pciru 16.-1 nc,.xcopcl.ictJ 6,
r .! I ) *r]*a --------a 6h.nvPwlu'n'x l-qoFl@d'
cc,.Kit i6'115nerr.,t l.n.*r.r;";1. sboad be c'ro-red tnkra,o rhera is
--------+s&€ aneed & cvcaHo3 nelD rdbc cdonedlcn. ohicrls '
de*roXe rDte f,lgg c6.org$o^n c,rrj&fs ct?t<,( errtf9m"se"-as
fs.;^.-Jrr;
NorE'.- in $e o.bow sl-Qg nhr'n Fnisl' hffon is cftk€d the $gc Ocd<'sac'r€.#
o4e[f vekrffLe LdtI be f^&cad OdorncrhcoilS in Qgrst"x slul '
- x)ft'sP.indi' Jno;Ohe+Facrcnu&oq ia $e FocrcrgBeccn rhnr gcrrfexs oUle'r
ftr* YetiShn1 slcD th"ounb Jndt ooF"p OfixcrHoo ond irger'ra thctf
Dc,rufo..'ce oqf!'t .fft" Q"6''rl slto aod to inp* rhor objer ro out
hancic,ss prqx,.Ird,
-
Excrmple sP.q$ o?Pllca$oo to (ase the above i"r-tlogic Serr'tx rrrLnc'Xe<l
- JD0c Gnnernon Pool
yli KeeB rogdorr^crnr Setut'T oP hybl%t in;nn)ng rnocle'
8tcPz'"- kee{ fblrh appt' ftodg' a'-'d P"h rbe lirrroln? rn'c'i;Bcafi"'s in
Sprrqcfu " r-t R'Le'
/| 3t'tngcfu , x* t
ZlDmtgpe--->
4btsos 7
61165'o0rg'
s9' jrrdi' furObjett
fu""U8-" $ =
Lb/C.ie i6 =
" jo?b" c&iS? ors'ot' "':-
/pyooertS r.arne --
*trndrN^*e' u"t"="!fl9,i:"
Jndi
PY1rfsft14
p565rish
Connea$ctrr
4tm{>5>
laq
ZJ)YDP
z-LwP6>
to
rhe
Zptry,,q n61roe =
"inoiEnv; ronroert-f "
>
1ee6 - java. nc^rnin3 . fu*"U , inirlcd ) klbhtic.indi.
tnJ Llnrsd Cc'r*e" t[.c.ny 4t*p z "
keg =' ,javrrr{mi'q, DyDuJdonc,rrt > h6://loco.thos,r i zli 1.-
tlwP, ".'
zlpto[rn1z
Loi rh
I2eS's.
lk.o,o>
Lvan *& JaoS' 6ns5 ="DB0put..Ft''nBer.n''
>
Q<rrhe..ed &om Ond;veX;s husins .._.,
JMtOup*facnrXBean. ihs Ksulknf ohrecr
Lpwn,o eCtnoe =
zlVao>
l:llrrcc'r>t>
uds' yap -",jolb' l>
T-Jruetn JDBc a,63crxce OQ.1er.r
jctr P res in ctass pc.rb
'
Spnng. jat
Gr.nnrcxrS - lq6;ng 'jc.r
cdrlo8ic . j a't
(D p.oua-^^'. t0 C''recfe JDBc Cooneolo'n
(bol &,{ orac"ls io t%dorDdnR
.-
9wu o? ot*tj:1"11 oid bc v+.i ci f; ss zbrca s6(h-ho"'e>1f,:S
ffi;'d;"qba& ftrde/:<{L !-rr ' n dnw' tvted
SA-O:- keeP O(6de 1tu
rngdornCunt
"-"'-----1r-----;" TdroioOc6ole
.
gljuo/ (ort l(b t
.,."..
5ra"4;- Skdr
a6cdnnltl Sictt-dc'r'trln rn*ir.'.__-r,
3x?-al- R.rn $e cLicar
7 .lava
sHP-a;- cfeclte JDBC &tnneexoobot
Qd'tni9car60e
S6-ctco
-=--'
Qemcrrtrs
---j {rKrU
Wfto{e 1 Lryu--J -----------JnekF
fDr,rirruYh plSizt l- $-_l
trill be lrueu-(d
apPlicotlcm
DBOtorafio$f ticntr
Gtade"
JDBc
- > jntut:n @16 -=--
ftr 11 TescLM,e rU pe Ijcvctr,sy' Drfasd. Y{e '
----,-.,
Iyinaeand rnin[tnl.et:-e [.-+ l.---
poo| rcstzc $urirLHrg
I [ .-: -_l ._J @{Aae
--a V Cf,Lr&Ba!€ r)6(m €
E Dti<ryruPc
'
@ f&sst'lo'a
'p f)rltNttrnbct
B .fenwName
E Se'tuicrNarne
@ uct-
E**
--) Finish
-)6l-cp-U:- Cxare JDOC guJ-a5cLrrce piotog fu the obov( dDBc O^"ffi
AdrrrlnConsole Sc"reeo---------+ p66r.rt-<r5 ------ J0834 @n$gcPesctux(e8--
Orc I
*rin
ti$cr
l5>
to(a-(bosf
l0c4J ho I F
,.tdbc: oraale ; ft-io', @ tocorho tt 3 l5>l eorcl
SCcf-t
sder rog@l L'---4 PioA ----+ s3JJe
'- f,k-)
w
llero --------+ JNDI Nleme',
to u.se
RePu eppe crn lqlozlrorA mo0fg Sprrogcfu-xo
cntcrsSEsh $tKrt mcocJed Caqn&$crn pool in q^r^nt
w?c'{ tl$ rrrrnch cilscrrstlons .
gK,P@:- 0xecurc fl'1e crieni olpo b6 cdd;og
----'[elname: I6sfi:oi{ -------; Q!**"-ffi;*l*,ttr
---rl.! '.thdt &.e<
CyPFn
0
ff spng,ior,
6 --+ Olcrs6 Fsb oft. iar ft te
Srt-ing ;r.r F;tcs
ra'.<btS
- 6kp(Di- Ke<p mgdomc.ina' hlctssFish in Qrrnning node
skro'- Keel Po nfi cippn recrq &s shou:n 1n previous old'catlctcth+
Choqe rbe @SrtoO",3 Jalrrer in Qnin6C-Fa.x*r S,..
Chonge Jndinome tu llg0eJndi f.o- Sr'th1r.
chonge v*blogc Q"$ p.oirrft$ t ith Cic"sE !'ecXt'*J P*l'*t*
comrnons -loggln6.jaY
rPw
SpntgDno (c,,so cc.tr€d c.s Sptrog mAc)
the. &va ctas 5
ard rrr res *)af
oL"dfe JDoc 6t'ercrrrn*
ohl
geod ood exeaou{ s€}L o'ueru in
qod*.x reslrs aod PrbLels rhe re
Cos JDsc ,ohi5
t 5 lo ol"o r:
O*er lq;cs 4 the alpt;ad{c,',
DAO
abstrc.ortcro lctg o"l )
wrrs & dedoplnSr
fu,r se{r-r(-l'1c| Pe(s
l5r<roc€ logic P"t-
lo€ic5 Ci6 'reusobfe
1ogic5 is caued
--+ 0AO P6igo partcrD is oo tr'rL5 re'tared co:r$ GptloSDAo t'6q1.!-{-tQ-
--'> epdngDAo rnodule
6iw,5 oDBcTemplore ct&s6 l-a provlcle
dn PUn JDBC frrograrnlry lha.r rnec.a| E;tnpllRu* the
ilDBc petti sYunce Lo6ic.
Pki. JDEc progrorn;og
(]J
o
e
re{i6rc{ idbc drr$at coitl DrnrCr tlancrSel
E5Trdni5b he Omnel$cro t/)rh Doslo
j
DB 6lto t
sitrs J
frpplicr$o-n sledhc 6t
-.- .
(choqar in 4K'X afon /
I Cororocolr:qicS 4 rhe 
i *nn ( ** 'n
a.ll JoB( a+:r- )
)
:t"' rhe otac
O,nd OPliccaron
64gli6aflcn pDt[affrd/r
Spec,Ac
"lo6i.s
'
Shcx-rtd tclFt cc'Ye 4 Cornrnon
taVe c&ra oP 0rnmo ioBfce
Apptl cc.lon SPcihco logia5
3pn5 JDbc P6*T'"3
0 ff* ftbckoplorc ctcrss ohl b tufrhhi iout Dk.lrt.lce obi
O Send ard execi*e SO,L Alc^e. in DB slOl+Cnf;c"tio", Spec,frc logics
O Grtrf^r^ resulr5 t'c'cl prcLers fhe reeutn J
An the crbc,ra 6$,n fdbcTennpc'rc cass coitl
ist need to tertsecore ct+ on$
@
c
€) 6ll,fo.,rng |;ceCflao *L"d-lu5
So Prugrtrnt't
i
--> to Cr(nK JdbcTemplote crosi ohj fih: Dorc,f6c.r ce ohj is &6-,-d.."r o6; '
- -> M.tfu-nce ia rhe irnpoterLt lr''oPof-g op JaUcTerrylare dass(oq'sr'"iabc'ffi
I
-lhe impcxtrr| rrgrboclb oP TdbcTemplo.fe ccrs.5
lo sr6d ond execr,1q rhe
SgL $rr€Yics " *
''-''/ T0 e{ecu}e frro- Selecr ouerics
- uPdc* (sn'"3 qq )
lueqfulnr (Stn3 m) t Nhen gte*yo-,.g reic,rn r'rn.^Ac vc.t.q
WWI"o.t (sm"3 ot) JET:-
senr cwnt(x) P..", stz,<tcn*.
1re.1F^h+ (Sr"^g %)J,0f,." srec.* 9l-t€,n3
yero{ng 3io6le *rcxd.
Eg' &tetx * fiom 6rude{1* t:he"e Srro=lol
q,r"tF*Lr.i [514"5 %)3wbco 5elq1 *"0 retrtu(ns lltrltrple rrc"rdg
-lo txtRrrm Baxf'Pocrsstn3 ;-
E6'.- &;lra X &or, src,dent.
-
krcnUfl,'t" ( Sr"rngt I ler;e s
)
'-e Nl-ren olr ftys( rrBr6als are hro.raoS str61e at6urrcnr tl-rn 3'nple 661areenf oQ,
ajrtt be uEed inrcroaftE
t ' - - r'"rn n'r'd I troCfu6 ot fh"e e &8t{Fnqd1
-+hlhen cru these mtrtnc.lg are ca1teJ hooinS turo o'{'B6r'er
- tk- Pr.Pcrted St +.tcrtr CIbi ('Di) be us€cl inKrnaut '
Exarl.,pte APPI;ccflorr i -
E: APP6
i
,
D8OPerdfioo'i4va
D6OpednHcroBrco ' javo
D00peroficrnCfg' xrn
D8O g,rortcm C ti tn+'Ja'v a
ccm finl tiKe APacfre DecP'
PoP"t us,ng third pc'rg iduc
DB iab)e inofc.d e
5r&dcoI
I u9to
+__ '_-)Srnrne
F saad
/l DbOf."an- -ic.vc-.
irnfrott iava' (lj'i I ' 'lr /
'p,ff,ia -invtfF
"t
D6oftttc'ttc"
rt^robex (+ )
larclnra (ro)
Va{cho{a C2o)
fxrbi c
gr-lcic
prbtic
F-'b'i'
Pdi.
Foi'
int.
iff
in-t
inl
t{o?
Usi
;p6errl#o (int no,8t'tng mme, 6h'lng oaa);
qPdrrrcDrtrrs (mt rro,sni"g rt'oovfittE'51-d'g
Yfloc'ddf)
V |,t&{ ,
U 1"c"1 %
1' +uut'R Safl
'lnl
k reca^
cirq'
-lttfte''ecL'j(
g<fr4 q!<'J
-' ' J c/ I -'q,r rn .m e lc oc ap'ra-r'
)
v
DBofraHon8ro'o
'
joVa
,n#j iiil:fidH;#;""
{ lthron tr'Df)./tg
" fal.Te-P)are ib)
irqrlcrrrrUs D@lxttallcn
/lme*oa 5 Cc,nsrrudc't irlP-ttcn
Trbic DgOfriro,len &un fOU.tt-pt"*e,
t
t $;s.jt = ftrnPlcrtl
a
.9
&ereFt<;rs (inr no)',
c*rrtstt,.ftnrc( );
6c* 6t ,aoDetaits (ior no;'
g:tSt"Oet-rs
(Sr"o5
KrnpraP)
//;rnpteornr B.n.retbocls
inr insecTnPo (int m, 5t ',g
tn-e,8ung addrs
)Purnrc
{
lor
k
[Lbic
fL
inr detetcDtrc'''to
(int no )
o' . s'r<,delll- Eu 6mrne--  P Sadd=! mhcx
= i b' upAett< L atfA"r" 6rade frl- Eu 6mrr
^ 
5.,o-- ?
"
, ned ohr'rll lt*1"* '*tqq{!rn'i ) f
L-, USng Prepar<aSfttt<ml,trl o4iecrs .
uph.reDerr;Ls ( it" *'3.an6offo-"' Sr'"3
n$att)
,t'
TritrlJ - it. u{dd( ( ins..r
. fe[0
JDGcT(mpldlc throc.g b
DcJdACa€rJ fixcq t'lco .
Ttrr's ts an a1n1l,aJa-< I
ekzq ll c,n. So, exc<pblo,
11ffi.3 in D(o.'o&l<
j< 6Pild'1c( '
into €rcrdenf vc,tues(?,'1,
?')':
O*eurt ] [ no"'d''f '
a&t'r63);
&r?ptles he 98e""d Pc/xol-Jt*<4 vo-{ug
CtulfoUt bo"rr8
aa.ncc0r
refLrl D ltsqtt ;
3
prillc int
{
in Yuult
{rurn
I
t?
rJ
FlbU c
0
t
lff Tt.:ul
rejuvn
Tesuf ;
- ir'uf dc'rt (" dtr'rt &q $..&nr
re3ult)
q
J
$iu'len-ra
( )
Qu-ldi
c inf Cdrrr-l c
{ .- - rLt .2. 'ne- ohYtllt3)
inr rtsoll = jt'guryEnL-* ("
"*
eocrnr (x) ff'orn stc'den*
"Yenro resolt
"
3
F o1(, llat
{
ILa Yo -*
T€TINN
jt.qpa*UF"t1"l (" soe*r + Prum
gersrr,aDer<urs I irrr no )
Cd{$f'r.f
m ] no.ts
terbe,re g'o= l'rtr- Cbtt*t ]
1",3);
? "nar:
eruAtrrr tPhu.^c sDo= ' /
OhF,rL I t "'3);
Lr* goSt"a.*rD.r.irs (Sr,iq c;t5
)
I I ,r.-n
; )
vdut6
i
OhF.rLll"ryl )
"/
U
.J
V.'
Wuc
{
"p
i
J
org. ap,cie- Comrnons' dbtp " Basl.DJc.fuc.'{(f," >
MO+ fu1tu3f,&ltLc^(,
ZPrDIrrYt n&rne =
tJVsn)
LWao id='dob' c)drs=^ D%6'co{i,," Bco'"'u >
amsrncttx - uJ reP=" tetnPlote'/z
Awoo,
4,wns,
// Ogq"*x
^ C I i(rrrf iiav c
irnpc.it- Q3. SP'Ccrilffxl- 'eqrrlf' " X )
cl0r5 D8Op."*r.lr.rCL;tr*
Li., L=ir'g..'U[*Liat ("s.i.* + Bo- Sudeag 'ohc"'
return 1; Lit Dotosr,'<tw .
)t
)L
/l agownonoocfu'xrr,t .
{bean5>
zhean 16 ='ldbcP
u clol5 =
clas5=" 0r6'sP'idUc'o"" " ilAbcTernplafe
>
"ducP" / z" dofc,Su-.r cg ' reP -- .-- '
grJd=!",nt-
fllrnc > " drive'iclabNarne
4Lron >
&ao id*-'Krrplare
s v rn(6r"nglJ attb)
E,.Su*htra*r ovr Gnra I (O:;Xi
llgr&"", clors ohj
DBq.rare^ Uhr= (D8op"<'nrm) o*'5et8ton6"'lob" )i
. ]:til.i' l*r.u *or cre ieEtrtd " + boi' inse'nrlofa 6rori'4o'
" )'Sa
"
);
.-r"' '
6o.pCno.orQer'asthorco'eUeda*ea..-1bob.),u$axDo<^;ts[rorjx-'t;|.}""qp)
S'o r I no u[ Rtca'd s *t* o'." deten"r" +bobi ' d ete+r Dero-rts (l" t
));
So r I rp'of Stz.len+ s catnt" +bqhj ' Wful"']sc)) )
6'o,r' (" (tit stuclcn* clcrurs' + bohj' getsrt'aDera'rs
(or)) ;
s.o.e[ @ hgd btucrcr* JexitE,, 1bob.r. grsyao*D.r.,rs ("b6ad'));
icl List, ttoP 0uf<rsft?rcrurq &nd
/ All colferlt(Jn Pramc coorE
orrx the otrqlrrY- L D***'.r ot"
&'tt9zlble oUtc-'rs b dk"t
ll P'tvwe Ccmraioc.t
EifelXsxmX.r fupticaf,tcttl Conn*t c-i-x= h€u)
3il*'
311.oo
ja., f;trs in cLAss PAl H :-
? Sprin6irrr 5 --"--. 6Pl]n3
"JqY'
cornrDctns- Iog8hg "i,'^'l
CornrnClo5 - dbcp'j ay
0 5d bc r+, jc.{ a
9' nrh* is rbe digP rjLo exec"log selecrlueYb ;n po-roJcBc s6d in 6*n35DBc
:
g:- plcin JDBc 8iv€5 QebLrlr&i oloJ€ct' aod )u is rpt &'rau7.tbte oby-ti ruseod
Ovet tbe neruo6F '
6Vnng ooec 6ere* quc:g ButA Qesutrs
lr]( can Send rhis ]'ra5hru*ulcs drte*tX
Sprrq JOBc inre{oatlt
CbetledExceptloo Celed
UncWoEed l;xcefilorr
uses ploin,rDBc
66t-Fxceprton. 'ilr
eu.nrho*B h ptarn3Dbc flrac,cs
Ccrnve{rs rfro.l 6't1g fO
$*"3oDBc
aued D'raAc.eas["ctprt"o.
g- FDric inr q,ue"6F"rlr,r(g6"3 ?n) $m<,x ftnffoerEJrccprtoo
s
L
/ploin 6uccodc
.L
J
Or,r<-t' IS8rExce{'ntcto
e)
I
itrocr rrd DroAcae*ErcPrtcnL))
Ex<4*ion RerLmcotn3
IY
,,
The Jnvo. cla55
CId{) ticcttt Cln i5
qrc ond tha
hb
t
il^nt *trr,ireLr<b
co,led 0&0.
P'rststcoce o5ic
DAo mov-es $e
brd;h,
{t* otrc,,o lqicsoP*e
furgistr_nce qic cta tusclble
Pleriote to6lc to
p.xamp le Neba4plicatt q bas"d o1 m'tc} Ar.hj kctqye aod irrple ot n* r>3 Dno Dn"n u^
o
o
@
llaioserv €.{-
brdnsct tiiodq^]
ro ' btr"tt (victo
c;grr*,1--- l
@(prevora416t1 fr4;c )
ic NcbPaq e
De slLo
In rhe abrve atpliceH crn
DAO, l'1vce ft5i$.' part fn5 are implerne^reJ
OA0 cl&s5 Gjntrrin SpnngJDEc bd.6ad 1-z.{sJ5ttnCe Lqic.
Llse &xv€'t qDooc6€d dynrrzrtor' 55o) }n rbe cubot€ ap pt}c'oHor" '
fts;gnflrrton il a Betr sotuncrn % rcoccurrinl pyDb)em5 oe oa'$tcartoa
Driiqnk^*c(ns a* ,he Sesr prartcts ro c<*top sla: aPeicano.nt
b{*"Y
ft$ @ prn.edut t0 .ler€rop rbe a&",e .odD appllc..tl .,n tU c{s;n3 l'lgEcti pse trl'x knz't
8i(P-Ii Crgle wlD [^j".t
.,r
flrtl'P
rr,b^t
rJt
rct'tJnt
F t e ""3 Ne cc *-, NcbPrc.ie Lt
ttrli tct'el [6e.u,r
--l
---.:
Fnlsh
StrP-s:- Add s0bng C.'{sbllHes to tbe Proie*
R,ghJ dct- dr, pyqje{r ---- -,-+t'rgEcliP(e + Add sp*ng Ca.Debitihic3 ----) @srninaso'.
ffl sp+r.3 j'o cclY6 r l)tLr*ts'(nce a""rt lvfJ#cf- isogc [trz'vic-s * sfl{"tq
.-------c..m
CCrrot o,ter ;
e)
tJ.rogi. )
voo"rttan (fui4 genn
@cu.togt.l
(Fscnt 4rp.,
l-r{ i()
I-b&tDno I DAo cta"s
)
(F.orrst o.e ro8i.
6x?-]li, C{rnA6u.€ l"lXDorrrlio i- ,Seruc4 oP coellql. *""ct toirh lt F.L)P((.IDE-
tJlndco rrgyL, --- Pr€fc€rlrt-s
-)
E)r'ese ---) Jcm,er{ ----s 514$lo6lc
---
--r'
[Jcdo5,. lo,x -------+ (fEoaole -----------J
Bgn hoare D**o,'3
Arlmlnisrcafl cro
.
UStr name :
passox,rd :
Q.rcIlUctn D znnai n rOOl;
6tcpp:- Add f;1ooin3 €nt-rics ;n $il€cPt hLe .(r"roaercq. x*,
)
/,,.ao ;6=".,oPb" Cosb = or5.sf 'inai' Jodi Ohfcrtr'oto'gBean
-
>/*trc..*
T? apPt;raxo" {,p61 / * tr., ft, &4p!i
l*rl+
Jndi Nary6 aJ rs n6 oecd .t g,rrn3
..Tt,/;daN
nnl t" ti
-----) foel! ------------+ ok.
Add 0.Dbcr+ , jar -&'.
IIC"n P'oJcr* -------+ &rilaRarf:
ltd,bcL+. jc.t hrc.
torbe Buitd lle$4 r{.'e Fqie4
---------+ M pa Ertcvrre0At..FaleJ
Nlxt't tl-<tlt<&^S
tpl'd^ MdcLLa,Z<n tI,4",
6-,a'r"1 W-rca,.l-H er lafa.
-&ocar<-clrnAS<fu+
-/
lptogrt l D,irne="
gW' b v"Le:gN Ir *#;*;il,|;k
zlbgrr> ana, p.f,srrrcG fali o;4 ,,*.ir.%.:fl^;-,
t1
Lbecn id --" ter',p)a.te cdss = O€ 'sP ' .jC bc .co.e . JduTcroptalo
lWdW harne= "6k&r,"c6" rc(=',lo(b" l7
j
<Jaeao> -J
-_,/
<&or> fd --' rnSdao " clcl-s ="n9Dko" =
<WYfl r^o-, ="r#.* ref.-" ftmflu<' f 2 v
4Lr(rn > J
z.bean )d --"fnO " class=" l*lodet Brc.tu > r
zlrtyry fnn-r€ ='rnda6
" re| -'"t4Aati' 12 ' )
<lkon> r
_)
-..''
6"pa, poelop *1s DAoclals as Eho.;,o blooc
f$^.c.d,.|o"!
Iv'dr'.*re tofic
Pc cn g, c
--J
cla:.s
-'-r
clor3re.5rre:
^4Dde'DAa
'=--+Fu tI'
ftuwtc clats nd,aD+ol
' llLeat Wf"vu
rnrvl+sl":tktb
2' JAVTT^P)aI< ib"'
l/ nar strlrrl-; w'ohd krsttt'- InP!|on
prt2rc Vold atJt ( JdbcTe'npla+c
jc
)
0
.,
' i+ut'ib--ir;
*,'.n s$fl;.,ir-," (sm"3 ctn, )
,,rrt -H* &= ir'ry*xk& (" ** n P-- si.de"t
n rf,,, oarttt [l l"n]
Xnqo *ai
! l*"a
3 lo^
--ffii 4t'&'tsc'n
pc oor (rc "------, pq, -------+ T:^l<x(arc -----., Na,"<,c'" Fl" &) --------->
l/tqodtl, ) att c,
WiL inte^Pacr llder Ifi4Pljsr
rtas.-ti".'+Swdr'rs (SH,J c tl) ;
3
pc so Src-------) M,t1 ------z cra-r. Noroe '' Mo&I B'arrt "--'--n add
"
nole)
nW saad=
'
);
#"ue.
-_-
(t"a yt,,
;.,ubl,rc cl6rs ltloderB@D itn/tr*'nrs f'foao I
/u,." y'1'*3
llodc,rDAo rrdao',
ll *x, k'ilkoL 1* s,r+- i"a*.
Fldt c Voi / g1l'lda o (MoaoDl'o "dr.o )
U
*. 'rndqo = wdao;
p*:. ffi" sp^',4!k,J.,.6sC&.4 dt) I
//b.to6rc
if fcrq==nu, ll'ffisj
1 .,u ='ha" 1
3
Iuse Wst@Q lo5;. og DAO ua's
 llictot
z_1?wn>
tt*j add
odlsrlkar'{
[2 c ---- uan
-------+D& F -__--_r
Lr.t flapS= ,"d*. 6arD.r.-rs(crtg)
rucon {r;
 ll,,'l.'"A
Iz.c {d rrawa t ------'-----.+ t,t rrr r httn I ----------z Nlarne ; F rtn- btrn I
LPrnm actloD =
!"conwol)€x
.,lr,+)d -" 3<f' >
cilS mroe
"
/iorij-t tbtt -'ttxr'' rnrne ?' ci' l'
Zinrur tgrt='ralrnit " Va-lue="'&arch
aew:d 12
-----= SctV t€-t ------) Name:
.?"r,rel /oP Yr.PPrn1 ut t :
Po.bllc closS hoin&orl€t o,Kc/a l'ltrc9"vte+ {. "
l'4odu boui I -/
fxtbUc void inlt() t
',J
/f+*uuo sPr;Scrnlalnw
Clar?arh,Xmr fuplrcat{orr Ca"*<xt c}' -^ clcrsPa4' XtorApplm'rrc'orConrc" C"XW
il6+g"^fl&* o^ ,4n,'+ 'h- Co*-n'q !/
&e hhi-- Crb&-t) etx' grBeo"'(''u" ) I -
J
J fln*t)
Prbrrc loid a"Go(tt6P ?eltrcrt/ ltSR *"p"^l')rf.-s SF)'TOE
{ :
//ruaft'r..n dc.ra
r 51' SYParornetar [-oT ") ) -
rtq Q-- te14e5f 'Srralarn<rw L "'J J
I coq g.rnar(uA
 .
Fson-hh"r to $a6!rmt {t&,. cP$e 6rtqjerr
gngr lftD?tra-r-1 nljc- rt'"ict+
i
fl61e,!-rv lc.t
Cmalrlllcd
---: B tr.;r {raler*6,
FId6<dloP"nt)
-E'"rcb.
Lsr{cae *= Uui" aa,cr,6rcaerut (sr);
//feP ru,rr+ in klrest o-tt,'&.r-<
/'&"*"6
'1ta
kryest fu rv-rct tle -,.
- R.a*rDisg*<-het yd
= r€lAest'6oR*1*otDtFi'I4"
("arsuti'jsp") I
(/aoGaC-,-)
)"
: prHic
.
void d.P*r(FlsP r.p,st, Hre *'r*o)rf"* sE/JaE
d
doGu VI**'*^"*r") )
n"
-J
* pr-blrc Void desr-6 C) |
' bohj = nutr )
- 3
t
It
' o'to"
^ 5rcp [i add rsar+ 'isP to Nerrmt to
' '-rco
------r
flarne I tS Xejtrt'Jsl
P'Con FLbroot
rnuP '-----r $P-
'- Ll'@paBe imPof :^'iava'ufi) ' *" !'>
1tt>
/tb> ino Llth>
ztb> smr'' r t lth >
zth> SdAd /lfl', >
48>
L/' P^ (i"t i=o I izl-si2e( ) ; +ti)
JL
11,.p ,n = (moP).1' ge+(i)', /'z
ltr>
Ld> t1'=rn'sefc"s^io")'/'>
LlLa >
21!> L/'= nD'getC"SNAmr") z' > 4d>
/d> A'1': l'rr'get[''Snoo') v> AHz
zlYt >
)rt
,J '/7 4uw>
&cp:.""- Ruo rbe prDjee-l
Bc oo Prarer --+
l^t$loBl clo'x
. .'l
cst rtc Pilded
OF,n Brocoltr L0ioaoco
PlrnAs -_"- fyuklifrJe goaw ctPPl)catl aD
------)
--------1 brein fiarrr :
-/
procedrrre 6 Gnhgco.re g)eSSF,sh E.X Dorrg,n Seyucn (i]irh l'1U E<JJ'Pse JDE .
j
J
l$lndo<omtnu--------e p^rrPaeocelo ------11"t[EdP{e-----i &nE-na "------- blarSFXXtr-
&,tassFuha'x @E.nlte------" ]l''ned'vem'X'
%
----- ^.M
hlcb alPtlcoHc'n" r$ n .La
-'l
->
plain Ccoc su'r'ac"rs anX PosiHondl
lmro"rto6t1) in lne "Vtel
g('in]',xosc Sw9crs
brb psiHo'(?) aod rnmcd par,"$()a{s (*'*'Vilii'
'U
.--+trhrnePaT4rD€}e{scc'eset?descriprSue,fuoc,rV.Psitlcrrr.lrfufe$&o^u'(neeAt/
dDtscTernpla}eclalsrtocooucoirhr.l"*..,patamefo,let-n^red|*t,,"eAM,'#fu
-----------+ Lr+?;/i tocalbost:11'zl f rc*Patf forn"hrml
Gt?igrva.tt' d"'",r"^6 :
In rbe Clrn9t26.rrortor, Rr" tr c}ange iind; mrnt ta 54rfu"- lo t'1 3 D5 [ha-,
Senvcl cnar63ed Conr'ed'too pool trq
JP ondertoXlo3 Se'rr.'t-rt dcxsnot provide
pod5 tn frd avnr,|bcLsed
pyogyarnm e,r cctn Ltse -lhiYd p&(tLJ ccrnnecllcn
M,"..J f6,1apefr',3 *ki Jzgc No"5l{ss kwbc"H'"@
,
v
--,/'
4 Fr aa"rpte apPlicdlldD cn
?*p^.d5r.*,-.'*5.tt<,,
-
51,.s
P"tpr"a$tz*emenr og to u{e ib'
15) ,-oY exqmpl€ opplicdfid'o on spm,xDno
'^- '--+ lnorder fo maLe oertcrin Bcratnes's Logic as Teuscrbte
103,c ux Cc(q urrk coirb pLl56L fttoaedatre6
c'od
-'. PtlSgL flrDc€dqh€ and tr(ocJrc'ns are rlisiule 'in
rnodulc c,nd ln mutFple rrrdulee op a prqiecr'
|I)e nted fD f6ke c Jav( ClasS e^ed
.---4 Usi",3 frr"ng JDac @e &D ccrll Pugo'u lrnrccdrrre
Ct{ F<rr'Jrcro
fcnd,lo3 -fioa Or5's?'jduc'ohjcot' e*tPffi
iP Cafain (rrsisK'1i of)e'aLkloos
Oab$ then toe Caq ]mp)crnen t
possiSl€ coirl &e r*thado of- ra 6tTcrpla
coirb 66tttbacr iDrctP6L6 g''p€rt '
ar( not dltcsl
X
ihcse og,ra,rlon6
Ro,r l"hppex
->
-Io
Poc€r5 one reccrrd oP rbe l?esut r5et oU
RerrLrfuE ohacr^ --> ib P.ce^E *e rnutHple recerrde oF Pes'rt set ohj
P."pr.aSr.."r.*.rutCrc.tar
-_-
Biu€6
&ro ohic* f0 c.reolc and c.ee idbc P"q-"ea6rt*t-t'*o$
cind coe use ex€cr.*ec) to c@ot rh,e PLlsst fmrc<&Ye to) fi'ncnon '
'- @ p" exarnple c,pplicc"ttcro ao (or-{-rrrg pl-fsor- proced"e 4 o't(!t-t" DB 61(o
"€ee'{ Pofe rrro;
@AO A-feoso: @
)-o1c A're
---? ro da,elop Ohrts b.sed ft-tq6Qie slto ;n'lepc#e'rt
Lring soll6uedcs then Loe ne€d fo mcnlccoi/,.r
fBaAoS, 16P lin k ond €-re ' ' '
plcrtD g65c and 5pY,ng ;Fbc
39rt- Ouevies c,n d *rse
So, W rhese PcrrsisKoce
:-r 6pnng ORn wrlule d
ku<'t cn exi6tinl oPr4
crs not 3491t its ocon OPn slto'
slrrr C.nJ lir^PliFic5 1te Prccer 4
yeqlsrc4e Logic oirt Ye &udzed
g6L @uet're) e",<- DoraBcse sJL"
LzEi <t
t"-Jt l- ^*-'"n
?M+H6'
flD6tffn
(e Lo'd;' torl''a^f
orrn sltos lirc ++&'n'*t*
'
fiar its Pro^ride
fSose Setact ofxnaHcrnS ond uJa{uDt (0lr-6
of?ticc*tctn ''fj '+
*' Prgt rrds QD
* @
l{loe lror}
togrc ond- cenhc"{-jzed
R ncrong oP D'ruB*es)
rnuttiPle oPPl'' collooS oPc
p," *,rs
!6 usln5
lelrnAenr E'*<
Lca<MnX urt rd opr',t slot'
f;" +u. lF e'rct;es
ORn 6]co
H;berDerc
ibons
3do
JIX.
'1bpt;oE
6stflple
-lemplat clc{s Sea .
ir6Jeroplctt-e clas6
619 ' o? - oynr, ' bi&;rD-t<a ' lh r"ror<l etnp)6Je
o€'5F'otr.o . )ba-H6, 5q,rYbpC0c"trcropl<rre
oq,sf, , orro' .Ho'trdoTcmPlaf<
afi.sP'or.o ' iPa 'JlJcrnol<tt'<
iq'rf
^rt,roPl,,n
t< ' llPL;nrT-Pl.rc
oq.sp.orro.bib,eroor€ a.Lrat&satcnkcr."gk n 0hrs &s€jcnR'4'""u 4j' p.r trus
JdbcDarcrSarrce ohJ ;r rcryiw d.
lo L$.rle )Ab,&IAe't'PIat< clars oQJ
futa"fr'cn y obj )e rq.rrtd
a
.->
Eeoo
&aq
@no
rbsi
Tlr,f
B;t/e8
gl'ca
JDtsc kd'<.8ctu-c€ obj
t}'"u.trrrrc S.rrl*.,E.t3 oq1 ( b-t&ot'"F"4k'^^d)
*# 6&^ Hibcr'areErnolare
imgrrtenr rnerbcds 4 1-ItermrcTe'nryjt^t
R , Sinatera,o oPx"ollonc :
@
P"r reccrd iPseaic'"'
"*"cj)
-- y *il:
:H[ **.^^
lard0-) I Wa'^t,.I*no 1€cc'd
)-r^ur'-r-+ ft ,dd(
,^-birJ^,*
et t*i'P ) ; {.n ioornng )
oeAoH'S
e^ htE oPto$T'-j-J
fl6,L B$ei ryrr-se)elr o?t"o,J^
urrrU@te kl -+ ^ - r e,,err oy@
*rc'"4 '
o"rrU$orc k) --5 trvrl- '.iH-r.. Eqrrt oytd^
il;r;ff.naxr^tr)
---n P^ |$r- 8c'reJ
,L or"n*.*'
iftratc ('',W
-->
P^ Ho' b/t<ed
I
ilOdute -lll
ug!ry rg"r"
tpringcoirbHibetmreApp;coniraltrDprlog'APPDT€-PYeseofgB'Log;c
aod Hibcfnrc Afpn 'G{:reSenrb Jrraiereoce
L-qlic'
*--> Sp,,ng ood l'fiberrn-re Jnrcgrario'o i5 mrbiog h.r c'cldiog b;utt*"tt lrt6i5j-..rre
:
logic in 5pr;rg appo.
_-> Jb trrl re l*beroa]< 64>r> pef6i5ieDce io6ic io fix,og&rn ctoes buqsiog
5gr;og CRrl rrodure &r need HibrrnoleTe-piore class o[i '
.-, , 1
- 6trrr,9 ufth Fhl*rrr'l<' Appn lusiq Hibcroorc Terop)c*e ctr-ns u-) J
fii6ornqprtpp
Byrffserr Ctind oCd
lPrhere is no *{",tc,t< lcoinfssLogic ;D Spn$BcoD
rr..,.nlJ*n*log;.re
clcts cls B.Lc,g;c 4 rhe St riqgB€.,n
ong 5Pr;ng Cronfigc,rc.Hon Firr qlso
l"na,ntcriniog he tntr;% o? Fhbrrno_rc (crnBgo.rc,l"^,,
',hva ( HB PoJoc tc*l
Pro€cdrrr-e
6icP-r:-
jnPo'-
ftvelup
keeP
jo, 8r.s
l-l,bc.rnte
-/
hJE6__r^)rh.$
6,a.^) _
tn de.tttop tbe abow $;ng crltb l-hbetoc,t< erf el.':co6*
Spnng aod
in c$s6p4ru : 6prin6. jar, bibc'cnre a..ic.y
dg$-r^,F lib Brac.r: ?----------) sprrng ,hr ftres
' t'-------e hi*'o..,'. .ht &lcs
rroa-o class) rooPPiDS €.le
fhbcroorc y€laJcd .t'av ftfeS in CMss pArq orrd
CPg *re #'rro.o;t,3 bcaos in Spng cfo
-> Beao givrn g filbchrc.Soc.rce
-, Locrt &rs,t"lH*j ra...., flvin3 l-$berrr*e Eessronfr,ar<,g o&.r
--J fHberno"reTernplore class as Springka.b
our Spring $can iqlttng l-hhrnorelernplorc ctass o -
Epnn g Inrcr$.ce, SPnng Eeon
f€r6i5Knce l-ogic ir, 6p"ng&oo crass $ ersrng
ll'tcrmrcJe'Dtlc.* ciass o[i
& rt',e OfPo in v6ulcx Yr&nbet'
bfeP-m:-
Jar Eres in
Srpry'-- deve lop
NOTc :- Nrirc
i
B't c
ObJe4
6rc?;[:- Deve]op the renrro'rnirrS'resocrrc€s
Ro tna crbow st-t?6 base d Spnng u:rrlr Hik"nc*c olPh
E-rpplime rLtc't 4tt'ndocrf AiLLr'
6n eo/ oal zort
rePus lbe
Tbe l-ht- 6uev9 $crt is plc"ced
and hj Nl&rrfd payam.
*)Exeat',oX tta,.11.a Nrn,ie;,l,tnrs nf,i po$r;cnal pasa-r'elr.s
gq a2, *.,irc Nahve seL q/rr'! 16ifl1 p0$ t)owJ Paran't<a
zh-n>
"t*l-- - '
Lllos; >
/sql' qlletuJ e6Pg"- #s+N''
LretLLyn clars= -9s(d e ^.^A t!e:lidr-= fJ>-Clg poro rtr.s , -, -- ? and ulc
./t.LcD^1Al srxt+ ;P''; ulc'n< obo"e Lts"dd 7' ' -
zlsq'vqutz
zlh-m>
€ltp-!'.' ettllo< lhe aJfiN llI+;w sar afm4.
io rcr{,p;r,g 8re borr"6 loBic'I rrome ;s czued
"*T:rryi
*)
skfilh.
Lrt
narre =" rutd >
c lcrts =" Uy.n' I >
W5i L l-lttcttx't 3e*
fut/r. ( )
[ ^ l.rcste,, n",u 6q3c+[J {roo,eat3)'
Lxr J= br' g"dBXNavPd t}-'et L 'r
awattx ib: 't' ift{clto'()
"
wluro iL)
&
fiieot+' Mnrd Alo.t+ur SaL T airh Narred Pararnett^t
6lq-ri- pnpart Nanve eat ytv,1 ';ltl, NaLnxd fxta:tt*o"t, )n malpi ^6
(n"
2)ym2
Lclass --- 7
,1cL"s>
&/-1a
LleWn
.ftl4
rlsql-cyr'ttr 7
4h-n>
a &o- u !cr.s u:Ft rt role =: ? r
erco* rhe cLbar€ q/a$!
pAlic Jerarrr getfuta t I
l- V,r- ft
"
iBU rtto*"' 6*"i Amr Named Po'o- f
"+"t2 "
zE'.et}1{ it; '! - i hera*s c) /'
're,
Sm"6 ! I t" ? ;i ,,"' 54Prl3[t r]
fl h inst<r $ogle r*o,<d
L/er ut--oeaa UarCr;
ar -selUid(loot);
&r . scr L/na.nef" p41at ",)t
Ltr. fetPolr C'p.l', );
bt.soue (al;
vef&t0;5;
-'
Wb;re Wnrl";o3 W;rb pb.;n Biklrrrk o1.{
non - &lect per{Gisrertt oPactftcDs rncast bt ..,,.
P;elJ,J-red a5 -lrr.nSacHonal 6t€drrrrnJ6 "
&* ;n .fi"6 lWnrc lhar i< nor YeoYnftl'
P[$]ic Lruatzx AtDdJaL)
l-i* r= hrl. pna 85 Namza 6u , fud Naxned la:'arn ("rutz",r''t'"t
IftY,FL,t iL = !,ituafa< t))
.9'.5[rIt, "
3,nao @1..rl3
r,o'k"e ulvole=?'j
W)tdes obsnadtn ltn cn pao kWna-t< onA +av't **
:
/l tr 6npn- burr< rnrdt6'coFon using il6u
int re,s= bt-br.tr?gdat<C"rtdro U*n u1 ser'o1'rb1e=-1
nw Ohy*tl{
ng.r'l
'i.r{);
r<atcd6 *at a,< u?&xA" *):S,o'p("n0.4
rekfn ib;
lliy'lrr,ara-templale cla'rs
{ne 1,,'-,n6 lafunvl oyratlonl
-)
{nt &-YSuo Dqet*'
= = =,= =- =::)-':l::l- - - - - - -2 Tii!e:Spring with Hitrernate App {4#,sd€t
L2)
13
14
{5
16
17
is)
1q
public int getuid( X return uid; )
public void setuname(String s)t uname=s; )
public String getuname0{ return uname; }
public void setRole(St.ing r){ role=r; }
public String getRoleo{ return role; }
20 l*
2L create table users
2-2 ( userid number(s) primary key,
23 uname va rchar2( 20 ),
24 role varchar2( 20)
25 );
76 */
zj -__,---_______ -_rrser.hbm.xmr-!hgs_*fr_i:_s_qs_____
28 <?xml version="1-o"?>
29 <!DOCTYPE hibernate-mappins PUELIC
3O t'-
/ ,/Hibernatel Hibernate Mapping DTD 3.0//EN"
31 "http: / / hibernate.sourceforqe.netlhibernate:mappinq-3.O.dtd.i>
32 < h ibernate-mapping> f'tPotr6 cr6l S
-+,34 <id name="u]T-column=..userid" />
l5
36
37
39 < / hibernate-mapping >
4rr -------------- -demointer.java-EPil&r$-tl!*!9-:-------:---
41 inrport java.util. *;
42 public interface demointer
43{
13 ,
ouot't rterator getDatq{}-
fus;ncss mohod, Decramfiqd)
Page I of 3
48 import org.springframework.orm.hit ernate3.x;
49
5O public class demoimpl implem6nts d€mointGr
s1 {
i3 f
private HibernateTemplate ht;
I fo6;. to ioj..,
21 { nubtic void setHt( HibernateTemptate ht) (, +;bet rrat( Tcmplotc itc..Si o6y^6 .
;; Jt this.ht=ht: | ;----ful
s7 Lr ,) *1.^rs l_.!l*leL58
-59 public Iterator getData( )
60 { r---t H6L g,ret)
t1 List l= ht.find( "froin User',);
62 Iterator it = l. iterator( );
-63
54 return it;
46
47 import java. util.+;
55
56
67-...--------.--....------'----.sprinqHB'xml.-.--..
68 <?xml version="t.O" encoding= "UTF-8,'?>
69 <!DOCTYPE beans PUBLIC "-//spRING//DTD BEAN//EN.
'!httB: /./ www.sprinqframework'orq/dtd / sDrinq-beans'dtdl' >
70
74
<beans>
<bean id="myds"
iitlJ!:.[]tl"t,"gframework'jdbc'datasource'DriverManagerDatasource">
gNc$
JDg C
U,ra9'{rJ'9;
ohre* 33
(rur,$en{Tl
77
L04
ios <bean id="template" class="
106 iirii."v ".le=i'sessionFactorv"
> <ref bean="
1-o-1 </bean>
<orooertv name="driverClassName">-
?"Jr""l o.u.r..jdbc.driver'oracleDriver< /vaiue>
</propertY>
< propertY name="url">
?JJt-ueliaui:oracte:tnin:otocattrost: r szr:satva</value>
< / ProPerty>
<pioP".ty name= "username"> -J
<value>scott< /value>
lprop€rty>
104
Org snrnq i6s C<bean id="d1" class= "demoimpl">
""-]-ll].1t ro { <propertv "J-t-=l
t*"t <ref bean = "template" / > </propertv>
lfan(otbfi$fD!. < Ttrean> l- y@ tioeno:lob
inf,Ldng lhlilBol. l (q0bt-€ (lc.ss obJ
113 </beans>
114 -------------------------------selectservlet'java
1i5 imPort javax"servlet'*;
116 import iavax'servlet'http'
*;
rce {io€ no; *q
iro ;;;;;;s.tp.i,,sft"*"*o'k'beans'ractorv'*;
ili i-'p"* ".g.springframework'context'*;;;; ;;;;; o.i.sp.ln!f'amework'context'support'*;
i;; ;;;ll;.1";s selJctservlet extends Httpservlet
111
,r"0,,.
void service(HttpservretRequest request,HttpservretResponse response)
i;;'throws servletexception'roException
t , { Pritltwriter out=response'getwriter( };
;;; ' svstem.out'printlni"tn seivice method of servlet")i
117 imPort java.io. *;
1fS i-.f-.4-grgirhit'"'rffi
119 imPortjava.util.*;
13'3
t?Jpti.utior,-co",textctx=newrclassPathxmlApplicationcoht€xt(
i1i {:K"*'ffi;tr{ffi;U6t-ttsiveast"^xw4'^
tta''<
;;3 lterator i1=d l'getData( );
;;; out. piintlnl"<ooav- og""toi= *rfffcc text-= red>'l):
13s out.prlntln("<n iJit-t'oiuttafr users< / h-1>.<hi> <br><h3>" )i
;; out.println(;<tanlslvicllh=8oo/oborder=2>")i
1zz while( il'hasNext( ))
13a {
16?-rrr,r l68icro disptatd ret*Ls as I'lrhL+'hl. VffiSffi*,in Ur'L"
Ft's'ncts nvd.ccls af h;5 &ct"
4.39
r40
141
142
L43
t44
145
146
L17
144
+fe
tF0
151
ls2
153
1,54
L55
156
157
158
1s9
16()
161
162
!63
194
-+6 5
166
L67
164
User u1= ( User);1.next( );
€ut.println{"<tr> <td > ".} ul.gettrid{ )-1." <trr>" +u l.getU name( ) + "
<td> " +ul.getRole0+ "< /tr>" );
)
out:println( "<i/table> " );
)
catch(ltffiException e)
{
out. println(e);
e.printstackT.ta€9();, ,,..,"., ,,:
: ,.
i"l:i-
<?xml version="1-O" encoding="ISO-a859-1"?>
<web-app xmlns="@"
xmlnsixsi=" "
xsi :sch€maLocation= "http: / /iava.sun.com/xml /ns /i2ee
http: / / iava.sun.cohr /xml /ns/i2ee/web-apD 2 4.xsd"
version="2.4">
<servlet>
<servlet-name>select</servlet-nam€>
<servlet-class>selectservlet</servl€t-class>
</servlet>
<servlet-mapping>
idervlet </q€rvlet-natI|e>
<url-patterh>l!!!
< /servlet-mapping>
/r.rl rl.0qtl6rn >
</web-app>
SFioSt+gAeP
696 -r,NF
clcss(6 .-J
Lt!€{ '.t'(s.5
6Bl€.r6c' {l (t '
( lAl S
tilart'hbm'^rD
SprirSDB xF)
fLdi c
l
Lio n= hr. Fna
Jtrtrzr
3
t€icq D
Exe.r'"Hr) g HgL &tet't
lltbli c lfcrotar
Itqotcr gerDrat;
d,,,Jf"'Jiy:!:?
d"nol",et - iiass
liu.*.la.,i"n
t--r ilibrrrrrtc lcrr 6r<3
I --* ofD(icw,,ic.r 6t<
Hib€irn}c?mPldJ{ clcae! .
ai!> = i ord ui d <=l 1
Llor"-- ;j
Ftfqmet<i
JorFret in cga:pAn+ : scrrl€l._Ap;.jcr.,,
+n"t,r.h*jr,r ftrts ;n ilE8'.rrocli b htocr .. e _____-,
"p"n,;o6r.s
l1ore PexSitEn.e o?e{oH6rr5
S crS;o
3
r) E^eGir; og HAL 6€.EI'! 1u 6j coi+ p6i 66rsl PcL,{.(rnef(Jrs
[ " Poto {se,r r,oh.*
L.ittrolrx(-)j
nurr Ohiq,t tlt't."*3 );
lrpo--4o' r&f..S
ir:
;r )
+)
%d)t rorh Nanled P&rcrrnefo(
g(tDttaC I pase 3 at 3
U
,,r, ,-, ht.PindByNr,,oede.^.- (" k*n Ustn r,oita,.
'*3j
ard uid 4= l'fa', n&o 5r"r6tlfll'n
,r,'er,,?^ it = I'ilcraf,6i),'
G no"ta p"r'meSlarr
cbtldJ liDo'r,ol)i
.. ft.lzan iL,. .:
L.)
[8rt+r)
WLb.nml
Ex€dt'in q Mq.r€d H6'L q/aaB to)rh frgiil'rndl Ftctrtefu<S
4'
-:.::::_
Slcp -r:- liJrire Naff€d HaL qr'!3 t; *o")og rrc'pe) q Sre
4qtu"l,
4h- .n>
ereure *c abIe +o'Lquery
pir8ic f,,tuat ,t 6aD'tat) -.$ v - 
t
,*.
''
h+' F|"aftM'*a 6"o1("tr"rl nt- O$"r11 l'l'at 5
"1
'
fu6-nJ'^ '1Y -- !' )'t<xala'C> )
Kram ;t;
Lh-m>
z)ass --. 2
:
zlcsu{s >
/+eZ mne:"Lcsi$ " >
4to- lJec" cts rnltrt
o
,r5..n1g liEe I
and ur'uaz=:b Jl >
$?-{ri
fiunnq Namtd lr6t-@-(l-t
sry]-;ri r,t{,^'r( t'.w..d HLdfltd ;o nl4flru (;tc htL:rnX
/h-ff.>
Afi'cA
I
,/ rlcOATA
Lc.larJ ---7
4ctcrgt>
[ &t Uit"
" fatL' >
ub @heYe ttb'ctid >="' Pi-
sk?4i
===::
. tlapr4z
th,-
^,
uro,x tL" o'br( ML+unJ'
pl>Iit fu6"At{ trDd-"
{
L,s+ r-=-h*. ft"r 86 Na'ea o"'r An J M'^'aP^"' [
]"#; n;smffil
i;':"1 ;,'
f&tzfiri i+ > I . Ifcra,",'- C) )
yelurn it )
l1;&rrnl<Caub<ca Q;4execohng llibe.mte Pe$i5ftr}ce Lo6ic 4 Cri tcrlaApl bU c{5jog
Spo6OPn rodule.
Brblic Jrctor,x ffbrztL)
Ll* g= [Liot) bt' e^ec"rc (neoo l-1iue'ooreCar-ob"rrC) [
prric OhF'i dotroll'beroale (5*t'"' sen) {'
ll A,t;o A?t I',.,sLd Pers;sta'nce
lo6;c
Grte';a cr; ses' c..'oor.Gra,io (Ue"'cr"'ss);
ll aaa Co,',Atcn
Gle; * co'nd = PestrtcHcrns ' l;tse ( "lole ", " '/ P'r" )"'
CF'add (C"t'a ;;
/l exer"te lo6;c
l-.t3i "0.=
ct' lisi t )i
tetutn 'L',
Jllncr+A
Jll;nncr
ctats
)'' il"u^"a
I-ttratzn it, = !' itevttu L))
y(farn it',
l
l
4$: rn the o.fuve code ht-ueto.,x().{ne6 k caued h""n5 dLnc'nomQs innuda*J
Ohreq thdf ;rry)ternenK [lrWr"XCoufuc* (t1
16 e^eutl< *ts Cocle plare fr fortoui.,y jc,rPites iv't'rhe ctasparb'
I
I
(Ss"g..1ar
I h'Or,*t - ,o't
( 5.rn 1a- -a,41
jar
-a rr.t 5p,rng ru;rl-r Hibp{rute appli(afic,ns ule cdn tcrY-e l}'ts{nclft CanfiXuraHcn
€'re and
D,'" ^,'*- VolJrrUJ w"" a.e rnc,st !c
- p snparrtS , tl,tn l-ir brr nalc G-fur''radcrr ht
Sfdng Conft5r''ro$cm f'te s1;arLrtJ' YILn rrr'
0l^.^,.--r-.7sr"n3 LUrrtrJ--
P '
'
''- ']'- n^-at'r"tt l"'rn*on ivigo{t
'4
w"*x&*v4
l;npea LDlrt, Spng rnfu ftre 4 uoni Coak6r'* Locanon avoYa(ry
Trrrlrvs Situc*on fkr< isno nted 4 grnfiXr'ii$ ke'nttr'l gfru doraSxrce objc'r-
in Sp';nq G,^f.3uvaH.* f,rt ,
EB-INF
P )t.jal
Nc-b. IrDl
Revtsed Spnog urid-, Ihk"lat_ thjt--P*"*g c)&6s
$".5HBAee
J----------------+
l.J
ClAsg€B
X ,Jovcr
f+)
derrointc,r , c 1,"*<
derrrrimp I . clars
SP'tnghS.xrn'l
fi;,Utta,rc. cfu,lmt
(I&'bbrn. 1pa1
U[<lr.ctctrs
> 6ek*&wt*'ctali
)
@po e*o,np,"
tPel ibe
;u
I
hiberod.t€' cfu. rrn) :-
&rm ora lri*rnalt 6o-nf[crreHc"' Bre
t'iqHg x-r
z-lfucrlPE
4trDrrn rprDe=
LIfuo>
ZIXooO >
LLf..a id -.rq56as]coTac.lzm6u cuos. of6 '5r'inskroecDc,,(p.6rrrr.}uberra.te3
.*t:
JJ
eam e ora 'lli bcr ncrrc-Ttnnplc're'
teaa prei&s o?Pn'
,
-/
finnq, hibe,nofe ;^Fc6rat&/'
zlbeons>
*
Arggl-o."n.r,' v4lue="ct?ssP&lfi ''b't4t'nle' tfo'xm "I >
krod"-rp ctassu Corft3 uwjtoo
C{p(lcorton crn
SL{SlmC ncttz{v3
onnotctllcios baszd
{t,ndocrl-
6*^
(sw"6 a, bibemorc + )
orl oaf zor:
Mo&rle -iV
3pt,.rr lPg Plodule
.LE
9ive3 APdicahic'o Co'w^t &nr<nrfx
qqo@@
JT
50q0
t
Igc+ - lqt{
-'> l4at.',ng &rr clpPttcct'Hcto execrrh'r,3 oo Cerrcrin oara cnd g-e orl'er ol$
fi" one hme ot) P^ rnutriple hmeS is norhnS bt'r €nabillng
1t'o-*
on $e apptic&.*cm6. dhire &aiJ"3 cottb 'iirrerr-,rr-t'o aous ftjs et''cd-ltg'
r5 Verj rrnprrn-(ni-,
ExampleS i -
Sffdin3 r€mainder,g an the lstoP e*-monrb'
c)eaning Temporov5 $res ewldru d lt'o'clocL
,^_ F* fbese oe-.alio$
Ne can use T'tT vTctsK,
-[ime
r Clas's ctp idk envitor'rnen]
r
--> The Java cnsS thaf exteods Proro TimeTasta class def,'nee *'u iob oo cohjch'
Coe ore PlcrnninS io endbte Sex!ice
__ The Schredr,ted nfJhor cr| In'rr ctocj can erp'ble scbedr'un3 on the iob
!
& idK leuzl ltrray Srvice anrpUcutton rek,t Of?lia3flor)(O e,lt. P"3::,'9
rrnP5:
-
..-t ,."" :: lnnlr.l.,n r.r pnr.t,ta ri.rrn +]lice "d Cq"'t4+S-fqtz
The log;c on ol"uc,F, Ltr aft lool';n3 lo en'ebtc lrrc'r gx
Tnitio{ deleS in5 rrrilli irrrnd3
SFd615 in; Hor dalag"
6 s6c;6cs lne rrmc 0ep bluo * *&"Jf.-*
" '
povides ctbehacdcto Lrge, *, &varrrdl o+ ?r^ mc'i)ing operaActrs
provideS ab6hraortcm tagu ott i.rs €" rnessag)og ope'raf{cm5 '
fJr,ivldes crbstrocHoo 4o^ tmi, tdelrsew'tln t deveiP d'F;t'rc'l appticallo"<
g;ve6 dire* dist ltr*ed terbrolqS cruecl HLTPJT'voEcx '
-ll'rr ba-ced schedul;n3 ovaollcxt3 '
obsl-racrtcm Lcrdcr orr ind; 'io ioierac* co;rl Re6rsrt5 6spttr'res'
erc....
D
?)
3)
1)
5)
4
+)
fop'*
prDvide.g
and
ex€(!d,( rhe .fbb ctn S peci€rel Dal6 and ima
odvc.ntag% o{- sP"n5 $ned-ti'r6**tt* lr'x" *, ildts Eut, schedz.trnl ao cl
$ivea the fttrrcrtng benfirs'
Ollo(o5 io PetF.- &}edltiog
SfreciFt
prPorrn 6chedrting
ttcr rrrcns da36€a
Schedt urrg
oh rrrrtHple JobS'
",etarcd W@Y{f,1<'{6
cFrla'rc*ive lX usrnS xr4l BleJ:-
on rbe urc' dePrned flxJ&se' ur-ndeftrrd
ner.d not b be etrcrr}.A Psc'""
-llrnaiF s V ctatj
lfrrte ip61p66r1t beont oP €fr'ln3Based TirreT ope'aficios'
o 0rg. €p. shedurifrs. tirrr-r--hrrerrFcrcroiBeotn,, __.-_r J
[S*"a fuWT'rrr" 6e*rlire h]bren 6nit'..ner is stcocca 7
@ otg'sp. srhd,tin 1" fi""r' 5n*-iltmez-TasL' .,
-r
regrerrri6 the Job "n
cpkrte|, @e trctt,'r to eoa',,'e avtvtt *xvice,)
-'' -.- -,,.^-e
'--r 1fu'a iob musrbe tt*-te inaiava ac't rlx* 6*coao ?-" Tit'u-fust^*:
--1 Yegeir-firslhe job dn eohich ur uYLoJ to s*bIe -hvrr-'t &{ui ce
---t -tttr-5 Job cat' Le lbe€ in a u*-^'"g''ntd
me-o,d & uxn-&hwl datn"l"u''
Pcr 6prriog k sed CI)ealalllng exarople O{?Plicorl
do6 '6L91" o{P'i&"Hon l9'>n c:? r1*
:
Fte no's 68 io fu _/
0
@
@
:
&t$o5 to
0llo(o5 ro
clc55e,) .
',J
,,/
SpringHBAppAnno
l-----.-----*-'wEB-lNF
l----->classes
,_1i-:_':
l:
anl|l-2.7 .7 -jat
commons{ogging.jar
dom4j-1.6. 1.iar
l---------'pl
I l-.-----'Demolnterjava/.class
I F--- ---tDemolmple.java/.class
I l----->Selectservlet.javal.class
I F------>User.iava/.class
Taloal'nt5
312312013 9:22 AN
,pt Bres io c,rxssPA Ttl
j^0x " Persislcrre - jaY
ai(.'sP ' @$<at qrff jcrygrf -5 1 'aELJ
orl s9 a",rt"t'3'l l tzE Ls&s E J a{
o,i sg ' bens -l r 't PbE-lsE ' J6'{
orX *e urt - 31 1' W)l.As e ' ; o"l
hg"'nc*e-c""c - +'t't Fn<'t' ic't
qpr!!t.!4
I
.2
4
5
6
7
B
o
10
11
12
" 13
14
c15
0ro
117
lrs
I rg
lzo[ ^-
i;
24:
25J
26
ize
)25
1:o
lsr
'l zz
/ss
lza
lss
:o
37
38
39
40
41
42
43
44
45
46
,47
48
.49-50
53
54
56
59
'60
61
:62
63
64
65
66
68
rtl-----I F->SpringHB.xmt
j-----'lib
I l__-_.C.jar)
F->web.xml
l5-2? coltc$ Prom bg"t.sr< + 'l'
)-e,5 cotecr P',,.6 Jc!.rFj'r der' aorn
P7-8b Cbr'eL* ertra spnag6)
hibemate-commons-annotations4.O. l.Final.iar
hibernate-core-4.1.8.Fina!.jar
hibernate-ehcache-4.1.8.Final jar
hibernate-jpa-2.0-api-1.0.1 _Finat.jar
javassist3. 1 5.0-cA jar
javax.persistence.jar D
jbosslogging-3. 1.O.cA.jar,
jboss-transaction-api '1
.1_spec- 1 .0,0. Final..iar
ojdbcl4.jar
org.springframework.asm-3. 1. l.RELEASE.jar
org.sprlngframework.aspects-3. l.l.RELEASE.jar
org.springframework.beans-3.1.1.RELEASE jai
org.springframework_context.suppo(-3..1. 1. RELEASE.jaT
org.springframework.context-3..1. j. RELEASE.jaT
org.springframework.core-3..t.1.RELEASE jar'
org.springframework.expression-3. 1..1. RELEASE.jaT
org.springframework.jdbc-3.1 _.I.RELEASE jar
org.springframework.orm-3. j.I.RELEASE jar
org.springframework.transaction-3.1. l.REaEASE..iar
Demolnter-java
package p1;
import java.util.';
public interface Demolnter
{
- public lterator getData0throws Exception;
l
_D:T1T!1*
package p'l;
import org.hibernate.";
import java.util.";
import org.springframework.stereotype.":
rmport org.springframework.beans.factory.annotation.Autowiredl
@Component("d1")
public class Demolmpl implements Demolnter
t
@Autowired
private SessionFactory sesfact;
public void setSesfact(SessionFactory f1)
{
sesfact=fl;
]
public lterator getDataOthrows Exception
{
Page 1 of 3
-
sprint.q! 3D3t2013 9.22 AM
Session ses=sesfact.openSession0;
Query query=ses.createQuery('from Usei');
Iterator i1=query.iterateO;
return i1;
)
69
70
7'l
72
73
74
75
76
77
7a
79
80
81
84
85
86
87
88
89
90
91
92
o'l
94
96
98
99
100
101
102
'103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
taJ
124
125
'126
127
128
129
130
131
133
134
136
-!-:li_i1t"
package p l;
import javax.persistence.*;
@Entity
@Table (name= "users")
public class User
{
@td
@Generatedvalue
@Column(name = "userid")
private int uid;
@Column(name= "uname")
private Slring uname;
@Column (name= "role")
privale String role;
public void setuid(int n)
{
uid=n;
)
public int getuidO{ return uid; }
public void setuname(Slring s){ uname=s; }
public String getunameo{ return uname; }
public void setRole(String rX role=r; )
public String getRoleo{ return role; }
)
DBTable
create table users
( userid number(5) primary key,
uname varchar2(20),
role varcha12(20)
);
SpringHB.xml
<beans xmlns="htto://www.sprinoframework.orq/schema/beans',
xmlns:xsi="http:l/www.w3,orq/200 1 r(MLSchema-instance,'
xmlns:context="hlto://www.sprinqframework.orq/schema/iontext,'
xsi:sctlemaLocation="htto://www.sprinqframework.oro/sctrerna/beans
htto:/,Adww.sorinqframework.orq/schema/context
htto://wwwsDringframework.orq/schema/contexusDrino-conied-2.S.xsd',>
<context:component-scan base-package=,'p1,, />
<bean id="myds" class="org.springframework.jdbc.datasource.DriverManagerDalaSource,,>
<property name="driverclassName"><value>oracle.jdbc.driver.oracleDriier</value> </property>
<property name="url"> <value>jdbc:oracle:thin </value> </property> '
<property name="username"> <value>scolt</value> </property>
<property name="password"> <value>tiger</value>
</property>
€laltdn/ed
l-a
*eu":^H
/ksrh4 t t{
</bean>
<bean id="sesfact" class="org_sprangframework.orm.hibernate4.LocalsessionFactoryBean,,>
Page 2 of 3
J[::'.5..*'
sprint.lxt 3/23120'13 9:23 AM
lirk ctrerl^,e.e in' P,
' Poc
139
140
141
142
143
144
145
146
147
148
'149
150
151
152
153
154
155
156
158
159
160
161
162
163
164
.165
I Ot)
.167
t06
'169
170
171
172
'173
174
175
176
177
17A
'179
'180
181
182
.183
184
, 185-
186
187
188
189
190
191
192
193
194
-'195
196
197
'198
'199
200
201
202
<property name="dataSource" ref="myds"/>
<!- use this to avoid configuring mapping file->
<property name="packaqesToScan" value="D1,'></orooertv>
</- Lrrra*"U *f 6frnn6 Cor*ainey ftL%tu z;o3 sll
</beans>
cl.r9 s€8
the F€*.?
::::l:tl:lj"*
package p1;
import.javax.servlet.*i
import iavax.servlet.http.*;
import java.io.';
import org.hibernate.*;
import java.util.-;
import org.springframework.beans.factory.*;
import org.springframework.context. *:
import org.springframework.conte):t.support.r,
publicclass Selectservlet eldends Httpservlet
t
public void service(HttpServletRequest request,HttpServletResponse response)
throws ServlelException, lOException
{
Printwriler out=response. getwriter0,
System.out.println("ln service method of Servlet,,);
tryi
ApplicationContext ctx=new ClasspathXmlApplicationContext(',SpringHB.xml");
demointer d1 =(demointelctx.getBean("d 1.');
Iterator il=d t.getData0;
out.println("<body bgcolor=#ffffcc text=red>,,);
out.prinlln("<h1><cenler>all users</hl ><hr><br><h3>,,).
out.println("<table width=80% border=2>',);
while(i1_hasNext0)
t
User u1=(User)i1.next0;
. out.println("<tr><td>"+u 1 .getUid0+,, <td>,,+u1 .gstuname0+' <td>',+u1 .getRole0+,,</tr>,,).
i
out.println("</table>") :
)
catch(Exception e)
{
out.println(e);
e.printstackTrace0;
)
web.xml
<web-app>
<servlet>
<serylet-name>select</servlet-name>
<servlet-class>p l.Selectservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>select</servlel-name>
<url-patlern>/selectaction </url-pattern>
</servlet-mappinq>
</web-app>
Page 3 of 3
Io 6frr,.,9 5.! [tibel oatcTemf]afe cl6ss l'tc
l+iberrnfe Sessi-faoz.T ohjerr l" 8fr'5ilec""
brcn dqn cct+ea aod vemot rrd so, i D;€LI-
olUte cooru,r6 c,r;rt Sl*n3 a ( l'r' Uroo,he +
C.trhb narttoh -
-> Ltlrr Ba$e
'r€f5hv
.TcrLi'l &rvCr
*) Jovct Opplicolltln
-----+ Jc(Vct d0Pn
.tava olpn
Ftvcr lt,i I
S/ur rrro,ol-c..io6 re(or dj'
6lut rr&ia tctins Ohjeo$
rre;nfcrio6 erDci l CtccounJ6 O-.rcl '.Xssc.geS '
U€e6 idbc 6rP;
DbSf ir; (o'raue, 'sujtrse
c^oA e+c " -
)uses
Jrtl c,fi
Jala roai I 6rp;
icva rrrd t af; rn€ r(r:$
DB sllo| , r,rlc-lo Seru<'{ Scos
a4dr€J
Qgtst'g d,o (w@il+e*l- jSpss regrarg c'r'd *c"-)
llcl,lt servert slo [ &mes fta*-ser *t,Ui-"orn1ey'bffi,
iavax-rrctir , javax 'r'rtl I ' iDt(ln€J- ere (Oa' t & Jzu- -tdttr e-
)
crze rDt responsib rc fo efl:ril c+cocurt'l's aod eroa; I
--> ttrX arl- troo tgfxs nrd ) 'ticnts
D AoaX llade rna;t cucnrs (rlecur*r 'fl6atlavexprr5s
,,bt<'s nora )
z) lJ.cna66ble nail ctlcnrs l*t'o &^va,.r,a; oa'i uriti za{*)
UndersrandirS n-rdl S€:rve-Y
or I 6e'i ve'{ (rrac}une ro)
frrirninq &r!et ( lbPa ltl.4AP 6argo'oQ se"vor [nre)
Accoct ot r
]----+ aNBox
UJe5 Jovayrrd, d?;
f,l&i, cllcht
ancomiog 6arve{ i5 resPcno Sibl e
inboxes o? errrn dc4l)(rnJ6.
CtlSoing b{t)t i5 Y€spr,tlblt
to CtnOtber Lfiou CLcltatrt| .
fo Ytcrr't.e Ond monc,ge 6 Ei I messcls €6 hD fb e
'-)
$grLtd drlercl lhe err'4il ry11ssare'i {}otn inbox onne fi
to 6end err,cf I rn€Jsc{A'z Pmt'> dne en:rl) 1 'L<abQnt
elraril rrrseffA ip1 $e lnbox
SLnftLbLe k"t }l1<xnef 0r'-ael
----t
--'+ PoPa incornlD,
al€
-lhe
,-d 4
rno-rl cJiorrs' &' lt ls
&rep lnCDroirtg Selt'rtt rrain'taino
1.htl c.re
a?to{ {ead {fum inSox, 3o,
+^ inlrcrneJ rnoi)ing 64+c,rn--,t
i
aagang
r r se ft.r-{
rhe
;t i5
3;wn
mnitin3 Oporcrrlo'ns .
ESI- iLe Wt^'lJ ' Gltoil'com
i
---1 floJ clienrs use Poeal rm*e ?rDt0cols ta infc{crcf
& rrt'i &fl€r6 '
P0PS
> ,{)o'st 6Peic€ PYDtocD
Tl4ftP-------------":'*n*
l1:rt y'ccess pzrfoco'
I l.lc,,tlctitntt ust sr',rrP frt0rocots to Jnfct'&r*
6+ no.;1 Sevu'ed5'
SMTP---------n Simp)e 11411tt'nsF'v potoco '
@itb inccr-ning
Setrucrr6
(oi$ &rd"tt(n6
!
gg '---r Cq lan CUetu
b< r bl;nd &/&sq cliu'a+ '
'Ibe Strucrrrve oP E",olt t sg
To Fom c c bcc &Aiert
Darc aDd ete," -.
I4f e&nEr$., -" - . "
A$acFrrrfr$ a
Altad,m enl- a
&mes
l--, fg fe :, llai I &..ve.l
' e{5icrn : 2'^
vcnd o{ : Afcdo e
dePcu'tt Pc'f no S
644 6drnio Ccrnsote : 45b 5
ft'r POP6 incDroiog &tutd i llg
Fttt SnrP &riSoing Se'flrer i 25
-----+ Tnsrax crti(n 1 VIYGLI rhe zip +ir insrou 6't-14"
To enrt he Til^tl 3€1"e-{ : L Jame i-bo-e >tlt tc'o'bc* P;te '
4 sl,,:.
in JameS rrfrl I Se'rvc'i "' -
prccedo-e to cr€c$e errni I AccscrrLlrg n-}cnuall3
5rcpJ :- 6fnr rbe Jatr6 #'' vd
n*t*'fo csnnef tosto.l-]n cm6o1L Q lrar*s xt*n
sl-r.rt
--'
{uf)+ tglne}
-------+
Of€n lOCc'-iboS f 4-5bb
lqin id:
r00t
Err6cctCrr d "'
106 t
fuetC666 le6t.
letp
G ddtrst^r
6dduS e'i
' lislus€r 6
CarctruQseY 6
deluser 164ri
U5ti r&vi deleffd
Sesaro,n ohieq oP 3vc mol  API
rr0J l Server ' To cware thi 5
prD00,r'3 ncrrnes ar< ftxed
rn&r) sei'vor de u6t '
-rovrrarie .,- 9**'
Srttanr|, 6tiranrl''
fi-rn i rrftzi
feoree'1fs
tar*.,rr obj
.ioe Cotonechvt
r5 Lf-t(i€en iol!- a49n otl J
of, neecl YrpLl  pmlre*ies ond the(e-
cilueg toii uct'Ulrrg bctsed on rhe
' 6 P," exampte opplicatlon on Oalrl Flclrt
^px
6oq6) p18eoo'6 opp'r) no,.
-) lo r€o.t w$level mcd l crypti(atlaos rhe &vq noi ) APr Code ul;tl te Tre-frrv q in
_ V&,brescrurre pyogram B like &:''''trcf ) CsP. to fuErnr, vrlJ | 67vaa tls1g 616 erncti
Oatotrrt15.
Detairs oP Gnor t rrsi I 5e'rvcr
"
-
.
gd
Boro€ eerver mrne- : SnTP ' CnHol I " com
MJaQ pol"r cur.hr,,r 4 cxrhSoiog ee{vc'f ( +b5
frf,oml og Sew&f rf.m€ : poP ' GrDorl t ' Co rO
fryDml og &'rvrx pornurnkr : qqs D
P"'Pvio celo rrni I APr bdsed o'Pr'}6 ro i nrcrrg c-oltb |I)drl se{wr c'P cnmol I Yerov
o{'pltan$6r} € io opto 4 tbe ;;;
+.h'Jd'r thJ('l
c'4 o-tlcnf '>"re
.:
anloa i"o,u
312512013 5:5O PM
message.setconlent(maitbody);
-r &tting UoaX *tHJrn.ge ccqnfc*
ood ntrit.iot $'le b rbe cLAsspAftt
1
2
3
4
5
.6
7
10
11
'13
'14
15
16
l7
18
19
20
21
24
26
27
28
30
32
34
Jt)
37
38
39
40
41
42
4J
44
45
47
48
49
50
5l
54
55
56
58
59
bU
ot
62
63
64
oc
66
67
6B
Java mailApps {rrginq plAI D i:av(( frIj I Apr
)--App1
--*-----*----- -SendAttachment.iava-::--9--l--------
Java Application to send an E-mail with attachment
import javax.mail.*;
import javax-mail.internet.*;
import javax.activation.*;
import java.util.*;
public class SendAftachment
{
public static void main(String [args) throws Exception
t
//Creating Properties Objct
Properties properties=new Properlies0;
//adding protocol,mailserver address & the port number ofthe mailserver
properties.put("mail.transport.protocol","smtp,');
properties.put("mail.smtp-hosf ',"localhost");
properties.put("mail.smtp.port',"25");
/lCreating the Session Object
Session session=Session.getlnstance(properties);
//Creating and configuring the Message object
Message message=new MimeMessage(session);
message.setFrom(new lnternetAddress(,'sachin.l,,));
lnternetAddress address[={new lntemelAddressCdhonil',)};
message.setRecipients(Message.RecipientType.TO,address);
message.setSentDale(new Date0);
message.setSubjec("MAlL WtTH ATTACHMENT,,);
// mail body obj
Multipart mailb'ody=new MimeMullipart0;
-+ represe,rts rhe emPB bodrJ c(- *t€ Endn| m49'(3€
// mail body partl obj (text content) .l
MimeBody'Pirt partr?ie* rrrri*eg,jovp"rt(); I aadlno p&!il tb rnesqSe bod-5.
partl.setText("hello see my resume'): ( "
mailbody.addBodyPart(part1): .)
mail body part2<attachmenl)
FileDataSource fds=new FileDataSource(args[Ol);/A
MimeBodyPartpart2=newMimeBodypart0; (
part2.setDataHandler(newDataHandler(fds)); lpart2.setFileName(fds.getName0); I
mailbody.addBodyPart(part2); .)
represents attachmeni tile
c{ddiog Pc.Yla to rn:sscge bodX
//Sending the mail_
Transport.send{message);
)//main
]/class
//>javac SendAft achment. java
//iava SendAitachment one.txt
// Prgs on plain java mail api (with Gmail Env,....)
-*-- App2
//Mail.java
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*:
public class SendMail
{
public SendMail0 i
Fase i-itio
TB-?4 tnardt rcn; (,-.Nre a!.cn b-.o5 tDlt+' tol &niil Se-rv€r '
public static void main(String0 argsx
SendMail mail=new SendMail0;
System.out-println("mail has been delivered");
llmain
)// Mail class
>.hvac &rdtaiit' jarv a
3/25/2013 5:50 PM
69
70
71
72
73
74
76
77
7A
79
80
81
82
B3
84
85
86
87
88
89
90
91
93
94
96
9B
100
't0t
102
103
144
105
106
107
108
'109
110
111
113
114
1 '15
116
'117
118
119
120
121
122
123
124
125
126
127
129
130
13'1
133
134
13s
136
trv {
ffirTffifi::ff! new SMrpAuthenricaror0;---? obric <t c*r,gtn &t irrrx clclls
Session session = Session.getlnstance(props,auth);
//prepare mail msg
MimeMessage msg = new MimeMessage(session),
//set header values
msg.setsubject("open lo it know if'), t isizav.{ 6 grd'i r . (oD
msg.setFrom(new lnter netAddress("sa+Y#+*+@eBrail-€em")):
msg.addRecipient(Message.RecipientType.TO, new lnternetAddress("!A!aEz(@goa!kg$"));
//msg text
msg.setText("mail from satya");
Transport.send(msg);
tftry
catch (Exception ex) {
ex.printStackTrace0;
]/catch
)//constructo r
private class SMTPAuthentacator extends javax-mail.Authenticator { -1
ioncr crass k"'io 9-
public PasswordAuthentication getPisswordAuthentacation0 i L arrrl,r,'.t'calloo
lcJ; c
return new PasswordAuthenti;tion("satva€ffiil+23@qsaitinm","ra$t2€e"); L.l-^ .-, *,* -,* rDcdl.nrn/(.5
]/method t€st zov. tesri."o lt"ir. &4)c )s mqri)
)//inner class ,/ ' '
odd rrra;t"iar in be cL'AssPArH '

import java.util.';
import javax.mail.';
public class GetMail {
String host="pop.gmail.com": g512aya @gw . rom
String emarlfrom="satvaemaifi 231m€em" :
Sting passwo rd ="iavaj2€€-";
StringPort="995", tLstJC'v"
GetMail0
t
Properties props = new Properlies0;
props.put("mail.pop3.host", host);
props.put("mail.pop3.port", port);
props.put("mail.pop3.aulh",''true");
props.put("mail.pop3.socketFactory.class", "javax.net-ssl.SSLSocketFactory"):
trv {
Authenticator auth = new SlvlTPAuthenticator0;
Session sessioo = Session.getlnslance(props, auth);
Store store = session.getstore("pop3s"), f-z Amr€cring lo popS incr-ming
store.connect(host,emailfrom, password); ----r Cr,re*s tO eirylil ! d
Folder folder = store.getFolde("inbox");
Page 2 of 6
3/2512013 5:50 PM
137
138 folder.open(Folder.READ-oNly);----r anbdv o?cn io Rg^D-!NLY *"'
".,,.^." Eom rbe rnb6x
139 Messagel msg = folder.getMessages0 - ) I€adiD8 ol-t *re errr. r n)')Jqd-
140 ,
141 l4i6 r! C System.out.println((msg.length{)+" message lound,'):
142 d,scYt ) for (int i = 1; i <= msg tength; i++) {
143 ou rt''-,- ) Message mess=folder.getMessage(i);
1,14elf,oJlrnt'i mess.writeTo(System.out);
149 .
L
1lfo, cv,rpa=r,.<.w,( u.tt m!g! tc, b..f!i r.d )
146 lltty
147 catch(Exception e)
148 {e.printstackTrace0;}
149 )//constructor
150
151 private class SMTPAuthenticator extends javax.mail,Authenticator {
152 publicPasswordAuthenticationgetPasswordAuthentication0{
i53 returnnewPasswordAuthentication(emailfrom,password);
154 ]
155 ) //private class
156
157 public static void main(String argsl)
1s8 t
159 new GetMail0;
160 ]/main
161 ]/class
'162 -*- *-App4-------*-----DeleteMailjava--*-----
163 import java.util.-;
164 importjavax.mail.';
165 Dd€re
166 public class€€tl4ail {
167
'168
'169
170
171
String host="pop.gmail.com";
String emailfrom="sadya
String password="ia+ai2ee";
Striog port="995"; itsr.i.'va
172 tVftjL
173 '- €etMail0
174
175
I /tt
177
178
179
180
t81
182
i84
185
186
187
188
190
191
192
193
194
195
196
197
198
199
2CO
?01
202
203
204
{
Properties props = new Properties0;
props.put("mail-pop3.host", host);
props.put("mail.pop3.port", porl);
props.put("mail.pop3_auth", "true");
props.put("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory.);
try i
Authenticator auth = new SMTPAuthenticator0;
Session session = Session.getlnstance(props, auth);
Store store = session.getstore(,,pop3s");
store.connect(host,emailfrom,password) ;
Folder folder = store.getFolde("inbox',);
dl?llE
folder.open(Folder-RtAD_€NS:
Messagefl msg = folder_getMessages0;
Iol ..erFa? ( Fdt5' Fla
3'DF-LE'
t D' b"." ) i/l T"'' hft 'q
Srde r . t rose ( btt'€ ) : //clGc rte jnbor to;r$ 9la3 lrur
Page 3 of 6
91.6. clore())
3/2512013 5:50 PN
205
206
207
208
209
210
211
212
213
214
216
217
218
lao
220
221
222
224
226
227
230
231
233
234
z5c
237
238
239
240
241
242
243
244
?45
246
247
248
249
250
252
254
255
257
258
260
262
263
264
265
267
268
269
270
272
private class SMTPAuthenticator extends javax.mail.Authenticator {
public PasswordAuthentication getPasswordAuthentication0 {
return new PasswordAuthentication(emailfrom, password);
]
) //private class
public static void main(String args0)
{ fpretr
new GI/ail0;
i//main
y/class
Application sending sms........
-:-App5----------SendSMSjava----------------- *
import java.io.*; --) i"T'ir )' rl,ct'."
import java,net.lnetAddress;
import java.util.Properties;
import java.util.Date;
import javax.mail.';.
. - 1.h**, *rtrmpon lavax. ma .rnternet. -:
 "
import javax.activation.'; J
public class SendSMS {
public SendSMS0 {
)
llc(eate an account on ipipi.com with the given username and password
public void msgsend0 {".,""SoEs
Str ing username =' giditfqqw" | /l/our Credentials
Strin! password = "sffi" 7"""b'-l-
String smtphost = "ipipi.com"://lp/Name of Server
Slrinq compressre.r:-':None": //l dont want any compression
Strin6 from = "ffiE/S@ioipi com";//u r userid@ioipi.com
//This mobile number need not be registered with ipipi.com
String to = "9198610986.10@sms.ioipi.com";//mobile nurnber where u want to send sms
String body = "HiThis Msg is sent through Java Code";
Transport lr = null;
try {
Prdperties props = System.getPropertiesg, ?. crttr,-n r)eLrr til'lI [nu{r/lP!
props.put("mail.smtp.auth", "true'); J ruT* .;*": m(llt fqre{h:s
// Gei a Session object
Session mailSession = Session.getDefaultlnstance(props, null);
// construct the message
Message msg = new MimeMessage(mailSession); .---: o"6ptJ (.d'hlE
//Set message attr ibutes r> t '
dr
-!r{ ds}.{
msg.selFrom(new lnte(netAddress(from)) :
lnternetAddressI address = {new lnternetAddress(ti})}:
msg.selRecipients(Message.RecipientType.TO, address),
msg.setSubject(compression) ;
msg.setText(body);
msg.setsentDate(new Date0);
P{sPonin$
cmilmsJ
getTransport("smtp") ;
;ft1 tfonspc'rrr o$ctt poinn h Fe o(rr6'ii-6
(6nJ!. + iPlPi
tr = mailSession
//lry to connect
tr.connect(smtphost, username, Password);-J G'hhett-f la
n,,.,.' of )eici
dtqo'3 *
msg.saveChanges0;
//send msg to dll reciprents
--," ,b^Lt* /{4lti r'',j,t lD f,. qec.t}f
tr-sendMelsage(msg, msg.getAllRecipients0);
-)
s€rBJ rt€(t'G{ C-r J ltce,1t,"-ls
tr.close0;
) catch (Exception e) {
e.printStackTrace0;
)
public static void main(StringU argv) {
Page 4 of 6
3/25120'13 5:51 PM
273
274
?75
276
277
,278
279
SendSMS sms = new SendSMS0;
sms-msgsend0;
System.out.println("Successfull");
cidd rrgir.iav ftle fo rl'e clatsta6 '
l> &,to-c *oa-6r+s 'i"nci
1> .i4!( S€dshl
280 - --------------Siudent.jau"4spciriS'--*erfc.a)
281 public interface Student {
282 public void sendEmailMsg0;
283 I
284'--- - - * - - - -*-- ------Sludenttmpt.jau"(Strlrla-A(q!)--
285 import org.springframework.mail.'; -
?86 import org.springframework.mailjavamail.t;
287 import javax.mail.*; -* ujrog plaio t@4 fini I nei a{Ba4 ahfljr&
288 import javax.mail.internet.': '- &N<'lt4< So, t x t !. plarpe D.r,r roa),
^PE289 import org,springframework.core-io.*;
290
291 public class Studentlmpl implements Student
292 |
?93 private JavaMailsenderlmpl mailsender, -294
295 pubtic void setMaitsender(JavaMaitsenderlmpl maitsendef) { |
ro in'iclr f,a-r:rlrb'{ l"QJd e .rrnpl cla6 oleJc{
13? )
this'mailsender = mailsender;
J
*"11f RRa rt4tt tt ta
298
299 public void sendEmailMsgo
300 {
301 try{
302
303 ..
i91 ,.*C, ,, L. a public void prepare(MimeMessage mimeMessage) throws MessagingException {
App6)>>>>>>>>>springMailwithAttachmentS<<<<<<s<<<<<<<<<<
.send(new MimeMessagePreparator0 {
305
306 hadnS
307 crcsr oqj
308
309
310 dd
311 €lldl
312nqs'tr I
J IJ P€f&YfL
314 St,.ed
315
317
318
319
lftry
catch(MailException me) {
me.printStackTrace0;
i
}/sendEmailMsg
320 )//class
i,21
---------------------------------------maircrg.xmr--4pleg-e-fu-tsaJ----
322 <?xml version="1.0"encoding="UTF-8,'?>
323 <IDOCTYPE beans PUBLIC '.-//SPRING//DTD BEAN//EN"
324 "htto://www.sorinqframework.orq/dtd/sorinq-beans.dtd,'>
325 <beans>
l?9 qr€se.* f
<bean id="ms" class="org.springframework.mailjavamail.JavaMailsenderlmpj,'>
l?1 u."^ .,,1 <properly name="host"><value>localhost</value></property>
i<9 :_-;" I <property name="port"><value>25</value></property>
. 29 {)iornn> [ <property name="prolocol"><value,smtp</vilue></property> . _
330 .rbean' t) To run rfii s
331
332 <bean id="sti" class="Studen mpl',>
?lq <property name="mailsender"><ref bean="ms-'/></property>
334 </bean> -6y1p.n. tire Do:Ba6
335 </beans> - 
336 -----. .
--ft.4ailclient.iava ..Lel,knf -o+pn-)---.--
337 irnport org.springframework.beans.tactory.",
338 import org.springframeviork.context.";
339 lmporl org.sp.ingframework.context.support.";
340 public class MailClient
&rrrs n61
mete.
o0pu(atloo K€€f
Sarot ri"i., l2cronlng
r) 4dr 'fatoto;n3 j"'r ftrz: in
tk ctrrtssPrr*
g'nrLd. ia-yi brpdl'j..Yl filr i6n-s']{ffi?X*
Page 5 ofo
ilfl lry) il::::8: ::ll:[iffffi,,!3;.,,'-.:,- messaqe.setText("hello This mail Con.r**5 ..^"-"-"Fs:ij1'l{"^-r.lj:ff|9"_19."1P_91{li-_ ro rr'e me$ore
message.addAltachment("abc.!!!", new ClassPalhResource(',abc.ixt,'));
3/2512013 5;5;1 PM
341 {
342 public static void main(String args0)
343 {
344 Applicationcontext ctx=new FilesystemxmlApplicationcontext("mailcfg.xml");
345 Studentbeanrets(Student)ctx.getBean("sti");
346 beanref.sendEmailMsgo;
347 System.oul.println("mailhasbeendelivered")l
348 1
349 )
350
35'1
Page 6 oi 6
--)
---+
-)
--)
J ----->
SPting tlail "-
'"
--) 0rg. 6P. nrriI repr€seffg
-----) oyg . 39. hrrnl . javarrrn t
Leloer Sewrc<s io r'Jlndods -7
provi&s ab6rro.6 crD 1at3e.r o.r Pl&in Jc'va Ytd  APr'
As oP ncc Spring rlcri I i5 &aPfiJ r{ (ml[ Serrl rrr': t o PeYc(HctD5 '
Aloos eef ffr,il rosg prDp,tlie5 ond rndll prDgrriei in Sptn$ cq ftre DeLtaYc'$,ftr8'
give.5 Gobc.cl< i yut{fu{e5 io 6end errnr I m5g'5 tntrh ot+zr-irro erut-s '
Org. SP.rmi I DoLFage, 1 qrreJenrb

Orf " SF.mdil'iovdrr}ctil pocl4$€s J
Sr,rln€rr^rdt APt '
sp^n$Pf*t ie& gt"o""t"
lttrf"senrs spnng's cdrsr6cr4fton
(crrefu tr.l
( use ftrl rD S€nd errni I |n€s"f 1
to'PrtP,*- rrru I cTxT cchtclns
b,4- o" Pb;n
java rrr.' t aPi'
s€nd an'ail m€sso|<l tol$#
)
- @ nr example cqrpicatloo oo gendl.,5 emcril m€Jsage b3 u:lng ftmngrrrttl
.reeer( 6,4P., not@ oP fie P'6e oo's 6r ( e r
t,rrh c*tc.alrrrar* b3 crsing Sp"tr6mcLt t -API ur need to
Irlh&r€<ree fllrneYlessaflep"epe'mt"r
t) { -e- M'*tf'u
c-oirL
'""/ .rfPcr 6r4pn no'.Qi oP fie F'B€.nos br q 6I
---, To s.nd & env:twnsgs tolrh ottc'alrrrar* b3 crsing *-t:tl1:
.-.,, LOrdF io;Ih dre coubc'cja ltl-h&r€<ree [llrrrYlessogsp'tpe'rnt"t
t) { '
cc.rued fli-eYlcsr'0eHeletn
- @ fc^ €xcrople c'{Pliccrroo oo Spangrrlcn I bcrsed, *'
fif' :'^'
.'
arr-&ehrreqr -Y;;6#; e'""^ r***''?i*l'"''
'
--> To seod @ errrU t rnsgt
LOrdF io;rh rhe Coubc.c,la
i
Can
t0
*.1
fu end 6rn6 rnsg6 to mdrile nfrrnh,6 b6 .*1"3 &vamorl Apr.{pn@ Praedu..
u1"-
SEpe:-
8Kp@.-
Creote 666
Uslname C
posstrrord ;
fun rhe
O&es$
spe--h
Acccrrr* in J,tlTp.r "com.
zavaboES
zc.vabosO I
frrccedu'c to
5K?0l-
f"ee." : tutpuffr.ru..n3 t*['* 8*'* ")d9:
the ufbd{pilmfloq o? Torcrorg*rr'r t,.tirh dorrc'in name-
""'-'
do.rrrio m-e i.) brrr-1n -"# DNs re6'stt o? LDrndd!6XPf7
goto cwinaaossgsre-aa o.*'.,t" hosr6 f;re
to l?+.0"0'-1 Nt^ll'.1 ' rnlaraz " in
rh( ' tt
9 cknnge
'-[omar &rv.,r pt-- ntxnvd 10 80
xf prt numbtn is not specificcl in lltQreryest trt) tben rhe grol-ocol hJfP
tnes to send the re#-tesr tt a Serv;cc nLrost pc'rt-ltlrotor g
lqgl-'
odu ffrtoco;n$ cde in 6erver'xml Bre und"r LV'tne7 v1 Splofuing r+'.-
Cbt,crlt yt6.,'rg and urebolrlpi cctidn qOrne
N"1RS.s , IPrPI , 5oh R.
feceive
SFcific
rf,es6ate5 Ob
phone numlae.rs
Gnd Qlc'. cre rbe
efnai I rr€56c€€S
05 Sm5 rrcsscges
Srrr Cnrcaco3S. These &crturrgs
cond del;vers these rnesscfle{
S€rvo{
6nd xeplace l?-+'o'O'l kort'osY
[*XasrS cff iPiPisr ldcbga
Errn, t rrrs6 coirt 5e
Govc.ird info SMS
$l'9
Z. Hoof rgme --" t,twt^J' rrol-t.raz' in' oppBose -''tt:tbo1p5
bzbo€.jr) rarn<
unpockl^JAR5::;;;-;'- ar.roftPro5 ""
vnte" >
l, I
LGnrc"r p{.rb ="" docBnse = Vorcr APe />
l-6ataPPtr t<'on on
zll+oet >
"Y9, ftploEee tbe atow ryec;fu Voa'&p ur-lD@ppD
rbe reed ofl Dismr,urcd
onou.*1Derolry "*
frnbe sure lhGf lnletrorrpBte is 0ro$6a"ed in
I
gKf4',- Qgrc"vr the 6efv€,{ cnce .
6tQbl- "t6t
CrPo brotgc't
$e 6ryriar$on
u;odoto - ond rgpe frls ot trrw '- Jl www ' rr'tc.raz' in I
n tor!^caf&1rr '
rbarh arl&PPl^)'
Urrdersrc,nding
liad,ltlonol Ole.rf -&iwd-9{0!
Trcdiriortdr c)ien'-se.(!e^ o{)plcollcr)s c6*'- PYD8fcrrning e""t )
ct* locolto"dq"-*"r
.ttrof meonS o*.,l conge in rhe locot*r6 a4 Senror oqelf Cc*lc'n 1pc vrrul;t trctiE
Gde {n rbe clien} &PPns' -Ibs indi'cc*re cllenr arrl 'Sev';e.r
ri{tPhi &Yr H$M% -
CouOed a4,Pn5[h"lpt*) h,*.*
rP de6ree o? dq.,nJe",? ii * d* ft* ^*Y-Y::^:^':,
lthHil o,;H c{pn6 s[- corre **a a'< b$eA leect6 - cor.tt cd-oppnr ,
To deueloP rbe
c{6 dieuuoed
Disi-,ibrjJdJ A?Ph '
Cl.lcni - 6eT!c'l
wrz6 .e
c(Pl ; catl c'n 3
Apfnl CrS LocaitcrD ti.erspe6,^cn5 l1pg rten deu toee the m
Di*rits.,td
Looc"Hon of
no nerd oP
oppns bg
aNYA
6erva
aharSe
$efllng
Druu*.d a{lns
BLulnetl furmpontnis in
.qJ- n'-iJisL"'
@
t)l
[ry,LrHPle $e'Yslr CLPPticafl
ons
There routHPle B'ct"ng'unrf
dhbd.
vi!;tllii-l.
C cl;eni amns fre^ B'rornP"nc"*
(E @, €l crien'r &?Pn taus
wlt,"nxt 'k^ *7r'r'6 si'
B'rncr{rodr o( B'tnt*'p^t"t a^J hAe{e B"'r'}'olg
cD'tl be derlor"J
scfcxcncea coit I
fnGrhioe 1
Od I Rea;gttq s).o
B'tompenP '
bd-
irdia I -----+ B.cotrpe tef
lftila? --,-, B'aorrPa r€
.canp?rag ' boat
grpfrof [-.{oHcn ltuns?d-trd'4 rtrrt rneoog atutr c"lzanle ln rhr
c,+pttc^do just needs io be infr'nrrd b *t1" efto ' antr rhtnLs
in c{rde,nl Cient &ppns ' Ecz ott ciJcyl.t o?png l}<r{&at 6"5fi 5t-rrttar
gugltrsGn"pnz+ oft*ntt ftt r7'uw7 rlo'
xr,lprrt laatl bohnte btt tts'
mut$ple S*- oPPllrorr^s '
thy oWo us n d"nl"P mtltlPle
tr'"g rntJdPlr B'ct^Pw^n'
V tttEli,eJ tDirh Tedlrh0 ol^s (-'t
oF S",rrtX c,-fpl t'itr e^.."*a(Snol .'-.s,rrt
6ru
LtU<. frb Cllor-t o|pvr'
i
To dax.toP Dish'ibured oyfx>g 6a oed rt''e
E3 :- Rrf r , €JB , wcla ser! rces / l-ltbp Jn voker /
--- slt% JEE pmrrlde.l a,b'r@art"0
Nfl&wicea a"'d ajso PrD'ldcs
@ Pr{'.1-t sl.t
( *o.. b-omP rcftrena* 0s gl$a visiste
JDts
f lya B;rI, E<IB.,
f]utp 5uor"r '
ohts an d also ruroVcs Dlt*u,rea
}qTb as lmarroo tlorr3Pat""r off".)
@ Gvire Ct;er* nPP
( c"rrs Oe b.muhocb oP 8'co'F"c"rrs'
Plain RHr :-
btrirt - in Disl'lua}td lecbnoto6S at
Qrni regist"tr q.5 Rq;ar'1 slttr
pirg s oP troi c'Pi oYc : iava ' rrni
'
----+ ft i5
---) useb
-"' Cote
iq"fq11qgu"l P}6s
S;ldboi i5 he DPPetoce blLD Loco
'!.
=
lru., Ig rbe oppo ood ;tg cl]cd-
-===
Locor cticr* ft'o{'Pn'
- IF otPn and it5 cUcn* regjde5 in
J digft*nr CcmFrtcrs *rn it )s C&!ed
.- 3;- lihad is rtre DiFP rlt'',, lso-t ohf* dnJ
=
-
=*"
rP
trle,hoa' o9 rhe ohre'r Crn be currel
Clded Locgi' objeor'
TP tt-mentro& & rht ohJerr Orn
tfl(n lb i5 Clffe-J ftcr.ote O{]tt]'
gfltn* ood Qe,norc ctier* !
ye,eldes 6n 6ctme JVn theoir Is CarreJ
tuo criP?e*er* ilns 4 SrrnLal
Qc-ot'e cl,icnr Jo a-fltl'
eernore
Otuca*
q'
, ..,rrs the,n ib tr
on1 .Ro* t-occ'l cx
be @red hm !ltl^ LM4! reer'5ts
cl|<rrj
9+w* 4 J;.niu.r"J lahnoloytte
CoRBA ond Q}r-" "'
lo6^
^
er*trn6 d.tr*arrcd tahnolo6la
im o"ro J^'n;b'rA hr-bnolo6; catted
Jo D;sr,i tc,.re d App Dci re ioPrnent + Drlo:dts are involvzi '
O $g1y;1g J'*crPac"/Bt.,siness J,rr.rRace
-- tosq&"Dmoo"t"*''X.;tT:T*i.lX-6;
-> Drctc.raH oo c{ b..arbod,g
ive &a't'e bY'ro'h"'/ qnl-r€ra'v
i'tifi.*
@ S,'* P,ovidor APP
(* St"t,v'
'AfP
fle' canJoln6 b"'rerboA3' io 8'coroewnt)
Obtfit krz'ne: Ptrorchlr
o' ol'u'' ics
- class
--+ hlhite
G(
imptc rrrnrs java. rrn I ,[2"'6o*
deuloping &srnhted dppos
krrr ra O$eer ,
(')
d/ he b,rsnegs dUelfS rru.sr be att l"pq
kcr .ic.va CS"onlo 7n*trft'ce-)
,Qrvcn App "iova C6e*rte Povrac,r *pp )
Cilcn*App"iavo f s"*t.u Cu".,r Ale)
Qrni re6rsrrX
Cpr6ur,1 st )
Jn ona ornpcrtcr ff,1/ripre JVHS @n be lbenc l-o wtn rnolkiple
SirnurtancousB Cor) GncurrcnrlX
6.,'.rla
r S:nvcrApp .i o'v a
-Gie.l*#rc^
Cll.il A?P ",j c,rv a
il k*' ir..'o(&"rire 3*rcr Fac'
)
imPo* jara'rrni '* i
PLtDi
c i66* Pate Fat ertodg QernoK
-f
' li*oo B'rrrrhroa<
il. t* f;6Eerz"r<^i
(int vc'r)'$nu'i:
3
Ba66tc
Ex(Pd"n i
@ E,*arople oppiicoHoo ch Plaln rrni
/i|9*.Aw'i"vo'.
imfrort J&Ct'lrni
' )t )
,,-,'ffitf,,*tffi
ic.uc. oppns
xi
PJb.ic E*T'npr t) tlwot':s Qc"ereEltq"l
o'
{
S'o I f" €'*rtn r i s- sararn Grurn,.cr"r" ) i
/',^03.-.* ,.'.'1'-1o* o (lnt vor)
frtu. t^3 $nart
f^ Linr =!-; i <=ttat ; ++ i )
a
1.
1a5: reg *i)
3
tl(lfn ,ftai
J /l $naL*"'i'a
B$lic class &wrhP
n
o'v.',(5rl1 o"6stJ)rtrocs fu'Pna
-
E rl-pt obj=nero krrfrnpl)i //B*r*s ou'
Na.,i.2
'':;i.^l"a"
i ouil i ll r'ro's'''" qrso
N6'ios'bind C
r
U"
'v 5'o d ( " st"- *pp rs r"^at - - ' '" )'
3
5
il Ctic'$APP'iavq
irnpolt "iala
' rrni'*r
Fib[c ctos5 CtitnrApp
J  ElttPd on
*
n , v t(Sr""gtl u'.'s') w*
t,
,* n t* "F
fin,,., *oon5 stt'gl.' lo,w or"'ou^
E.j r"bj= LE"r)f.Ji-,ij .toova.(uinu;,): il*so6i=(ruu)r'n'rni'r*!'{'r'ri}lJtrIl
ll col B't"ruat
L-, lt ["lqtt to
''ntorr
S'o' rCCut* hw :' +b's' fl'"a l..or''.* "r t5 ));
3ll-^^
31o*
Coroptte ,.1auo Bres'
E:AppsspfingServer)'i'rvac
1'javQ
c60t Far-t'cras Ptre il Ctpnr 6rderr'
f ,fills SprinSCritnl> jc.voc +'Jo'va'
$errrarc SnrU ftre ..-0,$;'$, r--, cl&sJ Ro.rn( o? B'al+
El Alrrssr,,rnc r".**;' ;Ll" Factl-nngt
g)ve$ farJ'npt -&,,b .ctar,s
Ct5 6n b P're to Ctierrr SLzPJ
6tc,.rr {mi re6t6tfU fr.
0n rrcrahof'l' 15
'
these rrcrshocornS {rn""-f--'
P a'.vc'{ cPPn'
rnM ful
IU
on b.hale oP
k corred *trh"""'8' and Te$rxse is Cdled
--+ T6e 6kib &f clienJ Side 4 or €e"ver s;ae grrhms
oPc'rctl66n3 '
o, r urrrl cePn 4.
gcz
) Iheie icoo Prolie5 Loiu ccrnrounicdl t0i$
on rroi cllc*d 4 St"'* 61'de dPPos"
9.aP's'de
ec.cl, orhc'r
1 3t"'B'i!" l;--.r1-* ,'r * need,* 2
--, frrovide5 65g,6crrHon loter.on tuo'"
l:'^. c",+rq c.l,p,s, I x,fl|]
sh6P'.s
--, frrovide5 ftbstrct(-nu" Ftr-
s S,'inl c{,pns,
I exprlcrrg
o*cros b dewJ4 €r.w'r { cu'al apPns a
l-, ,".*r,i'.*: .*:^ii. ,..-
; ;::, *l.". n 166orcin! urirh pc"n t-i aPi ' lffi;"X+if # #:ll :-/- . ^- *i r,ri I Oncrto-'/ari"s r'z'me @&wi..f"rq4""!
---t ot1.5P.rerno.n5'rrnl Pug "flo.et'fs
tT* - t1''
"-
ffi
; ;".';';.-,'la o *ni'"'", €,,.er*sn L"a'n3 ln 5n'5 vrnr apPos'
r) lhe'.e is ho need op 6bY6nf rml re6sl^t$ Q'^Plicjtb
-----i CaJ c,lofo corrh ftmnSCor*at:nt'l 6k''''tcd Yrni
XisrI) ff( (c'n r''lc'(E fn'r explrcidj
6f'tltd Ylrri ltf i si"Y
€e"*n Qoae'r
E : ApP5 sP" n5  scvwr ) rmiregis
Run tbe &rwx olPucafio'
E', Ar0p6  si'*t 3e,r'/6. > ,Jc.!a 6c*<'rApp
Qun fte Cr,.i(ni c.{Ptl.aH ffr'l
€:  nr:f,sqmng CU.* > o,,.va CunrrAo,o
To chaoge Rrrri re6iot",1 poyr rf,rmtr4 i-
Sntal i, -
Ttrniregiarx Loeawtroo >
E[} >rmirefi6rl 2ooo
--> t)g proces 6 o? crnve*i n9 3:'rra rntcrllcne Data to rrrercpq' q61tt11on da-ta
keeP hrs;rrrs O$ecl rePcrr'oce
Prbcess 6od ol[oco6 to tf*
iqjeuton PrcceiI'
'in frDi re?;.3hr5
g.obj reP R"r
ftrocr!  dqz.'rle,<;--) dllc[o6 io
jnje*i(m
derr.den,l
r-; ro8i"h} rbtat-t3l^,
----> ariaUJb lo de.etop ftr',=sc."ces c(3 Po0i's 4 p"to't
'-) ouoc,rS lo 6*dfo rmi r€Bi5hrj relamd cFSs in xrnt ft13 &lar<tHr'"-16'
619 ' sP' Ycrnotlog ' rrnl ' Qoi Servire F-;^r'o'rcr cdn aPose 8ir'€,'
Busi
"'!s
obeet to Rrni
haornX 6Pet;P;od oarn q
6rX' 6('' rc,..,ohofi'rmi ' P-; P.*lFto-1t3ton ----
''*
[3aslne'r;
1r**
ga$r''ea &"m
""''t6rsr5
rh' ou3[' IoaY ogtaH o>'
@ n" exomple &1rpl;co'on cr' 3;-,"gR"^ri bt'eed Dsr'Jl,',-/'ecl
ct{'one *?^ *ut.'";'6t
t I-i n3 &r-c"'t5
-> hth;le deve lopiog picri6 erlr c.rier^tj- cr{?n Loe o'ed ro 6c'lte'i
tol
R*m Se.rve, cppucc+rc1-1.
O) DicK lome $ivcr1 16 rr"i B ohjeti
a acopy tp &rvice inirrpq.., 6k'b fttes '',". mn'#, oo'rn,..br,)
c) Url ro p,. frrm Loovrrp o1c^otl o'r a4 trn rtfierl tt-' .
d) prc-..t*oti oa a)8* Busintts acr+''o ds
l,rl[.,,tt de'*-{,p'r3 SpogRyrr et;enf crPPn t'd- need 4u""1^3
4 some as otpve deta;is bk sk'b6rt )s rp{- r9/",w '
plain trni Servot Af,pn (
(''l* )--
Ploin'(roi clicnJ APPq
gpnog rroi servc,r APpn n
(vce)
--- Spncg rrn; ciictf afPn
plorn rroi &.rvcx ArPPO n
(ttt)
'
gPnog rrr)i cl ienf dPp/)
fSr,to Flre sho(ld coPred lo Cr;e'* apnn side ]
lI /'
a€ia.ils *6t'r br't'* '{+t' '
f orrin rmi clie# Appn oeed 3nc6 ?ite !rr'r 5fri3 rrni
$orrt<,re ft.s Stau fl're e,Vf:cfrig]
-, In r(cd {.t!rld 6.Lt Ci€d.it ca{d Gnd Debit Card for4 pon ertF
Dtsr;hrrca fompcvrenx
/ mrr;coti*s
gp,nn! rmi Sgtw Appn *
(to)
, plcro rrrri clicrlt ctffn
$ew<a alnn *rs hol-
frrvcfe siinJ Cor rt dc't'loPel' ol
&rv eromple cqplic&ficrn
ge Ege mts or(ts
Mhre d,rhptnS lqrrs in
gprrog Ofzn, DAO rncrd&teJ
Drloh,rfS O? Pnl :-
O RmJ i3 Languaxe &fxnde'-tt (-tr.,* t"to"u
ctelelo1rJ
ft;qnnr Serl,<"r
obre de.*'l'Prt
e
@
@
- Sp"TEfg pravi&s ehrdsrton le'dl't'') plornEJB ' br q$tn'afi^If cr'rt mAe
ujcd iq rh€ &r4oprna- rP EJB 6rn1n*^r$or v iu'sr u*<|'^L in$e dad'srnpnJ-cf
EW ctrut Aw ht6r*n fS. Sn"3 htl"v'* xtot'r tknPs
"b*
gfA1tr"r8
)
--
gr^6lrlcbsmr..r prwides abswa,,""J4w
^
bfn *'tut't ^a
cLit* kn
:
*^ d'*rrk*cd Teor't'ologl
rr ls slrri.rgs urln u'ieb !
rr ls slrria'gS u'ln ctt'b base d disttrtu-rca
!-"- - o J r
6pdog &rnta,n r cots os Fe6lsr'5 SltO
A.^l*nps in tbe sai"t,t
--
Heie &r,.,or o4pq i5 rrotlrrn3 W a$oppficcrloo dtplof:el in the Sad'(,'l
--',
lbr( cu{^1i c4pn Can Le thand q"tone aPPD ot ufl*pgt
0'rg' 69' rr,o,rnX ' U;J* ft*tt*g..ni'ehr'*r"'
'YeEs 6'oars inthe
*
,..
q,rt'1 Crp"nJ U''*'* ) h'"t"6 &rvice in-t'e cPoc e nttmL crs '')cts nort& (o")'-
**
o*""^^ l-,-.,n!6r.,,r" ![rrrL**Pr^uh*g&"" g'x E'*ut "&'*ot-ot" 5F .vtffodng . hKP'r
&'"
,Yt ..J
oq 5prioSrmi &ri,5 Sg',.389 wslo4e ee1-, o++^ {04
aldrr{ o ctlc Grr) loue t$e. &'an<'rr- og
&r"ln*s[o$t:'
totb cuerd- clrld Se{x/rel!P q rtrt-r*t- be
ln Java Lar4aafie ' ) ,
Rmr o{,Pn6 eorl r use J*e" ner rykrotlL as rb',t G-rnrrurrJ cq}lc'o d':aonel ' --,
Awr"X middler-mre Se.vrcus on rhe S'srnesslo5tcs "P Rrtrt oryrrta it
t/r.tr d,'PFJo.rt r I gt
Rrnr re6rsry is a &rcalt retlslY5 to L"are lrtno'oP L'* ( LsluaoP"on@
'-
T0 0ercorne thf5e 1y"blerng ose gtbc,r Dtst'iu-rreJ ]a'rrnolo6rea ltK EJB, HE"Fr'tt":
Nclos3vvttr{ ond e}e.-. EJB, HnplnuoEor atc l-6*3u- d{tAt"rt. ltl6k"?rcrs
v
i< l.anguqe inde,{^1de'rl-, -
SpgErO pravi&s ehrdsrton le'd'*'') plornEJB ' br q$tn'afi^Iry cc'n rPk -
scd iq rh€ &r4oprna-,P EJB 6rn1n*^r$or v iu'sr u*<|'^L in$e dad'srnpnJ-c+ i'--/
JB dtent Aep *rxl^r4,,r,,* fs. Sn"3 htl"v'* xtot'r tknPs
"b*
grATE'n
) ' '.-
3rr'6 Llosor,* prwides alsrror.rr"nl-o6o'r ,n b*'' su''tu"t anA cLit* ka &t'latw '
HTTP lNVOKER
is ak6 *g"%. &{".&t*' btU *"*,r. and oppl''caxons rtr'Jtte
jaua Lrn6,ro6e.
D
to frc{ and tcrbe cr.u Httpre$rrst &,rnlng % urbo+pn i{ar-r clienr'5 aod to luus
the reryrsis to aap#o Jal]a daNes .
€ewwl JsP t,.^grarn, is coued FlorLrarfratl€,('
thie tatrnolq5
Nvittco in
fte &.va clC^SSeS oP Wcbappticorlcrrr Corl b
ond theX coo't fcrrroff llrrp"esp"nse
'10 Ovsr Corne fhi S groHe m Coe icrke erne
llhis Spedal
FyonlccmrrDllaf i6 a sp€cjcd uj(byrso&6ce
&it poin* ha'ndrhX aL d.i |64.,",
aPn [.cPo. a]xw dic.Xrarn)
h SWrs appn fr<l'larrSeru{ef 13 fior
r.rtse l+ttP rt9/re6l- i;veat &om e-tie-nl-,
dsrett n utet*,
*eltrrl 6e'rv tel ftogram / el ft-6rahn
rdtlongfi,r,,l
qcrg ctars )
Trsr a [&va crars)
ryxg'an 4 a *or aofs at ffJrX 4
c3' (Hatoa**t*, op crd,.nj Jarxtcte,crt a,^urb
GxhDLl(^ $*ter.
In Sp^"X a9pn5F*esS.wret k F"".tCo-r'tttr&rruter,
F .rnrCcokollc,/
is tronr G*rrtttr Q*t.r.
orO.se.H#'e^tcr.Di'g
Foflr&nrtrDu({ *r.!tcf musl
D;teca2maf.f' arl Prk-ro
in utb lrn) krc ko;,g A<tud on rtr.tc],
'0
1aw ruLfple'YY-1rr{rr .
--) O
or
bz Caohflued
-lo t'ap a"J
Wtbgc'cvcT AptiQdon €orw,/
"o
@
@
@
4 +ounq ?O, as SpogGn$y'ta$"o S'}'"i*
vlef -' fr{rrf > Cofittl|
Nhreo DtsfarrheSftvlft i,5 ir6hr4n$okd ib inrcrncd[ activohcS WtfApof'*'+""G"'K"+G^"4";
N.r to ille Dqrarn
prdgmmer dePlog€eb Htfpfrxofet $srucir Gtr{'D co hlela4plica-19c6- ir> vflo #:rW J
i .,- ,,, r.*,-.^..! '"e,'r<s Drrr,o.r.r,a &rvler clans oulat -
$cz oP load or' 6ra'fi(,p 9'tttlet1'pntcsttt't c
eiftc,r drc,n3 *-t"'r 6ran-c'p Co) d-'-'vlng rbc deplogcetrn"* op t*Latnn'
-tl'rrs D;srtrlclr'r 9"rt<J intcnrsrq activolea Ncbfippn *Confcxt Ot"ta:nn bX
Iounl lDwo*r,te'nv*L'ofilo'rNamaF 5a{vl4' xml g'" * Sr"r5 c"ts6"'"tln hel
.Ihis Sp*ns.c"..rdr{d 1x^ftr,ros f-lrr-ins-r,ntraftoD
on a]r rhe 3r*'58eons c'F Sftryt.*
f;re.
t" * W@ o+ prelrsrantiaH'r'n tr lJrrp$rnort 9a'^ttceEzpotrs ktt{'6
Brssioess Cla* cqi€d in rt.;srr. tfo hru;ry S*itt1'"*o&6q ffirrncas o*Lo,nd
C,.rni cern Uses g-" yqf{est url anA
'
"b&* 8e..,^} -h dT*
Etpe6r to &"w6 o4pucoHon.
A
€J
GCrre.arCS {EAeJ+
h*p: // rrr,r hosr : roto/
B.ou.r rP; 6erl,-Jeerc: ;
Nt"b olPn -1
F'gAtuer"1.F--
I br+iru.t ,* ..- .*.0
-,.tr
.bt*ilrpt (gurrt"" ootn
u'(l wta t
tr}hleb( )
i-.....3
.rtrti.  '> },*p;-pl otoss oqy
(ni.*DaF< ) @$..f o4rr€
)
'.-'- O Bored (rn rbe cr'bow auiuhiea :he Dsrorj'er&"vter garFrrs B'ahietr
tcftEence fior" ReXiorrS a[o. - :
/A - o ^.,"^, *rPr**.,rp ftom &"tg a+t'n
O cti,* opn 9cl5 B'oUtar reforencc
'-
O lrs'.oP B.Fr'bod arec*<b
' ":|,#lL .,,r* apptt.ai';' ),
---
g * €xcrrople o{pn er} HirPr'""b:go rffilJl;@
Pcrseno
-'66{cr
.--o A Dstdh.ttcl 6rppllco*loo Con beo WebopfJn of lon-r'oc'bapPo'
"
-+ weucppn *n* uses Yqist^d €'ppolt,o5 Uouo:x'iftc'*Pa"eDt
aonA oJJJD<nt
- -+ Htt?tr.,vole{r wb3{vices ate- f'e Nobaeea &ghlkded aopt's'
'*'-4
^Lnffur
Servlet, J5? 1^r5o1,pDs a're rprar olr Dsniuxtr<J o?f't$'
;
*lbe
ctienr oppe dcudo;rr o? Hwf.uoFe'v shn'rd
6c,4r,r
&ttoulvrg tg'tt P-omrhe'
&"r" Omn 4 HtP.trnvo.c,r.
C) DcrcrrnenkrHoo ohlt Bu.s;rrsg rrrr$'o61 ,
Sanrt crppn ippcopor Con Sand rtt-is dera;r6 fo clicnr- A?p Wd'ru
nuil cn as a Cdnl€ai to do<pntoaJ,
cD q aft of 8ervicel.rrcrf"r
/Ar"l"essJnrt*Rece
b) Teftst urt to ge*Qustrress 6qjar "rekrence
rn&atrg pafuos uxblllic(S Gt-r $r';ngNeh&rvices
a{Do. Qrbqa!;S. rheg UcP". uslng fifplnvotcat fudarlop
ep,ngbc.ed bisilsrtt oppnE, Spr.,rger,rrls mr ln&srry
gta,,r&qf Dts*ia*d 1e$notqy h drqlqp tht Oisurued
rhe
O{rfyyrj,
tff S (Jouo l-essogc &,vra ) :-
--) I9 cl;er't ig b)ocre d 6r
eiicrLt 6ide oPc,'otlc'o 6 (IY*i 
Se.r,t'r , rben i b ii Crrue d
Clicru 5id e
O|I/rc$tCm-l
oor Ptee ro gcncYzLrc De^r requ€6 t t6t)
fiwn vea#eSt wfg'l.ed Yesrffse CoT neg
$nc$rcmtrS Cor'rr*-r rLiftrH on .
io
to
fxt f="tO
ne^r v€4,l,l€6t-
$rr.ranan
-) fD 6unchYu-o(.ls
ond Senr'l d{fr8
aoPrts '
oi(rl+App
reO
P,.t;
Ste f 1t^f*-
Da(f yE&eF
Cl,ciu si e{e bttRMi''
Jn ASSrrchYDftrLs Cornmer ru'cortlc'r; Clieff
In Sgrfhruncxrs [ommtrruca]tto i?
its idle crd Vtcc wdr..
Ln A65rcb.;ronc,t.s Ccrrqrnc.rru(at{crr-r
in [us5 rrrte Cont{nuarrlX .
ood &)r'r(/ ci{,Png ccre
clicnl alpn ig ttt,scJ
lme! Cc,4ted
otf{''rs-
fbe 8o'w dPPnS
((e$dc
--)
---J
Ci1nt and $"'Yut'r a+nnS
el;c,ni- fi.-.'-_
---J Xn G3ochronx-rs Com11-frnjca116rn e[icd appb ond €ert'e" ctpps6S 6^
fie 6htlX Cnqrled o-0pn5
gSrrtronot A Corffo{lrucotl oo
Clicnt APP
rErres l Cr)
GrnrrfrruCCrrfon Alcx't*
e". kshn cv'PE[
-)
I8 Cticr* q)pn bneedg to poftrr- Cicrw5ide oF4al.tons And tl gerrgrctfc rgl-
'{e$resr coirb o+crrctting &,r gj€o
'1q.pJr
r€,€sfd y€4enlz S.n g-rnr.opn
ttrc,.t it i3 Calttd "
Aqno**crs Ccrrrroc{nrcc.Hcrn."
bofi
I
{uo'{t , ;2t' ,
=-:--
oalor-l:oro
to use. In this respect, ,n"rruain.,-
tu^novontyuhal
rnvocar,on /RNtl r,,h;^r .^^..: - - orrlers llom tightly coupled teciInvocation (Rlrll), ri,fri.f,,"0"-ir.-""
"]rrrLrr.rru'rr
.rrgntty coupled technolQr);-,q
N,essasino ar<^ .ri;-r-,,. a^pprrcar.)n
ro knorv a rernore appricorioni X,!ir
W-ts_Us&e_JMSJ8E
a stngte transaction- ' 't''e" 4uuw J
U++usgsret*
dcstinalion
l4ehod
(

i
!
*
t
i
What ls Messaqinq?
Mcssirging is a rrctlrL.1 r:f conrrrrurrication b"t*a, j, roiiruaa cornponeo!s or
;|ffi"r.,:"* :;i:]^i:_a
pecr.ro_pccr lircrrrry: A rrressagins ctienr ca;;;A;;;;;;;;::=_fror any olhcr clicni e..l i.i;",,,"]llll: 'r nrc5sagrng u,lettl can send mEQET6]E-if#
,"n,r;,tg. .l."iui,,gi'il,..:"}j;i-:1il1,,:olrnects ro a rnessaging agent that pro;id"" fu"lii;;
,"",..,". ll":'::*,'""iii1.i'::.,.;'ili:l:l.con)rrlunicatib,r rhat is toosetv coupred.
sender and the r.ce;vc. d^ ^^, ,.....-"-!,1,.n,
ca:r.retrieve the message irorr rhe dtsender and the rcceiver ao no,tr,|V"-'t''"'
vo'r rcLrrcve lne messaee ftonl lhe dr
sendcr rloes no, n".a-io;ii;t#fF9*ir!4!l!-{rlre s-ame ri,ni in order to c
aboLrt the sender' rh;;i;'";;;';i:'l::-10"* 'h:
receiver; no-._r does the rcceiver
to use. In this .p".,-, ,-^----, recelver need lo knorvonlyryhat messace fon
. Nlessaging also diiTers li. '' -- -" 'lv NrvrY c rcmole apoltcation's m!d6^45'€r;:" --
r)qtwcen pcople or behvcen ,n,,,,.,."n "'tt'tonj" mail (e:rnail). i*i.r'' i1-*[S$i* | coru.rnunicarion
n"**"
'l'n'i"'" "ool"",i"',i! li''jl',ii":";t:j;;::H,:"t p""pt. ,rr""lgieT.*€$a-'i*, .",i",*ii,iijl
;l:ffit:1F,i;ff*ffi,,
tr;[l{-#,*,'';i:
'rui+',J1;*gffi
*:",'1,''""'"ry:,il**
#:::H:,,y: ;il,:"::::.:ff 1'" l:il ;l"lliff l,: :"t;i;;'l;ffi'::' :: ;';,'i; #
ht:;*f'ffi lli*li-fi tf,,"'*",il,fu ffi 3#;,.r."Tifi j.jilil
nf{inf ,**lt{t*+ri:riffi
ifi *l"*,";*#* ffi;*
.)
'+!
The Java fulcssarc Selvicc is ir javx Apl thar allorv, oppiijut;on,,iiirr..
;n',T,-.::: ,ft''"-:::,j1,,t".1,,:l:.:.y.,ai pril,rcr
"o,npuni",i'ii,b'ii,t
'? 51""'' '"n6,
receive, and ,erd
coi,r',, i,, c:rrc rrirh orhcr In(ssi,.-ijr, ,;,,iii:1,,:iil:,jl::-',,',1' ".ii'.""t"t'iir'; il: lidffi;",lil:il :;'
'll'c Jt!.S Spccific,rri,n ,rrr r,.,Sptciiie,rrio.
't
u".ri.,,'ir.ro.',.;,1),"i:' J'r'blishctl. i, Arr{:,rsr r908.
Spccincarion i,o,",r,.,n,s *.",,,um;,*l*::;,1:;:ji,illll'rJ]:j';:1,;;:::: ::#:jH
. lltc JMS Al,l rnrrrrrnr-zcs r
Dr,t t,r'r,rirlcs cDorr-qlr li,rrlrr.cs ,,, .,.ll.
tl'ol concepts a pro8.ramtnel mu
{l)cr}r,rrrr,ir;ry Lrr-ji!rS a'pricirri.rrs 'r1't'rt s<'Ilristicrtcd
';"rr-"g,;; #i;:t'
Iciuo 1e u5s Lnessrgi'rq proilucts
I r)c rrrs A'r c'rbres coirrr r rnic ,i,::':;:1.11"'s f.o:i!l.,;l;;.F '"#i;::il;:[,j:;:;:'''*'
ro mrxitnize
, rs-rtrc1ror,",,r. a ir,ii ,,r,"t,'itJt
ts not only loosc ly'iou plc'j bur also
lrrrvr: 16 s11,x(51
'n".r"g; ;,, ;;;,:; ',; ,l .'.ll :l;..';liuer
rlessrg'ei io r ct;, ni n, rh.y 0., i','"; a cii.nr ,Jo.,s nor
. . .
|ttti:rblc. llrc JIIS,l,t,,,,,.;,.,;"',;.';
" .^^
ll,:,T,1:::',',, ";.: .,,;;";;:';:i.'";i;,:ll:[:'il]j,.::;:]ij.j'
lj,":::;1:1,::,"0
onry once Lory:r ,:vers
lcss;ig.s o o ,ecei!e cluplicete
,
Point-to-Poin t Mcssaeitg Domrrinr urrrr-ro-rornJ M cssaging Domirin
A poinl'to-poinl llteffiOucr or aDolic.t;^n i< h,rirr
^- rh- ^.:.--^-. -rrvers. Each ,,je(,rop i<
^AA.---^).^
pplication is built on_tirc cdncept ol rncssage gueues,
il"' fi :::",':1":i:ii:',':T"1.ii,L':a{ 1;'Gil ;#:: ;']l'H1.'fi'J:;ll'::f;;the queues establisbed ro tiota rrr#--'--
tv q )PELl]|'j queue' ano recervlng clients extract r
are cons'jare., o*hril ih. *---^,^--
messages. eucues rerain all rnessages i"nt ,o ,ta^ uniil
Ittepbo'e
are consumcd or until the messa'ges expirc.
-
'rdd Com4fbr o:irh ArxArrlr6tcr&lrtne
#"i, *o u.."*"-Plt to onde! ste$ e
$tifu o
"tut
;>nrrro h.hr,,aq
co4:ltncr.
The JMS Apl
durable r,,t.".;^,:^--
rnany rccipients.
,, i,r
.-.... ! . .
to crnddsrand
'' l
r::'
l:,'1r,!!.riii:ji.. I
l,Cller;il I
llliJ:li ri.rr,ir I
ftndd'
n
[3
@S€nd5
E
@ffiFigure 3-r-3 Poinr-to.poinr
ferch $e
rht Asare dP,s tirrrftro b e.l*t'4$'e
lu,.l
tt
F*tF6!Eb!'
subscribers io create
not active. Dujable
to send messages to
Gd"K"" '
I
pl l9r'b matet think alarr Safill.ll€
-r:: -. ; Cl
| r
lr hlislr/$u bscr!b! M cssatl irrs l lo rrr:r irr
*".,,",,':iJ;ll'j,';i:':',1i,.i,,,1,;:'#",*;.f,ooJ.'
{+Jlfff:,ffJfiiTl"i.i,jl{,1;llTilc)na,nrcn lly publish or subscribe
messascs rrrving frorn a ro'ic,s ,,1-t,.ln:
t"l':nJ Tg-archy,f The sylrcm tlakes br'r-
"i;;;;;br;;;;#onlv as 1,ng
" i,i'r", i"',ri,,il"l" ;iili;ij; :*li:Llll'r<i .its"irrulriprc s,b'.';u.,r. i,pi., ;;;#;,..;,,i::-rv.ir,"g "'
i,i"k;:';':':;i;:l'11il;il::;|liffii,J:,,ilri'urriprc subscrib.ii. i,pi", ;ff;j:,:il:
Pub/sub r'essaging f,", ,t," .^,,-...,.i,f:'. l:/ ,H
j 5::l l:.:,* .- u,r.-,,:;; ,:::::*tttt-'-'-. ruotrsners and subscr.ibers trv;i:.,l'-i-_,-con$rne onry rness:gcs pubrishcd
t.lt-:u:iilil:"t depcndency. A cri
con,inue ,o u. ..,i""i-",5.Jii.J;i"":1jH..;1*,;;i'.:,,"#:I."^.,.;i";:#:,,::,r.l;rJ.:fi,:.';jl.j,l
) rJ :1116 ;. c,!-.n crogie.
Messaqe Consumption
Messaging products arc inlrcrcnrly rsynchronoui: There is no fundr:n thc produition ona tf ,"
"o,,ru,nl,ion
of a rnessroe l1^.o.v^. rh- ,^r"
t::i3f tTi"hlbctrvccn thc produition and tlc
"o;,;
'.-"''' gJrr'llrrerluu5' I rlere ls no lundamenhl timing de
n a r[ore Drecise sen* _,*..,,,.,^ ^..-u,J|ion
ol a rnesrge. l.:lorvevcr, rhe JMs ,;";il";l;; b;,
ll.;.i,l;;fl#" j.:,". M",",s.; ;;;;il';;;l;ffi ;":ii:, iil,l,",]il;,:i j
-i.tttch rynou:trv. A srrbscribcr ;, ,-;;
"- rrr sr'Ircr oI Iwo rvavs:
.re reccive n,prh^.J -r.r- --^-.,..- - .,,.iiu..
cxplicitly ferchds rhe mcssagc from thethe reccive
'ethod.
r'he receiuc ur.rt
-- '!r !^F'vrrrJ rsrcncs tnc mcssao
,ol r.;v. ,;r,;- block until a rressage arriveinot arive rvithin a spccified tirne lilrrir
::'::::::,:,::,:::!; fl,:H,:::,:::,:: :_"^::::! t: 1", ":*wi,h a consumer. A messase
il il:1I::ff*l:ff :::.i.1".:':1", ",'r";,
ii,'i"'i"l'iJff "'iJ:i?fi;t,fr::
calti'g rhe risiencrs onruress,gc ;il;;:,;,.; il'ffi :iX:",:;,i:ifi,i,::.j:;
dministered Obiecis
l]:'o.p"',, Jlln,, applic:rion .desrin:,;ji, una .onn".,;on 12.r^.
i.i'liJi"H*:I:",''#:ir;i::*','# i:*.";*l +r,::[;:^'ix'JH;:;l'i,,'i:;,TJii':j
;i,#::::'l'::,1':,l""r,on p,-,,-s#lu,",icalr), :rh.e
tlii;tiliilH::i;*t#i{ir,rlt1u j';lF",u*iiil,":jp.:::fiil?;ff J:.,";ai:r;*:r'cr'r gs ,virh ,r,".
"r,i,j";,,,,,'i,";.,:iJfi"il'"";'l;,:#ili::,J}"..".ji,i:;
I;;*dl -
.--iJ.''
rffi
lffi
W
A
qonncttioI Factorics .
A ,o,,nurtio,u
/o"-ifrs rhe obiecr r e ri""r ,,"--.^
"n"op,,iu,",, r.i Ji";;;.;,:;'":l::::r.uses ro cieare a connecrion ro
!Llnnec-rron racrory is an ifii"n.; oftl:ujot;on
P:rmmerers ;;;';;;;.1
pt""idcr' A co'tection facto'v
loprcconnecrionFa",gryl,rrrr"."
tr'' conn"J';onio.ro;1il;;:::"":;T;t"ffi,ifi"i'*.o'' e';
r/c |tlalions r: ;1,
A d.'stit,oti()t is thc o'bject :r clicur
nrcssirscs ir .,,ur,"*lin',i,""';:;f;, ':::: ]:
spcci! thc rir-(ct of Dessf,
u,.,s,E;,'g ,rn,uainl j;;;,;;il;:- j,:'.";;5:Hf s .r;,';;, ;;;,,,",'li'j'"','."..1,:ii[:::"'"TJ',,"ffiJJ
Conneclions
a ,o,,n"iiirupsuhres a vinuar ,
rcp/rp socker u",ri"",-.;,"",,j1"0
"."^l:::l:l'
"r,l a Jrr4S provider. A cr
scssrons. i'. - - 'r provider ser"i." ae.r'",, v"" ,i"'jT::t]".1
could reprcsenr ar open
connection l,c crerte one or mor"
A.rcsrirr is a single-threadcd conro
'n",,"s.
pn,d,".,i il:i,,-. J:ffj:.t:l'."..*:lll and consurnins rne:L,r..l,nu rressages. ;sages You use sessions to create
d{ !,:.r i i. t 6l
r .l
t--.
I
3t
I
t
t
t
Eessaqe prqducers
A ncssage produccr is an obiccr rh
It implei'enrs ,rr. M.;;";;fi;:::1'n,.'.rtirt'J" by a sessio' iind uscd for sendin!r r])essages ro a desrinalion..',..'",.
Messaqe ConSumers
A: ness?8e
"o^u.ullln obiecr rhar i< .r,6,-.r L.- -
1'l:::: t,i.pr"'.,u,"ii,."i'r:::jfi::ff'J:1
*ni.:.:*'""
and used ror receiving nressase! senr ro a/r mess3ge consumer a ou.s a tls c'j;.^r ;:;;;.;::.,,1:''.. . ipfovrder manages the delivcry ort']ll1::
tt*'ott
'nteresr
in a dcsrir)al
oesrnarron_ rncss;rges frorn a dcsrinariorr ,"
,ll:
':l]',,1]t: provider. 1.he JMS
.. .-_ lllc rcgtslcred consulhers of the . -
Messiqe Listeners
! lessqe listetrcr is ar oUiccr rt,
;:',til';tr,'liyti#;:ilil,jrltiiil:,fi{il::';:"H',";LJ;'ytli::.:':r,:, 1,ris.hjcc,
laken rvhen a r"-."g;;;.i;;r. "''r'ruo' onMeslase ln the onit{g554gs
Messaqe SelectorsMessaqe Selectors .'
If-your messcging applicarion nccd
seJccror, rvhich alows a rnessac,.
"j"l?,,11:t:^,T
l:"tsoges
ir receives, you can ,s
::lil;J"j::l:Hi:,ln'"':#1";nl jtiffi ;:r#tr;imi:":'i)::.1; j:,:'.,,:::assign rhc work of fihcring,ne;;";.,o.o" il"s;;;,J,'JJ";,i1.; appiicarion.
Messaqeq
The ulrirnate pu+ose of a JMS aooj
orher soitw.aie aonlierria-. ,^,a a1:11t""
is to prod-uce. and roother soft*.are applications. lVil,,--'""
rr rw Pleuucerano loconsurne_nlessa3cs thJr ca,r ihsn be u.r,d bv
you,ro crc'c
'"";;,s.. ,il;.;;:;;;;;;::,":.1.il"""::;,i^j:11l,lI:,::l"pr" i,, r,igr,ry-n..;i;'";:::,;{you to crcltc mcssages rhJt mdtcl| fo
rrrat r (l,nple but highly flerible, cl
s Ltrs ,,",.,o"" i,ni,i,;;;;;i;:':',:,::,:i'::]':-'r.:r i:"l,Ys rppric.riorrs on hc,crc:jenco,,s rrirro,,ns
i I cssagc Hcadcrs
A Jtvlimesagc headcr contains
ptouia.r.o." r?ii"J; * #ilI'l::;jf f'*'t"'
lickh r|irr c.rn;ri, virr,cs rh:,r r,rr, crl's,rr.s irir(l
. rylessage properties ..i ,.,.
*#$:."11;'J'"T:i;:::';:'?,0T"-,:'.':"'#"i;;iJ",I:; r:""00',"n
,o,hose p,ovidcd by,he
use them lo create m"s."g. ,"l"i,o^ other m.ssasing t;,r,.,ut, o, 1,ou .un
Mcssage Dodics
Thc JMS ApI defiaes
to receiv€ data in many
Contains
TexlMessage
;i::';":fl"j:fiffdM
scriatizabh objccr',,'iirJi;;;lilg;,;;;;-,g ti,;c,*;". -*. -- - - -
tgc bu,dy lbcrrlts, also callcJ rllcsser
fo-nns and provide c"^""iiii;.'., .il;"- '.',1c5-
rvhich aJlow v()u to sc'd utd
,:.------.---:-_--:- 1 exlsllng messaging fon nets.
tg. Cornposed of heao.rliJliiit prqp",r..s
""t).
r h,_, ,*r;"r. ryp" l;when a message body is not required.
ffi0wm,
1
'Fu"tt1'na
ooitt, (tut .*""rp1", tt'"
"on-rcnrrlr
on-ex.nsiut" rrr,.,.r",p
;i:il1fr
ty en,incraror u, .",",,r,,,,,ril-i-u.;:. ;;"fi*.il ,i: """::,::j::
ectMcssagc
,
it
5
6
7
8
9
10
11
12
c)Jli
lrs
lrs
tl
18
t9
20
21
22
23
24t
25a
261
nl
28 1
zsl
30 I
3rl
321
::l
34lt
TIJD
3f
38
39
40
47 I
42 I
43 I
41 I
45 I
ael
471
aal
4eI
50'
51
52
53
s4
55
56
57
58
59
60
61
62
63
64
65
66
67
@ xgnvnrs cbnnedivl 19 bl to serda ooP n and JnJ $mx'l
public class MyQueuesender
{
public stitlc void main($tsingE args) throws Exception
t 4 a. /^ ." -r-.--.'
Propetti€E propEnew Propenies(); . corn,scoo. er*6"prSse
. rar,l'5' Sen;arJoitdo u$atn
Irop,put{Conlext.lNIIIAL_CONTEXT_FACToRY,"@,,);
prop.pu{contextPRovtDER_uRL,"B rfloiJ}&:lir.H
lnitirlcontoxt ic:new InitialContexqprop);
,^- QueueConnectionFactory qcts(eueueConnectionFactorvlic,lookuDa.'conFactJndi,,I:
l€) Quoueconn€ction qconn=qct.cEateQueueConncction(li-"qc41;.i4; -Til';""e'jlrro to J$C.""rghc't)
QueueSossion qqession=q6onn.createeueugsession(tiiio,illsion,AUTo AcKNowlroen:E?i'rA!hbt+trtotti 6<sslot0hic* OS b4le b por(orD On{-JHl, Opootj oDS. - " todt'
Queuequeue=(Queuelct(.lookup("QueueJndi,'); --+ potds .iO rhe er*redC Cesrlr,ol*rn Ce Crt(4 l,F<b Orvr,,
Queuesender qsende.=qsession.createsender(queue); ___.j
oqt(J
-ir,n*.
frrlnlng tO Stf|t€ d.j$Ddfb,,
Iili|X"r:il,n"
t""""n"t a5-60 ..-
c'arr5 ?o 1cxr rrssases bool og ?o djgftJ,*'t 1txf onttrus
ds beucs ' bor €i-rtri 5 m€tso3es &nia,os s"me kr!'e
in rfrme PDg,nS.
To nrn PlOln Omg) SprJng JrnS O{tPn6
Q teel rngdo.ncrio e 4sr'ruor cf CrrlassFsb ;n runninX rncete
otffi:3i:P..il'6''*'&ft'-:S;1i&-,1,',11",-"lqr$ir*1
Cli)qD(a v -ert 'i4'l
CID a{P&rv-alm)h'lc.t
tir) a{Xr,r! - ee . jc.r
Cr),huee.jar
message=qs€ssion,croateToxtMossagg0;
meslags.setstrin gProporty(,'Name",text);
messa ge,setText("This is ltem "+k+,,"-,-."+toxt);
System.outprintln("Sendirlg,,+k+,,t"+text);'
qsender.gend(message);
' k#;
I lot
lltor
qse3sion.close0;
qconn'close();
yjrlr6a f1!6u<rre&n&r.ictvct
{ava Hg6ueue&n&'t
int k=l;
for(int i=l;i<!4;i++)
{
if(i==1)
texts"Hotrnail";
else if(i:=2)
texts"Amazon";
else if(l==3)
textr'Jcuru";
olse
text!"Bazes";
fo(int 1=1;1<=5;1s1
t
importravaxjms.r;
import javax.naming.*;
lmport Java.util.Properties;
68
60
70
71
72
73
74
75
publiccrass MvoueueReceiverimo"'""""""ii1tixr3ll
-.uer ftam a..cr.edes"ffis"?
public stadc void main(string argsp) rbrows Exception
'
[r!c'.un! d"-,.i:,14 Ary".d"m't)
@ chonge trsa Jndi pnfr,,tttr tt 6frsFsl (hDld'b
Properties prqp=ney Properties();
prop.put{ContexllNlTlAL_CONTEXT_FACTORY,.lveblogicjndi.T3tnitialCo
toarFartcr/.};
prop.puqContextPROVtDER_URL,,,t3://localhost'001"t'
lnilialConlext ic=new lnitiatCont€xt(prop);
QueucConnectionFactory qcts(eueueConnectionFactory)ic.lookup("ConFactJndi,,);
QueueConnection qconn=qct crsabqueueConnection0;
importjavaxjms.';
import ravax.naming :i n
i-port j""r.uGiii.ilrti""; {.p rtie or c-rc*r oliar gornr'ng tD o}o$Fsb r€ttt5
I"":::'1f*')-_-.------Myeueuer",,o"r;"uo3odro-.,r...) --_
jr'!E applicarionB---
ii
Que!eSession qsossion=qconn.:reateeueuesession(false,Session,AUTO_ACKNOWLEDGE);
l: Queue queue=(eueue)ct(.lookup("Oud&ndi,,);
I9
80 stdng serector=',Name tt{t,eazeel.,Hobn",,r".-- n"**"* 6 f;trct rtr srscng
t;, QueseReceiverqreceiver=isesston.c.ei;ie;eive(queue.setector);
tq uvQu"r"n""ui"". fi=?#iffffu3.,u"*".","k
cQriog trs-vor pot"it'n ra B&e,.€ akltimlc*!
u4 qFceiver.setJlessadeListengr{mq};
85 -------L
86 qconn'start{)i ffi"-1l"""6c Lttt'<'t Titl'*
current cla-x objcrf,
!i ,
-E-e.-',tt [slan't h m<rsalc skrr<
f.*
dc rocxcSex '
89 F-)yqrrtg4fs tarirae msfr €zlh firr€ ,
90 public void onllossaqe(Messaoe mLot I
31f,r,ffi;;;i#i"a+"'(Edat<'acolr"'eoclrmesso-netor'il4t7
sr
lgrran i6iaressag6 bnsg={Textuessago)ms9; r/csgest<tre
ii## iJ"11i#:$Tlli
R"?il?d($;"""s"'i"'".t*s
Tffi 'i**.s a* ffi.,),Sf dl ' e,pdntstackTrace{)i
98)
9e)
100).
tot *.-.___*
t02 (App2l On Topic
163 -.--...*-________-____-Igpicpemojava-_B#j.:b(:_amD.)
104 importjavax.naming,';
'105 importiava.util.properties;
139'.o"nl:gtln".j_rrrn5 Apr)
108 public ctasi TopicDemo
r09 t
1.19 public static finat String TOPIC_FACTORY =,,tconFacrJndi,.:'l'll pubfic static finat String TOpIC=,,TopicJndi,,;
112 public static void mainistring argsgiltrrows NamingFxception, JMsException.lt3 {
111 Properties prop=new Propeniesg: Jnf,r! properrtct 4 Cntrlss$rh rt6,s tj'115 prop'put{context'lNlrlAL-c-oNT_EXT-FACToRY,"corn-sun]enierprise,naming.seria
nitcon texhactory,.);'!'!6 prop.put(context.pRovro-en_unl,"iiop:rir"" jiii"t.jiqs); """
11.1 Contextctx=newtnitialconteit{prop);
118 ToplcDemo ttsnew Tep;sggrnsil. -j(ur'<'u rr6!s a!,krr-
113 qioiu!(gxFuJ."o"t*a,e*,a;#$ifu
121 )
122
'123 public void dopubrconrext ctx) throws JMsExceptioo, llamingExcepticn
124 {
125 Topic topic=(Togiclcb(.lookuolToptcr:
126 -Ggr*iAf,|;'$e tn)( &$tnaHon c& OrhsFsh rqisrr5
iil €) rlT:ii:311ffi:li:ll::-':i,*:*l:i*:n:*nrcrory)cb(''|ookup(roprc-rnironv);
ill i3ffi."Hi"Ye'+:#anr*i$,ieH#*ess ion.ruro_ec KNowLE DG E) ;
|t;
TopicPublisher tp:ts.createpubtisher(iopicli _) F6llshel is creareJ [r]r+i' lD lOp, c
ili @
136 f TerlMessaqe mso:
1!i i ;;#;:;r:,[i;r'iluessase(',rhis is rrom sathya rechsliz..t ,,t,
lc*r,g 6ne ]e^r m5J.
133 L system.ourprinunfl n,ui-"r,ins,st on lr,Jirli3i""tiJijil,i;i,,;;,
1
iii lf.*:9il(r*s);
--r &ods one le'(r rns0 tD ihe ropic d.esrinattcl
142 )
143 )
144 "--*--*- _subscriberDemo.iava_.-._6_____-_
145 import javax.naming.';
t46 impoft iava-util.properties;
147 importjavaxjms,.;
148 public ctass SubscriberDemo{
149 public static void mainfshi;g arys0) throws NamingException, Jlt/tsExceplion {150 Propertiesprop=newproperuis0i
JorBte5 ;n closa p&rt Samg c6 p1g/iocad cr{po 0
1s| run trb5clibm c,+pn P<,r meotttpr( times from d)?k"&r* t lndrrog +ien vun rhe
Pcr2nishor app6 .g' are firne.
151
152
153
151
155
155
157
158
ts9
160
161
162
163
'164
165
166
167
{6E
169
170
171
172
173
174
175
176
ptop.put{ContextlNlTlAL CONTIXT_F,ACTORY,',com.sun.d'|torpr;6e_ni,ming.Ee.ia}|tritCor}iextFactory,,);
prop.puqContextPROV|D:ER URL,"iiop:,, io"u it
"*t,+C+$'i;-'
Contrxt chnew lnitialcontex{prop};
SubscriberDemo tFnew SubscdberDemo0; r- C(lryrfll ( tds obf(+
tt do-Sub(gk);,-? i.,k, ftF,ff d-"teEa-ytg!,r rine no: l6()-l-l-r
cq.closeo;
)
public void dosub(Context ct() throws JMsExcep..ion, NamingException{
Topic topic=(Topic)ct(.lookup("ToDicJndi"t:
rhe tDP;c d
'JrlDa$drt
<g (nlalrF-sh Y<E;sh'l
I:ti:::lT!Pl?crory rcf =_(To-picConnecrionFactory)cb(.!ookup(,,tconFacundi,,);
%emF..r-;Topicsession tsEtc.createTopicsession(falss,Topicsession-AUTO_ACKNOWLEDGE),
Topicsubscriber bub=ts.createsubcriber(topic);-> "Bp;(trbsc$br^ .rs
Crc.Ilr(d fnly*iy rb
tc.start{);
Thl< o€stir!}l on '
(]'om lt*tc des6rr'Oorl
System.outpdntln("Received message is:"+msg.getText0).
rc.croseO; ---T-i',r,-
TextMggsage msg;
ms9=(TexaMessage)tsub.receive(); ----->
1rt ) ..
17A )
179 ----------180 Applications on Spring JMS
181 {App4X or queue)
183 Send€rApp {on eueue} -
1s4 ---.----.:*'-:--l-j...-------.-rrlessasesenderlava(Si$&*d..-_h.c_rry.toS.tc tu 6o' d T(^r yn€rsa5 €
185 impolt javaxjms,.;
186 import org,springtrameworkjma.cor".-, @) cdero;ai:ct Jt45fc.rdaf,< tlc't{ 4tidt $mrutb Cf{<' ct'i"$"t
187 publlc class f essageSender {
188 iarBrcr io oarsrxrrtl
SfrrinA Jan Bret : @
sar* 5 3s f,res .,p - ppoD lotrralr'r
&lrff,sb erlrr shrrrd bC iO ruodoT moJe
settdc.l
f,-"- J }i 'Jav aL!)
l-"- qn rng.
"-1
E ndc^ > .i1vc4 x javq
6cJc. > i<lla k'dc t;z"l-
?9? MBsagecreatorcrcator:newMessagecreator()
203 {
l3i
public.MessagecreateMessage(Sessionsession)
?9q Texutilessage message = nu ;
207 tly
208 ,
i99
tffi!" rr'e.1 message = session,createTexfluessage{);
z'tv -J tmessage.setstrinqproperty("text","HelloWortd,,):
211 ) l'etr4sd Jq''br f" 6Dl.r ihrfxr,i.tb r,r,.1 .
111
catch (J tsExceprion e)
lii l
s'Printstackrraceo;
216 return message;
1i:, );
) eoe- art :- |e.t ohjcq F,, nreou,,e,s
219 inrx'r curs abof ir'fl.rr'an.rj
220 fitsend(creator); rn""a.1sCt a1"(rn<.L..a ) torcrtA
1li ,V *ft."*"i cDcr'sm..a-rc.
lli -l'1.'- I :'s .----*:_.s.s!s..,..Gnryefu-fuc).-1.*;n3 rhe tqic ro iqcrr
225 <?xmt verston=,,1,0,, encoding=,,UiF-8;D
irOfa*lota at,.rf ohjeq ,
*&
r<((rvc,s m6d
* c"ac* Q ln' *4"
133
plivateJmsremptatejt;
131
pubtic Messasesender0 O
r93
194
195
196
197
'198
199
200
201
public void seut{JmsTemplate it)
thisjr =
jt;
)
1-. t.l so oeP;ned B' mabod
public void sendMessaoelt
@;irri r'-g,rti..s { a,tc.ss B:h Yeidtrty!*
226 <lDOCTypE beans PUBLIC ,,JripRtNG:tDrD
BEANi E .,
dll ;tthi//www.sprlrgtrirrnework.orgidtd/sprin;_;;;,d,-;:,>
tzu <beaDs>
?11 <b6rnid=.igmptato"
iiilrii*i,T#l1Je.""Xi??i"TF;??#'[il:X,,#,'::::"*]"-l:-*?,,",
>qo
261
262
263
264
265
266
267
268
?69
270
271
272
273
274
2ft
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
fi ffi l;:$g:Tl:,,ij;ework.co
ntexi,s u ppo11. ;
(
public static void main(Sttng argsll)
ft{*##l[t#i':i,ffltf"'Jl'S3;ffii,tr&#;$??f,q]tri,-"ioncontext(,,sp,;ns.xmi,,);
)
system.ouLprinfl n(.'message ser)t,,);
RecelyerApp
importjavaxjms.*i
import org.sf rin gframework jms.core.";
public class ilessageReceiver {private JmsTemplate jt;
pubtic MessageReceiver0 O
public void seUmsTemplate(JmsTemptate jt)
t
thisjt =jg
)
public void receiveMessage0
t :;.eiv{ rtf msq frDrn
Messi.ge message = il;eceivefl: O,c, rs-Ct $trlafidrl
Tc:fltlessa ge tms g :;f iij<n (me$a9o instanceof Text rlessage)
tnsgE(TextMossage)message;
joi Brce in closS fiaA:- sane cr
&ndrr4pen .
{?&&'vlr,
f- --+x jor:<o1
J--- sp*ng ,
^m1
llecqua > i..vac t( 'Jcr!c
>Jcrrrc. R-.rteC0c",r-
j ifiX
:t
ru
;:;:=''ffi ;SlHBll'"f;'rework
jrdi'r'rdiobjectractoryBean">
/
;l'1 -iH
-:Effirfl ::i#;::ffiI,ffi'namins'seriarrnitcontextFactory<prop>
11,5 ;U*dXy:, nd i Name,, varue=,,rc o n Fa cu n d i,,D
23a (Ir 8t,rh&s c{nrrurd.,F<drrrJcLj.a
frrm glc.rFsh rc5istr.,
239
i
try
{
System.ouLprintln(trDsg,getTexq))i
. System.outprintln(tnsg.gestlingproperry(,ierr',));
)
catcJ sErception e)
{
301
302
303
304
305
306
307
308
309
310
31t
312
321
322
323
324
325
326
327
328
329
330
331
332
333
334
e.prin6
)
!l/'?
Itdd
| //.b4
l!9 _:: -_--_-..-.spring.xrnt....--
M .tOOCWpe mans pUBLtC "./APR|NG/,DTD BEAN/E .
316 "http:/www.springframework.orgrdtOfspringn€a;.dto;>
316 <beans>
317
119 <bean id="cfl clas-s!',org.springframeworkjndi.JndiObiectFactorvBean,,>
319 <propertynam€="jndiEnvironmenf.>
320 <props>
<Prop
le}':'l1l1l11l!g.factory,initiat">com.sun.enterprise,namins.serialtnitcontexFactory<prop><prop ksy="F ROV?DER-IJRL,'>ilop:/,[ocalhost*d{S<./o;dD>
<props> -btr'oorn)n8. prDvldk.urt {++t '
<property>
<property name='JndiNamo', valueJ,GonFactJndi"/t
</bean>
.9:11-i91C" class.E'org.springframework jndi.JndiObiecrFacroryBean,,>
<property name='lndiEnvlronment">
:LIRL">iiop:/localhost:+846</prop>
.
a/rt,&r.br | +6+b
135 <property name=.jndiName" value:"eueueJndi,.,/>
336 <,/bean>
337
119 <bean id="i€mplato', clas6=.'org.springlramework.ims.core.JmsTemp,ate,,>
919 <property name="connectionFaitory-. rets'ici/> ' - --'--'--'-
119 <propertyname=,.defauttDestinatio;', rets,'q"/>
341 <,/bean>
u2
l{1 <beanid="ms" ctass=,'MessQgeReceiver,,>
1y <plopertynsmer"if' reF,'tdmptate"/>
345 </bean>
346 </beans>
347 .----."--.--*- *-*Receiveclientiava__.__4*__..___-__-_-___..--.
348 importolg.sp ngframework.contextsupportii -'-'-
349 public class Receiyeclient
{
public Etatic void main(String args!)
t
FilesystenxmlApplicationcontet ch=new-FilesystemXmlApplicationcontext(,,spring.xml ,);
MessageReceiver mr =(Messas€Receiver){55k#ge16;t;i,;;;;i:--"
)
mr.receivetlessage();
l
<props>
<prop
<prop
</props>
</property>
350
35t
3s2
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
. 370
371
372
37t
374
375
Apps (on Toplc)
Sender App fpublialxr gppn
import iavarjnF.r;
import org,sprlngtramework jms.core,';
public class Messagesender {
private JmsTemplate jt
public Messagesende{ O
public void seUt{JmsTemptate it}
t
thlsjt =
jt;
)
376.
377 public void sendtlressageO
378 t
379
380
381
382
383
384
385
386
387
388
389
390
391
352
393
394
395
396
397
398
399 il6end(cteator); ---.> 6drds
400 )
10r )
Messagecreator cl€etoJ = new Messagecreator0
t
public Mosaage crcabM$sage{Session sess,on)
A"dr!rrdlt{
]!ln6 d(lr s TextMessage message = null;
phkcr !Y
,,1'*ro,* {
'"v*-- J messago ! lcsgion.creabTextltessage0;
l.t.'.,(.6rGat-eaato.at4 messags.setstringProperty("text', "Hello world");
ld(. k ce message,setTgxq"thk is test msg");
)
catch (JilsExceptlon e)
t
o.priltffitackTrace(];
)
retum message;
)
];
rlE' Yr,essate t0
rb?;( de(hrd$oo
,
133 *- ---.-.------***:-.s.tl,nsmL($.drs*3-Qr"j- .,..,.. r$sc..rr.d.-g..,a.J404 <?rmlyersionJ'1.0" encoding="UTF.8"?> 4o6-416 ----, urru "
405 <tDOCTypE beanE pUBLtC 'illSpntNet/Dto eEAH/ieN- oui.., ut $frn;ng i+ liDrn f,ndi r€{l(n-5
406 "http:/iwww.springframeworl,qrgldtdispring-beans.dtd">
407 <beans>
408
409
110
411
4't2
414
415
416
4'17
414
<bean ld="cf ' class="org.springlrameworkjndi.JndiOb.iectFactoryBean">
<property namE=".indiEnvironmonf '>
<props>
<prop key='lava.naming,tactory.initial">com,sun.enterprise.naming.SeriallnitcontextFactory</prop>
<prop key="PF|€V+F€tUR|Siiop:t/localhost*8,*l'</p.op>
<prop$> &o'narri* .
"-,ao
. ,., t 4(+5
</property>
<propefty name="indiName" value="lconFactJndi"/>
</bean>
4tq-4r+ geft Tofic Ptor.,
4191 <bean id=''q" class="org.springframeworkjodi.Jndi0bjeclFactoryBean"> Jodiyritsl.r!
4201 <propertyname="jndiEnvironment'>
421 I <props>
422 | <prop key="java.naming.factory.ini6al">com.sun.enterprise.naming.SeriallnitcontextFactory</prop>
423 | <propkey="FA#€e=!ql.'5iiop://localhost:40,+6</prop>
424 <,lprop* JGv." rl]ming I pr"v dor. ur, +t4{
425 ll </properttp
426 J <ptoperty name="jndiNams" valus="Topic..;ndi"/>
42lJ 4bean>
428
425
430 ) <bean id:"template" class-"org.spdngtrameworkjms,core.Jm6Template,,>
431 L <property name="connectionFactory" reh"cf'F Pttfr-d,; 4og
1ll I <property name="defaultDestination" ret="Sr '4q : aq
433J <,lbean>
a'a
'rb 66'sTc'oPb'r
(lard oicr"t
iii -r*,
Sphosgr4n irl]c!rcd toirn Jrns r<"Px,'c
436Y <bean id=''ms" class="Messagesender">
437
I <propetty name="it" ret"lgIqllEl -rttla : +60
43qI <beaD
439
e <,lbeans>
440 -*.-.--.*-- €endclienljava---
import org.springflamewoIk.conlextsupport';
public class sendclient
{
public static void main(String argsll)
{
FilesystemxmlApplicalionCont€t ch:new FilesystemxmlApplicalionContex("spring.xml");
Messagesender ms ={Messagesender)hclcry.getBean{"ms");
ms.sendMe$ag€0; clx
System,ouLprintln("m€ssage s€nf 'h
)
4{1
u2
443
444
445
446
uf
UE
49
450
€iooder
f--
-- x 'iaYac!)
|-'--'--':sp;%,{rn
etn& >i"vac +.iava
> i.ur^ Serl,dbe^.tr
jarftres in clAssPAJH: Sqrh€ og pre"ioas app'A '.
451
/ 452
' 453
454
455
Receiver App (SrO6cr,ler )
456
---llessageReceiverjava--
457 import javaxjms.';
458 importorgspringframeworkjms.core.*;
its9
460 public class llessageRecoiver {
461 private JmsTemplats jt;
462
463
4U public llessageReceive() O
465
496 public void aet rFTemplate(JmsTemplate jt)
467 {
468 thisjt = jt;
469 )
470
471
472
473 public yoid receiveMessage0
474 t
475 Message message =jtreceive0;
476 Textltessage lrosq - null;
477 if (messags inslanceof TextMessage)
478 t
QecPi ver
l------+ x 'ja'a fa)
I
l- ------ +ri og ' xml
.).i1ys( tf -.jctva
7iaYc( f<ftflwclierLt
F;r5i ,5kr1r a)al$ple Qeccivto I Subs'oi6ea
.405 E$ stzrr amlS cne ?D'l'T aPPD-
' (tt/tkh'< efllD/
479
,i8o
481
482
483
4U
485
486
447
488
489 )
490 )
491 )
492 _____________-_____spring,xml__._____...____.___-...-___-_-_.__
493 <IDOCWPE beans PUBLTC "-//SpRtNGI/DTD BEAN'EN"
494 "http:rwww.sprinOframework,org/dtdlspring-beans.dtd">
495 <beans>
496
497 <bean id="cf' class="org.springtrameworkjndi,JncliObiectFacto.vBean,,>
498 <propertyname."indiEnvironment,,>
499 <props>
:99 <prop key='lava.naming,factory'jnitiai">com.sun.enterprise.narning.SeriallnitcontextFactory</prop>
501 <prop key="PR€V|DEf[-URf"iiiopy/tocathost:,t&*S<lp'rop>
!9? </props> irva.(&rn,')6-. prD,,.<r(" (d I 11,+6
503 <,lproperty>
504 <properlyname="jndiName,,valuej'CcnFacundi"/>
505 </bean>
506
:9I <bean id="q" classE .org.springfrarreworkjndi.JndiObjectFactoryBean,,>
508 <propertyname='lndiEnvironmenf'>
509 <props>
919 <ptop keyi'lava.naming.factory.initlnl">com.sun.enterprise.naming.SeriallnitcontextFactory<lprop>
:11 <propkey='qryryp54-g*t,'>iiop:t/tocathost:fiFt€</propi
512 <ptopg &vtr.nc,mirq . p761,atgr. 11, 1 46t6
513 </propefty>
514 <propertyname='JndiName"value=',fue*Jndit'D
tmsg=(TextMessage)message;
try
{
System.out.prinfl n(trnsg.getTextO);
- System.outprlntln(tmsg.getst ngproperty("!ext'.));
)
catch (JMsException e)
{
e.printStackTrace();
)
G p;(J.td ;515 <bean>
510
117 <b€an idJ'lomplate', ctass=,'org.springframeworkjms,core.JmsTemplate.,>
518 <property name="connectionFactoryi ref=''cf,/> r-rt€t^ I a,a-
519 <property name="defaultDestinatio;,' reF'G-V>-- - .
520 <bean> Erc, s6-t
521
522 <beanid="ms" class=,,llltessageReceive]-.>
t?q <property name="if' ret=]teripfate;f>f t4<4 : Srj
524 </bean>
525 <beang
527 importorg.springframe*iork.contexfsuppoA.j
528 public ctass Receiveclient
. 529 {
530
531
532
53i}
. 53il
535
536
537 )
public static void main(string argsll)
t
FilesystentonlAppticationContet ct(Ener..FilesystemxmtArplicationconbxt{.sp.ing.xml,);
)
*ff :ih"""":ilm' =(MessaseRecet"errliJ6;s"6;?K:i:
*'
-
538
a-----:
TO Ocheive Osgnch,rono&g Cororn cfri(OHc.n
.^s€ either A,Ja.x (Cli.nr5)dc rc4bn6log3)
To C,cheiW mesSC.Xg bC.se d CrsgrrcbfDno, 'S
6randd6ne Java aIWb Lrse Jfl$ Uose a
Ol€ sc.rct ?tDvU€,{
6lco brocoscr co in 8oq:r aod ctebcrpp r)
ol Jc'v o Rr,t ler6
Ccrm roudaofi crl
ttPS6 c(gtnt ,
Peceiver OPo n
(Jclued,de Ter"hhobJ)
knrr?n lcoo
*n&r qrnn
--j US(S
Fr, t fr.a hPo o^o
E€ i,- ;m66e1vu I
fvovldoi s
H6S€rieS Prom f,bt't
msna fto- nrtosdr
t,dILE€ic nersage
gmr,/
Grto,ssfish il€so6t twtl
fi.ut"Wctd€t.-
Flo- GusFrh
(Io
Qeait.E
YtSq
$1s i5 €wt, ro prR.m m€ssc{€s k^!e d As3nchronotts Ccrnrocrni(c*ton
@lu-reYD
tulO &va cepn6.
----4 JH5 Server
/ f,rDv;der fuppri c s ciesn rrrtt c,no h*i''g ci^?cJDi lrg to 6tore rn €xsagg
ftmPorcrAl
----. frqBy*$1vfirr g4ptizs one brrtt-in Ot4s &'rvr4"
P,n Bo:io ftr nessaging ond fiS vefu PaSe noa
hc.nd{u+ 8wn oq oalotl mrr
-) f,115 8q{f{rtr6 tio roelsc€irlg dortcti nt
I me1 Point ro Point) hrrrdn
q --J Use3 €ctecre OJ De,sUrrrrf<"oJ flestrge Str'q
lrc+ 4 rbe s4lurrrntc'5
r1 prrul** Cot*,in
Top,. as tbe Destlraklo" I
ntso'Xt et^
thesr mersc,Xe-s clo,-rrdn te€o< paXe nds
tlargc srut" /
l( r- oF the o'-[c+l:otr'
@ Ptaeaot'
elrr0:-
ro or(ol€ in GlassFsb ?''X
6fart rngdorrOn?' Server
Ern  APe'va  bin > OsadYo) n
SerVctf
o€ GrcrssFsb. crrd og,n it6 Odmto&oeole'
skot-dwrrr:n mg&rtrcr:na
er<f{91-
Neo J fN0rruarrr.;
Raurrce rSOe c
hrtptlltocorttost tA*t Lt€lD
"Jesrocc'{'
trtsted: ir'srrrlal " '-'l
--,(/a- c.res* Jt15(o!,neo$oqTacRru c.-** L"*
:*
c..eJsbaleertt't')
-r
Adnio G'soo k',ten
-
Qtsuxes------) fl4'5 R€s*n"
-
o Mctlo.TAatu#E J
SHgGrnrEJ-ttan
O4z'{'F -/
"--------r o[<
Conredorl
re?rrseofs Jngdortnc{'htdn IDo1 ' eo-eh
bk, ctierri appn aod Jns e€nrer'
&reue akr6rrrrr* !,""tg JNOI name
&xee,D ----_+ dl{sResurrcea De sdvpfisn
Qerd'rces
idvax.irr6 Pl'X
->
ft6 i
F.cdn"'co"*r
fiSCcrnarrna,-tcn1
K{rfestr*S the
6t{r'- o,erc
Admin Conso [e
JlNprName ,
fi6o^ Drn*r^)th*' CaofuatJod^ )ok
Jw is Fftr oP iee mdule Jrqg a.Pi meaD$ trrrrUnq colfi
ttre y. fttes Ibe iee o-P;f cc'nl<,.rrg itta opi
9 6e.ljogic g"rwr .--+ t'&dogic';ia1
in glasftsb Senrr
-':
jaleee '
ja{
in Sboss Sevw"l Jbos-.pvaee - ja'.1
o^krlpablirhe/ A-pp
l.r**.i*€"'* IQetwttz-TX?e :
O Plozrd..a to c+aorc -lbpl c Dcg*;vrattcm inr|'e
' a*dtt 6nvl vcnrnrth
Mmtr(oo,ote su,en >Qas:rcree-r *------t
lfor-rcer l]nffiffi*
- r h[r, -----e JNDrNarne t@gkr6stzrL
,------' -:---1 ------: ftsar".rt
""@@sggeg--r -
-/
ruc(n------)
_-2'
ftc.-ru<,r tm ) s"4p6ya AR
urea .lms c+i to srd # to s'e t'lcnry sr1l<
Lrsea jvns opi {-o rtrdr"e ms6-l furn Se flera'c
the 6Furfttre cP O116 rnessqg e
Ttrere i6 a p..,ss)bi li rg & Developtng
*rese t1essc,ge6 Ye+kr FXe no : @
beade, nameg are Fxed
propc,rg oornpr ori values *
"ff;t:rT5:..
Tasard addiricnat inPo olonS <9)rh }ltssaJe 'oe
ozed fo ctt^l' (olrh flersage p"op".+'q
5
4
OoeoeGoeneus'n
(1)
6uecre (r)
Sueore6esricnr [r)
r-elor<d lbPic
x) Sl&,t, rcceivc't
Dorrrir r(R^{
crpplicortc,n dr"Jl$ coltlr, &,ere&s4blt"
---+ Irnporcr*
rehJtd
?o: Froo:
mn€i Org:
arrrhor:
Tt'€
.l€a! a4"tF.,roP rJm$ r',lCrsa 3c
lsngrc€ 5 o? Jn6 opi
6oetre
6.treae Conrrcnoonro-Y [r )
rcrs og Husc'S€6 &" ttto.l-ct
ine" 6
-'o?lo+lPra
l;"* '
Otreue&nde'i
&uzueQece;vr'l
Ofd elo '-.
To6eR*ushrr
ToP;.Scrlec;ua
c!o& ete..-.
"yekx1td to llcssages
Ib pi c GnneorcoFacry tr )
lbpcConnemon (r)
-Ibprc (r)
-lopi.&sl.' (t)
Sr,uml"lesage
llapllesage
0b&* l'1csscse
and elc . .-.
F+r pkunJos Apr bosed
h*ea PTJP nesscqieg o{,plQ 4 $c o'loaf.r" td"*
*> 1r€ rccrl ti rne AafiP te o.{ptlcatl cro3 6tg 0m6 av(
@ OrnO*"f rrorn8cme rq
@ 8ug5 rrqnotemcr*
(9 oPPttne ord'a boo&r6 and erc
@ ft,, prcdn 6ms based ftllst''b $ncle- 4 roes6cr8in3 reW
04@ & &lo4
'.
$p.''S ilr"tS :-
-+ provide6 o.bsr{octtoo Lcler o9 plaio Jfl5', Ttn *tls ;hs4rt']lieg org'e€ ',
jvos'c(rn'J-slt"vlv'-'
+ l[t,:s 'Jt16te-plot< clc,-w 9i"pti?ics $e gvucess cP Se'rung c{oc Qe'dviYEffa8s '
'/
-+ Nonecd 4 coorbjng rcirh PtuoJtls r*r'' Pt Jflqopor<lf{ans
r
c.rertf( -^ "o
'J
-+ givus Coubeu< &ukrp.,ces it l& djeF BFs oP messc'6r'
1m&€ale JiloTe'platc c-torl o1 firSto""earo 6hi, TDPicfottt.,-tu desrinaflcrouu#'=y
+ Sp,tngJtis gnrc-a $e a"'*o.*e Caued rr'essc'geCttor<r
to ctrdJe
.--/
di?F tldtrs c-+ rmsa6ecrearors b3 u'srng rbe- e;posed gy6sr:*lcrn ohF4
O ftr, fu."5J145 bCIs€d P-ro4 €xorqPle crppucorrog
*ePR'r o{Pn@ "P
rhe
:
f:6errjs @
"0 gr/Anq crqs bclsed gth**h rncsaSing dofrc-,n
kr(
of
gicrnpte c4Po 0n
rhe Pge no's 0 t" @
o{,P(D
"P
rhe V'fleoo's
A{rP.rO -
AD
Xcclure-v
Sfxioq l"Jeb}lodclle
==:=a=-4'=:=::-- -----
Spriog lJ{e.b modLrl e
p&,i:t (0ri',cS Pluglng cncl fuc;t'ie6
-
fror., orlt'r .oeh fl@ Si(os
rrrrrre (sp"T ldabvr:v c
/ sn."g
'nn. /
f-) rt r5 sPnog 6 orr,rr rt<b Flc.:
I to.t o{pn6.
to rDcrke +rioq ciPPDS cbmrnct rr-icafcr'!:l c
bcsed o+pnl lire 6hc'r5{'?PDf '
Jerc^pp"' 4erc
-
Srrnog w'b fl,x,, )
siuc, ro der,eloP hlvc'L 61'rctLi lecict're bascd
Strc*S srd Spring Inrgcrriorr ". -
-)
fn tbi 5 O{pn Slrctr3 Crppn ftfrreSerrfS
and 6pring Cqrpn r€fm 5enr5 m€del tct'be'{
Cet'tl*t s
y166r; reg.. q,t.l *Tr*;,Hi{,?j "
(Fr€renFrl sn tog i c) L'
l0$ic5 -
[gic{ Pners iotcQce lcBic)
Ilre frr:o &r$ s oP SrrcrrS aod Spnng Irfc8roH oo .
Q eFu-rs Lo;rb gpytng{6hr*s ood Sfrfiogoppr,s .rtside ard
.q$ircrts cQf') i5 )ocol ctien+ opPn to
+ b€re SftinS offrr, r ,.t not be a
@ 6r'1115 h 6piog
-+ he"-e 6hnrS c{l)pD and SDing apflh yesides cn f('o d; P ft-'re
"tf JVvrS <:€ SalTr e cY
di?Pete'r-t co-Prt't'
-i StYars o{?n ;S fi€ff)5te cllerl-r o?pn 16 $ng a+eo '
-> h"'re sphn3 cr-ppn masr be a Disrri burcrl oePn,
-) Jh€ plt{gir) rel1.rw d P.,. ,StYL(S 1' I arrd Spr;nq irultgr<r$f0 i+ i
c,nd rus P)ugin i5 scqrPltcd b5
prg. ef: . @eb'6ttL+5. Gnrcx+Lx,cte'r PluSIo
Spriog slto to ccnrfigr.re ir, SFtutS ConAgurol-icr{) Bre b;.rsr.'tg 4plr-rgin > k.x .
Aaic,n&wrcr yecltnizei cru $e plu$ins c'onff6uwd in srn rs Cor,&6uianan $te
.
tlt rnar.rcrr i b ts iosEnrt ctJt^d lorole* c'.'rc*tcrn ) . Aettcm & :r,tet insra"ttrHo-n
'frtv€s 1:1666 eirlxr clr,,"lrg S{wd 6ktftrp .,t durrrg rhe deployccn'e'r-r r-(
trr)ooppq' beccur se coe $erorrolr1 ers1cle &rd -crrr -stz'-tc+ crn Atri on'?"v Et '
--+ lhe crtr,w C}**, Lo,la.oPlt'glq ctchvdkt.s Lleloppn Ccrnxxr $pring&ruet-inc"i
q 1rrE o3 6pec;6'ed ff't" ,r.*e Ccn) A.,t'&rutttlqicalnarne - Servtch ' Arnl
&5 .gting Confi6ctY6$on f'te.ro"',e ,
-) IrL rh.is pmcsss o1-1 5f1e !er.r6 itrcrtart Cclnftiarrd tuit b€ freirstc/n]i.JtJ
ere!-uj< crfr lbe 8Om€ ovM
€fiJng efan
Disrn {fad o{)Pl^}
In ovn]lrg cP6 hre
ep)46 -in .*," fo* =
"o'9
' spr;e>gPmrt'r:zntr ' arb' strt*s ' Co..rGsl6a6ptplagln" />
iro fl-e acnvcred fio3 eon,r,irr4 1&rc6 (Irc*ia",&r vel l-rr€ i. Darr€> -se,v)et' Xml
ID srrur6 cFX Fre
J
Zplug -ir) ctasoNar'' e -- tr€.sP . cuclo' srldts' Gt'tc^'Lt'ad* Pltr3Inu 7
zsei- - ttDrx-,ft$ ptDfrrrg =-
" c*r tG.,BX locclHoo' Jcoue --
"
/ r,rre-rxr/ r-ngcPr ' xmt/ ta16'rog
e,tJ&Se'xn'/Y
f nw^rJ
zl0r,g-in >
-'hr.e tbe acl.',nra4 *pr;"g canl-cilrx,r tares .,8cP61,xml
'
ro,cg€e.[m PiPs ca ft-xc$ff*;.
-n In 5wur6 coirb Stdng o{tpD &tttopme"r tt'e St-&}6 Aeitancldl6 shocttdcon@n '''
Ciiealcide aod shrLrd cou tbe B'rre$od5 6P ft*$&^"' oDrdtagfe '-/
J
io Sp"ng Ogrn.
fxarrpre ; ""
"s*fJult-Jfj8
u)
@
o@ lw @tqar.1
b'raory coi.doto
W.r,to $e d;cqtowl
prDgrorre I deflcgeea 5fiots 6pn nt 6pl icorlic'n
b€drdse A? Loacl oo 6ran'P Ser vtet Ccrntnnc/
€.ltbcr dcrring &rvca 6k<r'fct Ccn) dl-n lnX
jn Lcrlgerv<t o'r Awlicc}lerD Sewt't '
Cfttl<a Artito'Servte'f ctass o5j
the dealneenet't & opbaff6 '
@ fta6Servt* aaivales Ca,tt^tLca$|,3h' this pt'{in o(lh'i1fts rhe arbpllta$o16^+t'r
(.adal^cJ"
h t'rcng ZA*tonftwt.rl-{ticalnah€
-7 -'krvte't' Krnl os $y"ngGnBg,tanon P;rr, _
Corrhol) e'a )
gr€c.rt C-l -., -' - )
i -.-.. ^
. J
Cc-r,,rr.r taracnl
6md rrtooiog floda
szw iCl-. xrri
f''t.
f4d,l6 WLe4 olL d'te Lr^rs 4 5mn6C*9i5t*r-' fia noiuk pt<^lnrtcrnruxJ
' -. @&@ endLr,Je{ lc'r'toO tbe Rrr'Pcr8e anJ &tL'mir l1e "'<1tLelr to ct-dx{r,'!D'
ff6rrmcl@ dl6cussion.S : *
frr- Xt" 3'Prr'* ctass ,,+ €grrng c+i ' Irle
Nwn 5h11t5 AleHc/n cl&s3 & Kndg
Crtn geh &(Iess fD
9l(us A(tlon (1035 dksfioe th'e &,.rertlooote,r PLt$ f.)
to 0& acrelg J6
cnd cre a^ F rh.,s SP"nXc0nt''ir'ad
-1? CaLt B. nrcr{rads 0rr i L '
@ Acn..n5e',vr€f it&ps and fuKe6 the rEuest an<l useg 3rtof5 ccn?;quvot1c"1
.- ftre gnt,;es to decjde Flrmbean . anJ fip;rcrn ctcrsS **'! c''- re7orcd to
PYDceg5 the rellrrt
@ A.g^&*rt prxkS rhc B"s'rrd +"t dt" to F-"-Beon clc'rs oent
O A.r,o"fuvre. cefls a'aaurct'-'-'-) rn<rbod of p6Sonctcr-rs '
"J
-@
1h.,5 fx€cck(-r-r-'-) ,tethocl s'-eboc'r rnoncLBcS tu Bth ft-ngBcan
ctavj ohj(
@ oer*tG,-,-,-) rrrh6d oug Bu,sthe$rrncr{roc{
oP ff'5Beon *A fl* %-
keP *t, rtour in refest a4w;e h rrt've i& viriote m r€.sLttf l']a6c-
-O rnb Qx€-c-otlti,-,-t-),rerhod 'rt}.-'rhg 4te @"rmle At"s69'ntt-r '
'@
A*r&r,o uses sn*rA^an*r*^ &lo gnr;a +o cletla"+fu'1'1r
pga"F*
'-@,A,n*SovteF
fi&rs€e $e G'tnte totesuttf,ne bix,r{,,{a$ndoco
as
-'6 oou,, PaXe.$.ax thc- rzcvttn ..na was lfu rtsrLlts tb
-) tc-hea Jo &nlap 6r*rs (Drrr'' j
^ : - ^,^". coitrr 6e srw"' dTtrre q€ tzoo opprDac-hea +o &trtop 6r*rs 1o16' 6pAn3 oPPn'
'-'")
loo 3nr'-t5 Actton cklss Gs 6p''rng Atoate o oi5
A0prDaab l) Bg rrr')c"'U , A
,_,U*,'., Drsro.Lftrr o,i+fsrt t . "
;: )
|
^*^n
r,#Ti*u["tj*T-.*," sfr".r' * :* p**@'rtu*
he?dfD cfu 6*'6 A'tnonctc'rs c'" si*tX |,*.-ani't spicfS f:re)
OCt VOIC/
Sil,an6k^
3gnn6Conf"no'
taN ati.d d
-) in 6rtrr5 ond Spdng inqrarl on dllmxd gte+<'t tx'th6
Sp$ng Gntairr€a - be(l-use trfS Crntalnot Ccn be usel
lh)s Gmtotnar tDit be crurva-Ftl eltho{ Chttn6
drflry.-.* 6p sr$'4n {hs ft'o@s iqnoves
oolrb Gnr<rrl-oo*rPt"{In t€+}tJ
h mulHPie krlcm cftrr<e{ c^d
f.",- sa'tiL4 (a1 Ju'*q rhe
tl* yxt?-"a^wilhc, o"nP":a a
ocrivzrli ng Sp't q &-tc!ine,l
-)
Sampie .shtrt$ A&16) ci"ss
in e151 ft-nr.o crcts s €q-'"ol<)X '
Cocle S allroagQl ;-
public c losS lestAcrtc'n
f
Flblic A+ionk"tood
ti.*
// c;t ftcresS lo
Ne,uAPPuorto"G"*tx
t-
execue (-, -, ^, -)
ep''r"g c1'"ou*o4*6'3"t Lcacle,.ipbr4i n
"1,
= gqfJn'oAPrticaHonG'*e*tC) '
exEods Ac}ione"frt ,t
(rhis inri.acd,B trirri 5 Pror1 kda ctc'a a4
6ric.tt6t ";r{ c'P i )
ll gq acr€Jb to S6ng Bean ctcL% d'j
rnoderinKr bobu = (nftrlerlnrcr ) ctx'5etBeot'
/ rnf I'
L b""t;d
Rt a^eP.n* arymoa}c: &
ApLr-lo0m"t rut
E-6c,-lg {,q"t g c{ph &€a {etrcLt€d cloCl'mr^rz+'tu-
IfroOcf, @ UUsC$st(Jns :-
-> l*re tce cbn6gurad Srrugfuricocl&rs os Sp,tn[*.,,n c-lc{g in stzttroSGn€J3u*H^'
ftte. sor{.ot L& can iqenr 111a pr6de1 lrolpv' {,;ri5{}earr
e'}a'6' ofuj<ct fo Sh'uis
.-
Aqi<m ctcrss fb Cb'l-L rhe EL|'sincl5 rnca{rods
#n o",g'n^ Sr'"'rsA'cno' ctc'rs in S* tsG"95"*l- f;rt{'o vecdt< th( wq1-ttKl
P*rn A,.rron9wrtr oyrJ J6 pas6e reqAestio cr)l$irrat 'shctts &f:o'c'42-6 !7
itrf $ Cc,nfrgured in 565 Con65'urc'rrc' f;'tt '
+ Sprn3 Apr fu>pliel Or3'sF.'*" rn *.' Derlarr^g'4.+rcrrPirxs dc.qs 4a th)s
:pcnpre
rc0cn pa$eoo'S @ n@ 4 itre muo"ricd '
flcror;1,. ll'nrrtoct cf sPn6Bea6
bpd 'bm.r C-) j
13
@R" rn. af""
toirh 6Fng
dtamm b,sA
c{p1:n LW
and tha afoire o{ftrDai}t (| krscl 6f'dz4s I"x
.{,Pr, @ Poteoo ) t5 -++
i
-+ -Io Strott ConB8urolrcn F te
(c,crion frorb=" /x.-,tz' hpe** org'se'c.]cb' '5ld<r/-o ' Dere8cttlng Atd"" P-xB >
t Prox! clost R'r origloor Ntlc'' clt{
Aat$<tl>
lbeGr'6>
' -"'uu(*i^"
'z
ru"*t-;*:*;ffi':-t:ffi' o n** q *"r'fsacn
dard
zl}roo> .^ -." t-
-,--.-'tlodeflnPI l7'
,Zbean ;d ='
dr, c)(:.s>--
tltF- L-sP;ngBeon
Sarople ,slrcrre kltcln cl&rs o? $c obaa grrnru'o :-
fJLrb)ic clcrss Gtfb;<"a exreod 6 Aedon
{
ro }od sP'tng kah cLats obi
llodelforcr bohj j // B€oo P'+dg
frlblic void sefl3.A; ( rf"atl Ttl+<l rr)hi)
I
rtnl'Ixb,j -- Wi
3
rrblic A*it,F-.-'a e'neurc (-'-' -'-) rb'otx'> V-rcat:o"
v?
{
5m1 rescrtt= bou';'gail'r'C )"1 eaitb'r'rt'd
d) sPnog}ea'n
cld'6 obic4 '
..'
.' ':
-l
-*"*'*j@
giws krtor pcoft'nonce ln s*rrl5 Jnlr#..,len |.*t,,'tJlt- ibi'04/5 5riltB*
crqrs o$et to sr',rrs Auta" ctctss PID(l/t eirbeJr d:rrt lq',J,
Sko/r&{ ot
dtrrtng
tu opprotuh no@ bored
8ffoo,.,77 y6+f
retl<'r erpno: @
fhe dtptgrrr"+ ofr tfie a'rbctpptl'
std-tfs trrlrh sPnnt c[Pn fu<r"prtrnr
' x; Htn;p,qiat Shuring 6tyut6, <p'nq,h,*-arc &zrcgrarton
v6vc? , OAO, g{rs$nes3 Deletojt Ws9r, @l+/.t!fx,"
--, the bafxr .hva CScrs 4 cllenr aapr, fbor &pc'rafeg Brsiness rrCrt^rod coUs &,**
Aad- cr]s6 i rnpleyn e-rrt-jn9
tpr,,t Pre"luittto rnodlfu is carred BossnesDclSorccto-ra
stroJ5 f0 sftioc Co;rb lh']fr nolc c{'P n
C&rnt'dl,r tal.^)
{ngr1, jsp(firrnpagr er@ft(-'-,-' -) t
.Etyr,tylt'.
E]
R10if6 e '
trYi.l4 3 -
atilr----) /-==----l

@
n f t,)eb o{Plr'(afioD
-./'
HfiP lnti4,l
nb--5r|-dr'Nl
a &PA Fwi<m'totrLf plaad in
Aa{oo ct^r inrt'acHn6 tal{
--) Irr *'e ab*t_ d..afa", iN UJOaa{)pnS dr11 fu,re (1 a"rts AlpcoA^,
€r"n6 oen rrrdut4 tb ctflt-top the hrsinels, Wgrcncc Lo6lq.
$r,nts appn iS Httplnuo.cr Ctle.il-app4 t0 ;eAt+**
H-fltLoi.n&mra aryn,
O ffu HftF&'r.laborgava d{Pn'
B.tsinerr Lqt.,r 6afu,Aa.r+n3 fttz.[ run omJ ttttdrs bastJ .1
anL punr<tnta IrSr k iyLr(J,rlt 'reee.L -
*r!:,
Bxs
-,
-> Trrdre, aba.e ct{pn
Sz'&t^Ja rrU$A
'rDO SErn€ bf<,1 ara
t aa- Qd
fnrhe ah.a d.lagr<.m &*a ,{,llan;s llftpbvdb#S,.-o{rpn.to}rtch
ttns sprmgJEE.,
Ptcud-:, ! deverop the obcrrre dicigrc.m based ra-rin;prDjeoJ !16 us;ng l"lgEcrlpsE 19E
l{fl Servel ofPli((rtido : -
6tq-l :- Cnarr t^J€b tlroje(r.
fire -----i Net6 -----+ 6cb pr4i eLt
-
ftojea Name
' Lulgiglry l
-'-
F;nis b '
6|A-S'.- GT ftgcr'e p;sprr'har ee'n''rer io urA'xrnl f;te l-r'"r og +'do ctrl Pa'rfc'/ o art d
.,
Teft"r oeb'rrrr oP f'5ero: @
.- C,lcp-sl:- C.r€alc HO- Stcrdenr trble io Of6cl € DgSlto'
er€c.lf ta;rle llB-Srcrzlent (sno n'aLrr C+) Pdrm"tJ kcX
' &nme 1a<|r'r>t>o) ,,
tota{
nur[er(5) , Avg nqrnbrr (t':) ,result Yarc']-r'1a(5)) j
- 393- c",o*. DaraBaa p.Frc &$ *cilre in il8Edlr;se ]DE
- oom !
hJlndoc,r
-------+ Fed
Klslrrrive
---'?
tlJk ipg€ Ddrz B a5e Erolar<I
--'
00 trut'ltc'r
---l
v iqfir cUctt
.J.-
Oraoe (rr'in er"r )Dritt('tcrnlc'Fe
,.
Lgraoe Ll
Driw{ Ncim€ ,6
'- Gnr-rdf'n LrQL" Frt'-'u---------__-n"
tr*"@r"t^rmtt: ta"l1-t!
tllcrnarrr , t*".-f
_ Frssrrxna', L!r"-J
c,ddt&r s ardb.f,J4
-L
:
-
*;-:^ffi::'T,--5", Hbe,rn4'}-r ",'pLtutt(
----- QI+1wr'IL 3>
'-'' pEntote )+ibars-Fe Ar'notc*lon fu+Pd* UcrL-----tM^1 5
00d.,'c,i ,-lr.5-]
-....-)N6c # f] e^,.ec.rc &srnFar,'1 ctrus?---FBh
-,${'Tetpr^rn Hitr,'v.t< Qe't'rrittrrginecrinS
on l'l8- st.'denr
G'
piodr.,o rrlKu P ot'tmpxs prn tre --------
-"{l.)5rtu P(e DB Er P/('rd
-=
-) DB Btotux'J'--j
------r Foand olzLP
---tExrllnA
Cs're*a' *ol-':'*t *n+-_---e^ftS'
&gh ctrck on Hb -slzl&/Lt
--4
fiWnott Rar'rst Evr'$ntrr"g -+
a- ,Kivrtsc{ S,r" flllttt** n*jlf_:]
@ c*..t ?6f,6 z> D0 kdle W J*to Dd.raic(er5 OU<+ [p4o)
O Ad.t FHtzr na.l't l'n qrxr5 Annofawr,x... W (t't.rcta< Ph'G s' F;nd Bi meuhoats '
[3upda*e l1ilxztvLb< ccm(15utav6, Dturiipe :OS'^]'J'6DM
*----- D v*ne pop Bdtd.^r
--)
p'u'@:&ilIlilil ---=(u(xE
* "E;;:Yd;sR.lzhr. - g€rutsf - ;rrl
$tJ5P6fiecrury Beao id I
---------n l*|tr.
814'S i fi;s 51-(p fle'ne'rcles
Hb6rud6* 'ic!u6 +bitaJeru DftP .jar:< P+,"1
1 N(*L + @ HiUerrrrre lgpeS -,
-,
JDGtne{a}<N j l]"C}t "
w.'A4f
-l
------_:)
.g5-sruden* ---------) TDcnenc{alrri I',rts t-lc".il
--_+p'd*',
s-{-gi- Add fion9 o'{ct}ili6cs tu #-ta rfts.4+
.rr "--.!rv.ire,naLilih?{-
oiSl-uteocrncnPDjats---------'F]U|=ttlxt--JA.ddsfd%cc'PcJilitx{--.----)@<r'"onr.5..-J
-----)
*)et cos, p:1l.,ltt14sjry'qp9c' gll4' q1-9l'!9 ' tr)i5c ubGric{'
----J^/(xl*
r'
p6ro cl4t3
Srcp--rffi ;- Add gpvtnqlr4erparfl
5v C- rYLo ----) T-nrcr ftrce
clois
spnn5lBeona
: I t"ooer. I
ro the PrRJelt '
foodel ' ia cr
ft^ttlc IrWr(-aCe Aodel i
qfi*r<*{k** (s-ng mt'e, in* mr /irrr m",itt mil
Clrbu c $nng
?
J
ltfta,'z sr ----' oe-tn
--).lars
; LlloderBean
) nrp I c'r^{ad.6 lnoule{
Frblic cla(S llodetgcan im)te:t'tzttt]o !nod"* I
HbStr,de'-,rOno dc'o
"
r^-Lru*c 'voicl se0ao (Llb5r'du"*9no
dt.'o) |
tHS.dao -- dao ;
o*,,.
O*n,
gonoro*',Quutt(S*"3
69'"'e' in+ m'')t'f *-, )d ', f
/Htt" to,16u,"
inr tottrl t' rnr't-Yftlt
mB l
ftn,-r- ar.rg = lfirrr) totar I a'oF ;
/ $,ntla+e rour ,, ,)
W@ $r""g ,rer. )
ses Poct
*g,="ktlt";
f/insu,r .tc^a bb usry DAactaj3
hdn**,rr =ne.o Hbsrc,&,r ().'
5t" serNamefnor"e).
sr.seilTtor (hw):
St"sahuS (Cror*t.;-5;.
St' serl?clrr+ (r.s )i
dao-satr ( stJ'
ttltrYn re' i
else
r€S="PGSS";
Sllnena
Cbnftgu'e
in
--'/ /*do I
-.
4Vt'o>
'.,, /&an id ="'Wg'uA4x*A*o''
--
zl&on>
z&-on id="rr$" cf&ss ='lvlocuBrao
>
qrofx rrtrne="'dao' tt'p=" llbStudentD[O 17
4rwrr+A
a-
lP [ovg eas )
*,e 4rraoin6 ,acldsHcnat kans in *-1 a"66lr*r ^
]"'
d;s6't<x" -. grn/tr}'xm I
zlbaoz
'-^-L1^, 't"rPoinvoYr,r ' l)tpTttow&n'iufu
zb?ilo r!,rne=' l*'t't;ceu thtS'=" CJlA"se' *n'oan5'l'dtpinv
/7nPrr1 Tnftt ="
g*i a'T^xoPate' vo)l*-'mt'dg' I
'
Mm€ =" &rwitt' rtl=-"nb" f ,
Ll&an>
zbean i6'="5url Llots="ovg'3;niqParncrra"t' "tLLlo'8'd w"tl*,Lw 'St4tU'l-U'aur4n
2g*v lAme -' rrr4ernS 5 ">
sooe$r l'lo"rtorfu+p;T
zQnP6>
z(rr,r1 ke6="m;.clo' > lser^.,;celP^O'
z-lpnrzb >
zlyxaT*g >
zlbean ,
zlwn37
CcnA gctre Torr(l.t €ewe,r eonh rng EcUPse 'ID E
6tcP -S ;- Pun Ae PYDier-t-J-'
,- ,t. , ^ o,^. >. A-no'l)ralJ cr) -------3"<are o
."
Pi6nt clrct' on frrDi€rt - ) Ptiocts -------tnUE4Jp'e(cr'ticcAOpl)cafJ
e.-1oY
Chanqer'-
Ccpg ditpe'tchel-6e$Jte-r'xtnr Bte to hlEB-rNF e?lcie<dg VJOtd-"l-
changeli-
Ctsr€e a'.- Add fl"m.6-home1 tiu esmasn-?'?-3'ia1 to tbe tulld Fnb oe$e fiqtel"
b) ddd s1n og, ltU"n"re rebred jav Gter inra the libravlcl .'P ri( fI'"P
hibonnrc 3.Jan
stP+,i-a?t -l'e'
f,itng jars
Imn-r'r' jar i- l. 6,{ .,id,,l
hlbcrnat-r
-fha Aeflute g 5ar $ t! (jovossi s t {#{o. &,A icd
rulrr,';t.Y-A!9
irrqle*- r<el?da
<
orP-r:- c.tule uJ€-b p"qPa h"';o j nane Strr-*aApP
Fta rrr ocr ------t
nerD -------' Ldb W;e4r '--) prderrlarrr :
SltP-$i add 5gr;q A,pabil;hYs t-o It'e {marU'
@
-1--"''"Foisl't
fufl*ct;cv d, Wiei' "'-"----trogF-cuose '---------r Aad sp{og crnb}lil-i€d ---> (tsvflad>'s
'$t- - t I t2 r'Aft
------ ;* svt'3tt C..,c' L)bo..,ics) sEE LibraYicr ,, lzerroliog Lura'ri.a ,, m;<c L;bY'{nq
-'-t
pexv -----= Eetol lc AoP Wdd -=-
Fte:
G lffttod.t'iavaPnn'' ser'a' ap"'(urtar'u'too)*nto*
Tl!t::*l-., . -. -, ,
-
4 :'";;; swn'w?-y, Jrrdnj8cz.n bt"d l-o5t'to call rhe &rincxrvtrrh4r'=u
O( E',,,* o+on '-Ioi"n' l-tut"tat' --,
fuea gc-+Neur -'-1Sn*cr?ata----------+ t.tc.me: fcl,..a -l ---------r BU'rl, -'
pdcic iru€{pa(e
t6e
t
%.ffi*ffi-ng ncrme, inr rnrlin't rnrr;ru-r')- '-'
1
0':loerrerlt-.lRa- 1'o-af -1'o o ?rr'o-U6al
CCgmrr$nS-Cll,ta$o'n -?' I'iOtY
fl ierll.X r0 I
-:Erde":
Clnogear IP CnsV;ui* qrobtem i6 "rc,.i(ea
O rcr'ow ll'bersffe, q'iogllblzdag {o-fP"tttd Frh c? rhe
Spno$ 'ia'{
Ctrnrnorrd - tOgSlng iat
6fr'n6- Webm,c'icl'l
I
,
3rc,t5 *Ot'',
-1{5e,.,crr}e Jar R+uS
lfc--', ner-D
--J CIASS -----r Narn(: Ct iaru Eean
frrblic CIASS CtienlBdon4 irqlerrfr*-S
Fodd brqj;
Vrbti. void se*[oi (xoa"r a"oj ) I
fhis'botri =bobi )
pusi€.Hode,t- Ft#!
rtl+"-+--+#'
in ctienl'x.^
lbeor, id --
/-l,(oPea
zetw
Ll&ao>
zvdo id= cb ctdss ='c'i@B&o- l,
L,[l|oPe4rX 1)orre =- bohj
" re( =-' PP6 I z
llb@o>
/nrao oGme ='/de"'0" cas|=- lolrrrftcnoo >
.. .b I
lYroYrtrl rrm( ="mo"
rff =
cb />
4@an>
A,lbxai5 2
cticru- {
;' trrr.ls h
& -L"**, a,-€4;--
t ? rck.do y(srrtt:
4+?<f& .s- Sre.l6,-++r*o etess.
1-l'tol"vorec R"a6E ro"dBe4rr >
iro" class = or$' sP ' rrff.oh .,3 ' l-' t+p;ov olen ' ',"
"r.,r'ne
='serv; ce'F*crFace
' vatue -* t'lc'del
"
/>
' '
.
"
Deme = s.*;ttU't' ttclt'te- bttp:/raorr''os+1
>o>o/ )149-*rvfrn/o'J'ao/:
lLblic Srioq elrB. rrl')".l (Sl"nq tet"€,, j.t r"'"inj. ro)
',-." -..J .*-,.._.'--. d "..,r r,'3)
I ll coo b.F€t+rod o? st61^ aj0P
*"g nr€-sult *- b$. gu-"oof. l2esrrtt'r'rne, m'f t,}n3);
$t€#i-
-=
Lrc?-e'.' add Srrarb Cc'pa")tihYs to rhe
Vgw ct't'on ***
='ou:---a WAe Wud,X<^
W
rP-r-o clcrvtas
--------, ftn;.l.
6it0ry- ddd k!!ap33, Fa'rnBeo^t' class' &rtrrn clars h proie'
,,,-* i,',
*ffi Eiq.*[tii"'
. .- " ^:"
-----
t^Jcbstnar6
---+strurs
-;
$rurs '3 Fz,rrrr, n.rf*{jse--a fgexf
------lN1meLjq1
gqierclrrt,
@ )F'b-IgPei &p<*F"n
---)
Md grrclfs Copalailitie-l --i
Qswuls l-3
Wje'k
Darn€
y)3
F -ltofcrnr€r -odA f- -----n $r.'rlrxl1.s
l] desc'rrerr s6sched kxeJ
-T- a
t.:
' -----t Jsf -------, V ca&!< Jsp .Pr.."r 9.
NLtr Jtp patt I i7i"r.u..itp-l
a 7ac*ic|'yrh
-- -----rnexb -'---- rftrfh "'
ltaiao J
trc,E4A.lt;l
-_) #-, fre, -l __,____5 ft,.,,astarr----------: add.----HIi:Tff,
€ a/ d
-----.2c,tor€,
--- --J Tioisl, -
sltp-il,.'- Do 4r,roorn3 mod.Aco$ons ,b 9nar5 C".?',Xur.nU -fl1,. ,
0) ner* * exl6riog Acrton cta-rr drra2lSute.H* dn[
fum" <"*- -rrr!p;o3
", *3 )
/aUon -rrt,+nir,g S >
lorrr.o^ ynr.t=" latll'6' BdAe='613'sP'c'x5'sr^rure ' D-f13"*fryAttl '^P"-'L'? ..-
z-ftx,ttat d narr€ =
-
scrc.er.5 ' F 1, -- 1rcstrt 'iue" l'=
r'r'te- l(t )
,, zV,cnan>
atcrhoq - .r,4n'. DgS > Lr_Locorhe " r pla6So &S shocon '
ConAScore Gn*c"tLmde'r l-,ru8rr)
f trndor /otttcn - firr+p>nc7.s t tq )L'
' zrnuscLSe - rf,y1QYLe$ (j$ann?+<4 -'" AI1arcano, Bcsocr:rci l>
zplcrg*io crorsNo-u = or9'se'orb' s|rc,-rs' CPurLoal^Plftrt' 0'
rX Wfenb= csftt<^t}n(t5Lo cottn" vo*e =- f us}-t"tr I cucn't''ti)'=
zlPlufl-i, >
sg?'w. Nriit fittoto'ng cole ;e fl<fion c'@vJ
I[-o ^...-[4ro,,,jaro
llJor-*-rt"'"" '- r (
Pstlic clcrss I"P*tNrl'^ e/rcnds Ad* 1
Clienj mo) c
Qu',)tic vo;d ser|1"(6;ryg 60 J t
{'rie ' rrn =mo ;
'lt
J.
Pbuc ftl^F^-'"i o<etulr C '-'- '
- )
a
qv
(,-
LIH*'"" r{eear.-1'': ).1 :'.''t , wtf, = i{:r. ge+l vfn(1,/
t'J';,'-:
;; r"'* (itu' surl'())"
int wtz = Islqu ' (atK Jnf
r* flB = J,uk1b(' p"rxctxt
tlta1,d g.rne-rhod o? tr;cur.r U'ac.'t J
t t/ 
btf yrscr.tt
= -o.Conr&".rbd (r"^< tttrrm>,m3
)'
i ll!"q', t^ttt" ib r€lf-ert o,r+nAl*e
"ftAfr-sl' 8e+Att,uc,re7'msS",v€slttt) ) .
rntc.rD ffr'.{l,tn1, f;.a E-ara (. *tctr:s "
);
ll-.wt"4
ofrn !v6io5q cpr, dnt^-l -----J tXpe rhis Uvt
1-,1+p : /7 locol host '-rrl>a
I Sv'tLtskpp I
t"n't '
jsf
I
J Xuou
-,, gkp ':- Add Qescrrr.jsp ro r/{c.bmor lown & }ne P'"jtt}'
:-, Q.c. anr ilexoor 4at ----.rxa"-"tf,spP
?in.* u: @ .-' P+"u,t '
i' Qes.u is = tt.=,ealrtst 'gctfi++sat:< Cq ") 'l'>
:' t r- ^-!''! r^ tzrr"?at *ttuv't and atso tavt-*Lre tlrx*
- or'(p-Ei Dqlo6ee fiss prr,3ej} iet wr{or
...-,--
- tbe k^r't avn ;5 olso inrctn"tlnS 'na4e'
-1or,,a+6'
- *_____--, Ok
.7
' 6tq3'; ?sr $e e{pticc4lon.
.--
mul nnicriat
4..-
- Languog.S are'!in.n to progrerffo€rS lnr:ing
L'
6.:- Nbor is the d,Pft"c.'ce blt, prcgvcLmiog Lr.nguage, IeohnologS and Farnerrrorfl ?
lcrtsic aod direcl PccitrHe$ tude!R)bI
g€dQicc'lfan bo'l% at't se "rulcs cr;l gddioe'l
.-....>
are ure&.rr cokr;re c'recr'ng
k}mogi6 r Flamernct6L6' ..
to &r"tlop *ft<'*r<,s
c;irt be uJed.
Et Dt3a, 6edlct/ JsP, FIB and ele" '
Frrrnerm<cE c€ qe.'ai $lcp rpl"rnlqre's ohxh povide
othcr
rrr.r-tlipte Cove rchnotogie-s
E3i sr...rs, Jsfi spring ( er. " . .
tolute &xloping tt,s sttos
sfi"ogta,'rn6
hg"'r*
Ab6rA.*lcrr rra- * ,
d0pllcorioog.
fhere ko6uogee
EJ:- crc++, Jara,
-> SoPhoare feahnotgg i6 q 6lLD
$trlrrS 8.x ,J,ith *ttt5 3'5 tnlcironcb
2 <Vo@
-taglib
prcfix=',html,' uri=.,/atruts-tags" %>
4/9/2013 5:01 Pn
-13 </hlml>
------------success.isp-Cs-'4f-!pAg)-3-T:a
,1.1
.%@ taglib prefix="myHtml" uri="/struis-tags', %>
16 <html>
'17 <head></head>
18 <body>
'19 <h l>Success Page</h1>
20 <h4>Hello <elLll4hlqperty value=,,username',/></h4>
21 <lbody> Ltttrtws qt,'es u!e' na,lre Prb6 vo,l1,e StarlJE obj
22 4hlml> a. -r slnrf5 ?"
3 <html>
4 <head></head>
41 </web-app>
60
-trTiJ Ed ru t
'r,
Smff ftrlon Cr{!l{ hd,rne l!
/nc wrrs an-lltunyn {v!+
24 <web-app>
25 <filter>
26 <filter-name>struts2</filter-name>
?! .<filter-class>org apache.struts2.dispatcher.ng.filter.strutsPrepareAndExecuteFilter</filler-class>
28 </filteP
29 <filter-mapping>
3G <filter-name->struts2.tritter-name'f src*s a a.?ptted $rro, 66, ff6,.r6j 6q 6.k]t
31 <url-paftem>f</url-pattern> | ."_ .,
17 </filter-mappinfr- i"':"t un *d^LYdl dta <ls C-rnw,r.
33 <welmme-file-lisF n'aFe f€rvrcrFGer+ 1,..1
"rd
(z.Fe or! p.e- xn ar or.C
"n*pors"J
o(
11 .
<welcome-file>register. jsp</wetcome_file> c,.tJ tltc ,t35 <A/velcome_file-list>
J _-_,.'_lJ_,we,uu,,,y_ rEZ au thc "oth h.Jc'(ry ce JyrlrErg.
3,6 <listenep
37 <listener-class> ) **ltt ott't Lr sen^t lt d"$ u4ft srr' nEs t'*$ a4vn
9q org.springframework.web.context.Contexlloaderlistener t3J </listener-class> ) Gox.,t G^1o1n d.; "1 Se,r vo, s 1.,,r.+ .
40 </listenep t
42 ------------------------------strurs xlnr--C6lgt1-q{?-6gqg!1-9 Brc) s.'"+'a
43 <?xml version=" 1.0" encoding=',UTF_8,' ?>
.14 <!DOCTYPE SKUTS PUBLIC
4? "-//ApacheSofrwareFoundation//DTDStrutsConfiguration2.0//EN,,
46 "http.//struts.apache.orq/dtds/struts2.0dld,.>
47 <struts>
19 :i-__I$-l"I: 1" srruts,that tnjgction(for Action Class) wi be done by spring-_>
4v <constant name="struts.objectFactory,' value='.springi. />
50 <!-- <constant name="slruts.devMo69', ys;us=.'ylJs,' /"r-_,
!1 <packagename="myPack"extends=,,struts-default'>
ii O I .":H"l'g#leg;1'.Tilffi+'fu[PeffiC"i.9"Li?1"?flTji':?i"-'il ?;an
in spr{s crs nre .>
54 L</action> , )
55 </package>
56 </struts>
!1 - --*-----------apptication6on1."1 *1--C$r11-Q1$€1J3{A f', sP*
I58 <beans xmlns="ltto,ttt r*.sori"qtr"r "
?y xmtns:xsr=htto://www.w3.orq/200ir(MlSchemainstance,.
6l xsi:schemaLo""tion="h.p,l@
62 htto;//www.sorinoframffi
99 hdp/wwrryspmgframewori;rclsci€;;/coiGi
64 http://www.sorinoframework.orqEitternay'coniexviorino-context-2.5.xsd,,,
65
66 <!--Configuringdatasource-->
67 <bean idJ'ds" crass="org.springframework.jdbc.datasource.DriverManagerDatasource,,>
bd <property name="usemame,, value=',scott',/>
Page 1 of3
Its Leanrd ir spazi ticl c.s spi clo*'-ta"'ra-@ h,ar,t e
thar means
uy sgt;01< d
l*u tqw bt
bJ+'
{-"6Crnftyv*ta',. ftra
Srrurs &fiq clat ds sfr,,i l&rrr ;
'.,
i
41912013 5:02.PM
69 <propertyname="password.value="tige/'/>
70 <property name="url" value="idbc:oracle:thin: '/>
71 <property name="drive€lassName" value="oraclejdbc.driver.OracleDrivei'/>
13 :'3XT;**oonent-s*rn base-packase="gl'>
J-F..q
rrzer'ilrr" r'd &dh s 4 Pt w':k,'ae
74 </beans>
75 ----------------RegisterActoni"u"--Gtnrf:l-&.troa
cl&ss Coo4nu'rzd rrc $e sft% 8€a)
76 package p1;
77 imporl javax.annolation.Resource:
78 import org.springftamework.stereotype.Component;
79 @component("regAction") 1--r l"r syn+sI k-dooclas6 is cc,nf,'5,,r.J at SpB%Beah
80 public class RegisterAction { J
gl ' in sp;o3donh5 ..tr,ll.o^ e;Q .
33 r@.T"?"ts'ff[:l*El"?l?l-'[*
q*n6&an cb$ 4i is ihJ€,"t-'/ tu apeq a-(
84 6r4{rs &do4 cl4-rl -
85 public void selDbstore(DBstore dbs) ?
86 { f
Se*c. ,nertrocl &+rrn"i? gtt<./t
ier.A.87 dbstore=dbs;
88) J u
89 private String username,password; ->pyDpnie4 fo |,of{ 8,"' J.f"_
90
91 //getters and sefters
92 public String gelusername0 {
93 return usemame;
94)
95
96 public void setusername(String username) {
this.username = username;
W. O 4w"," glnu6"as o,1
Trrn r4ole4 ya,y*let .
e8]
99
100 public String getPassword0 {
101 retum password;
1O2 )
103
104
105
106
108 public String executeo {
]!i i$i#":J,:i$::ft.";ff:l;ys::ffxfg.*^ii *,,'"r cf ftr"x&* ct"ra
111 return "SUCCESS";
112 ]
113 )
1 1 4 ------------------------DBstore.java (fub+Arlo' Eare ) s F tnS
115 package p1;
1'16 public interface DBStore{
'117 public void storeUser(String uname,string Fiassword);
-'t
oeacxal.a ol6'mer$"ol
1i3 ] - --------DBstrorer,npr.;"u"-frp,-;'g8e'..l)sr"l'3
120 package p1;
121 importjavax.sql.*;
122 import java.sql.*;
123 imporl org.springframework.beans.factory.annotation.Autowired;
124 import org.springframework.slereotype.Component;
125
126 @Component("dbs-') P(urrefi} beao id
127 public class DBstbrelmpl implemqnts DBSlore{
128 Conneclion con; L Sp""gfnr* Peco
. . .
12g @Autowired - . s braSo'xe ohred r, ds r,"op,,-J rtr.,,.i a'-'*ot"t dt
130 DataSource ds: --r lded
131
132 public void storeUser(String uname,String password)
133 i ---E-0.-.,toa
public void setPassword(String password) {
this.password = password;
)
107 // all struts logic here
134 try
135 i
136 con=ds.getconnection0;
Io tlis a4ptualoo
hi.*.a t
6hF.t 4ryn &e-Clmnej'fjdh 061' Page2of3
toe ax Gn(lg<re
{oq Sirn a A-.tto,'' ctar,r as tf',ri B*" cl..r| . 'trtt rreal SgrtnXGa'r 61av oll+ }s
s ta*sa Arrr'cm cl 0t5. 8) rta* S ,,:t{ra .rF sp;1&"^ cn^ d
^ut
l f,l.n
3 rruls 2 Adton c/&U
i
41912013 5:O2 PM
l?! Preparedstatement ps=con.preparestatement("insert into userdetaits values(?,?),,);
138 ps.setstring(1, uname):
139 ps.setstring(2,passwo;d):
'1.7O int count=ps.executeupdate0;
141
|j? if(count!=0) Deplogeren+ otrett'y aM/&<Lre
1.4.3. System.out.prinflnc,successful,,); -- -d''
144 else
175 System.out.printtn("Not Successfut',); Shafs?.sprtoq Ai-ro
146 con.closeQ; t " rWeO -r^F
147 ) LyP6rar,... t<D L ! cldsses
14a citchlException ey f
rc€i'ni'i5P
f J I )5nar5 )'Ynl
li: i -":;;"^^" 4s,.n.ss.ip
f-,i1*.2o, [*;ru.,u,
14.9 catch(Exceprion e) l_ "."":"::: Luu
150 e.printstackTrace6; I l-> ^
uq' L-------+ Pr
rsl /d".cio;;b; ---"' l--*-*'*-t |-$::lT}z"lsl //don;io-;;b;'-:"' Fdd'' x''ll l--+Re6E'.tr'*'L
ti2 ) "' Lo66,."r,-c**r.,,-, 1]"X.j#_1Lr53 ]
r54 )
155 r j1r Brcs in g1a!3Qdtb i
56 sQL> create table userdetails
;; e-tr'.-t34{'Ja'l r oY3'sP'coYdrxt-3'l't-PELE,SElart
SB username varchar2(10), & * *"6rJZ+*p**AU org.Ee.beaos- 3l l?EtErsE ja{
t9 .
password varchar2(1o) L|;*a.g=g=te'd60 ); --'--
61 ',t
iar B res in L,gB.-roF  lib &lde{
l
)
ccnnmons-togdin t ---.- Pram sr',inA l'5
P*rrn,"v -e3lq lg",', srr.*a a sl-
Java55:5r - 3')I O.CDA
I
ognr-Eo.9 )
o,jducl+ -- -->
Pott' otc'cJt
Sh(JJs e - c..rt -73'+ 
? p-- tn*? 3 slq)
i*trg1"-1.t5 - SFInJ -Pltrg;O-2
)'C
I
NnutY- C.ne- ,. * t J
Page 3 of 3
eolta*S ?tu m 6lf(-l+6 2'E slLd
Porn Sp;n5a't
43m - 3.6
Asm -GbaooS'3'a
AStn _ bye e _ A.z
&rmmcm6- P;reudoq d - l':
c.,rhnrh S -i0 -a'D"t
CBnrfruS-taofl7-3.1
atg'sP. astn -s,1"1, PEI-EAsE
be4ns-3.t t." "
4 , csttt{<t -3,1 t '
, . Cv-rr -J.t.l !
. . r OfrrsJi dh-J.t.t "
" 'iasc-3ll' &
., v hJdD -3.1'l r n
r r- qa11-!.5sr11o- - 3't l" "
" . ut5 .J |ru-f6 -S'l l , n
h*p r l/ tocar bost', rolo / 6r,trrs?5p', nX Anoo I
'J Jn ttrcrrs 8.r
..---
.J -> NO Brm beons
'+ 6ftJt6 CcmB 6t r oacro Are rc'-rc 15 5|rur5 ' xrn I
..+ &'ntrollel i5 Seni E.lF l t(t
.--u' 6trurs ?.o.A ----) FilrrDisrrf ie{
6frui5 z'7'A -----> 6nt'tg
gof,ate Ar'd E xecure F t rcr
'-J
'A """-'1 -..
- lver6lon? '<i4{
- -> rrcin iar f,ras 4reffn-tnetr 6run?'x opi oYr t
:H::.::l]r';.*
- -, 3t ,-^rs p. gNes h.d u -in Jsp tu3 libray,eg ohose tagtib uri i a
"
f stwa't<'X5
i
-, senJ rer LisEners a"re eru.., ra pett?ztrr1 EveotHand ti n3 on '(q/J"'Y i$g* '
8c'<u1& conlcxi
'---,.
--l
cdr;c)o ooirt be c(oivcr1€a r*en S,ervts Gnrtrt ohJ ert is c"o-rca / dest'og ' ']1't s Lisrcne'r
'j orr,.,*#Ir as rbe
. O0iuarg rhe ccrb cq{n €crn-F& t cdn}dlrua S
"tr'ra
"X ry W., :--"'; n '-
: a-,.r^^r^pr,ns colu be insr-on'dkd'
.- 5nrrn2 conftSurarrun ft,a. rn rlt,s procas oll the ftno3beans
.J @ P* exampla Gppticarron o.., .'wut6z'x cnd 5pring}'5 rd.cE,.zdJ c',r rt€cn rhe e'0c,llt*}ot
'-J h-ao.o Bn
n o,.t rOf o+lrore
'j u'rrb' 6o,iq5 d?Pn banet"c4 'rg
lof o+ /rotz
.J Pn: oP gccuttoo rel cted lo 5v'a'6 2 ; ac#
--., O) pqrtogeerner*
; r.
,n;q dnplol*T*t#.-?j
..i b) fo6t(nlra}l on oP &rrtetFtte'r ei+rn d!,nn k"* sl.,Yfr4 crt ."
-.., c); Ccnrcn r looae,r Lisrcrr'r crclivdtl .'n [o+-rq;
..--,,*C^rcrt.1yp1 cts rhe
.,-,. €- S& 4l*" Conltx{tntor n q curivc*{ an bX tuuo3 GfPllco}{do LJ''n
, ePting can66ur*Li'Lr,"r,"
-) Prc-lnsronHoricm
of
- spnn3
inialc.h to s*oAo-"otta.3isn M"n)
-''
-v 6pdogBeon cr,as fDgstt*trnpl
ohi) coxtue
v d erdr*r qiu€s fc?uesr ra Fz"rnP€e f.regrtc'
jsP
) fi,s {<|. tr€e srr,rnits $e *ayext (nP lto)
i e1 &""roEl* ha{'J drd 14ves the raillesr (}6-3})
i P; **r.F"u psses tte rqlert h shrc'ts ktlon clcrs co'figrotion (u"-ul
$"nxrFrq &$s ereurc () rnerhod' oP Srrt'rrs *+ron cta* ' (rot - tt l;
this eaecutt O .
Calls Sbr€@ tpr..its(-, -) +
Xlm 6e re-t rrs bcicl' to e{erlrk t ) rrrefio<l
3pln6 &"'. clc.l4 (lZ2-)53J. Th; s nnerfro d
.rP Atrlon dactS
i) fxecu-x L ) reruvns ''SuccEts " sl-nng to $^,..I-rrcr onA *^.iretF t te'v ccsel rl'i 6 sM"3 lo
get-6e rrs&rF PaSe (rtP ta)
,)) &"u'.tF trt* pcrsses rhe co{r'Dle io ncc",sjfue'
Module -E
gry:4'l:
->
.gprir,X
Aop is no
",-, .; orirh oop. oop ls rfre merbodt>togl fr c'r.,. ssmxrc>'roio1
| 4*'-* AoP io rbe rnerbodo loX 1 ro d{'Pl5 foidd lct'D&Ye s€vices on
Laoguages' JITrr,.J' -'
:._':;::.r""i::."
ore rhe add,tror,al €eyvic€5 rhorare c{piiep-' rb" aPPi<c''n6h5
io rnat e u-t{ crpPn s mot per Pear oo crcurafc i 6 oLll
-
5i t<rofl cm s '
.
Et ,.-- ,--rnciPle oo +'e $*n .olt)
Jrran5ouicnr rmr'a^SerncrLt (opprle s do e-rle'5rb; oX crr oo*do3 Ptnc

; 6ecuri r3 Service Ctt,oot'r rhe afptlcarr oo &o."' onc*-rhon:r
A LrseY s )
.
t ggt.g service C trp" 12g'cF o? Agpucc'frccn e/€{qrtcto )
.t
tdbc con611olio$ ( KeEs setcp?ta{X cvcdldtre JBtsco'nreurrt"
d6)'
.-n trP coe ccnl ic ccie of rni dd le&r.Ye 6e ',r ceg &*"'l b in the oppllcalt clo
'
roic{d le c,]e'.e gerv lceS
Cod e laecorrrs 3peo- 6c Jb crre o?Pt;cdtl o'' I Y.,o "reusc&i I IFX
) n,t* u'ot rhe cmle oP llidJ )eor'te
ServfceS trnl dortlrn'f-e c4plicofiol 6ode '
- --- Srn
^fl
AoP ourrrx us tr' to'i re A?Pllcdr on cocle aoA rnldolteor:aT
e 9:'6vi'e5 sep*'/<l"l
' o'nd oLl'coa Jo li nk mildlata've Servic4 €ode coirl alt'tscz';:ort 'h.roo|l xml Btes
er,AnnotaFons.Dtreto{4jsttrerod,eo?mtddleeoo"refer'rlce-slera.'.egreusaj"le,
-=+Tocrnderatandrl-roeedo?sgdngAoPaodonderrdlr"eidingrl-rcl-'€Perpc'genosl6eFolo?'
mlddtet66ft Sern@ I
lrcnSoctlan <eculiS__ , I
Ospe*s f
advicez
I
-,a) + Cross - 6t rrinX Corfe,(ng
$e'r"g AOP Te{mirot€teg
asftct
adv ire
joinr pornl
Prinrcc*
Odviscir
hJ iriot
hlea!iD3
fiargei beon
f +<'Xcr ouj
Ploxfl Lan
/pnrd ahj
i
Advl (€ l^
fJ ioi.riPoi cr,k
asf€u '- rbiS$e tpecj Fc&fiol c&niaini n3 TUIeJ c.nc
-2
rol ddls,n''eAcdokltn€S ^ "ro lrnp lcrrrnt ts€
SeYViCeS .(rrd.]1c&.
Odvlce :- Qaal mi dd le{rlavr &yvi ae ohido i 5 zhe imP}rrrf nr<rn crl 4 osfr*
jrrir*Poinr;- possi{ol e po6i dong inooJ B si nus rnerhoJ cohsrc dd{';6el can b awfiel --)
'--l
,* Loltn
Et(l: lcegrnlog s0- Q.methocl , €nd 4 t5'nrr-$od , B'mubod r*crvns q tcLluf d$(,r@"l
O rng{rod *ntm Wcc+acn and ett '
,tutnfclrf ;- The xmr (u) -h.mrcficn Lar1d ewhl'thor liotrs 4&i rcs cot$ io;nt r-lru's of -,
b. methocr , '
J
od^.,isgI :- ad'isr + poinlcu.t 1o gottr,i is Cqled odvtscn ' Oekrce
"+p':3
adrrite cro --l
gusiner! m&hod ib coit be Jatceo n rhe &rrr oP cldui sc,Y
'sbrett' '
3,i3.. conel€.,,i.Bbe?-(,d.r &. i*"1*g:'ri.or^ is ccued .,1n6'^
"
,a---,-^ r. :'n'€unct v'utgrr'- '
";
*
'ofinton
o* 1i'no31 A+""qo"c''relP-6n"m;ng
is -
6p5ioJ middltoave *:'t;G5 cr'.. sp'ioggcan aas
cauaatrrecvinS'56n3Aoez&sPectJen|arrezrrren#4k'ppUno'JSntfuJlatl&Yzo'r;F4'
&rnor e'pert fierd le,.t-r 6eo.ving (va";^rt"to-).
Advlce 3
(Jo;or Point I
fu^e"ns rb.3
I
tirger beo n / ta$€r Ohle* : -
'SpngBeo.n clc'ls objel-t o.r ol-'i'h r€i toe are PlanDinS to c.pply'? roidcllerDer( &rvi(
is c"ue d tcrrgetbean
/ u.t6a oa:e.* .
2; fr'cxtrrani rr'o1l!*,
r Srh'hgBeo.n clcr33 ohJe* cn r.,ilrl cln m r.lcllerylye Se{vlces c."e olvuaQ oqpl ;e J ie
Loued pwX oej-r. @
- -) 0.rstner s rncrtro d.s Ca11ef, o"., targer ohje* j us t exeo're tbe Btrrsi ness ro'erboJ '
? --+ Bglnex rner{to{5 rnlled 6h pp{t ohj&f (xetut<tha Bctstr,e.rs rnet{r."I lqlc
&tg* ,1A.*"
There Ore + 4@5 oP Qdv;ca5 t .
o rug.rcadv;ce (Erec.-t-res or the @;niog 4 tbe b'rnerhp"l e^""t'{-)
.-, @ ngo* Advrce(E,reclt}cs ol-1he er|F 6'r'Y.:food
ex'e!"nfr')
,., @ lbra,rs Mvice f Exeerr-.s ohen exceCo' is volsed
'"
*"
.'':1-U ). -.*.n t
@ AruunaAavice (Ereo-r-res of bqiniq a,?- b'rr€rhod and ctr loe ext|cP' B'merood/
u'lngSprrngAoP,Ag?e*Jnotool5tDLcoloM@useSp;o3Col)91vg.fsu{,pUed
ll idd lec-care Qlefces cDe
'an
o''o t"" '1"
ft deve'lop Ure"rde$ned
Y; lclLe.oe.'e-
- Ser v tcce and odv;crs '
:
P," rte a'Uo* + tUfsoe cldlices rePt'r Fc'8eno's 1o4 ro rab '
:
tD proced(ye to der.'etop 65xrngAoP krsed aprioX crppliccrllon.
Arep}'.: Deveop 1va clasS a6 $e odvice cf86
6KfokDecloPfuriogl.*crR.ce,spnogBec.n"-,,|'-,n&lsinesg''ffhodder-tanccHoa<>
defl'ni iiorr s
6t P@l: gev€tgp SptgCaf'5-c'ron Bte
a) CP3 sPrlo3 Be'ro closg
b) cPa Advice class
c) cF5 Adviscrr
cl&s'9 Pil1ol 6 Advice ctarl5
d) cPX Ptox;Ecr'5Bec'n
cpt'l-4;n1 dv;sert ' l?>tqBfar>
V *;s r>nt'gTrttro.,xket'o 6;ns sg"r138eao clars ohFcr4s l.,tDa6 obielf'
Sr'r1@ '- c lienl ftlprlaxr * e'x''r"
;';J;t"'g*Y [ec''-'r'm'x ^
fipprica*onG''rc"t ) "
-> 9:Lr.z{ pra,,.'y ohial &- 6F 03 Coatun641
-+ cnLt! B. merbodg o^ pybxb oh)e'+
t _ t^^o <bir] yl;dllergye
ruorEt &,s;ne.rs 6oerho{ Calted a F*3 &)e+ @;u be e^etuftd dcnA -"
sw;ce.s (Aaur."t). - ,.-,,rvil
-> Based on rhe advice coe durJop rhe .)otnt r,(J,*
o*Ht;T"$" decided allkr"tl&uaX
-
?) Advrpr i5 glvm rb l1a+ &trdo Nvtces @ith ce'rrddh' Busin€ss merhd$ te sC%81-
e1..s5 . 'There &re t oo tgFs cf Adrlces
0darnetlatrttlcrtroofbin*o+1av;sr,/ r -L^)a l,r,<ca cm ltrte .,nes o( he
-'
-> vYe tbe advices toirl te unPed coirh b' ffd"nag b'ted cm
-g'n'rtrbcds,
!-
@ Rge"PH"rhoa fu;*cut ffdvlsc.r --
benu 4* odvlces urirl be ltnFtcrl crriih b'wgfu,ds
!66ed an fdei e^wstlon
-.
4r, ,.rotta 3fz'trrof'n 6^ A&'';sar-s rcf&r lzqe rn"l tor{ro1
Fir5t SpingAOP c{,Pl;Coh'c'n '-
' El APPS
-5WtoX
-se51
-FF-
// l'lgAdvlre 'java(Before nari.-
irnfxr* Org . SP" c.oP ' X 
Detr',o 'iavq (arog rnrcr Fe're )
Oe.r,oB.ar, 'iavc CsPYh g Beah )
l''lX Adv;ce . iav q (&Pa Advire';
sHDgcfu . al'ol (sr,,''g cfu P;rt )
clicoi App,ic.vc (crienrAee.,)
oP B'rrrbod
inpo{r java '}ant . reead ' X ',t llreP,/']-ttao hPJ
tof-"t jarcr. ur;l'*j
pallic clcrsS hgAl-urtt i6lplerren-t5 fl*r"aBce-*A"
*...,o" )
t
la.Hic vojd !e&'"(ile*oa @.t!.'Os"l/l]
o(t 'Ohfo
t
,,**o,,, detcdts *'Y-;
,arN-*e
C))l
i:;l ,.i*:.,t;:". ff.*- *"nr"e*'e"C'^(l)' '''
6 o'n (merbocgetN^me[7*"t*ttt"*
is sta*.d o!" 'trr'n DdreL)Ji
llcr,aq;nx B'-crhud a..1 {'illre tP tt
't.';;t;s1 o'6*"r"r
v'r'e
Gr,inq e,-- (5nq)a'gsloJ r'lgtT" ''*.*"u, b.r'erhoc),
"ilr''l'".,'i1""'u*t' '=z)
il * "*
I
'""on.t'l =:'"ub1t''; l/ if- it is 'inrnried
! ll""t*oa
3 lluo's
f/ Demo' Jd'(c^ fSr-"31"t*
R'* )
pubic irLtel&ae Demo
o.Lr'. voe *HarofSunJ
*'.u); llu'
l
tfor**"'l.'.,". (sr'"3 S61 clarK
)
frr.di c clc's DetnoReavl ihrpltrn#rs ftrno
{ 7,rn6ut,.no.r,* op- G rnerho4 
lxt$Ic v614 so1|Jello f Sr"n3 nam€ )
3op("Derru&an:
S.o.e(
*tn
tn tn " )
exat*ton Q
l.!-- Advisc'r cfu -->
,,1,.oo id: "odvt
- claJs = or5'sP ' aoP ' tuPFtr ' Na,''llaraXert" afu;nn*Nulscx
">
zP*f odv i6'e rel =
z?m?ery ffe{?edMmi'
4kot'>
z,-- rru-,s
Aao id =
L{hnf(t ty
''PPu
cfj $*n p'xl ohj H on t_aYg€r ohje6 4 afPldlni adulce --)
?e b' ctQss : orf ' sP ' oo? Flo.,re'l:o'k ' P,o*6f,"ft1y Ba'n '>
'aAv J>
J-.rsq1l-leuo ' / 7
.-..{-
L.: B' n-rthoa tr.rn e
Lwwry nam€ =" ;nrocerr;rNa'e'f t
LLi6t >
ztar/? > advr 4ValLtt >
-T-
Allst > Lt Advtsc. o 6jera
ZlVnpttW.
Ll&an.
0orr€ -*
narne --
Los
LtYbptrtX
Dh
Dar',e = grorSJ-rzruiaas
'
rnme = tovgel" "eF =
tlafug
" db" l-
zlEzns"
T--tgy.^ote
Lt - - 6PYing Cfu , xrr, I
l t DmYPr
LkaoS>
l}tar, id='9''
L&cLt ;d ?'94J
// CrienrAPP' -Pva
irnPrt aX$?"Crnlcxb ' *0f'/r^'x
pcuri c clas6 Ctinru+pp 1
P s v -(sungtl a'6s)
s
i
fitt-$1stem X*r ftlPticoH c"r
G*t
ctas.s = DernoBec'n
"
lz Lt''-
c1os5 ="flJA'luie" l2 Lt"-'
&Allerrot) ----+ Nanc : "'-Fnaras;,'
P {)crars cfu '->
Advice CFg --2
="D"*o" /7-f,-ry."a, r,'*afaca
Ctx =nero
I /i g+ Pt^g oq;.*
Dmo prox5ei = (D".0) ct" ' g.. Beo., f
' PFb") i
//can S'tenod" ... cm frror5 ohl
pn^sohj. *aHerra C" t}i"") ;
gnx3obj, oSfielro C *'' );
tu l>.javac f ,jav a
/>iavo, Ctt<nrArp r^-.l,"q.ja{
/ >.i4, 6'tes in clard Errt ", 3p;n6
"iar '
cdmnrns - '
"dkJ o
-> t6 c.rle Se6ulelprpesnonP.iuG*A&rso plcr-ce rbe S"-tng c'de to tht 8t-1363
ctass =
" org' sP'GoP - iufipoyt' Qt*9
llu*oaPoinra'-rAdv;stn
)
zt -- Adv,so c(Z
Zhan id ;"Odvr "
L?ofrtctiftJ naroe --
*
advi ce '
/W(r 0orr€ -- fntttxn
LlVa$>
t6f =
'' adv
&r)-rr e =
"t,
.*" l>
&trpre Corle oP Arutna Advtce
publl 4
I
clcrss llgAdvrc"
't
t*pler;r.nh| flerba InrctceP nrt
Pbtrc
c
L
6h
fir)ts
obiear invopetnf*3##"Jl envirbbnpnr- cF rr.,e 6'at'ers "'r+p4'
ir.proceed()1 /lcons *'e g' ner$ocl
'-'-'-':'
ll exentrcs af $t ent & re B ' rrrf:oo
.
a?pnO to oPPnCD c* ftr kb*+3
ftr, excrwte cpPlicct$cD cr$ rhe Avound A&lcc
?tteoo5 llt lb )lt
cokrr a'e $e sl'Y)og
*s1,ong
is ured 6nt5 io
JP sPnng is used anl;
fP gro;ect is k^r"d m
rrrcdrtes th,'f cre (sad in t* f-it-ti-'
model Lald tlren Sofr'r Sp'ltni JEE' ofrrl'' AoP rrbcllrleg '
invia!,ccmt?Dllo{lntdfu^tr?^E',rn6we.brno./r-.1<'
Shru+s,ryrtng (*iu'ror. :trc3,"r!t*r rhtn fltfu sCn1 AoPr a'EE)
6P1o1ux-b rnGrfulrA'.
!g9" Cmemod,;e iA rte &,str"rclcrV .&, 4t( rod,c.le.
x)Keep;oX *t Nc,t* oP Prm oF exeirLrioD is caued 1qgt"6
uea P- {"1 ere e..uad lq rnesscSes '
opoltoo aoa rncss ace.q.
x) hlnHn6 loX messoles us;o6 36,*,. 'o'l 'q#'nrtn f 1 is not in &sr'5 sic'nJa'nd ' *" Y€:
O -+ 3o p() con t^lrtie mesr afles nl6 +o Gasoie Mdriw ' 'Tha'f mtans cantt b uae )
-fu rrdFc fistt k llt...2os"a!,'t, $vs , wx'l setvr-< anL ett" - 'v'
O-) 6.o.pt) roj,r u,'.rinf f'Dce* is sl.6lethn*al"d otr*tcH o'1 ' I' mu'!'6ple''cssaxq
Cc.n [c tptifq 61 4 +;ne ' I
@-, f,o'pL) ds6no I atlaa -lo otor:';zt tl'a |to6nosc'6es
cA--? s.o.p() dpesnal atrlpa to 1o;* ''l' l-otux'
v r " a{'l/fo"l tPlnce lo6**"1*
-6 oart*,, tl'ese y'oblems use L,T+J c+'
I '-'
,'-
(-
: ^
0-, lo6tj allocos f0 t.r.ib' b*'c.1o
ra JiCFc,e^r J**ttr."t* tire fite' db'o*'lss'.t't
-
Co.n$l e aod etc' . -'
oarrellej
@--r Lo56 can ct'irc rnsfls Si*"'otne-'{1 " irUcgd'
@
* lrS+j aar<at colap'"" log mr5s
deLuq z in% z ct''' n < errc,l t P*a
d
@----r Log+,1 4J-roor6 to +lrc-t lqmussc'ie, cokte w*re;uin6 *e,'o'
n
@-r lq+j au.atstr #"n"r rhe lo6r'rssc1"r '
Lru*i , D
f------.--" j*P-?'., 103+j -<vers;on> 'dc{Y
I
lructtog;c-hornt>lvliAd]"oowise{"t'r-to'esa"''<^rluGrsoreaop
AW-rontiuloga'i-r
2it'oar
b6'n3 Pn jouo
Version i 1'I
Ttndor : o4ruche
(v"Mn c'n
OPan $qrce tcot
ia"frres lo$4i -<vers;or'> 'dc{Y , ,," loq4i-r.}riki
S," t p*,t''s lq+'i oel
use
4debQ3"lefl
amRrrrr.fion ErFe,rs/ deh1g8ioi stt's
. {ogger . d.,ba3 (
t'
r d,n in ,"si.,(- ) '
) ,'
" :'obeQ 4s{kde imPoccnt cn
---,c{lelDeoleL€.|tDFacedkr)r)imP('.4cntcncrrk[s&rmpieercJ.
Ell Gonecuoo co6 = Dc;vr-r Tla-rngc
"
' 5"+Con''to+l
on C- '
-, -) i
tog'r'inFo(' Jdbc can ohj i5 coc'rrJ')'
-
->
ctl€ " r,lorn" le''tl tD disPlr,3 o,atr,ing messctq '
iP [rs' oex tL) )
II
.J
etse
I r€ cnx?t"))
log3ar ' cdccr n ("Re'ctrtSt+ ou; rrrdl- Do{
l
.- --) q6t "erfo{" re,x-l gs$ to*z}) b$w o( g"ocDn ExcaH'rts'
$"[ cc'*a b&w or
L^ ,r," uLov-no@n
Era+rt-l'
- use .9o*ol
' lo4 in Ae u!4 RctJx thar Dan4rc>
tr3
t.......
:
"": -' llv"'o" e"c"gtlon
en&ti"tx
1 ct'rtlt 661.E&4tion
sc) //v'"n
(
lot!({' erYo{ f m n-utc'n'') I
3 rr 'i --''- exf'dt t^a''"t '
&lch lExcePticrrr
e) l/
".t'*(Pn
c
'
{
to'U* ' e',o-t L uornoto Po"re"l):
3
- 'There afe 3 ircrpcrnccLl
o6;s in lo$+j P?Dftt*ln3
O Lossn ohi
Q funetda' ou;
@ l"^taq o'Ul
- $s"'oh.l
"-ti)
snables
t'3g11 ooctd* * B*o io'oct clc'tg '(iilu{oors to or€td€ l*"neua7o
------ ....r r-n,..- rur g* [41 based lqSi1J DPe,'dfion6 '
ffi- u-*"*' ""e;',.'.r''j
-";::
* ::. ;d
rqsirs ope'rofrorr 6'
"-*t** te-me'oel)
1"ne., to$er = .!:$trfjf1t3u  "_--G#".-l*,t.cr.$ poi"rrng o TcsrArp cloN-
Su*icTacol motrod
7---
lo6Xer.deh'6 ("t rrrt" ) ;
lf' .d"ki (.l.,aroa. ;;
.-, ryuku dr. dtlnn"rt"n otr1ert J"'-|,r.1 ,,:c can ..ar;r€ lo6tott"tr+(t*
nt ou;,-
4 otloos to
*+ TJ- Can !e ,{sad t0
) -Ihe aPia-Iable W
clatscz o-v? '
E*h *. &** o-s p1+.snA n"- btr me'{&f,e8'
,{sad t0 (rrxrv,n2l lk [rlivc"i ]- + lo6 wreur'1es '
i
-,---/
[og.neva3<a info oe uxltt
0e+
t-[ tt.o* lod "*'-?t{ -
ft1at'dor obj ;
_> -L,e curdk$te a1pt"d"r &* A,," .*
FleAflroJd (to t'uwt4&'+ /
e;+*i"!1ff;trii
.*&*1t'i,&:ili",f"^t'l^^l
Il4Amt^dl,tl
ar
-ll*'4*
S"o,J-,'a'*
P"t*'-6*o
X-,1--"6o"t and etc"'
NbrEi rL+ ._5
aL,e
O&"
f,e lo6n"lr*t
lo6- )o*l is
S1r"3h aorrrrrt
re+te;w le.,xl
V= T^% '
ttre payocis@ *@
o00n ttcj- urqs ou rbe +rgOes 4- q{YlcercPcl c+P"@ctF v
' _ Tron6aclion rrnfftge roe nt l- l+lo+luv
-+ T6e fJlocegs oF cdtrDioiDg tbe wl':,r<d O(x/fadotrs
]et'eotho! rheto
;nro Sir3 ie u-t' b7 awlgioS do e*-4 th;o3
or nofv og F)nCi o te k aAtp4 -Lfinsaedoo ff'il,aelln}^+
- -
Att Sengldue /o6ico lixe trc.nsFt mc'neg de-birca'd P.nr.ers)hX
r-rusr te &ulorzd tU eoadlin 3
._- Tronsoqd on tnf61l 5efl/ I c€ '
&onsPtn Mot'es C-, -,
,)*, is r$e (s-ur"'$ on ol ttoo oy'rcIlas '
'' ----- -TtansPrc,t m6nt 6?(
' @ t^ti*', drono o-o,.* 4- hu'a aw.
* rtis, €rc.,mc','.l€a to exea,ile rl'*. logcs  *"'urrr"6 Aou"'X& * *& lt'dple
-----e t'e con b;''3 rtrc e?P.*+T'con'a'ron fl6mt ''s;'tr 4t y o:*
T*'
b*i'maLatcJ,<
:
annrana6^bte ' 1o o'x'u'e tl';s 1'*blen *;'"'y*k' uet'V ,'^-n**'a G)Te.'"'
?.fdb.f lran sataoa n6rn't Qav;ce'
Jr<nsalri,q
(e*lc< '
;; ffi;'-x.ti# Y-;X:i-'l--*'." @) &'ru<'rw''rya
,^''
-1Fiat V'a'llan ua;te'
ti;r) f,h EJB csmPs uls uje g'axr
'rn"y)
"fro"v'a
'n G'utce '
l6e 'tHOcc.t Cale 4 TEnso4rtc.') (prg€erren+ : -
!: F$lic void bm, C)
{ t'st
kqln Tronsacncn
.v CF/(aHcrn l ' " - '
quancrng""'
ofr{4tlc'r' 5 ' " " -
Comrnlt fte Transodtc'n
] car'rrlExcootlo'r e)
{
bllb'ruc Jiansoq'ncm
1
qJ
I
a-
lomscrylc'n rr{mt Siues S.{tttt P" ACID f'o1rrlrr"r imPleq"rvrro#an(
A :---) Atoroocirg
(, ----+ Gms;src.rX
L ----+ Solcrflcrrl
D __-___.'
Drlrrbili rg
-+-[fu pwes 4 Cornbtni',g fnu]ttplt { retr"a iyrvidlar op'ra$ond iwa t;yle u*:O;i#j},,
-llre
alo,d
'Airrnoorg"
&arr. Ror th. ,^6
"
flrnm'
- 'l
- Cr.srrc.q :- Ev,^ $*fl]n ,.rlen k pt * .k,f'.kge doia c"t Violo'red *'*
^Yt':lj
no rule Vioufion c't-il* eod c(
i &Tram6c@tlon in fiere it a Y*'.'X
;;;;s; code' rhr"r ** olt I cou"e 'r G^s;src* cp'l' '
"-t ",ffi"+
doJ^ u'ndaltorotnJ a-{&'"
-- J*roI*: -fhe Prex oP a6d;n5 lott
&rr{. to nonlp"la}e ilc Lro
-
i< calltd enab[n6 ' 165 Jt"Lanon
pevarl^rs Cunc-attTenl
anJ $rnulhneou-l opam'l-ltrns
^ fuhk'^t J'+7
tl@0lik)
S"iLU;ri,l:- Tfc o.biritX c,(- b''i"41"6 DnBale slo L.r^to rwrrsl skrlc
n rh'^ &rtt-bort is furw-'ptcA'is cotrdh*Sh to6f;ru 6nd L'o'"'t fites u
rrrde'n1 Et3 r.s ths D-.rabls &t'J^t'
-[he Arfirc.rurf og Tntsaon on Tlc'noBerur+
lr,.neout^I1^t'n" Ccrrnmi$ o( roU'bctclcs 6pplicol-lon
1*.c [esurrtc trta^oflor '{a k"std cm d'e CQrlhrnit
C*'i,a S.* -1'Fx',sotttnal a4fn t
daru in 6 gn8are slt'r
[or) ru ba+ ofrz' a-llcotl
--l
rlr"r
(ibe Afpx.oHar cro rohirb
S.flice i.3 eno[ted
)
Tranrd4lto Hamn€4
(Gdx! tnitft.ctlans to
rtu{' QE 4r.LrleturF,( lD
r^-i r tr nnl,ark flrt TaqoaU
arcr*e n".t'1av(S-)
-> hsed oo tbe pp.pf ft{<urceg (alar.re <leo.) rtar art involved ta
Qorrraons cp -Ircrnso*trnral code LreCarr sa3 *r* ate e ruP€.!
Trenc{m{nf6'
forfu"'t ,/arr'6rq5
o( lrc'ne<'an ona'!
@
Et
ou rhe of;,crra'''s crP -l-hc'rrso'uiolE1 cde cl))rt ocr on
fra,xPor flarraX o?.'..|oo d- 't* ['ft aonrunts
S;,61e w slus
of *t^e'k't'Jr ,
@ Dotar*.iT*s".ttco (rx) l^Pr'^a'A"-'^)'
-.-ftcorcraftovrs
ef, Thnsocuanot *lg 6oir)
"6' - fl'li;eb Oe sl|@
Hibarsx ,stn ns,Ero le'hnoroii€s Y: Y:U*"i *O aBtutr'"ul
-|-)iprnohr Anuna+ A^ D;<ru,rc;
Tvorosaortoos'
*
D,srru*ei fia^ceatranl ' lelo+l:'t:
' Disrrib.,recl
'I{6 {on dn gpt(2fiole crroroit) pt*t
=:
Io pbaret,
-Ihe DisrnbLradT)'
trncroEd
Loill Seel' pr.rmis5lcrr Po- 'pBslto * Ia@
the Tx, . ..n.- *,on tbe Dsn*q+r.t Tl 'oittbe
ccwr'';'1+(a
Ijn ghsea.,, iFotl Dbslcl]s
oPto{ b* S
ottc'cdse $e o'*t'*' fn u'tlt be s' 'rollbccck '
@insel )./otacl. -r r "r" 9
dlo} to!
+
&- .1€3 u fo
(ptr.s"z)t ,t- ^^.t,rr>.-
Dishiurrtd
1 rmrcr6ed
t".4
{-
rf
tPhare! )
iabxcomlt Tr')
eS Q can-)
?bsez')
0Ua-!al)
-an I(ortn;t-l' 0f| 3l{' s
-,,
1_l
1"")
)e5 u cat
0 l-rcorT"*arla. frx) 11,.*3c*n+ .
trboSg
lt"sasf" rrudetS
f ldt Traogaclc'rr lt$el NeCEd TyAngc.clon HOde I
rPc're
A,calrozht......-
,.'
FairS
.43,rrygm<-
, futrcadl
The
tscaltse
tr&ngfruion 6ri n b€
, iri Fbl lrangacnorr
rolted,beq< iP cne o. cnte.1 Joornet h-d4ets
.,
AYe no+ at'Eila6t,
rnDd4
4
q .i4rYnet ti.xet bb"$ ogxaltdos (oLI be
flocei crs d;verr Cpanoo S mo;n fran6 ECficln -
Ftot frar't3aora or't nt"
'
ho, n T;t 3
(,
joa:ntg 1
jarvrrx 1
joomet 5
jrurntlt &
:
..
journc'tr n
5
hlhtn *€ oboL€ to&r plon is Siuen
to q 6fco d'PPn 'rhat tur' s oirh rlesr<A ftah'tattlo
o, ofl'o^r jottt n eY fi c^L4tl aJr( ho+
jcrzr nerJ 1:cla*- kx4nX nln Lt
6cer &nbin3
yieret bm Fio3
ti.s<,t LootcinX
licrc* Soobng
tr*ex b<*W ntt
I
ttc u,.rr.r1 X.uct, crrirl re fcmff'rrneJ e*- fut l"l one
cr,uai tabte . b,ecarue in Nelrci -Ianraot{ d mAd ar}
+ onesalrx J-oorot gp!<a 6{ner
grsT}'s.
-Ihi_-ies^z fi't fwws.ot &':Pn
NeSRd Trccc6ctHc,o rnode I '.,
frnin lx I
fub txl
t
)a-t 'ncqfiicxu
bwl'' a1
s-
taB, lr,ibe t.,or" ,sfmrf '!"fx'd1'6 Fl&l1x *b4e'l
Irz..,notr,:atrl donor s+P<T t esrcct 7: tood4
Se;n3 &+Ntr1 6stEtr l-rz''osood o.n
'
&!blx E
{
i41r n.f I
J
=
g.lb T'( n
1;<-t a b<roHq
,{ .,rcX n Ti&er kobl'q
3
^ ' -- -. '(;m Appl; otlc"''5 io troo cmrl 5
--r y{t con c.1rltr Jhanscctloq rnrml 'S'rvicc on Sr-'t ' t'
^ -,,,* b.-dd )
D n"'o'*' Apr""h
ffifi i-ry}{'$t#,:= t^"/-x J^'u*'
-:::;::f;:,{ftj'Jil '-'*
Cleo.r c^nd neal . - - - lnatr(, a-<- *el n CWU Co;rt
'----rio.1c/ol'e -fiamarlron rn5m* on Jrg pJ' 4 p-*trctre loli& a)
d;fe P"ar oF -fiamsc.alq qc"%d'
O Ut g-."Ttt satronflcunnu
--r J0 emble n ogrnb an idua 1t"t;tunce b6te
O l+u'*.t"T*r, atttaoYbqa no,.n h.ik'c"r Y'*lsxnce
Lo6t
---)'t0 ercble
-faT
"r ^ ploa'kb'n"tt ^
SCn0 OPJ1 |tk'*J.
on
-llpl;ol. g'csrc+e lq;c'
@ JDOTt *toctr'o Pk-'roi',l
-n.1,1 2rai>la nt'3t* t JDOP'^'ttnte
lrr6;c
S.,rrMa"t*
Jr service-
dnd erc.'-'
@ T.oti nflt.**to "oYottrya
'---aao ue!.e
-To
t5*
@ Jf^T**"crr c^Yl'rc1u
--, TD encDle f,i ngtnf o" frrtn3
o?Pn t$ us'tfl
- U .,. creale Trc,.rsortl*nTe,nptarc
da5s ohl -lio'nsoorro"llattt* oU b fr r b*e o$'crr-
lZrua-.rl*l .
DedoxoHLr€
-tri
03r
Q e'r
@ ril ro Tx'
rr:edhsr tbe b.m<&od
D0 l.rc.nsac-ktcrn to,)
dcoded ba,st o,.r tbe
busloas vtrtad '
-ihe 6 n a#nu,'tcs
r) rqP:td
r) wryArdneo
a) cqoo/rs (deh*lt)
a) Nor s4ur''tct
4 tP^a'ru1
() rucuor
br6<d local, Flat frc'nccctlaD manc'flerDe4
1lcXcno's
tt r {ttt
Leg^,.te irr,nlep_r tle [r6"a.ar ft
tte B."tl".* $,.'
bar"e ftclrPrr"ilx t6tt'
, ,9 f* nf,"t Dao rnod.r.te
re9e,r oao@ oF fie
in pvoyvayct]tl c ary'ro eLL)
P.6*rxUf cTrt- sa-aiilott tamqe"" i-
U4 orrrtrrnfrtcr{ bg;oin6 rlrt
-Jransc.rrloo , b,rmuoT (c,r) vclrUacen4 rte*f<*satuo"'
fuofl, exel{}e cotrh n€ro Tionqolrl or: baaruc
Trrr*cal.rlo'l ' fi. in4cater
fu.-ol'.Ti
*r6.nt
,-tr} ,nn-t
,,m
-la'u'"u*t lt4fl"l ilu'rwwos B'*'l'dr &nvzttn
cl;crf Sl-d,rdttd/'1} s.*i,e
, ; ;;;; ',,r-, &src"t'rtrod crnrare::6
*"*.h" **" l'd'+
Itm,rr""e^ice rd'r ; ;t.; ,**'flh )v''r8Lo S o"'.,ilfr*'u
ner-fi *stis 3fuurrczl ia b'ni.tpd ;tself-
orr cohicb *etara'f$rrT1 ro3mt erc4teA rtrrs@itL J
1-p-q1 lansac+lcrD Cot) Cl ianr g+phe A Tuo,sc'aA6 (drl te
-
-Tc,rsr'clcn a$natrct *gle ct..n,1XuwL on rf-'c '
/
Trctosa4ff anTemd cltt class grwides rbe absrantl c'(l a'6e" an
- '{trid pnflrama}ic Jrqmnrflarr
"n*
ln ep? a?pD
$tie m*e Codt 4 Jic,ftlee.iiE)
"S*t
& -nh
-.-a fl oue'rcome *,^: pr,utcm est +"g f.e/ A€eq,J
rhr
ft.ssing Tiaosarxcn SrarKd ln ane resourc€
'liavrsac-ttor).
Tn gqrcrnortc
-IX
tn6rtf
ctrotbea 'Ye o4rae isca@l ffr 4i.c,n;4
t(re &tr;nclo w*X
Ctielt toa1Pl)xl "-'
pr"ryrt*,.& .-
Can'c Cnortyt&, calil,
drer.-'t
g#ttv-
d6l
tb
i
Tx aftdh.rtr5 Q{e oor rE4dJYe d roh)e
Jroneo4lo6Teraplore cE{sS Dor nEiY€d
&afrg cr:rtb PaD$aYnari c 11 vrgmt '
d,;te deouo5 oirh Dqlc'^s'n-Tx rrgmt'
;l"l coirb
clicr* oPPn cartr 'tE b''
B' rrerhod '
c09:-
rDKi
Ie?dYcd
.--
Tx.
Qseb crierLt fuPPtrad
-Tx ig
Ji coitl be skJdt{d io tba
rg+rfYecl
bYnrt )
., (EdYes n€ro:- Thi6 B.rrfrbo4 rLtns
orr Lcr) Lolrb o&r- Tx
cot$ neqo Tr iff€lPg$ue 4 derlr+*/ clicQr catls s'methad
Tq^riY€s n€r'
bro,t )
s
L
---
ne.oT x
(rrs")
3
cr;.nr cfPn o,"o .dffrr"r9.
"#-;
y;3:^i:t&a
B ' rrgbo| cloruns irQ me {"'"'
Not Su{r$rrd:- B.r,r.rhod o-Lro%s ru.rS 1pifi6(lt T{ ivverpeuh'w * coecrhex 61;g.1.
tlryn is &t-[in3 g.rnert'o4 rptrh crr co,rhoqf
-Ti.
[*"
l--
erieru A?P
f ,^*
STnr ( )
I
oofr
S&?p(Xtg i- The garc 4 Tx irt
6* ,"ttt @)rb Tr rbcn
CIiENT APP
NO T,}
umr ()
I
fu oTx
TTA
_l
5a+Ptdrs
brnrC)
J
t7::- l
/.'t
:--; J*""
bYnr t )
.
clienlAPP
brnr( )
TTA
Nbf 9r00on<i
q
Atkribur rb KEYed '
......--.rl
iS $r?P ctrr
cl coirh T)
N}(J 51 Crrf rbe 0 'rntrh o
vuntatotl
br&t )
Nctro{
btrqc)
NOI} ,
NOTX
1
@ ft".f"r,t:- The otict'd-aPPn
thrn s an E^cz$lo"
61;eq AoP
NO

l,

NOT}
f.-
I
N]OT)
T}A
TX
@ r.ro*o,-
:-
1^h
ctienr App
blr)/()
m0st
{lE
PoFratlS u.sed Tx
arhdhrcoePaut+ Tx
Qeqlrire d rDne
Tl
Tg
Tl
Tz
Te
DTOC
Tt
|tcrndofor1
ttre EFFecxof lx a*trttrres :-
TRanscrcHctn Atlri bcrte cLient'6 Trc.oscLfl cfi! Beon 5 -Traosacfi
,retuns fioxX oQllr on c-oh;th Tr
'--> 0rg oe. borrsoLtton ' inr"'.tpto' Jit**-Pt'gF*1&-
Servlce i 6 eoobied
r
"roll-
Afi a'*&ttt i5 li*e Pinr.'*
advas.t :
'--- a6'a?'{ronsorrlon ' i ilcr eprur ' Nlo*}1tr"rt -=.
+ta+ol7-T).,,"sc'il1cn ar$tut€t ot lhtbned'o'r-
4 9'1k^^ aa"< '
v-> rn OecloYc'fiue
-Iirnsocfioo ma,,egtfi enj $g Trr'ngogl crn Ldll be Cornrn''t
t.d
t,rh€n no exc,crrron 5 rdsed in rhe salncr* rrradocl.
orlcPr,coira
rhe
L- Pr, o ri meErrtPd on
fvonsrr*icro tdll be volled b<'c-lr
,^.,.rTronseo-*ro. rr%^"ftJ refd afrn9 c+
..- @ f- exam0tc ct{Pn on Dectctratrw l-bf,t l-ocoJTronse(}lort
nq
$e pc.Snoo )lo {ret
ftctcrolive
-Ix rtgmt bg us'nX onmrcr'h'cns
o'-
il*.*, joto grrnc o$ F€e oo" Bo ff.fio":cv4
moetfu Frruatog rttto€s
i1&rodgecrD ,jav a .91Yne &s 13o DevrofFao 'jctua ul'r
*)
imQc,fr or$ 'SF ' tnLru<'ctf oD ' annof&tton 'fioD . annof&ttoh '
't / , .fpED
) On bm.,() t' tt'e/^d
orkn =
?ror.qail*r' QE6[J
@Tranrc,*t'n "l' tttt"x = llofitqcn r'"r ' s- - '
-*-ET^ art'lur,rc
"
sod"$-ry:Y '
spdn$ -tx ' u&'g'[:il:
+ __-a
a) odd
b) atd
/iOemo,xmt
a) rnust bs ge1',rrra bc.se indodl't
*
,Vtn$-o"oot'"*'
sjl i-]i--
b) ptc." l'rne no 4}to 63 4 Wl, Y)0" l3o as itis be'n
c) 646 Srtoa.,in5 ccdt c.i- tba endop @sna ! L r
4.LI ', onn6trtlon -d'ritre n transol}lcrn - rrpncl?e-d=
"df6" / >
ClrcruAPP'jav( t-
sG-t as rhe cuerLt o{PD'3o,^ cf lnSzr>o'' lal
Jd-fIU- ct,q$nrh :-  -
spn5.ic'v, ao*r*, - to,16lo6 "la'r
(sp"6"'s
envl- -
)
>"iaVqc *'Jcdq
)ic,.ra Ctie{wAPP
Oh* Jx dhhatcs tplute tm'tr4nrtr ur'rh '@1ic'socJ''<ttnt o
P'ops"rr<'o'
P;";;; .- NE^r'
?T&a*'Bneucee -
fra6,n"o. SuP{'tars, P'op'6crHon 'Nor-SufuRr
rp' P*P6"ff4n" l-kNDAT0lLl -,
topcrtr<,raon' NFlETr, $'g5"rr- N esrgo (*'en*'"r'*Tt ")
nloll*''
, To Cfph €pring based TranSa{flrnS on $ryio8OPn ftrrl]Ule fused h;k'rr'tt WEkttD(d"
l$ic use rr{g. s?.orm. bibe.rrnrea . l-lrut nrT"t-tqq{orlrh"%u,,
.+ F<n e^orde a?'PlicoB oD oD P'D$r4rrlfi c t locrtt', FhfTX wnrtlerrrttt o4 $n6oP.m
-
.)-"' tn, $;6rnoreBx;slante
Lr,6r"
'"Pu aPn@af-rlt< Pe'trends @-O*-
I I 4 )Ltr-' on n [o + I
t-c15
-T":::"*;:^o*o*n*,
tro..t,, porris "n $"d"1 "d' e kae)
'
w*<hce 16, *i:'t u- oppn oP /^u o:*^n"*" O; C g'41"'"a"t*1ry
ffr^an lalorl^ts
!
- * $lobol / 0istribcrlcd TvonscrcrionS )? |glo,-rlroL3I
:
ir'$ irnPlemento-tlorr.
j Akornik'g g.pie' gp€dal idbc dr-ive16 Ana 16 6ilranaacrlonl'lc'rr'3w
i'rplenenAt
--, t0 'add Disrracrrca Tx rr€rnt St4pc'n- on sP"og oPPnS '
--) o Con doonload q1orcd resrYces ft- Ltlo@ ' orort'iKos 'com u9bstti '
fransPtx rr,6ne{ og^r&tlcm blo lrm d^?P alcs oP tt-,:o d;P?*'"Ve need cDtobcl
Tiansc,l*loq Suprlo/r'
.--,--+ w(drq)Oe alr.,t I
* oxode DB 6lLo
kwttrt [au t.,-lte ;Aanlrr'::?. (au r*re) I
,Yecu.ir:| u"'*'' ,l
| Qgng lndr"na.ns bJ- accno h.ldet"r.-e bdl
:::-::
;ardvi qooo I tOt tqjc, 6ooO101 @
- ----a ule Deed DlswiLurcd ft tmI s4'P/aYr la pLtkxro ttcorse<,t n'"1 qx'raJao'ts <n
'-/
the OJrrre t;g,O OtcE'LnlE " ' '
@ R" *qr'}ele *{Pn crn Decrc,ro.tiw orrd Dl6tflLg}iedTx
rn'rnt_ oo
-tri.ar,'ponrrrJnqJ
OP,arron tPftn appn (BlLencm) arli@bte in ls[oVf>ot: b*a"t+
.!- * €clrrtij X
Sgcl'r-',hd
1. ruetunr fuel secr;n1 ?' Appri(*lcrn lr.rxJ Se(rlyi 11
N et@ or F Laue I
:----=;1"
pro1zt1 rbr dc'-lz^ rtr't i3 Have)llql otc{ ttf r€nrrl k
. ---. Apprfrudan detclopc-r-s aye nor rs fgrSible {" *rtS , pet.-ut1 crdnlos rrrltr ta'Lf rctre 4
t f;'""rot's a.d or$al
! AmrirgAr,n !&El
D--
*ns6;zr*lon -Y A',6o' zarto"
" " ''-, Pmtr..mYners 'rYg
re6rxm6i btc {"r t{"s og"aH o"*
tfr.ie rtrr"c''-$
.--a Che,u'ng $re rdeft}; q oP a USe'. is
-+ Cheo&log Ih e Accers Pe,. rn isstan a
CaSteA Aud1en61crjl<ro
& o' O1y.n cfn Ye&r.dcet
/1
is CaU e d fluntril1;2e.Hc/ .
g€oalYitb Sewlce s 6 appl;(a.}'torl i,
-/
Dealan-e*lce
'aJtr"->
Ib [s 4-i,oordc "rexomended Fo errabte
mode " Oan ure
mo4c ogtht deqoxo-ulue
O t" excrmpe afPn crn atPeaiJ profircmrr3 re-Bc.l- 6,e.
trA oe t 6r fi." t'""rr. 6ori g1m1 ge.lzn1 Plo he"a''b/Le
&4lj.h'q cln $'^t c{?ns.
2olo+lzot't
alPas Xn'eoi
o
r2
-) l6peJ.J Annotottoo 5 i
6O*O'-"1"0u ------'
-To rna[e rhe 'pnr*dna
as -fhrde
^o"Jt'-'-
@A,oc,-a
-ro ,,,a< rbe iarn w+-d as
^*:.:H^*iH:*,"u
exawra.-
6 g.*:,:::T.T. riu "ff,m&T,=ii
^=
t*;'1
@ Aof*a "-"-n Ta rrnle $e j'rva crrss os rhe Advlce elc4s
@Porn G.t _-- ao Pqnt fD B'"rrbods & vsf&e,.n c)ax '
'*' ' " ''*' hg ktct+
xz t ' t , ,',mrcur e'dn3 h alr $c g''"atats + rr""d
L(d,?o,ntrnu
(''e"o*rr* (* 141:"rcr '*("))')3*"r* t
?ubt;c vord t,..t'*,ort)t J rT
d;;*"ri ----
T
*o i: *#; HiL*'*
'ltstBclro ' iar,a 4
/ trgmr,'t 'J*"
1.,or,- o.g ' *P*ti ' lang ^ anooturtao' * )
@A.p".t
p.'blic. cr(rrg hgletctl- ,, u g.,,,.rtots4Jd"0B"-
3fl'lt8 rm]
3.."1-
g a.e.,"('r.,u.,rcnOrtj') ..  *, "".-. -- incttde ,.1-11]t_."r1^i.:gnft,". (' tesb;n-tc'{uFL
/ J
,. 
*,
-".'.-.' _' incwde ,e""s -Fllt -rlr.
^,a',>
fl*ri c void kp-cYcr6oa( )

s.i4$ -aDP -.
t
S,o 1.[' ia.n L,eP,nt aduite" )l I
zit' id:"idr" clar' ='la'+*t{ l>
| ,,v<an id =";d2" tlax =" S'yPtgr' Iz
6 on**'"'4 Co'1*'o*-f,1^rr.,  '*o' a'poa-o'tw?'^t/)
f
s.o o('to. aPta Y€J.^*4X ad"to ))
clil]nt da,rq &s,e- w ctlu*-pt t tlcltrfi o4v5.tt
I ^- -1,! -'.6 ' o .la I . gr'ri iar I ----
;^,elo."
",,*.0*, 1?:1i::: ;l :;tl*Y":l* -,--  7""- r ' r6lw4t'q to *flil ra'{ 1'""1",,s
i
Neb Promecocfl t glt,> s
6irnpli ftea rbe Pmaess
J5F --------------; p16sn
Nekaort ____-_-___-_,
Rom
fuioj Neb mvc/ sp;"g
Nhril ib rhe dipf blo)
5trt1t{5 i- x
"f eto4.deb arc AP: dcPcodcn i
does not *.?0oa !,r556arl on hrsed p5T am;o
dds not otlo(' fo uJ e Orkr rbq, btrnt ,, is P
$rarndo6ies in victo Lo'X crr
Sntrf 5 -----------) Prcrir o1x,,ct'r e 4rn&.rf .t
@
@
o
o
a)
alldrs rD 15p r/elril5, Seerncrl FCn, osp, hrt"' t
Fahnolqies )r) vlco Lc[er.
@ era1z*s dqlrtderlt3 l4elrtt'o crn e!€/t Jc,l:q
re$cu(ce L"u*z -laqtzmT;"rana
@ uses 5(,$n1r5 &-dlt-io r
sl
R'rmbeanS
" @ th,r** ptu6io 16
drry,
io penb,.
TermrnolqS rcru*;n3 bl(o 5?dir5 4'A ord qtdn8nvc
6ltdi 6 -i 'x
Acttuo€e{det
furn9ean
Aalao ctc':s
Srmrs cPg ffte
3Prin8 rovc
Dispor.r.n&*ter
Ca;rnr,raotl class
Gnnrmod &nftDlter cl'acS
Spnog cfu ere
Ter mi oo I og5
e-...--
&rnrrotle I &.rv let
ZOog hleoar0e>'lro
Acfionl-a4e;o3
4a66,5PNocLrdJ
l-Dl5Rl,.tler5fr'lcrlSicrlrarne 2 -
8e!',1+' xm)
qrt krrllev
Vie!) Qcidvc'rs ar.{ Vk"rs
5pr'ng Neuflodule Po" -tr
provide alghrt l.tton Lc"Xer dn C(ff€ 6eYvt$/ jsp tahrooX ies and
oP delt'lbpin3 nVc[, c.rchi l-tz]Ltw brrse d ' Llr.b cLezt>$ '
fuoH5 [arcrre cc're)
open $lmphong
mvc/s1rt trxt Ptoo:
,--
Prom inrcrft'ccan
6hrcrt5 1"r and qi'r;ng rnvc 1.
SrnlDg Yovc
O *t*..*;bt de'rr'Paas Portr dasses
g4lqtrts &trntatlcras brrse firro$ram i l3
ModetlrgVierr oklp.r
(to canBSrr. Qoarrr o"Ses
)
€anf ct6 6mua 1')( etoc,f,
' Flur: oP ereornn in Sp"% HVc aPPa :-
p*y*c),or Q'aiet ' fie
D p;,l""tt''nrQ,,0er- use^ Viet, anl
laleb terver ApplicanooSe' v<e
!dabdpfn
N Y ro rbe diog.tc,rn i-
0 F{otrornr.e. dePlo$ee5 SPri ag t'lv c t'Jcb epPn in L'&t&wcx Cc'rl apgn sB*tc't '
@ becCrult Og locid,orr- stbrtT.+ €fdrt€f, rf' ?he DlSparztpr &rr,tl+ it coitl be iOSn'l*l cr'r-c J
girter duving furr,cr su1,t -rp crr dc.ving flre &t%.rn€nt 6( ot'fupprt '
@ lrs D;urc,r.1", &*q.. affruarS aJ,) o4fro Gnrcxt cailz,)yLu I rz.ur"6 B[i!+lz#tt4h== .-
<Dser.t*crss'rrc+lo6nanaroe ) -sewr€r, xral as rbe $.rr'g ConltTtvann Sre f' tfisfroic+t -
-ou
rhe b.,ns, Cn(:VoA tn fu1 e*,eV"*yor -!'rc 76tn k f)/t-t,lola!
I1o+<e '
J
T'rmm ff ;,'ffi"-;ff::, +o '.o(D
d,o"aLanmttur "t'oo'G"t'*nt "-
ell.sr $c* ort rtly:r<d * y*u, i" elrtat'
Q D:ryd^o.Q*4 .o.ltz* lhe' *'"'t,.A 'E*rtAn-^ G-*,,'A 'LQa
odt"-'
J
@ ,rr^^ 9*rc.t- caw ca+2,"n K'nd"a ot- G,''r,*^) G"*-tt'n "L"tl
(9(0fn, E*A'"a rllt laott*s
rfle r1rerr
-anl
etu'ns floJqA'rVt- "l* o4lettt:
Viulflesolve^<
t6 BerutPaee '
eA* G^fiq"t d iin sir"n6 afu fio r &.r.r ,riq)
U
Tetrt Pctfe3 '
Qupar:.J''qQ*Ler
Ylr prefe"*arto'r LSnoF QeYrrFqe
ft *1an d,e rutrtb anl En^lJ t,ilc, re
a 5*^nc':tl'A{lut.
*8.,
+'d 0
[r^r*ion
rrart : [-----lL--------J
@ra:
I--=l
ontrlmrcC,- -,
)
':'---6t%1c)
r& ytXa flre GvWae
@
-> ComFr.od clc6s k PbJb c1(1s.5,,... and iava bean
' -. Ovnrnr,n d c)&t5 pyDtxrlias ..,€ed not tD 67ftk b uelrb Fitmcznf**,rt*
'- '-. Gn"rcnnri alas6 FD[rorrk, rnurf F . Lo,,."J o;rb Tin-O-pa*tS
CcnrnanJ 6rntmtterr ctass i5 sp,,
'6
+nr 4rf--de'f ' --1 n-il clat!
616 '.**,,3 &.meco 6{F , ulrs' ,"*,.ri ,-" ' G"*a lot (i"mtt'e;
4ornes '
l4utt"X ZsPnt{'biD47 ruJ '
flwlt iffPlerP'Lt
the oor;og &rn9,gurafio. Pre oF SpinX lJebrnl c agt) 6{ttutn5 $s frro{oi"'3 cfus'
@ Urt haoarcr s
( r0 linx iretti:rromin3 rcqrsts rpirb Carn'nnd cc'trmllu ctasses
)
(D G-.*na ccmrrDller/ ctc.sses ( G.-*nl elcrrses.
o v;* Qusolve.rs.
Vieco Qp561vg-{'- lbrs conprxuro$o.} Le.. te lp...'x?tto 1a s'eth *"
::t"t:
*tt
r*r* A..O9O Ont* r€5csY'es oe 1;a6 r*gj' ltrrs 'rlt-oQest'Uen ctlrsncrme
crvies ha,re d csr1 ioe {ieao Lclcx teehn ooX1 toP u Se '
T&hnologl vie(oklotve'{ cl4ss name
-
'
-
1646a[[2cscirrce Vic'ol?eolver
(deft"rr )
J6P Org sg ' co'b
"*'tvet 'Yie1tr '
lelocrrg 6s.sp c,,tb 'f,'tLt''''":';:Y#:::tiaoResdr,e.,
P'errcovu or! "af c'tb ' '9e lt+ ' vra
tlres e!'s?'c'tb' sertt<t v;at ' hLes'
-l1LesG"'63"w v
,15rt (x,',ssrstrclLcrns<tse ;; :, * ' *'^)el vieru' xstt' Xtt'V;-i1s';H**V,-Pt'at*
^"" t
i;'t;;;';#^j
ur] 'a
_, o./urer - victtt . jas?u(46rs ' Jc'r'crl€
.L.sp{ reporr6 016 (P'Lx-'zlt ' gadtet ' uic{t
Urrt-landtcrg : -
^ g," L- t:ou lhe etienl Benr,-tte
;,{oningqP*:,'
--, rrrpst 6ff 6e crc*ses ctmhxuwd
'"
''1"(, tft
i:: ""il:;,'",': K::*- ,,,pk* *1
ant!, G'vrnud C*+*11'- clat**t hd "" fr^d
h^rtu*. g"ew+;; ,^,^-C,m"l';:?,, oir.*os to u,, Loontds,ka.h^tlu*' g&*r*Z-pk
L!, Hdnfld,.llo?pr,'d :- This clcrss olJ.*L)s to u* Loontds'kae
C"-a@
*mps onct
^
n,ur*presE;dns fu linr fu fir- urts(reluesta''ts)oorrfr G^*J
G*nrttat clctre es '
O,.c,r * n'r*' j'n - ?N::'ur'fu1:Y|-1": :,##,ffi,:,l*ioi tl'
C*ot
+"tt
:
=-r
o@.,
r qr rs
)
rrrff G.o" i co^r'"ila' ctoq'r'
' Go,rrnnd G*tprs ".' 'ftiL'e 15 a Frssibiltr$ fu e'i.lti d.Wr*nt r1p"s oP C-s^.^dCsrtrott, .LanE.
(} org.+.*u. servrf .rovc. S'mptE'- G^t.nrpr i- useR^r to banale sing)? srbmit vt*n %'ow'ne, W thp R'mpa?t ..-
-
frurr t( )atrp<-}r qnder *t Cd'.t'dloroP Co-nrroUc^ &rr/tf . 6tw.s anG-r.ar";fG,-,.t')weina 76
O q.<f &rg. edt4'hv. ' AUr*+['t-Grt"f f
,v y
I
Ptt{8 rbe Ye?levr
uc.f.,r to ha,nJln 9i61e ra-Lmir lut n h-q roX", l"ni-]r^e 4^^po4' a^ h latdz) dr"o ' B+!4
I,r^arc Peayrxt ) vu*a -.tv tr,orr;,.( r(e 'vlgqrrt .
O 'O + L...-*.-u.'4g*o*Ji,o"aE tGmrlw9-
'--.,/
@ ,X .f .t*.g,,ul€+.mvc' G*l,oat.E t G^U, .r 8//',,c * 9,'v1eT)*rCo*-tto't
W aLoV*.ele4 --,
"a.G^,e
f C-l +6 Pro.eJ( ile ^c4tLr* Csa,,"6 $n 6db"k^("ererA"). ?
o q..g *".gn)1€f.ryrvc. matilarrlor, FtrrrA.rroG^t}"tt""':- n
hit b,nos /'r^"n, -
l4kAkhaib 4c n'r;ple -qnr C';7 %- 4n niltsple 9
,. ,,^, a- czJo+l"t:s
&,ne 6*iors "*
l'*"Pi*"--= ,-., ,-- ,^*G - ^ - "
"''
class gef3
"A6' r{ rrt'od h'sel '- rhero fhe -
-t
-*" thls cf&e bclsed C:rnnandGmr'otte'l clAss
' lr.^,^rneA, dildrt
-
&trn Pnfle (,,]irr be lauocne d '
+ ur6en
'tu6
clc*g LrT etr &mrrrinl G'r--llerr ctas Ber6
''Po6r" rrcrbod barcd *en the *"rtttr
--
coirr b€ processed and resrtt c;:ltr be gcrnctctrf
1l-€ imrtttcnt poparde* are : -
----------+ to syer$ loe &or, 4 ca-n'x'oA ebss ohJ
e)cr-nrlM^e -------2 la t?'hrLe G- c^nAda*s t"4'*
e aTo1rntC)aur ---------r -1" sP)fu &e G'-t"z^a cbN tnt>' e
&,ne 6*iors ^Wu
9'*"fui91-Y
-.--.------- ro ae" $t Jr"-W1e.
'
fo sfr<;ej the xu*ffie '
G-nanl dc'*S )"d.
N.r.to dt6grary1
gzn€/c,fes
-
enVr
-
"rlrrhod
bct se d impllo t r4/ue s F
;J
tvurhod GtEf
a) &"sionF -
u) f'.N1,."
I e*no/,'*
d,nd elt' ' .
abve diasroro
@ N",r-, poq.
OlO ff'. Drrr,tlcr Setvter -F"{t { tc+q rhe 6ryef'
@n*.t" O',+ linr.s flne rcye* o*1 &tmand Gnn'lttn tLoN ' 9o.. rl.. *2y'4qr
thc &,^rrond CcnnoVttr cla-f hl^h€3
I
g;tgN'aQnc+ ta lo'Lncl'
rAe
&nP"i e
@F-^,-.a" 6cr.re,ard
* pos{ ' mer{rod ** ff::;qr:ffi"T;# sr#-
av& Ltrr{ $t eyt*- cotrl' G""^'njGnrnlit" dorA ' "'u'* :"''"--
teG^na,r*G,,trdk".;
"bcrmes
tt^Ib to ltroceYt fie "tr1Ferr-
'.:l|P (wtttnoc ma.
1i+:fum!! rr.ge=
oo&,a'11q-ll
u
t..t't,.ln "'''id:
Oorrf,:
ol],ae'.
rl
t--_--- i
Ilrtdeu- d.f-'its /ayr
... ldr Errrsh gooo
iP proArr+ it asrt
- E*r:r"le fil.t;caUo.t
o@@
Nab afpo
Plsnar=1*" *,an
o
@
@ {*rlr, ^'h,.
lbe FlmoP eteloL on al
Disga*cl,e'r
).cpaX),*
*'vlcr
C-r.*
lt &lircs +,e r<erhled ,{-*atrut" G-'*'a dats eiut '
le* coJl,e o-,.9-ur;.G,.-,-,-J *xl'o1 oh Co'--o^LCc"th,tle'r
r
C,i" tare exar.rpte aTpn refPor alo@ e *," P6eilis @@
Lctt' aa.
tqp"@ pc(geroo @a€) ;-
- @ so-. o, st pl rtlo*l-+: ' Dot'o'"r
t'i qr.-e as sl€") oq 9ro+looE Dr"Xte'b)
_ 6 :"_, ^ sr+s oQ z,o+r>.rs o'.I]-.*u.
). i"#*s .w*h,
Tnde'isp Gi e?'eljJJe
. Q) Ed*. 6t"'z't
*a1',,sr'mt,"'barecLEd{nu')
::lh'fT "
tTff;it*tntt*
' anA
'h:s
ta'lc"* ?un' l-'*kt
i-fl'an
ny^[q"#]*'l*'^U
'^
Y*'*, '?*;t;;*t;
. , *rr,ns a,,J Jaues the eerft;r (*t:-'-
?,""ondCa',wrc,r..,^
gl*3
@ D'rpat t ovSi,.utef
-trt4s an''
.._.. rbe qprst c"or rh L.l:alr.nn6 " '- *
(rop,"ire)*- **'
Fr -rt'e S'-ortW'Ut'rJtf1"o;ot 'tag
ltnrs rbe r"qlrrst c-or rn
. (:_/
u
il, gts;,"#ml'*ff Q
I,X ;n*K
Yo^, ,r^)o* $ryL Dopont"'G*rc+-'(n?: t+'l2611 )
--@ *r,0, BrLg.,frtne &rrfo,r o. anJ Gtrt;a 4+ o47ur (,.+t*ttr;
: O Duwrcpt},'v+ ia4s anA 1ov'z fl'e r'14er (reto-eros)
- b eote c's @ f ^
t, o,.t..n*.-^t-rrr,r ) koo',no *oh +o p** da q1*t k<""*
tl.'e .relT,norwethocl is P$r ^ .,.', J"J- o? &- yul, +" &.*'o"J
ffi,
D D;sg"ra^.x Gvrer ,;t tit wa"er +znt
(usesaAn{:) r.edo& kce:r+r? ,v,ar))
- (D prga&n9*rzt c.Ilr one,*n;tG,-,-,-; rrrft4 4 G-r*A Gyn"ll""ct^rx oL.1" (zttt-:rtt't)
@ o"S.rr"rr e,-, ,-) rrt*ro cl nla. os f'lodaA't V ictc. a5i pt nt'1 io "s b"co pi"dr.rr ' j.s
e" (rep"- >rzo)
"
,12 A
@ D,nu+- 9.*rr* y*u {'e Ctnt-Ie n {ha-fn"e*at 'i'p C*tuiFrye )
-, Ve'gfuiog the lJ"r.cr and tafFevn 4 rbe Eyltl ddlct Grreg tr-fl,*r E.ymVa ti dorH crrs .
 /- n
ur Lrse Vo l;r{aJcru ploq. io (or{) X Lrtt/& krti dctk"/ -Io g" t<'rn1
, 'I
.--'s[,nr[l'1vc&wn3grcresscfltTfo-'!fzvo-lVatidcdonsiolitt-lebitGropiex'drdrrot
Plsib'le u;nt FlaScYl Pt
n vt'ltdo+tt"s ure for:Jale-- a.l5 liYofr&mcd c +{ Fl
us)n9 jaic. code
U
-) r.0t can cAe kltars mcr$od's e4 V;at'tan u cw
{., s;.pl; ft;.,q dne gtcex a $ 4^' Va1'rda-tlcr
'ul tJ.
- ffr'it olrui! ttr d"*t e E,-aliaoNu., llles iir 91e,role jc'rraclc.v( *d tlut j^o", doU -
&n beusei in ou lain& o( s6r.n-6 a'ggns indu&'5 g'nn,lluc d4Pn{. ?,1' clo,es MrLtt -
iyr)enz*s a6 +,-71'"'reta^t'. Va-ct'l.n V,r.t'*.n (t) .rJ
kn*t rVUa"re( ) r,,rAocls. r,Cui" L1..rJr.2 ioni< In h-Udon.'ug io6i< ;n Al;ao+66;
9qr* 4 ,a;e*Xx* GlvarLodr & V*a.H-(J*rs crcdj
@ P,ocn&," to duolop rhe $;'6mu, aa'n V*,7 rh. $tr* of Q^e'steE^ W,n^
ime'lernenlia, Ord . sF.VolHofi. ,!*a*on(f) onJ inpiernant rbegtE-r :- lcrve c. jan clasS
-r,-rs+ trrrovictc
't"rgleraa"ttc.
14 '
v,aa?.""{ u-tcco/r {ak i{e
.-
Er."Vrldc.rtcn lgrc
lcfu P.oa.rctfu.ia"ror'.1avo' ftre oP F tr t'o:@ o+t" no'@'
6ttpl "
5ie,jfu ftr( alr,€ ca'6 h Comrrund ft,"n hollf-4 c )CErs Con f;6qrcr-tlcT r "of Splrrn ConF;3woll- 4tu'
# *ku .x6s enrr{tr u( ga,.ni ^'
Q)
"9Kn-D| 1il61g furoroing l%i' ln rk Fa^ Yle bn odoa! n
rfi< rJe og 2tl+ lo uLt 't f'3'@
- rolq,@tnr,fi; d (o',ohd nddq cro'
4rT rn5;bosBindhrurs ta^e
' "i"2
'1), * r"* *' =
+" -. .ff; tt+JLT""::J,"i*' 1;n'"' "0o1"
(rq"ere'*r - r"*'ST)
LtiT t) :l' &jia3'd 4 rne u!! &tkr' aiftr{ i|1to!]1 ilc'o}l('a'
--2 In f,t'tut' Crpplicad.n5
Ft irn Val idc*lc.n6 '
frYDtr arnffre.t &;cndl g .
Forrn Val idan'on5 in SPriDg rnvc oppn6 Ce'6
veraioo)
a. 6ervc{6 i de1' cticr*a; de
r,nlu omarrrrncrfic kt rnlC' lida'tlOns Crvt
Zst)rtT: rf€ 55.{c
4t,
Lltikt,b"n>
rcnr =
"$ f e'aefo.,'1flest3e J /> ---' at ;s f6'eaLb l,JoP so' 6)e 4 dn e
imprtenr cnmrch0n6 oP sPrirnmvcft'* 6 gPnng3
^"u"''i,;
Vq&'&-t'c4 erfors
d:rpla.ra.{
a+lo'rlPr:
- O @Coer"orr
e'' rrf,tl€5 fie iava oass as d:mrnnd @nfrle/r
- @@?qpatflagprnX- ,nsPS $e ior'ire$lesr ar'I- coitb GtnrndGr'rl€//
clc.ss '
@ @HoderAr*,b,rt
-----'--------r KrePs fie gt'an.et<" & 6l'reo
b rrer6o4 b #r l'1oder4rr-"u'rre
ro
use in Via-ohc" '
=@ @ Soo-Arhibutq5 '-------, creor<.s &ssrcrD ortdb,rc io t^tlo Y€so tlYce fT ts '
.- O f- Aonotartona b'red Gn'nXhElrwc *Jnte- *t' €ft' $e aPPoC) "f
Se
: - n",i i'-"'::';*,"'", os *e''"-ra.
.:"x';';J,J.[: "'*
&"W'"d org ' 3g6ngP{a,.,C.Dcd
v' 6h sweF'viet' ' tleot'N*
Relor,rs n fne &n". tf PdP do.ttnenrl X-c4 she€'ts u:e &ot
Y ::ffi;
.-
i t.rj{ u}itL rhbse o8lG n sieri c-l epnSbeons ctnd err e crrrve rbt
.-@ {*Ihe gihmgl€ cLj.Ph onrbe 6!o.a disu'rttc,.n.hc a*.@o?fie *.*''spffi
I -- ," er*rgrrvc tr'bandle tb( 6it-&a'on* -"tl:--*:*.J11*:"#_ -+ Jn er*rg rrvc tr' band le lD( sttaarx" ' "r tr.r16 fcnc-fa*ro llu" "nl
a ftrrrr
pc'Xe Loe mrtst use tbe G-rtno dGar-l le'v elals & +ye"
aoe Sboc'rd also us(
' ; ;;- -';*.
'.oJG*-o"*
roitb rrrr?rde "? Con"anaG''nt,oua ^
- @
.p.n rhample &?pn 6n lrrrr*lrrrcrnGrr'crt<'l
rt,fta fie aprrcadorr@cP-
o+ltllal*r: h"d"+
llu7
zlsp"tg I bo"B;"dFrrs
>
-+ It prortdee the
9P"9-NeUse'ni(cs
Lrb5wodlcn bget a1 inx-ppc '
JAI-r^Js oe-bcrvlces"
ir Set? provides erNi (Dnfffnt +o excu"t-c k-r-bg3'rDi ce
an *,r.s proceeS rh e
G^7'oe"t' tht
as lt:tllkr^)ica Camgt'net* and
€ong Crnlr^;ne't
qryons l+L'e;s no ned oP fu.t"t" uzbsenrtn'
&tC Cldts ObJ@ra-t U){bkwice &mpontnt.
% * rat"'*-cntL- ttmrt6..io,os ' &ls ?"",P'o^'fi$n&."n u,nL*'2 h&nwne
W'*"'#:#,;"* bos'r $n,uut*,"
dtuatr"D ^ *W#
-t Sprrrn6S'r guptics 1loa clarse.s 40
-to Co,sume Ld'bwvi& h'V 1--
Qxpose iavacta'l
cl;ut aPo'
arfi' epaog &arrunr*. rcnbr;n.. Jilur9 . Sirnpietaxwo
&*rtthett.r eao o'Fnr ffxn
I would try to update our site JavaEra.com everyday with various interesting
facts, scenarios and interview questions. Keep visiting regularly.....
Thanks and I wish all the readers all the best in the interviews.
www.JavaEra.com
A Perfect Place for All Java Resources

Spring complete notes natraz

  • 1.
  • 2.
    tutorial4us.com A Perfect Placefor All Tutorials Resources Core Java | Servlet | JSP | JDBC | Struts | Hibernate | Spring Java Projects | C | C++ | DS | Interview Questions | JavaScript College Projects | eBooks | Interview Tips | Forums | Java Discussions For More Tutorials Stuff Visit www.tutorial4us.com A Perfect Place for All Tutorials Resources
  • 3.
  • 4.
    05ir€ tebFrarne (l)dlKsore can jusr develc'pg hjeb ofpllco$ctos ' LEing opn riarna coorri de dcro juot derrelop R{5i6krtre Logics' t.lO;og 6frin3 toe CaD derclop Otl hrtaS oP lo$ic3 like Buaioeos l-ogic) Per5i5trffe l$t lDrftrofiC'n logic, Prese'trc'ttcm Logic and erc' otlorjlota -> booFb '" tfro.)g t.r'' 6Frng 5.x 6pdDg j.'x using 5txlo3 toe Cac) fLoo - fire &{pl'r calloD 6 / oP opplicnuf c'o6 ,iB€ 6kcrndolone o+Pn6., D;otribrrreJ aPPlicotloos, en'lcrPrl€€ "n" {* &velop dl) Yjrrt6 oef oPPltcortoot, sprDS I rgpe I jc,vcr-j EE Frarre tr:orr' I APP)i cafioD FrarritooiK Vcndtn: XntaP<.Ce Bt G'tatc'r : hr. Qad Jhoo6c'o OpeoSource Slrrl 'Io Dd.)r,lood elul I gdjpbad as zppire Roro '11^11^1' 5gt'ogftatrfrd E'65 V €T6i6o : 9.5 , 3. X ?.5(Gopolible eorrb .hrr'o +) 3':r ( tlmParble lDirb Jdrl'st ) doco crqJ FA&5 : wun. Sptn6ftarneoooK' ar$ dDlioe Tiahnial : blto<o. rgeirdia.Sr Bood d{ricols i (a@co.&vc,,45 . coro { trca"" royf aro$ 'com { u'@@' r)c.tafa z' lo 6pring iD Achcrn Eoro rDann;ng pL{_bti shcd Coor..ing y moduteg. crrbere .oS 8fxing e.^ Cookri r)6 6 (oo&rte6. Cootcd oO P,o rr6duleS hrt $cr3 ore grd4ed iofo 6 roqicrr Cofr{-Acrries O ver vietL, dlogrom i - i6t a) ru{ t l-ut 6p'jry Aop @
  • 5.
    5Pilog e'l Ov€(vlei! Dtagraro :- 6pdog 3.x Ove{ vicu, Dlc.6ram '. - {$.8 e'x JEElrbd(rle = tt cot" '-/ - (nvcl-&rocnl ) E@ t-] ---1lPc'ftletl lsttA"6 I rrtl Srrnqg J'. x Conttrf Dod'rle + fl iSc info " &riog 4'x tocbhDod4le + 6PnDg 4'x at-bl4vd roodcle plcrin trd.be io ftntry tr wcb oodulc = e) 5fn rg COte iS sptn3 DAo I $e base -gal" ("' Sfrd$ 6D0o molrrle ?r,cdgt e6 ob,sttcrdc,n Ld4cr oYl ol,l Ottct Pn"^ d?$ ff_l F.] @@ flr""-*""t-I Aop Tesl &ufpa Pc'lst6f(nct, lo6ic
  • 6.
    :> Sf)riog ORhrroclole p6vide6 ab6rr1cHo'D :h}et co orld! Opn Fl(r)6 ao| allfjrl $ lo deuelop O-y rcsfpiD$ fx{6;sttrx.e Lo6ic. lil<€ +hbcrDd^t-€ ._ -1 gprtog AOp rrpclote is ginr) fo a?pl$ ispecr6(n'aaUo*t" Se"rvices)oO sprrog Affe' ---r^'r ' '' ^ ' '- a^;'n nooliC&tlcnr5 CorffitutuCo'ble P6"*' -'4 4r'r€ VrEb rr,66odg i5 0iueD to rrnFc eprlns OfPlicadcto€ : Ob c,xro fra-. eoorl.. slul a,"ilca}loo6. lire shru-ts c4pD / JsF cfto6 e,< ' - based urb .Pliccrrlcto' ;- --+ gprirg c&nfcxb mcd'ref JFE fiodsle Prci'ldes - terhmlogics llke JNDI, EoB/ Rllar J|19, €r*etprise cr{Pn5 , Distrlbcrrcd AfPnS And crlamadlco Ler6er orr roulHpla CcFe lx{ollc.rl ana etc" '' &*}ap O*er cl'tPucrfiona' |,1;dd le&aye .%viceb &re addtllc'fnl ' @Bcrool aoi co'nPr€ctro'de Se'flice5 I tqrcg oo a.v opp)iccfirD6 -lz: oape fbem H'." 6€curi ru/ TraoSo$roo rrnre 1-z'sec* and Oc.rrlcLle' rngmt, bglng z,falwt futw 6t@ rhe coboe sprinSa?i 6nd iE5 deryrttr''t iav P;re --+ (stro$ e'5-b(r"e > dior oatirg ' jctr {c{Y4erLl-g - is Zs1'rtogz'5 -b6rne 7 u u jaravrtn - cornroons cc'noYtoil6 -lqB;ng 'J <1 Y -.-t-Ibe crasses and inrrfucc s oP sPnoX'ia{ us€5 fie clzrsses o* t*t"tt: op 0wmc'>t-laad"t --+ 1#'o1[l 5-home >clrrogelog' rrt u* &ta'tO alsrt Va'do&S vc-6g6o5 d? &;'n slt'
  • 7.
    $prtng deffrnric.rr:- + 5prrngis o' &uabase d O1:eD 6oc-ry.€, l;€h, -trx{hi-i loo6elg " ard dqrnderrg iqjedc,D based appl;co$on @itrva-JEE oll Find6 of afflicc'fion6. -+ O[PD€cxrr ce 5l(' rrEao S Tt ]5 mi OPcsed to pY{IarDrrrls alorg carple d, C.(5p€ el orierLk d FrarffrrcY k fo derr-loP or,lg Pree elto b'r-l- it6 Slrlrce cmte cpitl be c.pirb io6t-cdlal"loD' 6pnng slca ' li€h-f-craflhJ a+PD6' fcl fetta,o Pre-deFrrd ctasges ' trirbcr.,-t crsing 3Pn'6APr -+ fo,ql i,g lighr-DejBhf slco crnd rqctr oe the 3Pin3 C{plico$cIn se-ruc-'r resO(-trces o? sPnr5 colrre exauht^$ f6rt reollured TeaSooS) O Spti.g CantarrrrS aYe tlthj-&cJghr ang o^ee tU i"sr creodn3 *fil6 NolE'.- Servld- Cctnfciff-'r/ J5? Anttlinar z.s1.lrirg bome>rrc "{?.;rd".t Gpr€sen-r5 Sugce cvre,4 epting AWI)taHon5 ore ood use blluo tcoo comPonen'fs ,,J ') o @ -> A? the Degree oP Ccrr4r-"crenf5 4ve de{€nden% io less loosetg Ce&pled ' *@epr'ng Terlno63 5 €163 1o leaxn IF rhe &gree oF dq'e'"deT 15 )s rrrrrc bw ttoo Aye telSturl3 -ccuped Carnponenrs - Sprro$ 15 looselS ccrgltleJ 6ltrr' r€ozoos' Q qxtq 4p ot'te- wnwas o'rb ffing cJr r& rnetdple roodules c-€ Cc.n inlqmle SPring coirb tu garheJr' Coe Cao ule Cj,rbett rtd;vd-PP! rltd4rlc- 6tbu 63aua rerlnd-qitg in appbtatlorT erlr,yrArfrf|, Berorrse rtrl cc'obe 6'aivalzd eLt€ be.t^i5.trigtlf Cenlarnert a*lo crn be elcc,,j€d toi$'ocj- tt'€ hr"td *i5hJ- and ebwuen 3ltos' oLpplicc!$crq conkP &rrbPd €{,'ti"3 c4prirafionS rrrrckr rneroor3 4d C?u fda'{c€S cct€ *rn uoe 66;rq e3 rk ccso-{grtonj/s tFffi tht &trnPon€nj's
  • 8.
    . de,etop.qg.rl-, likeigenl€f5, }r>P, $u-ttg, +iLe Dott aod ef.' " ''-, -4>(9 Evc-U Sfing rnodure PrDVideS abshracfioD Lagto o"r lxovidro$ roQtfiPle crre -. +€cbno)%ies ond rnakea prragrctrrrrrcrr p*s R"a &r'e tcclnolqies bcsed tlog{aminj cdrrte dareloping opplicaHons ' -+ Jt 15 oturcr5S -oc*'rer7.d t'o &elop$S$l"amr'lccitlano enc&iliog roiddfecor -'7 &xvrceS ire 6ecrrtirS,-IrcrnScrclicro ff€ror ctod erc'"' J sp,,ng Fovi&s q neLo **'htd"q; u'ued BPr'n8AoP to ofplb fut' roiddlebrrYe fervicgs on 6Pttog applicarxoDe' t-z -Th)s rrnve6 rhe 4nn3 as Aat€{} or;ented ' + Nh* is |tr dipperencc ulLo cleprdeoca lcoEt4 at',d &FcrlencS Irsec-rlc'cr 9' , 3re'cc bl.o utq! ug' u *t*' od qorhe" s dqzrlet* volues ...---+ clePrrlenc! toolru?:- Rescrrce erpliciYl5 deaoaa4 -, Roro O*,e.s. (tixe otter rco-,rce s) ,..-., + in depen&ncx lorcrp y,e$)oyce pulls rtrevcd-'aes Prorn ottEtl ih"',. -'' E90'"- ip srrdcr.t ffi5 q4!9-ry+-9! croi aPrcr passlrlg 'rec#eat P^iY'abio @rkJ kpendcn$ lmVtp o , JNDJtfttsr'U lccil-te, E$@:- 1e ccag coe colect utagjlorc oh'trcj rePerence ktxn './ .., Degmdent-3 tooLu-{' .r-, Mvknrc(ge:- ressr'6ce can gorbe'l oorg ql'ored glq'ode-,nrv*!'!/es' -'? D,5crdvuoK,-te:- qsecrt(r shctild 3fr-nd Some time loguhc,r it dqryt'*ttva-br8 "/ V&rt( ctitizing ttewr -.-+ kfrndeouJ frrtrctlcml- ffre urclc-tloging ee.rv&r OrtC*ttTAnU( Cw) PfLo Cct)P'tntlm( -.., Ccir) aPec^at 'ltsffr!€ &ssign5 vrrlrre5 to tbc rrsccrrce au-toroarlczk and v. $nornicoila. -) in Da..drrj Jrrrr'ticm forsoauea c6 focLinver5roof crrrnorcl)*e ""a"tovnX - &nrtarrcr to{ ) Se'.€x [d) Qunrrrne [tl) F[(r] and etc" pushes the vcrtrtcs to rt-e Teid.{te'
  • 9.
    a----1 r$::P ccrrlse nz<ric,{i;; ossigrrd fo Sradenr *re ra-nroerr-h 6i<-l&rlt tr-$iore'ro R'r -- cr cfi-use is cofled Depeo&ncaa"ri*tlon, Eg[- -Ihe t,roJ Actlonfuwre+ .{r'dre.9 '€n'oJcttztto E:rttoBeec,ctats f/t-DPelrh<S Eg(r:- The cocg Jv fl &016 c6tr5rr4cf(n orilaTafrfi'Ght:u 'Jo ci5ign #tw&F" s'',nol colJs llkcXcte rrr-rhocl ,Service G'-) b el.Pdse Serv lef PI€rctrD ' d.gndenr Volcres di"tt*l; ta'i|wJ qtu:'tg Volu.5 tD oQject. 1'g@:- -rhe cm3 &.rv6rConiarrg rc]Aerlt/ r(sgoose o[Pr3 ro oclI Artvantr,Se a: - r€sdlyce Can use the iniecled tri ge* d-ero' h rn< o'r.lu**g"; . 1.vp gn*lFyorn.,-@& r''"3 )ogt 8'$ 'vlr on 0-rryd ll e u thc- glrde'{IcoSin$ e'n n€ress&rH { uoressonJ vdJ-a1es n 4 &p/-* oT;;ff:" * --, 6o'q s'pt'cts borh de5x-deng iooF .,nrcartxs ate;;t'" l"rtn€o,t d+-&"fl rnfir-ttco c 6p'nog ogpliccorcrr t6 co'teA €&cayce. i8*'t[I[.ry{ -) A Fte to1) fr%rar') o'p an c4plicdl<tq Y & l A1r rr4id idvq pqiecrc o''c b'c(E€d c'D J:t:J"iJ:'f"""*:* 1'1'--"-'->llelel l^be-6-'----) [B'to3ic11*'sist"t'ce lgrc ) (live lvtu."as offictt ) v > t iun+el -------> - prcxnrctaoo logic Cl)Ke &aL(t' ri c'q ) C-----n (rrnrrolc'l bqpa ----+ JoEaIc.Ho'd' Lrgi 6 (coonedi";5 b5;a) -+ The dnin lcfJlc OF he olpricc.rtcrrr ii Ccll€ d Business l-Oc;l c -,,> pe.cisl-cnce loglc )5 u-gfut rrnfu- corzo opt"jrtc'ns on Dc'J.Bc6e elcos C--rc'rcore g--> t4'd trfe R-+Pead D --trytJt ^- frw,.) '- (,sclctt) G&u{) *--r precrr-krHoo lc6tz i6q1ug5 ute'riorcafa.cc {* errd&scr, to &-{,pPi3 to lnprs to apt}cat{,au aod io v;cd 'resat$ c4 the PPll<tha -r Jnfr$cttcrn lqic Ccynrrols crrd np.dkl'6 OA the of/ratkms opftre o44[calctn'
  • 10.
    (nelcl ) t- EJBisrorrBca. co"'P'EJBEorrrggeaclcarr.lP --=:f)$s/6 (f.roglc1 (Peratstcoce lo5i c) ( rrvle I 'l -r jsp-------------1 Seovto :--; EfB SesSionBeap GrnP Cv) (c) (a.toei.; kli,i:;),,s,.1 "ana Ja'{a cld55 thar g;4loJts [€{3i5rcoc LLBic &ot', Orl^cr tqic5 c4 ttr- app)icoftcrl., tD rmke lbe Pefsisrcnce bgia a6 the Pteniole k€i4fr, n^dlfr Ofd fcusc$le lo8ics t5 Corred DAo(nrrc.Access O$af ) i'' mMet ' st'*sArp ----) Eresersu[-Bfoncamp -_--> DAoctos6(Jruc) -------------*Ot iSf --------------n 6errle, ---------------- JavaclosS / 'Iava Bcan > ogs),.tr cvieul) (rcrnrrcrtler) (rroaer; ioP -------------t Servlc,r -=---> RHrA?p [vieo; (crnrrotrer) (r,rodet) J* -----------> fuvttt ---------+ / ,i [c') t?/o:J rols (6rs;sttnce logic) (k'ait.toce 19t1.; DAo C+tibctrpfc) - - -- --- - -aDoslto (itIs,'sKnce lqlic) LV) tc) -@ 5I&IISAPP -------------) tv) cc) l-0o"**o - [a'togi.1 [o't41r.1 gPYrqg JEE A0P [b'toglt; . nrodel I E B*.,FG;-"6*',0 --=-- D^o [uE ng4) "ae"l',u lv; tc) @ 'vap?p Cv)Cc) - (,r) -ipt'og wcbtlvc ---=) cv) ct) Ig,locJic) ($ tog'c 7 ( Pr'rsi sKnce l€lc ) #rnrdbJs-,vic€S Cornp -_---> pnofHibcYrerc) rDosltr] CRrsishcnce loBJc) *fflel t S1r".{ gr NP + 3pr;og oRrl J m'o &4 "---- -4 DR s/to fte Po6s;ble Techno lcgies o( vieo kqc'( jsp veoci lg frce rcrtf l'€{ f;|ltt1- xro 8ig6bcE Lcrnguoge trt'rt(t*'r'noo) Jasgcr ("&frrts /i e.ft'ts
  • 11.
    (DsSble Savref , SerrPrHt rer PoSiUteFc^rqecrrxus og' vieooLceter, conr@ftar laXerr ;- 6nurs J5F ,.tclruotX Cocoon Tc,+shq Netf4vC ard erc' - -' P:*rru r.onoloat.* tt t- EJBfusstorr Qec.n, Ncb?wiceg., JaJJaclasS ) Javr6ean ctar Rtr, HWloofer fspriqs opn DisrrlxrreJ lel}'nol%g ) , CteBn, efdng UEE and qe.-- l]ssrble -locto LaSor +a de6ne ,rJ ODBC, hltrYmlt' OUB io c "ouo (rnsr*ffc( Ae) #*"ryg*" comPoo<rr6 -loPtio' C'DO igor-le Stnog 9Ao Qnng Oer 6nd etc"'
  • 12.
    HiSb Lernl Praf$Arab) trctur e tf Srltrrs - 9flno g - i-ii brr ocl€ Tnrt€retrlc,r) t oinnt, s5P, joaer rcp"rrs.,. ,, Sovtd( Ailan&rrra ) 5f),tn6 JEE 4p [q"nt e*,,r A?p,: iliternorc / ep'ing oert PAsish.n(e L{ic ta+rf L}1oddDr,€r, oracle pg sl, -> Att loreor Technologi€.s oF iova Sapo*ng trJo/ f"rr rrnctel ai lighr-c*i'gk. POJo cio55 :-iFA jc..,rc,. ct6rsS tbo* ba"d 6irPl-cDare aPP)iccuflcrrr Jrrrcr&ces o? IW tec-hnolo69 L3- ig iala cdsb i5 taFen errcoJrngr irnPlernenhnS $e |ben ib i5 cCIled Poro cto35 ' FldrnPks:- aod *eir larcst versicrob (rrefc,vd a6t.lt rco6) ore pvogrqmlng To rrrake *e beohrbQ'e-g qft{ a4licollon5 is acln3 06 fesocrrce of ce{ftQ}n Tahnolog5 is not enEndiosi irnP'lerrrrLl-;n3 Prc&P;ned clc'sl#b' spec;$ic APr- rbcn it B la cc'ucd PoSo clos6 ' Gs Ksc(trce of srnng Gpplicalorr l@irboi.u* p'e&Rned clas6/ nwWs oP ft""3fut o Public C )as$ T?si " Test " i5 {- 3 Er.bic tlcrso Tesr atods kroo t_ '0.*u iu nor ex rcnd;T Sro- ^t ortB.r clc'rt - Iest is p656 116t5 PaID c lcrss . fr]
  • 13.
    a------r ' 83.:- Publitcl&s$ Test erKnd6 Flt*?Sctr lef 7, * orr" ]* rcr PoJo dctsb ' "'tesi' is Scrvler a+i degr'dent ' G) fru.b'lit clcrss Tesl erttods l>mo 0 1. = 1 *u. clc155 Demo ext(rdg Gprcoic$.nttt e 1 : -Y ,'Test,, * Dern o " ore not Pio CUsteS Pujotl c clctS6 Test implerrer,rs Java'r rDi ' Qerootf I 5 L .) e "rest" i5 rror PeYo. bcz Rernotc is a tclnologS @ S Flbtrc clas6 Jest irnpLrocnrs jnva's4'l 'Dtue'r {_ 3 "Joua.r.yr.r--*o' [r; is p..,tt oljdut ta-brn1og1 ' so"Test" io mr P0J0 clas6 ' @ Rr-bl'fc clost -iLst iropleroe'ts .tnna'lot'6'Rtnoabte t_2 = 3 patrt c( " jo',o,on5. Qlnrnble' i,5 fie Coreisva ' so,Tfsf i6 PoJb @ pu,blic cldss Tes+ e.r6Dd6 -IbreaA u= t l ilTest'i5 patb class bc-z java'laq'l6t"oa is pcrr 4 bs;'java opls
  • 14.
    @ pubrtc r]assTest J L V..btit uoid ror() t_I uses sFioS APt 3 7 r{ J Test i5 ?oJo clctSs. __ Sphog &rpp.rr6 PoJo / poJI Pol:- rrrrlcl prDgrarnln d,,e to rtus 6pnnXrr?P,,5 are lighrffl#" l.lhq &dq innrft{ce i5 fab<n as tl,e reaatre of Cerain kdtnoloS, h.sed oppttceft6, .,..., 61pe"'tlc- Aflrrs tA.^ ir l5 cattecl @rr ElcroolPq ' - 0 innn fo< c '[est 1. /i rtrrhod dectc'rarl cms ---l 1sg1,, i$ poJJ J - @ in€t6ag Lrt e^Erd6 Dern o t "Dcrr,o'' is usar -dcgncd intcrPare ool- cxtc6din3 Orber iorer $area .._, 1 &r "Tesr', i5 poJr * (O ,nr..* T$r 0xrnd6 javo.rmi. RermK i "l':: t'T,st'is cnl- o- poJr. (kca,rrc joro.r-i.Qe.rrt ;J RHLafl inFr&trr d - O hwft,re 1.5; qnirnd 5 iava. io, &"Ufiz.tte ''.J 1 Tegt is p1-1 " ()ecalrc .rc.lc' io , Serrali?oJole lnrcrRrce is rrc! mur,lo " LoJi' t&.rr c{ &va+prb )
  • 15.
    7 Feorures op6fx,og:- 'v. 0 fo** pom/fiorr 6m&l Programing. (q Sgrrng io righi -&reiqhj &gt oare . (nmt oP rbe spr'ng o?Pllcdfi6r'5 :" tt *tT^ -1t*1 - it€ heoq t,.n6ruf & nrbservet/ oo'u"** sotvtx) i @ Srnn$ giws hrir*-in ,niddte.'&ye 6e.vice5 and Gtto*s to coorv coitb *nven .J foarngecl ond "lhird Parr"t &+prla roildlooare Seuvicei ' 3i-n$ gil/e,s reo vrerhodolq5:s calred a'ot I nol""rl to o{Pb t;64teeoaw Serv ic€s ' J '.J it d+etoprrrnr. @ provrdes enviroqwai io prft,w UnitTetril on A?PlidxHoos' rsEi- ;^grot-.ra Fshog on his otn Ppooe o? code ts c"ued uoit TeEHnS- @ provicleb hrltr-in pt,flto6 *o rrore spnng c4pricorlcrra integro**te cD)rb orbc,/ ./ &vcr trchnolqX bose.d a+Pns ' 0 Arr,*ou to derelog olr binds of c+dicofrots like Staodabne' koo-hre' rlnee-r're, '-/ n-Ha dsniatrtcd cqgucahoos/ tdlo opptidrrtoni anf, Oe-' ' (9 A[t0co6 to daxfog off tdodc o( logic5 Ii {(t- pftserU-c.Ho4 lqle, f3osinerslogicrc,.q#. 151., __., ft3r5'lstcn6a lqP and e,e<... O $lwS t5 o(r)n ox-bFcrmetdort Spnng hfbHvc to drrrrlog t"Wca axcFur€okry€. bcsed uxb oppns. @ pvta.s copporK M o}Svacrtonl-crgex cln Othex kameoorlac liEe .l4ternott,0IB and €rc-^ Jarn/ trnxgrc*tort ctritb 6Zep fe{hnd%ies ond &r:c.hc.ul Fanrrewortr.@ o p.asg o lta.rq aftl use.
  • 16.
    llodure -I 5p,;q CoreY16dctl8 -> Base fito.late Rr orte" rDodrl)e o9 sprng. ->. G;veb a ri$hj-*i3Lr g*rogGnl.ainex caued &lnflow "B*l-'Fotr("3''' '---5 using this rrndule ,,e can deuelop or,)g €faod ctlrne apPlic&H(ms' --) toe Con qse lhi6 modcrle to eodoaiand 5orrr,6&oo tiFeqcle rmroSerteaf c'nd depnfenq JfpLhlon. The Csrrcrrarc Ja1q cla,96 thor is Crnggured io Springosnftgure.Hcrn Bre and ;5Yoc5b annotu$oos io Calted SfingBec.o. JavalSecrq cdn aci os furlng&an br} eiro's SpttqBeen n(et nof to be a JavaBec,n. --, sp,rng 8i!es 1(oo boltt-]o cctntrdner qpJ ti$Mrcel3l'r a'nta;nevS (! Beor,Focr.rrg (anrerne,i (p*. ol (oe rrroclule ) TUOLTTCe . ttot implernenx CIAS5 ir,r?ler[.f,nli % &arrFaaf.rg -, To cctirictK ,h.pqnrwOr,r.xr ccrnt3ioc,{ 75q c':bote i;k L B;'* ro d€ed.) in o&1 M6 C",eote ohj tn j^o clcls rhJ- irnpktoux CoDtcdner i3 c.r -F[?qo.ru- Ctcle oF gtucn Ltite 6sb 3[r;rgconk1ioet6areguenpctft'rrn$trng&onLigecXtterrrarriScrrrnto"dtoFnFo- Drrrndeocg rnjartco 6or forogeeon . -t T0 acrivate &aoFacf.xg Cur-rt<dcfy lo GrI o4pliccrhorrS crcrR Cq.pcp QLi javctclol: @ AppricaH-Ccn*lt Cmlainc{ ( prr oe qnrrrg Jrr[Cc'*er{- F'oc[u]e) 5o?t.nr€ A?n Co) Jlc.. closs rlot ccoo -Yc'Ye coce oP org,rrrcrgftar*ocro' *nt: ft:clz,u' fu"AAG) -,,,-> *prrse nt9 BeaoFalrut5 C6fl knf'e,/ &.1*",1, =*- &orBeroftrr-g (''aoj p;osng lo splog cg f'rc>"); 0rg' SpringtrrmeoJoyt . CcoKxt. Apptrcarr.,oGrrur (r)
  • 17.
    a- Lrle CC,o't &train icDv@K ctCrCSeS. heorX ue,6hf&lvexs ,) Sprrng lnltrRrce (Ja1a-r*rcoft'ce ) +) Sprn3f,ian closs (joua"r",s ) 3) sp,rng cfu f,te Cx-r P;tc) 4) cli.nj' APPlicaHo" ( .io'ra cbsa cois T nln roethod) Spring lr*ofo1e -) --4 _J -) -) ib can be a POJI ibi6 oPHdnol t&LtxG 'B't rtcorrrnJed lo taFe canrcdn6 dectc'ranoo oP B'r'uboctt/u*;li$ method's ! ^ - ocrb os cr Gmmon <rnder,stund,ng doarrn * kJu€(tl Llcnt d}Pn.@.fict" r+"meet- it tiFc 6!.,sg ho.oalxr h*,ng dedotcr-Han a? topics[tr""r'' t^tt a.s a5fferr€rzr "'/ .J du.,-re"rr Ulco facufft o9d Sf<,,&'r*). _., Spnog Bean A &,f)("r(cr}( &vcr clas6' Cooftguwd in 5T'116.)9 Cooeguro$on €-te -.-, mbocts. -" Ccnk(dnS Con be a JtoBean ..r irnplerneru6 Spring I"*etftue OnJ prov;deS iaplerrrnfrdoo to Qp,lng inrcrfoa .-,, EY- folre""X., Apnrr(d$co Ccrrt€"i Fr. &rr..X- 1,$priciax*Qltre* r('<sp,'q,fu B,iyCtx = nelo -t-I + Apdicattco C6dri+ inttr €c(c€ ilppt tcanonGnfe" t Co.toi.rrr C'rea-ring OQreom P"l P{2 ur-oeed Fo 6l-o'rt- &!!lcf CotLl6-rDe'{ , JsPCc'n}c'rne/( bi so, -Tirt ore bectuti tltigM conlz')ner6 +o ouiuo-fe lbese cirutzti nerrS ' hlr tPdn$ CcrrLfcnrKrS cL{e ti$hf -urighf rcvucr.rturrrrS fupffA.rtfooG*uk Cbnfcarf'r i5 errlpncernenr 4 BeconFacro'i ccrnldne^/' 31rr'q Cotellodul. 4?plrcal'to',', Cooidn6 tt-r -B'o-'n3 $est6@' meftods, cmtruckod s"{f-ttq t+*&*f &j".-n*s '
  • 18.
    --) CdnrcdnS artt$rrcrtods ---) CdDlainb lipeL5cle roethocl5 ' "') Jb Cc.n Le poJocta55 (o) nan-{tSb clas5' ' -t rb can be prrcb$ned / c''sc"&Pmed/*'tno'-oj s-tppricd ccrnc"^o'f,c trH ----) Conta;n6 &rsrqe5 rqerhods ioptemcr,raicrn hot'ing B'r*rnets Logic' ffrnngCon€rgtrmlron fftt' ei$en hl'{Qe:- Rtt Sprrog l&ans rrr-or be (onF;guved in Xm) enrri€$ Co.{ ) - sRciPging *re drrors op resurvce thmugb xm) enhAeN tr'O Annot<li.orrs to rrPlxs undevlcqltng conknnc' Cr) serw Ccl)Fm'rocrrt-: lecqlniz;ng tho.r rr:arvct ls c&t-ted resrrftc coo prgt roficm .1,"q,*fu"'"*_15 :- -t oog 4ft1gt.prog7 -xrn) coo be 1a4D a5 6Pfio9 ch ftle' '''> t/rle con one 6l mor€ 5grrog cq P-'res in cld SPYiol dPPS t+lozlwts o-+ SErnng kons rnet Ae cfu in Sporng cfi tsre ' .- + &nlc.ro5 ft{xctogltilecrcrn/ loc reLrred irErua$(rns . - -+ Cooiainb lige odcle rf,etbods Con$6trratlcm .-. --+ Chn be de^xfPea ei*rr based on OrOf s.rcr.n- rule6 , Cli(nj APPi;cc*ic/o : - -.e A0;vafe Spnn1 Crm.tcnrK{ ug spedfu;og Spiog cfu Prre .-- ----z Get Srrq Bcao closs Olj %- fu"g O"tarrn '---'-"+ cjaJ) &rsioess -r)uhod,s C7q Sprtng&on class obi€4' ":-
  • 19.
    ' -' 0>''.,gSq&ff5 brgp.e o? Dpendeng rqieodcrn 3) Inrcrft^ce JojecHcm (b5 impternenllog t) gttel lnierncrrr (b1 uai,rg etXxx (-) o? @n &o.o closs) ?) Gnsn""o.n }qiectton (b .rsT pcrawreldzed Corrstuator.g oP sp.lofl &ao closs ) .J 'J *S5ertclrelecHc,n: .v-.f_.)."r*,o.ls outoroorico and dSna-allfl " aP Sfniog cc'u'taloer csoS 3rrXrx t-) t' tocosi6nvad.u.estort,.i,ornnt,co(rronrbr'vaniabtcs)oP6r'rnSkanc[!ss.rkn iblb caJo€d &rl(t irr.rdot Pxample ,5ternrio Speqal inrcrftrce,s oq 6f'rloSBean class ) ll To,&o.,' iova (Sr"rng &"n ) lrrdic ctasg -lest&an s{. /10c,n ProF{trl 5ro'ng .165; ll v,t,ire 5$Xxx [-) tuPFnftiT &rtcr r{eulort pabli6 void cetilq (8t""n$ -uS ) I tluS.rosg =rnsl ) b lloloir. 0 mqbods p-ibllc y614 bnnrt ) {. " "'' lluse rorg herl 9 3 Deroo " xm I [sr.ng cPg frre ) @.rg Wy,rru coo6garc+lao 4^ ll.m^ Irlicdon' <bean6 z
  • 20.
    zbedn ia="lb closs=Tesi8eon'> L" ia f o6rt,-. --IEE6.r,,.s I f "O' nU $sc,6 Coo [i3kr afi o') '/" , ni...ra 4PmI,c.q ()rt 4lkan>" beans> ' hello" /^> --T--- I L> Vattre to narrr =''toff' Vrrlue = f-s.*p*n*g 1) Nhen 5f,.rg Cr'nr"rrt ;a Gnr.rtrrr Crealq5 Te,g$on Cou.6 tb'aerllsg ["he llo"; fhto,r3h SefftrfnJ€crtcm. ctuivcrrcd bX giviog rhis spr;og 4a hte tbe Spaog clc65 o5;.+ h"'rq ! " os fhe OPcr l.nrre and to rhe koD PgfS rnfluh"llo" fu )niccr rhe vcr-{ue 5pr;rgcaota;rcr nnc(nages rhe ohole tifeqpte oP sp'in6Beon inrber iu Perft,rms d.a."d*i rnjeulcrcr on 5g'rogBcctn cla85 Wffitnnb if Ctafe6 Spring{fuan clcrsb c'hie*' PYDCeJS fie rnrrnco^rt S?edoi dqje4rs fo projeuS Lo( rDcFe Sgong Coo{cunerr ir"JecfiDg lize TdbcG'n*xoo'l Oql -, f,dbcbtmt otzrt, RmtBusirgs r.rbi anA ere-'- tr; cworc SP;n6Bero c lors 'it is Calted Gtnstr&otrd ruq'b Perarncrevize d Colrlshf&o}(If6 rl1ocs io 8€on t"06"*3t *t) @ Ccrosfrucrr-ry fqleOcrrr '"- o$a ond tb Qs6i8n iqF*lcm' plcae iTr'rrcd''al€lg in1ertltot taYe6 cr,Pte'"t p'c,a SYn€Ban dzltt1 coifi cJcrsg obFet 6P$ngBarn C<Atton c-laJs oQJe+ &rcr iq)eetro raveo nl'rr^e rrg Canghzrokt{ (t'cnhon. Example Ste my i0 i- il t^v*r'.5avct [SP'rog Ben ) Frblic cldl5 TestBeon 5 '/f$ean?'on'3 Srrrng rrs$; fl ltraretcr'zed Ccmsrruc,rct{ g1rputttng Ccmstrackt iqectic'nrt
  • 21.
    R.ouc TestB€an C$t"U'6g) i ft;5'rosg = nnr$ ) 3 /[u'r";n B'nrerbods Fbitc Void brDrt) t "" ^^ - ^ uJe tos3 irte 3 3lt'ro's Ptrno"xw-, (sVt'og cP6 fttc ) zbmrs zb€oo id =' tb" C las6 =. Teslb€do > L/:ylrtj-tvclr - ( - lg'o Prooa anrg l''r 4lbeooz t;:: Spno$ tbn{-arrEr{ Lts€s oDe Pc($a'n 66o5irgtct-z^/ Spnng Beao clr*s ohjech anJ lo crssi6o votrre ProP'ng ' !,.Jkn Srnogcoolcurrt )5 activc*ed Q gru;ng tbe. abow &nno'xrnl @€c%RLe'".. rbe sptng6ntcrnar ci-€cLr-es -I?srBa.n .t"rr'w*bao)og r.rroe*15'bg <rslo3 : L-pccccrrn &nsaitlrt (Terra.o" tb=neul ?stBeao ("nt"); ) --, $. as,grrlog volrles drreurlx fo &on;rrrp"*iur lik-e rnroe - k)loe CIir"s , terghr car"pliog beft{r€a Braoprop*rer aod irs d.qrm&'nr mJ'ues ' }iss{gn}ng '..--, hl-rca to fton propr,rtes b5 speorfolng rhe vo-lues in scnS co"fttuxonl *:-r; %, oah*,tng dry-Jeoa3'lq;errron shoors ]oosec"q"5 "t' BtanVDf^' -' ..'/ '-) ,.-J --., J J ,_) ir_, , J otre ti rne rbe. t-' to av€(d€ t -', l,i bdr to rnsg U aad 15 dcalr-dellt Vcr{.ue5.
  • 22.
    16t Exc,rnple A{plita.6onoF Sg''ogCo'e rrnclule fo clerrrrosl^rcr-K &tt'6lruc&xc'o ku trsnt $ecq^lttctoq CcnlcrineT ' Srcp-r:- [tswlop fte €crr-rce cde as shc(Dn Ter{Pg.xrol -'-------> Sp"ng cfu B'te cr'*e TtotCtienr -+ C tic",t At+ rrrrne TestBec.n furgBean clctss rrlYne Narniog Convenh'crrls X-------.> 6fxiD0 inlcrftrce Dqroe X0eao-------+ SpogBeoo c?oss nafl'f XCfu.xmr ----; SProg cPg Bte nc.tte XCIieni- ---> C,tu* A* nt-" E0.' - -le5) --> af-% intc'ePcoce rrrme Uetou: EAPP5 /lmr")o ..tava (f'Dlr) (svt;osrruruft'te ) Public inwkce Demo J t llg tarrto' ftclarak/ c'n / P. . - ' pcrtrlic Sr'iog g€ff.arwi5bl1s3 (br'lo9 o t .,o-.)', ilD*o&,,.,'java ( Pofo cioss ) (srx;ogBean ) iro'rfrnf ia.ra. uHl ' )ti Fbic clcrgs DmoBeon iroplerrrn'ts Dcm0 J ' i/B*., Potrrr,Q b hold idcc^tqt valrte p'rvofe Sng Bg; llgrt(r nffbod safpr'n3 Se*c.r iqecrLn
  • 23.
    Pbuc vold 6ern5g(3rdog b u itl s , ro-,sq -- ffiD l t ? /i ;.opl.rocot 8'mu-bods frr.blic 3r'r.,3 t fJ gtt curr.or date aod hme Gr,rdql 6l= CokndQr' g+Tosrraiocet)l fl ger curren r l-*t + rte l"U int tr- cr'8d(CaleDdql' H0up - or- Dn)) l ligrtr..re Nisb rosg 1p([e= r>) Ytl(lrn rn€+ €lse if [he=lc) w}cdn rr€+ --> Cnmd APr<^ooon: lnarneJ else iP (hr= rc) " , Gd f,venlng et'+name ;refclln mtt -- €lse v ftfL.YD -sgt --tGood NiJht l" rname) 3 //',*,*"a Jl.r^, ., 0.,.,., o,' I -- :-:':i ^ll' -; *':, y, ;:i:,*T ;:*:. :i ll,''?,.'" - 2lL{di.>6 > coll€* rtri 5 co,.-i r,,t R o"r, z,srrir€ -hrme>d isrrtlourres v z&at't id:"db" cla56--" ftro'o8eao'z -> @ qnog-5tons*fl'o DiD ?ik ' ZOrrA'rr ry w.mc -*.m53" Vott'e ='huttO 'lz -> g -,, AbecrnZ DrooBrsn db:netrr DrrroB€qr,( ); i /l&aoa> db ' seli'153 1"berto"); 'J '.j *t) ? P ge,nerorcN,sr'[lsg (Sr''n$ *-t ) t'--, G*l ,*r' 14 ;" +,x^me 't )
  • 24.
    l/ Deto'o{i icnr'jttuc' Pre imtrrrt iropr'n irrfrryt 619 , 5r:.o6 ftomf,{D6rk ' hrc'r's' (Ltrq U*nfa'r'*1-: l-tr) tgl 4",""g ft.,o*--u'bec'n5 ' A'"i"l' x-r' XtrE*F"d1; I ctl "rX,t*n*"mecrrr K are " io ' Fre6pr"-'Qtaou"c ' ll t'.) Prrblic cl6s6 DIDoClitru ,,,16i6 rrrun lsrtrtglI arcss) -----------+(} Fr"Sr$.-Pest"te f"Dtt"Cfu ' n-r" ) KnlBcdnFc.c-ru'B [rc); 651 Prorn $6rrioclCcrnz"oe'l l fl c.u Brne't,od Srn"g {#$ = """'t'r'$' oo oi-"-t t"tus.,; re'*1fr; I s srcp-t1} rrod tbe S'ccorq ? jo"t ?ires ro CLAT6PATH 26priog-horne> die r tpYiag'ieY ( rtu"jot Bre) 4€pri"u-lbme> tiu icrtar*s- corrrwot *a1. truU;l|esxl'nr &r t+ s|)ring,jc,{ 6Kp-s:r CoroPile ol the jcvaf(socrrcis 6n{ g^ecu.rc the ct;cnt a-pplico*lra f Pttbl)c SzLltc { I f"r" Spr;og C<rnGiscrrci-l'lcrl F;teSg.t -R.ao*.. res -- neo, /l Aeuvate &o.,Fc,uz"g &f)EJne-'v XrrBaqFo.ct-"rq &*rg = n*' llsr+ Sp,i.,gBec,n cicrss OU*t oUr = ftrr,,.rU. ger$eoo C"db I ; - @ /lbUpe cc,rring De."o boU3 . lDerrn) oq;; --'qq > jqvo.c X. javo > jaVa Drrno(li{n/
  • 25.
    Nhrn EeooFa$otg cor-rr'dncli5 Gre co,rt be verr Pued 4 usi"g cuivarcd tbe eotoeS oF 3M trrnr Porser L S;tPte APr P..,r xr^t lmd n Dcr"oBean " cl c's6 done in SPrrngCFg B'rc to c'eott, '' ftrto8eoo'' 6pt)D€ Ccmet€urafic'n boscd cn rtre giwn &on id c)crss ohjar ulnS Ohjeu o6 = Focrorx ' gerBeon (" 4 u") : @ EcctnFacroq Cor,rc.iner lo ,db" [6ing C$r,CiguraHoos rrdc€6 Beonkcnq Gnh"r(ll @-Param Consl(odr(^ . @ Since "tag'' PtDrrntt i5 Corr€"gored usjng Gorcdff-r Ccl.t-r.s se11153 ['hetto" ) rrrrhod per€zm 6e*clIoie0H c'n @P"r.5'ge8ec'"'l'au');rne$odreturnoftrnof&c'ri"ctc,.ss6qjatondtoe afer<f.nrngtl-o'tObJe*usin$'lctvct"rcm3'Ol'it'iclcrrsree"obi" !gl_E:- ger&c,nt) merhocl is rhe prrtde*ioed rnrrhoct in pred;fined Clcrss"&.e'"' if oe uraot to $eh the Objerr (rt'.'ar") P.or {3eanFrct "y Ce'rtctheY cue erre rhis ferBean[) rrr-rhocl, IP toe oru B'roefiod genelcd€l^iishllsg ( ) itie not [x,.lf oP he pnde hne d dai5 oqle$,.,, :}.1,'" ff;**l tbt irnpl;-ent eloss of sPrioqJ"*trR'ce ' so Ldr rrusl tu{,eccrsl tl-,"-'*befu bobrl = lftrno) o$ i zpmperrgz ta3 rht BeaoFoJt un D-oBeoo clas6 ohje-of -> hjbtrl 9-r?occ65 rcft.,trte Vcr-riabe reRrs irs sr.l-bctass o4iet drcn cde tqn't cq) direct r*rbocts oF gr-bcla-S( usil ftnt rtftrroce Van'iabl€ ftrrcLk4 *uf k^ppenlq$ oecc.sh Sno-t. r.g.n.n,a Vcqiable Q-rrhtl coirh g,$cloo* o!"
  • 26.
    tr:ith inrcl?tce irnptcyntn&db3 SaSclcr6 h*,ng rtrct{- Direarnerbocl dede,voucn) Demo bo$ = (krn6) pq.f iS plcrced yo SaHSftJ atod 6la'bfrrrnl' iD ctrv frttng aPPng. $pvioq Grta;nc1 parorrng De&ndeoaJTniecttc'n cmll crm those SpntEBton oaj€tts *bn* ove clffoJd bJ rhe Sfrnng 0emJalne6 ib$elg ' 'Ilzt mraos 3p'rngConrruot'" co" t pa&T 'n Depo^'de"9Iruecrlc'n on Sp"n90""" doss oqpas ttnr art c,t..led bu P*St'-'*,d monucrl'l$' ke.Ptog Dm reratcd 61 c}ema rdotd he'Ael Staterrerrs la SpdngCfu [tte is mand;t6'! ' Bur *rtl oork ie 6pHonol in wb'xml ' -1i,nog cr{,nlicci}1o0 Pf':.o Sfrrxt toitb s'1aio eoAs toiib rnrrn tcmd€ Socs t() I ="*:ffi"-:-:':: ;il rast re''""r"ri3arftprenr*' 156 i"otu'l'r{ f -> Nhto BeooetrcT y &rntc'incr is acJivoled @e ib clsesn't clcc']cs Qn-X Sring Barn clo'rs o$a*a, Tt LatdrcS gp.,gBeot, closs onlerra anJ Gmplew dq-d"*j iqf-tfic'T odX cnhr'n $W'"1f)muhod is cot0eJ '
  • 27.
    DernoCfu. xcor a - ExamPle OppiicotlonOO C/Jnt;l.6 uhzrl iojecfircrr:..- 16lozl>or3 Saroe 0.6 prev icrr6 ol(.)pD ' &tw OA WLriaQB oppn. Bll" Odd rhe forra.:itr$ 7-- Patar]';, @r6lrccfzr &mO..fuVCr ->&rncBeon ' java -> Pq.blic { ft hto&o"., ( St.S -uS ) tbis. rns6 : ro53 l Sgsrc. . ord' l-riorlD ( t' ft "^&o., 1-llaram 1o'l5ratu<n " )) --/ ZDftiYPE LLxo.oS > zbeao id --" db'' ZCcrrnr-ru clc'i -(Y$ zlfun> zllv<ar,s> 61d..s ="ffi*n'' 2 value :'heilo" / > DemoCticr,t.j,av a ------) €arrE, as Previdt''$ c?Pr'' t^lbne ccrnhgrrtng fririo6Bcaq fo Plc'ce o.n)g llxwYn]> tags croder zbec'n> Ffl tbeq6p,rlogCoola;neiuse6O-PaYarncon6tr(rol-(dP".6PY;ngB€&nct't:'Sin'lar'fiat ond olso uie.g SefietXxxk) or-*'oas &t €ettc'rjnieofion'oo kan prro;r"tt<: lalb,te 6*6ru1ng Slt.gBean iP got' plorce crnlS Lcansftuld<lt - a{8> k'Xo und<"1 /can> tag fteo Sq,ogbtt&lwt u$e5 lx.{ame}crized Ccmsnucrar & tu Geok SpngBeao clc{ss ohfrr 4 to Frfi:rrrn Gnsrrucr<rl J-41e$ton crrt Eeon Prorx,r +ies. - Nfr^j l-r,{xnr6 if borh eerrc1lnieulorr., &nosFrucf<nlqjecno-os are enabled on &iroe Bcan prupc-riies cf, spviogBrao rlassa. -' 4: Srrnn$Gotainct &rat<s $r,rn6Bcatr class o{i€ct bY ustng Pc'rarrr-Fcrized - kan po1,ctrg. Eecrrrrse 6ertc;t nrerhoc.l exear,tcs aPttr Gnsffaal$o* . rht So,"Vof..eS injemt q Consmrcfcrr1'$ec,tloo tDn be ggctriddeo ber-arle fetkr lrjlartorr 4
  • 28.
    TO CcDP,€11re de{bndenf-Value6 tb 049 <valoe > or value cLthlbc(t( Ll --+ To omBfaye pofr*ies ctsc. /ormo ..nva (ttat) Poblic inrcrR ee &roO .) ,J u 5erdeA ntd 11cj5 Prfolegr(d cl05! Ftbllc Vold { Siraple l-,".rn prp6n,rHes (r;re Sr-og, si'nple &fa epe 6 > in Sping cfo Bre. Orr Spriog Beao class Ohj a6 d€rlrdcrrt *:lllre O*:r't Synt$Beao clow 4a-B-z 0'r YeP afr;**e, ;P aoe SPdog &an ctcss ;s lord,ng qncltr{ $:rrrgBean ctcc.s dei tbcn ft aued Bcr.nCollabrort on. Erctrrf,le Applical'loo on Zrcf 7 */.e O-lfri&.t€ (BeaoGtlat*","*ttn) p : Apns !---------+ SPrlog |+ $sa F-------" Demo"iavc.. DerooB@r>'ia'a legBeao " iavc DernocPg 'rrol DmoCiicr* 'iavc^, { lxrdic $rr"g 5agHeiloC);/e,,sioe.oflerb,ra $ l/DemoBec,o' java ( R)JO ctrss ) irol-rm &va'attit' x; ftrblic clcrss Dcr"o&ctn iroplaroe rrrS Derno { //bon Ptrt,r*o ,8w6 wo"7, 't inb age', lls;mprepropnj <-TestBero tb; Jr.fu.,.rr., lUpc profl,r.,es fu bold ohjerh t!-- DaJ( d;J //tntnin s.rXrxt-) rrr-r$o.ls s{prrio5 g*krrlieu w't xrA6efinr crge) tt'ris. age =@tgei , S'o' e ('' Derqof&an: e#ge(-) r'gtna "),
  • 29.
    3 l2rlltc { fub]i. void rtTb(?v&oorb) c 1. t?r.tS. Lb= tb i 3'o'P (" DcrrpBeao; sgTbCJ oxt+A' ); void serD ( Drc d ) ilris-d = d ; 5.0.p t" proogean: 6rrD(, 'l.th'a"): 3 f iroPterrrnt Busirrrsllerboc Frbtl c Sr,tng 6ag llel t o( ) { *'n " Guodtl-nin6 " u " o3"' '+age *"tb="+tb+ 'l="+d i & ^rr,-'lt; obs., i5 lx.ssed 1o 5'O'P ( l src'tcr"erti' ro6vntg( )oritr bc cc',e2 o.^r thcf ohiect auror'nHecdrd' r' mooro? rhe closses pSr'rngtl tolt be cveoaAen Jo dibptc* obre* durr'' toSr';ogc) "*a'; Lelt'85t0 ;ara'rang'Qbi"o*c') ll tesbloio'3ava ( hrrrlerrlfkan ru ftndto') pc6ic cla>6 -kttkoq t ll*on ttrDr,rru Sx,ng mbS) //nrrt Serttr rncrhoct ofl 6errcrs'tieo-rtcryr wiL TwM,>pfu Frbtic void cftNsg( 6"ng -E ) f fhia .rrng = 116g I g 'o p ( " T.rro.o.,, gsrllsg C-) .rr*oa" ) i 1 J F,brc Srng tSrrogt) { vetr,m n'1s6lgean . rnsg-- " 1ro5$ I 1 J &
  • 30.
    $-u lba'&'r la'r'lklt CcII aborcr.lzrr beata6NoIE'"- tlere Dcrobon, Te*Beo., clcrsseg aft Tavff) a6 becerrse fbe * tb" prrrpttg of Ohpt. DrnoBear, clas6 crn l^ptd ?st B e.,n {lccq.._-, <l__ h.oC%.*rrrt __) .r z-&oir6> ;lwoto i6= t'dt" clcob:"iova'cr-rit'Dore > J Axqr'r.Y yg6€="5cor' Vatue="ll6J>,.TcrF.s ir 6cs lqootng J zgotttt rFrrrf, ='rrrrril-r" 41-oe:t' b" l>' - i---, "Idvcgil as oioi J L(W,fty harne=" dare ' q.lue =">q" /> J 4beon> Z; &v aor evt (flt't"'-'a Lbcro 14='br" clasS =.Iesi&-aDu > -/ l{>wffi 1p6g="m6$' VcLl,{r€="betl6' I 7 _/ zf bon > -, Zbcab id=''db" clcr86 = DerruBon'> -/ z1opr{ry q1r.516 = cr$c' lr,lue ="d I ' .J zryqxrrrb name ='tb' te|=" t.;'l LWWU rqmtJ 4' yeP="dL" lz lt-,-or ZpvoPhr3 nd'rr.€::.d"> v Ll&a', * rLr - ev '' ' ,,^^l u.aa'-_"dt lz -/ 4prnf't1 > --> v A*ars> J il *tCiitnfr.iavq Scfqe a5 13r 6ppllcafion bd Gdl €uo"a,relnlrillsgt ) B'n"crhod ' S*iot resu# = bobj. s0€ He tto ( ) ; , S'o't' ( "l?.ru,n 15:*4rrsutr )' J" o-Hetto () g -rd-e.l ;rts<odo|J -) -) J , , -/ v, -/
  • 31.
    Jdbc ConoeatDRrol ;- &bCGnned'tcrnPool is ft'crctrg &tflr6. Arrtcrnnec-et.l.o o)et6 rclo>lni13 ccrnlaios SeroF readglg availcr-bte Jd'bc a:nnedoa fbe Crn rt'rga:icno {-oo I repwsen-16 Ccrt're d'" virS J.tbc Corn(Lrion lnot Qn cno<'le Jauc &lrt r ** tb.rf in ('ri$ Same (hn&,se dlur. fuiasa,rceoQjccrnprraerrrsJabco^r,ecrrorr@looc|rLiccank[r:edtooccels ildbc Cg.,nectlo'n OhjecfS &o- Corrnec$ao (-<r*ol ' Jdb. Dw3;x,urce o[l fupued &va cld35 is rorhiog bc.r lt is thc o&t oF an&,rtgtog tha.f irnpleroer,r6 Javcl4f 'D"ro&r.tcc (: ) Org,spnnggaro*oork. jdbc,dafagr,r.e , Divol'lcrn:gevl),kft.t"r-o closs 3ive.5 fi-bc funfim dhj€ct r,indn' ta iauc crr,ne*rc'f, Pool . ThiS Clas6 c'r€o,l.a3 odo- conn<t1c'cr firo I ksed cm rhe iauc d.nrex demrto .grpplied to M,.n g'ofxtrt;u' -lhe irnP^tct+ kan Ptol"xtdes are ') &iveo C lassNar^e 9-) 1r{l 6) trselname +) W6sro6{ d le $e5€ proqnhel. a^f- f;',.a up urh Nade tt'n &ivt'v da";ts r1leo idtx-ca;rrn:to" @:l % atude cairl be c'r&t<A. Example aFlicaH(D 16 iqi€q jdbc ftra5&rr ( ohje$ *rtt |xiffs to .ti4bc @ @ 6n @" CD @@7 Cqrrne4tcro Poo) to our futs8eo', Ecf,cndog .l'1ter*lcrn'
  • 32.
    E: ApPd f--------: 39rog F-----r6e6e t---- OOoetatioo' iavq (Sp';ngf'ucr&ce ) r , DB0penanoo &ao . java (6^= t.c.", 6fnogcfn.xtol [spring Gnfig&ra],on e'le ) D8Qrrotloo Clienf 'iav a f cUcnl- cppo ) // ugOpcrooo ' ;au a (lo,rr ) ft'btic Jdwce DBo;x'"rro'n ( pu^bric w ftm$,ro1(inr errpto ); & Prot'. 3o% Rr.r,Na-e ( inr emenoy) o J *'R$inJe&lolt ,{ol ) 'to ) firrt e-nno ) brc 6^"t //9.*-t".*- ohj fionn &'nnerrrc'n Fo I Car)neu6t) gon'- ds' gerGr>neuto ()i fl ga e-e '',*e cmp colrm r.,. ,) t.erhpno=: )) J IWO?"ono"V""'ict'o lrorrrrr Jaw'4r' &', -' c,-rri'too l'ftrrfta*t"+ impon .laval . 81r' 1', -Yo*osn,"" a"u plblic clcrsg Dfy7ptan,"o}edn ioplcrrr€rLr6 WQturau (/T' J t ilB*n prDou/ru Drr"&ot" d6, //i^lr' ,. saXrx C-) t,Lt+'DA to siwt ptbtic Votd *fiolDtl:&t*rc e L this, ds --ds; 7 d //impleroenr B' r'rrhode ptrdia Sxng RrtlName o t WoaSar.^r* b= cn'polt.tt6**t"tt1 l"*tttt etnmc &"0
  • 33.
    -t. P5,setJor( f,e-nno); Qeutfu res=p5' ercorleCIcre"aC); Dl-ring FErr€ = oul ll iP( re.nex rC l) i .t .t else { ,,Q Yhof = tealtc ool *cr'nd i fetr^tl n Ddrne; lt d Ccrlch CE (cpH 04 e )c t Terurrl " DB prpCrr-i'; I $ll,**a pLLbtiL ior ft**to"3 (tor evnoo) s ' t# sLt-' o& " t"g J - ,nreL*6n ohi Po- idt'Jc 6n Pol ' ilgu *"a Grrcricrn 1o' = ds'g'*Cot"rr*rnL) " llgr.t ev,e er't63 ?"try.A3v,x*"* ps=cctt' ynpnt*"n' ("Arnt ps"s.rltn fl,eroeno) i llern't* rhe 1,trc"5 Re:urr5* T6= Ps. exetut<6"ouCD lf p'ant1 tlx. At'fs iP [re'nextcl) &il-: rs .nrN*Lnt, 3 /lt"c FErrr€ = ,S$u6f-nX(J)3 &t &on e^p oheot (, ZrrVnO=? )',
  • 34.
    atcf,(Excpnon e) { a"ynrSz*lrare()i I d tsfrqn tuL) ltw*,oa la^ I /+tryr'tn LWVltra tpbry/{ry "d-rdb" cl.r35 : org " 5P' iduc ' &tasQrtc ' Wufir'oo.saha"fuu..e > ronr.--"d;*Clr,saName' - *:Xffi,;##f: Vr.){re--" 0r&dc"id,u '16*'flparul}trr'" bbo"''" connetnan @o1,J f,reSgsml2s o*u (" aPncfu'xrnr o , "dob" a1a55 = ffiOp'an ^g.onu > @ narne = db ' ref--" &&" I = u aweLrb Ddasokrc€ &j tu wn (Y |kt"Dn,pc'ry d+' zt ftjcrtpE /-Mo6> zlkan z z{ftaruru tl&an> z)Enns> irnertt imffi l-l.6lic .L P e t ' l, wne= Ltll hlue= "6ac'.otc<le-t|i'r,'. @rturthos'y z 16zl " o{l > (Drrf ='urtnome' voJ.e=" *^rf " lz rYrme= fxLs(/cM - tJrrf =" Hgu'lz , 'j -Lhf.:cro id= orfl's?' leans' F"to'l xrol ' *) O$' S?' &rt ' i0 ' t ) - --, firc53sttm P'st!Q 'tQ''a clasg DBognartoocticnr 6 v rn(Smng ..rgs[1)'f"'ttc,l" fiaccpdorrs &rc llto* SPr"ng &n ftgurafl on FteSgatcmRt*'.. y15 = fl€u: Il hcnu"*c BU"ft"xtry CrnrcnnLa
  • 35.
    X'rBeanFarrory &ttuy X-rBeonFa.r*g(*r;;= fYJt {t', Car.t(inc,lllXe- Syt,,g&"" ll au e,wn"da = ( Dtfpi.n-arl ,^) Nocnr1 ' 6tfuon(.'dbg),' @ io" + bo[i' Pa"r''NTeJ +O4;t ll 2 "r,'tae I jav d It > iavo Dgorrnr.utititv TkJafo'rrc dia"t lo 5grr.-'a,r'Pr;ntln ( t'EtoP 9'.la13 s S u'P ( EmPmr"e s l[ J llrrruq J lluas ,i'io Bres in cLA55PAfi ;- Q Sp,ing.jar @ Cb'rnrroo5- log;og'jav @ omuct+'.nt ry:- io rhe a.bove o-44rt;rarlon Seir5ccrra'ncr 5 injeohog c.]-r srrAngLenn c'ats rq"""tJ " d3t' x) <Pu-r'fg *rrre = d6' reP--" dld6' l- @tal.o be Nritrcn os Lw,,4I. rnrne --"do" > z*? kr'n-''d-rdb /z zlorcttrt> " assarc*d' b1n-le='l'5o " l' Cqn alsobe *T" * *) L7TDWLJ rEme 7 Fsscrrla VLL-*L u-' ,l1No(rt'H7 Lpwpng rxifne = passaod'> Ltlnlr.u> lixot zlvawe> -t '-> de can lrc.re Sp"oXcctn$gurallcTr ffre Ptx $c'nFocre"Y cr-'nrti'rr,{ bX udng the -f;,'o.ng classes' ) Fre,9trsi.. Q.:o.ro.. f,aso [o16' sP " cc"t " 1 oy''xt''1t ) --'. locares $e SpnSCanhg..ralon Bre P'*^'fi' fuei}ed ?oh{ t't:";, -'4 Ht,e uecen srtdfu Atsoli-rrc prh (ot; r€l&Hre v'j+t o? Sgnng crg rr' NoK:- ap ft'res %tdel o( oor Gy"nputci hget+*r s coued 8t"96*en' =:- e) Chs Parh l?e,icurce Class Crg . re . 6,,"t " io ?}€ ) -; l-trc,rcs rle Sp,;ng cfu B,e ftorn tbe d;*utrg locarrons 'jt'r f;'re's Odd€d t0 cLAssP^rtt envicrnrruirud V"*c.,Ot< -
  • 36.
    Ercrrple on EreSgatcrnResar.rceto lcc6tre lp;rgcfu $te "_ il['r, {d%ce3 B.re ia rhe"ain ' f ,,+rputa-e loAeo ond cpben c,ti<rrrcpp l- atienl A0P'.-|,1- } i l-ilebJrrcm llesoa{e fi're$lsrcra Qocrrrce t^96 = DelO [0. ) ves ={rj-o (,,t) is rto.z in E '- APPs sping Sesa €ot.i<,v . trtefurr.-f?.so..rc e ('^ e z /aepsI te,,r I epr;n5cf_s . r mr ., ) I Freforrc-Q.ra..c" 6|(p-r:- 3kp-n:- 8rC-X1:- ger fie )ocrrHdo CLA55?ATH E1 or g6rring ConR'6tuoHcn env'- ' t&niajc{ ' BLe ..nd add rbe locaHon to rhe l-------.)lfp5 "f-------- 9v'rgcP6' xmt m$c0ro[x*cr--+ prolrr*ies odvorped fuh ------"'> env voiriobtes------ tls"f sg'nt" VarriaJde$ ----------) ariqble ncdne: SLASSPATH '--')oY--1o* '---------:oK fnlre ; E-.A003Km? ; 4e,i6tlo9vctfur€s>i " keeP afx,og o4rPli@rlcrn tectd3 CLASSPArtl wsuaYae n gi&ur afPucr'ficrn in cu.rLrApP Cos5{LrhResoarcc reg = nerrl clogcfuihQescr,r," t'€P'tTgfa *,rrt" )i Elocnpe @ on C$55 pA"t l-l resurce :- €tc0 -r:- use kee.P 6pnng prt1ar .ll jcw hre to ca{puaxH(In tt-adt ftt" qffiturulng CtAssPArH' F,efor*Res*rce E^o"'pte on UdtiaDg ( r'.t"nnst -e+"ngcea ,^-r )7 L_,> db6d dr parl, rea =r.,,, Fre5tr*"-Qcc.'" (' .. : k-r spogcfo .rm r')i . : r l_+rrcdi vE Fftl6frta5 40f,5 tuft'* t**' Sd-) cLAS6PAf H r€coc.fcc:- rJ -/ J add rhat- .J 8le-il'" SprngCo"rrtqurarlon ftte ^a
  • 37.
    k1 l-.---) APP5 H KtnP 6tr{-m;-UJe Clasfcrrh&sou'rce io cllcrd GPPn in Clicnroppl^, ChSsPa*,QeSCx.r ee re5 =rELn ChssPar6&sarr.. ( "5r"tngCfu ' tt r" ) ; Glcoots rrc!-e8Gre d)3f Ct,'ttnr&off ft afu Dtpendeni !6tr1e.sY0 dltP tuptso? kr'optugrlel uroted touse d;PPltp Ond gjtri&,tt,s Prcffr/tl fgpe S;.rfrte dcrrrtrsPe jwa'rang.5rnng q-rTtr$ .tc.va'utt'Lisr java.ur,'t . $et c[tst",*es+ .ct. ) io.m. urir' llc't Beon tgne JoVa,util " PnCr'nre'S E:- Tb asign nul votlle t0 Seun p"og"ty Z'{q)ut> o' ''rf'l'e" /value > ol "Volcre " Lli6r> zlist 7 z'e*> L6'oLP ? 1rc| > or "refi' LlnoPS > u.)e /ndtl> r4 er-Fhhils dtulryJt( dfhd 5c4( - Sp'rogCft'x'o 1 E t Appb rcrop > .i.{rr cp bes+.._ror rD9coropx.c., --> proprnflei ___--_+ advc.ocd klb -______--.> VdriaHes Va/Liode (yroe l, CLISSpAT} Volug ; E tA0p6 trmg test'jar Nhite ucruog ott$ 6priryEnvirctnrne(tt is added to Closspcu+rEnv " ladcrble eov ,anialte -------------+ 1'Lser isgsKrn 3 luisdnclvali-res>'''--+ or-dltsZ
  • 38.
    illEcriPae = EcliP6e+ I'l!EcliPse ,'rrr4 r)4rc'r(i:.io FB.+ "-,--,#RT-'"ffi@ S:-39-.s77, #^i:d",-J" 4zog" -4''r:Dp Builr-in Plugicl6 L, TO ruorU (Ili rb CrdvarLe6 tecl-rnologies. tgPe ', tor slo fr" jr'va Vendcn; EctiRse otg Cornrrrrcicrf LDE gives TLrncot as fu;tt-in 6e!el ond a15o fo cP<tr orhe exirddmr s''ive'rs ' verSion : to'x [crrnrnnble ulirb jarr'6+) TOdoonloc,d Elco: r^lh]h],rrgelipaeide. corn CZodrgs hdt) Procedu'e tu keep l"lSEcriose ror reod ln cr-r'r CornFtrci i - instrrrl ll;Ecri pse 19 ' x (Ru-n |'lf0t'0 ' rrgecDpseide.'com) Ger rhe c.rc,cl velohed t6 l15BcL;re to'x chror c-ode(ffiffiil 4nott the i66erur-hrcrL'9 ?r* b opplicoH o6 tauncl^ed I ri1q;plLtg ond get l,icencg narne ( ti.errc k t SKpIr- gi.bnrit tlte c,Xle li.cense dera;rs +S-f'tSErupst 'aDE JIYJ . -t-LP" " Mg Ecri p5.g rrr..,u ------------J GrL€ciptloo f,nft ,,'s$ dn ---- ::m.t t=-.--- - ok, Qun.hrn fire. co-,rcb O"rrts bcz ap frcrcic g<rrcrJrtr'rr rrnclule o{Pli.otlon in il6Ecxnse to"x tDE t|rf oll t6irs 4 Bmn P*Y'ntcl ' n- h lr. - 6Kp1:- 9e tr"" lKfs i 6iENi PlocduYE t6 @,r?:rlm5 g9:Ii lounch br%)* dcrcLop g,t+-ut SV."g Co'e iqlecrt an dt.t tlgEcliFe IDE 6Ptt;?Uin1 .Sltp-trI_ C.reore *,va prqierr in flgEcliPse ----^''--' llle.--- oeu.t------, Jc.vc.ptultr > prqfrtrn'ne: lSp'iTP'aJ I =----nXt- Fin-l(l) *t{-n"; Alcl Snrio5 Catebil;elu ro tt^e poje+. 831*cL+o'npbjerl -, llyEclinr<'------+&U tV"nuryMtikt'ld .-> @sp'inr25---: -xry)l '._-_-) D-l ft !l,l r) hkxYslnce &*x -Tltr A*" oehrr,r rlx fDE. lnaBds (oil) be sorrd V SpnryTl &rc i;b,ern { ,------rqe(c _-, f] Aop B(itcle{ *----o Rre:
  • 39.
    ' - _q}cP-il;-odd SpriogDrLr.rfuce, SpnogBeoo class to fie &r for&,r c?rbe Prqie+ r;ghr cticl drl src %rde,r , Nlc{d ------, I"*cr ftice ---------, 1?lerrrne: &too* Prblc SUng $dlblloC); - Stq-g:- 6tr $pringBean clors .- ",t* clxa crq ,t. fr146a ------r N&o---r chas----------+ Fterr'me; {arbtic closs Elerno&qn irnpl{nrru.b Demo Frbli c intcFrtce Derrro j t lle,.on DrorralHes iot a|e) hre dt cntrr+shi9t +o f'jaclede o'T*r-. P*g*.t cePituJS: See* qu {}:pnftofs*el --.---j tlsttl_cliclr+ Surrc€r gene@re &rKj6an'l gelior , Effi-.;_l ---------> ost'fttonPciot F[e{or alpit<rJ3-__l qher eerlr-r6 r"crhods @ovor;de 'r*',. Sr'i"g sc'Stletto( ) { *'., ",oocl r'o'ruo$' * r'nam€ = " +name 1 "ctJ. ='1ct9e -t'd= i:* '^ " g*"'="*-6t15a ''colrrs ="+ colorS &J+ "'"+colcrrSlrl+ -'-' 4 + col 0{'5 Laf + " ph<rne's = ( lpbane5 i' &'ru'l HcS .-- " * P.,c,lln:.t *#::' 3l).o'x+pa 3 ttrt*s n * Lisr ft*-tc; Stting Cotor6ll ) t1a.p &c"trua: ,gg- odd trru!n$ omlcnl in S!m CunR6urct$orn Pttt
  • 40.
    (!-- De'rnCfu.x nn)--) {bons gpnDg-bean-z'6.^bd 7 L&an id=-'dt" cnss="tiova'uril 'fure" l> Zbeqn ia ='lJU" ClcrSS:" Dnc8ean''> LproPer rrroe =nfnrre" vlag='Iqia" f t LWWY ryroe=*age' yalue="Jo' / z lpmpq lTrrat="6f'' Ycp="db'f > lPr{xrry na,-r1g="frc"itg"> lli6t 7 Z'tc|lue> ofple zi)valuC > /value> booanct lv alue> L"4 hPno=-At"f> /lttsr > LIPYDVntXT t9ngry ncrme=' calot6" > zllsr > 4valut > Yed 4vcduez zwlue > )ei I oo) u, htut 2 AtisfYl"'> blue Avatutz ?a -0e- rc!5 .., lww 1Xt> LVcJlQe> Q+7]t56>l LIvalrL( " 2yoLue7 77oD+qrb 4,]f.qe-2 Z YtP baa6 ="dtJ> zlk-r> QSxryny7 .D tl ZtrrD1,tlrt/3 fll,,rrf= {rttul};cS > LYnBQT c lenlw7 , --.*+rn-r6 rq4rhe elcrwnt ri t{)fr{,cnt5 ont elemcM tl?voSttrtt4z Dctrne ="Pl'ronei" > [ *:;7 zatue> raff's L]vdtue' 4w z e$+xsturs F(B..'' - I aolue> 0ava F<^citl*lva!ut>---:re1'rtgr$s vdl"( 4 rtx e-0omc'nr :-lkthv,
  • 41.
    a- zBeuT z.vctldeT {Qroo,nqAvaluez zlYal7 LaVeZ .Xfr&.r^Ltg Qvaluez z)e4z 1eor'g> LY%> LVcrue> tceP |rycav-- tu&g 't-fuatuez Ak'd> "dt"Iz zlqpAz Artn{t> /-lpralxrtrXT lprWNnJ narne= " CaQiraib > -r ro java' r.rri1 . Pogries l-l"p &rasM'* eterrrr* Lg rr,-l;tbe sta'.'J "ol Vatite rnust bc 3rtn3 . -+ rn O*'c. tlop darosrnn.ruw Ql<svnt $fl* h aru &ura ohje* anl 4J!4 Can be 4nd &r-a ohlu'P- LVbP67 refr'ctonts a lVrap srr Usodl} ZPOP LW;P zlprups > ,JavG kt"nctict t rn IStrrngl ] args) Y-'B*nftttg d@ W=oeN Yrr&onfuoo'X (n.* crc,,ssParh Re;oar.. ('Sp'4eX'x*' ") ); /g.t SpnngB.on ohi Dcnro 66 = lDcrno )h . "'grrB"'n('eb')) Iw B.mehds lllnnuon &arr".r'* knknDel keq ="AP'> b|t d z/ProP z v Lk€{ L,r4lse kt --'ll lr "> lltrmboi zlwPz lren =" yp' , Sang lare .lwn' 4wr x, zlbecrn > Ll&Lo6> &tp-m;- Gdd Clienj oppn tD Svc - r,ghi&'&q gc ----+oettt ----+ dasb -------t m'e I [6Joc]i' /D,tnoCrt"* FJclic Llltsb { P5 V { 5gsrctrl (I.t"P'nrln (UoU,'SrgH.rfo C)) I 6)€lst + cdrl t srart -
  • 42.
    Czr'tr ctpPtt 646*1- p_*,n" Lae Can use iova 'utr' l ' 1g lor I ucre uPPD ' SrPm:- e*o the a?pD. R,6|u.u+ ir., $e f)q'noCr;c'*'iavq ----+ f2trO &5-=+ c klss -> Nbite rulEing coirb rupe b^n Ptprny L*-hro1vniz* ' rc sPecie'?d i,63, norne an d lt*rc"ard, W'r'fo $i'tngcPg'r{mt oe 6e66 anan ctn {l^- Sfnrr€Cfu'lmt --Z Ll.wryPEv. Zbeonb> n l1oq",rD-fokne >'J zbean id="drd6" cldsb=" ot6'sP' idbc'dcrc'$rrytc' tJnuft 4'qulb rncoe ='dtivc'r C]as'sNone' aloe =' o"arle' iabc' &Iue,'' OatD,,- iY l4nps]ryx nime='url' valQc=',lbc '" oracre " (I'ii"' @oto" f > ./ .n lpnpo{fr^ rurn€-- COorrrttonl'tqrzrrtr'e-c Z J lpto?s> LPilP l€$="u'ser'> gotf 1lf'rqP- ) zltnp Ktt ='Pss.rrcu'r tig4 A|npz '-_/ 4prpr 2 --) 'J 6-ar,rQ Sr c 4lw1xnry z .gt*ttrw- -' J zfoot> J -) .J -> To &55 6inrp16nd lin€ arBurn€/rr alc'es to Il6E trts l)E a-|,pr) " Prghtc-rrcr. in rht &c,rtecoCe of aga --------rQuocrb -- Qunccrnfi5tlraflon6 -/ J -> Aqurnenrs t4b -> W3I'!$1ry4-- ../ Vqtt .{al A Wtl6.^--. Yal r) orgsio: aqstr: a'gstzl drgslo-rl J _)
  • 43.
    Gna.t.rctol Lritrrot -> 1F5f-ogCo*arn<t ie trs;og Potamercrized CoosTtuck:t to cr@re Beanclass "'q 4 t0 oJb)gn fxnden+ Vqluea to Bearr prorc'rticr tlrn ir is caued Cnsrtudwienn -a Baced oq Z6cna lntcrcl -crrg ? lag QPecrYen ce ccuru uodet Zb?afi> la3 tt)e Spriog c-doi?rine,{ Plc]6rrp op4rrupn.fe Parom*cYized con"ntt.,tun tDP*{o'* f6n6rrctCt4 iajddon. Exqmple c{,pr) flmo.ictvo ---i Same ab ['€viocr6 crf'P n Deon&ao.jctva class Dro$*n inplcrnerurS Dcmo I lthrrrapslt fxDfr4.{eJ inr aXe; $tnog namc; Prmr saloYu: FdCic t //F"qcmerctiz"a col.sr,a{dtr6 &{.0r,ax".^1 -( plarr 5'fasrD costrurft/f - ,.-br ,,.,r'. giep -----+ S-lcl-f-All 6eter+Ba,o Pmw1c^-j#::licrorc consrrtrcrzt usin$ keta - 0K. // irnelerrn* B,rs;n.s oYsbod fxr.ldic { Shn, ery[J.,rro c ) ''c$e-= '+49er ' ?r,.rnL= ' tnc.rn€ +'&tla"5'= " + Salav! ) refurr) zlbcrns: {6pr)DScf€,xrol ,- > <beztfr ;6='hb- closS= "Dc,'Pgaon''t lcttfistnuclw '@X V4)ue = "aO' l> lUt6trs(fu-an Vetlue -"tqa" l7 <CtrrlgtuLftJr -an Valrrc = ;"4t5b3' 6c" l> Alrr.arl> There valurs roustbe syi;hd inrhe 0rde,r the pararnelrrs ctvt ctoqi I ab le " in Gnsrrtrcrz,r. tl"e$ rhe SF{n3 Grnfalnq utrq thae P:r-ctm Ccnshlacfai fu :> Sirre LtrtstLefur - crr8 > toX is ptctc< d {r'r a
  • 44.
    i S,A&"n lnaranHc"ttonand f"t /iDoro Crt,"r",ic.uo- Gnsr',...f,ot f'X eaff on, Stoc os Fevidas c40"1 Nore..- Nbire li{o!"n6 r'uith cdnshra/'rdl in tbe c'tcle'{ tbe Pctrarncxrrs -2 TP not infardel-cl trlt co"n $er tgpe 4 Jnd^ irr rtle Cor'Sm-rcf,rr| . -, J-? Ctch Erc,rrg(r tgne i5 Ltrt1p'e ttrrrl iru"rrloq toe rped to &m6gure &I''',et'l valt-t<l arc ptaceA in the ccmEffLLc.f{,t resowf fdenltb rrr-rrt'Ftttts eda*"1 ^ in SpnrgBcan ittt O.Lbic ) F+. D{rl}r6€on (i.rt a,int b, int c ) 1 tt5'o =o; - *rre .b =b; , t ttr,5.C =C : DroB=n fror agcr Sl"r5 *'nt, -Pt* &tt'5) {uo.oge =qe; ltrls. narnt --Dorrre i la.- class*-'Dk,-'o&.^8 > oP Onrfrcr*rt GnlarnS *,arr s,'owx indexes' tqfL -- 'ior " Yafute = 30 !J:----- larr-- " Flot t.el/ae= tgF - " &.ravo'tc.ntl'SmnS" !o!ttt'-- " YqoJ l, tbCIt p.larnedr h'gu'l cot Conlguta}l,crls ' l> /Czrt*auxx - ct:rt1 l1oosrtu4ttx - @X LLantt'ttst$ - 63 LIVan> A*ans> -> Il rn lFiPle f:tramelcrs idcr,rifu tg,em bcded or) 6orrr fure *ren sraan roorrrer/ "!Lin fi*ndGnflguronaq S. h^t E3'- ;n $Pn1&nnr {us's.la"6 = salqry ; i6 =''db" coe cctn '&to,b CynStnrcfz,,t fqjel-Hc'n - 3t56'171" f 2 in SrrnS&%uroicn Z.I,tan,82 1bf0n E$-"-
  • 45.
    in 6P'ogCcnfigrr.*,- f;r. LU{6lR'!ktt-d'r X /Ccfi111.lj.ru -oYX 1Un#tnx -cr Zbctn 16 ="dU" clc.5s? ftrno&ao' j> in&x= !" h" Ya1u1="lo" f 7 tnde;^ ="C .vrilue='b"ni lz inlex=" J'' uo1t4='w" l2 €6eS ho'ct" 9d +o "c'q get to "b" j LllrrlnT ltrc.osz -> Jhere la no froviSl sn lb 5P4t b Bcao fiop.ttg rntn e <CsndnttlEut'a.:t6> U'5. +*rhO reason ue rpcd ei*Et thr*gh 6erY dat<P#s c-l irde'}€s tor) Clmsrn rr<'r Parrafit'-rtf'{ name fo *' ,t""tg 6nsrfltal:.i WaFfJ<r'3
  • 46.
    i-2 -lhere ioa provi 6;crn io crclivcrtq kc.oFrcfrg Clmlcr/nei bcrsed cro *a q|t"od1 cd;urrrd _ Qeonhoovg emr.;rrr, fn rhia pmcess the the cUrd oyob)ncy/ arEt tr Frer8eonRctcru Exampk, appl'totton: - DemO . java -> &Ift11. Ob f)rgvlcfls afirn // ftrm8eon. okva impon jaltr.urir.Drc; Grrllic ctcrss Dn'o&dr1 imderrrors Demo s t l-br" d: Fllrtc void setD ( Dore d ) { tr,.,=o, 3 B,tue Si'rog s'gblerro C ) { ..,etut b ''d= " td "' 3 rDd BeanEcftrg C.rn orrx4 A(;5 a // DermCPgr'xmr ('ftner* ft tc) Zb€ons LWan id -'d t ' clcrsS " (' .b,va'uli I 'lnJ:-' I > zl*ptns> lDernoCPgg'xrnr Cchird B'rc ; 1lag65 L51ea1 '4 ="db" Cl05S = t@ltu mrne -'d" t)ban> zll,xaos> /nn.o Clicnr.iavq r(f)Fr(6 pblic closs DcrqoClien-r I "Pr668can'> ) <v<? lacc'=i'dt' 12 z]PwYxrrr1 7 ds',$airrrl acfs a{ as pavcnrcanlrdntu, P s v rn (Sttogt r aqs) [
  • 47.
    i clc,s ldrfi Rr.cc.*"(U'*@a- x r',rl Ch,.ft,* R"*,'"t t. (' O.''.Cg a' I'i );fto"gl : g- ZPofl'tr$ name _-"d " > zwPbac.o =..d t.,/' e|prog,rtg : 'rl.'ol" o'thisr]t Sectvches f*,t''" dtpe-dtrubeon igl dtdv€ffspln6cf1 (.ite // D,rtnr geon F&r}<ry Contt.61 X.'BcooEL.'.t {Ltryr= n*o XrrB.nnft.t.'5("* / chrU facrna"rug Cotta)N,l Xmr&anFaomy -f=*,u, =.1._,- X*,BaorE h^g (r,"- ll$ 56n6kan ck*s ohi Droo 1165; = (}',n)&d-ga. ger8frt C"db')}, So.p ( Resut i5''* bd*.scgHerrot)): t I - gl hJl^on io rhe d;Ff blr,r Bean anJ locor o*r;a'n o(- <"f z t"6 'l .- Et" "kc,nu o-lhibcdr. soLrcp-s 6, *,. J,{r#€t,t kon i'' G$rcnJ Spngconet6ora}lc't R'rt ond olso in Poreru gprng CooFSc'rofan Bre' .- EJt lpn:yw,; narrg='d" > LteP locr.t="dr"/> lrrytrgz 'c' ygg='dt"/> i6 garoe as Lvq'.rtt norre'"d">zve? bLd="at'l7 zptrrrlr{l$ I'lctfrr = d wF= u' l ' 'n D'(rI !'L uu n-'-r - d 4prDpo^b )
  • 48.
    NeOr., rcc.re €pnrngG,nrcdner tO keep SptingRean clcrsS orqjcUs iorhr SlrO-lo3 &otrt. Q Shgtcr.m @ ltotrtut' 0 r"ltus t @ &gicrn Singnroo'.- crnrcr.inc/r crcc,r<J 6no)g one otu€lJ 4 8;rringBeon clcss €-&rn *,o.a3 h rrrrhocl is Cclled ftT rrr-'ttiple tlmec crrirh SameBean id .b0,, elc($D = krr6ear," sr!{€='3ioBlefo,." > (, z-ltr.anz p .. _/ [9 mrntup.i- crnrs,nu crec,lrs rrulhple obetrs f(n $-n6&on o.* 4- 6gl6pletcrcrzrl'- P.u-a. $,r&* t ) r,ffh.d csrlll hcl-rlng SorreBean 'id ' Egi zuetufi id--"db' glcrtg =-prtoBean' ScoPe= PDhfSf'c .J P".r*U ge*Beocr t ) tr 6.- {brectn id = I zlvan> [f rq,.estt- GilJc]rx,r kfrf's 61-nlBeon clor ouje* os r€lAest u$co4oo closs = Dt"'okan'Egh /HAr' id = dD == zllxc'o> Sestion:- Contcrrr/ ktc0s $*A &on clcls oLj@r as f€ssioo Ur<M+ln Fgi .&an ;4="dO" closS ='Dcmokan' Sfope = "SerJlot," > =, orl.aJiq rPlue ;o L)l*sn> NorE :- rcauost, Jtjsl0n &ops arc opptcalle $ onlJ i'"l Ucb €nvirdnmf'ru -]be JaVa clcrgs tnl- attUco6 rrs lo creale on$ 6ne oc'E( oq)ecr lgf ovrr Singleton Javo coss' Evto thutgh gcrvct tlos ctLlotos mctttip( odads c'rtdHcrrr iF tlle cr.€ $<oltylg o.'ty 66a oUf* {.xtt rhtn itis net coile{ Siglek'n rJa.rtq cb-|{, gSPa='re4uest": cr-rtn'bule voLue rn is co-r-tcd
  • 49.
    -_ Nhen Sp'intqa,'nScope is 3:n61eron Crr Springl3eoh ct4ss &esnor bec"re Srr6nrur, jqva ctc6s. -- -> 3;ogteton gope 6prDg BeoD5 canbe ccrnPigured us dependenn t6 Prut-otUpc €qte gpiqfdean p[Tra"rH* c,od ricevc{sa.-. rn ilrut .obole PrDLers Gntc"rnrr doesnoi chc.nge &,rp$ 4 c.ngBfoo, .-'fteanbe plcrred o",r! pc.yamet(yized anarn cr<fts in 5Rr'ngBean tDber' ctr{ PrDp{tties oF sprqBeo., are coo€;gure"l f- &r{'cr4ernvnl - ryr Not ftbbibre, ^ Sfting lScz Conrc,jrrx toolr5 tD Qse O-Pol&m consr{tlcr<r{ tcrcreccte the o}cre sp"'tn3 , 0con ctcrs5 o$e*. ft ia enl-rtrrcemenr oP &orFoc-l-o9 c$nirdne{' ttrir Contari^c,r i5 arctrGbe in SP'"''og Ccrnfext f We rcndq'te ' at i5 ol:o ligh'-ueiSht 0snfcrlrrtr to Aoivole rhis Crnrctrrtr 6ga-Fe ouer* {r, o ccrss tho.l- irnplemerr} 6rX'5P'ftrnKxt'$ppticorrtm[c^rc"r (r)' thus Inrcr?ace i5 SLI inrc ft.rq o? OIt.SP. Le.ns- ft..r.r'l' Be"tF^m"j [r)' thtw cr.e 3 impcrrcnr clcsses implernenlrrS Af?u*HcrnGrr,rex-r (r).oc Cc"n trle rhis clc$Ses to qchvole d*rmrrooGnrcxt Cor*ornev O F,.Sgro-X-r Amri carr"o Canrt*t for g' sF' canler r . &+rn* ) -: Autvc'tes !f"it3G"-"t by lw,-nng Srr.ngc*g firtQstcrn. bAPo[c4Hor(on+€,.t f;,. f*- $s ,?ec;ffed trth uf- - pnQsrernYrnrrtdicanon fun.Fut ox--ner, Fu$g,.* XmrApplh"rt.m G"t '.r( m*od5.xn^r')
  • 50.
    CD Chte&tf Xmrr4pptrcorronGnrcxr(o"€'sP' donftxt ' s,6ac'rt) , :- -> Au;vcrrcr Snl"l Co'rla;rt, b5 lccr*rng 9*T tft 8'u fro- -the wh*t ctdded t, A?:Pll (otl on c66,t"t c6rfd]Y4 . tc' the ClosUarh env.. -, Vccrioble' '_., Ctoufun X' A1pu641* G"ru r *x = ne'D C las h* X-r Aeel:corrc'n(o'rc^r- (ntuq-2-' O K.rLl.oApatrcanorGnrcx r [o.1'6.sf " L.rb- ccnrt^t . &rPi-" ) -) ff*ivc.rcr Appucorroncoru.".l cc.nldne,V in la,le.bolPllarltcrns -' b"PP_5 C.o be t(lken ob skrric o rpn-st<rri c br rt erbo d Gog Aocrrcartoo C'''rerr eoo*iro, uee' flxk:,n *:^:t::?# +ar., R,, 6erFcr injeutcrn rrust be -taFro oa Y:84#&{ Y:;trfueaJzn ,rlrj]*g the ettt,t tikeAog llocucarto'o ci]t'rerr *'":^ ,,-toA tz. *o&,rm od&e,ooot -R.,,nrt-r=l;t1., *;* hrr ir con be. olso used to P*fr* J i' ,l TilT'J,:i: Tft fi; *u*'o'.,n f;reg in sinsre insrancco* Ccnntdrte/ aLnvcdrcrn ' O Abitlt to read *t* fu' P'DF"ltus ' +) 3+P* f"r itnlhhe-r,j-l*'i:] ul At* A grt"rlL'dl'X t"a crc'-"' Nqil=i qurhesb,r 9"d.'n'a orc'Fr T::rf""ffitrffi t cbnlcnn'Lt All these ht'res ore erclclsw P 91r)h.r')Eovro0rfenlfr)(J,tsrrlc6f'nn$E@nsdeue!"ed4ffrrl$Plerra8lclrrprs .,lir be 1cnfi5uted in d;Fk"c.r gr"'n3 J"*'**o" - j::' LDecon oLiva'tr rpric.rro" Grurext dsnlcrlnc' 4 q''b'; dux *unpresr.,"3 t-ft8"* fi't' /lnsuar. rpprrcorroGrx^r G'nrainarl S*q Arr, = f "De"tcql'*'tl "hta"r'ol"']: Ooo&t [n,Appt't'n-G-"^; ct^=nso OnoPo*X*'Apf,icadon G"r*'. ("Ps );
  • 51.
    NoJE'.- in &anft.txrgenv"' 'lo coo'P cai r[ rrslt-iple CcrngStr"ctl-lon f,r'e (o( Deed to ocrivox mLcthPe ir'lsl-aoces GF [!ot'k'"rc,'5 csn]ceirtr'tr' -> IP sp"og &an oQjec.rS ct.r.( Crro,.€ d bJ drota;rrea io ttrc rr:crrrnl $rAng G"nloi oer 'is Ocliolcd then ;y ;5 c@l0e{.1 Fre-inak n})cltloq oV flpttcotionCer*cxr GrLtuirr,{ ;xrRrros pre -ir6tan$a}roo Spn.gBeo"a;. iP "proroqrd&.pe e6 sftrlr,9B€4n 6 fatseo qs Pqxo'derLtvcr-l'uet6 - q" Hhot l"rc+p".re q:rloXBec.n' crn' $ngletn Scoge'' *$l.gt.tr," &"rc SynrgBeao elars P-ftf El Cor*clrrv c.6'€o.tf5 pYDlotgPe ' &^',. SpiqBec.n ctcrls cbjd at'd Sngk-tt'o SC"pe SpnjBean clasS ohjeLt tltmc'5 Pr€ -in6tctn hofic.rr Confaioerr iS -4pe[ccmc'nG'rttxr Ccrildnel' ostc{nhaficrn Po(ess ip l-he k l ib does not ct'an9J"&"rt" oP onx Bean' n p,^.,-o.N.*., firu.hp.,roo ue g dttpving E€ano are ccnP',6u"ed in Sgnn$ccnftgcrrc'tl* ;"ey ir ftrtvatl enoble Pre-.icotarr*tcrfttrn (qW- Cre'atlng obetfS v'jhen only on &tr sptingBea0t' ^, ^.. *.5t-r-.' scr4e ana tctLe othea 6-6eana *ffir3.;"l|':^::*** ** r'rDtuqpe s'"rf, $d,".*'e@ &re rnt dqxmdcn* to $qletzm &6pe ftnr5Beont q- Nho, -opp"* uobe'| fog;3ff"1-) rs copea 1 = Ii]*: ...,"" ohJ&r iF st'nnae^ s-p" iJ!*totr€l Arul Cyecf€J cuod .ltirnns €fingBec'n elo55 - ** T""o.::'*^. ,-, Oi* ;F ,str.n1Bca'or goqeis Snt't'" c.rcrce/roarc5 c(Di rerarn3 sp'n3Bcon i:il' " I 6,- h/hu-hu*n*+ ,..' +#lT:"lf: '-ued I 2= -^' "tT:'?;-l"* o+' ir sr'vB!^ eoprs "PotutSF' $ Cftat?2 aol reft:r'o.s 3y;"XBez'n cLc'vt lorarc crnJ yerctr n tpr5&"^ cta,6 d6&+ iF ,qttj &^^ ra.- ts "stn k+^
  • 52.
    The lert Ble$clt rqc ntrons 0'tteJ " Te^tP,..,pa.rics $11 'l -> I? {r';ng *pnt;cott cm plac€d it 5 yctocrded fb maFe tDf Cftrc/ oPPL;to$orvs crr€ tle e*rie$ in rbe €"m oe olcrn; c5rifi Ofhet qr*r5 AirPticc*ton +o csiol to CenrrctLiz€d keu = volu. pctlr 6 ig) is d"'t Ltd.c"de ar.xvcctotl &of,tt Jt is rcccncrended to the aurrdc"rA princpr oP 6[o indr'swg qryr.,-Cr.rrco *n1- ale changabk- in the thrse oluues to oqpticatlon (1,m c'rside fte crypliccof c'o Q lt'-t"; t'3 S*ppr/r.+ lbxtProrr'rrlcg {},. / r-l 8,"' in c.t r Poi6 the feo},notogil lr'rc'l c'H'ns n c4se Sarne latP""ne't f;fc Ccry-nrtLcm dala ' E,*pps' F-----+ SFng t-------------- BeSS DbO p",arron'jav< J' clcru Dgofrr<.Ho"B€qt',;a^r^ | " crarl sp;ngcP6.xm an C5on-f .;am|'clau Jdbcc{pllcatkh c-U bc&lefT€S{ . j c,-V a Corrta.;n, JZ bc&i"vn, L,r l, u"^"1*.,* ,*r;; e';; rtr;:#:',#TDekr".ir' P'bP/4trq aolor I rora ->T0 rrake 5p'icgcnPiS*rcrrl* Bre eP'rFA g"ihns cetkrrnvcrt,e: g*;fiF;grc -r cr)e pkr(e ptr.'cebodc's sgec't5ln3 the keXs 4 rl"e P'Dtrr/ttc5 [ire (tire ffi*) T0 recrxrrze l,ltse placthol.lers ond to nnke corrlc'i'rr''r gar{*''ioi r'vr-trtes pr'rctnl&r '''2 ^ o bosed .- ttr pbcehotde,{s lkd- ort SlxciFicJ {re need to Con?''lur'' - {tort, pop,riaa 4ire O'0.6p.bear,s. ft,.rt.c^83.P**rbplc.,clor/crG,npr7..ter as s'nrybeor is Sp{n3cfutsic-- Scrrce code o? rbe olort afPucetlc''n ""
  • 53.
    #idb. d",u." ood,o deEi)5 '' or' ,"'*' = Orode ' idb'c ' dqivev ' Oao a D*lt'r ti *, = idbc:trtc'c-te " *':n: @tooff'osr : l51l 3 olcl roy ,d bure,r = 3o* nnu 'dbR cl ' tige't SPrring o4)Pt;catton Dgorxrdfidn "iavc'. ------+ Sorne as tg I olleale D0OErano'n &co'irava ------+ Savne cra t4 IWW-oiL,.W?_niq raFeS &r(lrsr- OC'r tO YtCo? tu ?C p)c.ceholde'6 {ProPuti es fit< C{lty'r', ^,tI,cJ)PL -"' -7 ,e,t>s.fua.ory.con€+g,h /,t,fflc1"tP1 - -" - 7 ---^a-,kors,t".,{Phd-l-ettle^/ " org,sP.b€arlb'rL'",e'u Gn6$rt"t ZprcFirfg r0rne -- Lrrrvvrv'v ^ . I /- LPlacehotdc-r z+tDlx,t! [)ur,'- - " J t"t,U' drusc,, ]'' i > I1lYrq1g flarfl( ='uxnnome' at[€-- + t-W,'fr*H DoFnc =" paJscoo6l " 1o1""=" $ l-f 'dbwnaJ"/ z zl:tr-,urt> zbeao id ="dob" LWP(t{tb cP{me = " cls' reg=" &dt'' /> zlkc^n > z-llrrccrns> / Pgor,,or,- eli'nJ''iava iropo/t org "sf' conxxt' gqrpart' Xi Fblic closs E80p<,rrrftorrCticru' P 6 rl -[Su"rgl1 oqs)thvuos Ex+tt"n { //O*u.* &plicd}lon &mi-cxt pre fon .nX*1[gpticr*lcxrGrrnftxt crx --rK.o ConlidtP'l Zt-- AWnCfu.xrnr --7 ;;":,, id:"g:npccnB: t'*- nor,r.,",opc.r;es"/- zpyDrrdrg rnrne ? toco$(rn" alue = ryjtfil;;-0j; io cl.l{rnidiredtlv. /lbecro> ,, -*. -p i,rh..dc0fa:s,."f ce, D-rvdlbna6erhnSx'rze > " los6='org'6P"idbc'd zbeon ;6 ="drd6 , I q -,. s.t,,tx' l> -^J - - U . _t, ''dnve,rCtc,sNamc' Fdq€ --' {ry' ";Y-1./-] cas6=' DBoPwalonBec'o" 6 > fi re$srct Xrn r &rpucatloo (o'ilft t (4'^5cfu ""'
  • 54.
    i llger}yaogkas ohtR"r.' @nh)nor DBqrrotlon bob-l = fDeopctloo) erx" getkat' (''dob')" /cau b, me-rtrods S'o' P( " Ernp aalarg i,r " tbohi' ft"r'$a^g (r'{qq ))'' S'o'p t" Lrnp Netnneis" tbohi' fu.5frlame [14q1))'' Gllrt';') 3 i/*t, />iavac x'Ja'q i> *lava DBoPcrc4rsrclluf, b JDbc apPlrafioo : /Jug.g"t *lcrt 'Javc' iro;xrn .ic.Va' Sqt ' * ) -= +r"r orr'ax*' irrrP"lt.lava'utit' *) imfslt jata, io' l( i --r'!r{'c'lo grbli c clcrss rJdbc8ele*Tesr s t P. t m [$';ngt ] *n) thwcos E'rolurn { Irrue*ics 8Le Bs.nem pre.Inyrr6rreom f"D@";6' fno1,u,rn-eb^ )t Fr.I"g"@* Ss.nem pre'Inyrr6rreom [""D@c;ts' [t/Dfc/h€-b J' /lma the Conrql og pYDf/hYl frte to iova'uttt'ftope"rtt<6 cla''s Obi ProPtrrric's P =nera Ptofrrfl'J t )) p"road(fts); iiread Core.,r fu* h.f.^* clous obj Srrrng 61= P' gerPog*g (qrng' drftt^" )l $-T e2= p. gerftupq ("m6'un " )' SN"g =p' gulnp't,a ("t5' dtrusc4 '') ) Swing S+=P. Sukugn^ q'rng 'A}naa" )i //N'it Uutcoa" Ctass" ,f.,rNam. L5t)i Grrnnq Con -- Di*t' Manole,r' 3a Gnnnerrtcm f 8''' sl ' Stt) ) Shr.r.ro !t2con' c*et*e Sktrtrlu* C) j //lotote
  • 55.
    !{hle(rs'next()) t $.o, p ['ts'5erJ,rt(a)+ t /oore iabc ohjs 'f6'cloi€t)) €'st' ctose( )i Con'doseL rl " & /ir*n 3/ ,Jar -r Beaopec.torgCcrnrcrioe-x C1omt retottize Ood ose t:t:*Y gwo thoag the SPecjc.r g"ot, " P*,rS* T5 = Stj " g".c.,r"$&6? ("'** x Rorn Sr.aenr '); " " ,s'g*SMngtr))1"+ts'getSnngL") + +1 />Javac Jdbc&EtTest'iavco 4ist '' AfrWuwAz Llbeuo > :- = .zlbeons> o"d n""rdffi i5 arc,0l1r'rtd. -> ule con coo?igu"t rotrlhrpte prugmics ftre in SPrJnSEillironrnen-t' IP *rts *..ft9t.p'"Fnh's fttt c"nr.r'' so-" r"X to'* t-:;"tfi"t"t[ The values collec.l€d &o*' ostlg GnftS..ted frDfxxn(, r''- ood us.A lo zl-- q-iogch,xml--7 Egt zb€oos 7 1165s =.brg .s? - tso.,s. "*J#-tge/b€ttn ;6 ="PtPctnftg ' Arr,{rarrt na.-r. ='ry# 1,..Dp,.6{. t"u' t^o'u"DsltJcd ls4' q,oPtlte$'l'::- /'laiutzDbDcr<'lls' flDF# z-5 tlwfuez
  • 56.
    x) Lnrcrrnriomtizc,.ltcrn Olnirg +Longtrc^ge iauo'uri)' Locale = locnl € . clcrs5 '16 given &r c-oothng totrb locales Eq:.try en-Us , pr -FR , PI - Cn , hi -IN etL '' " A-g'.nan cts it6 sPeak ;o cANADA '-) moring oa'f o{pliceHoo cocxh}ng &' d;Pfu'""* lcco'lee is m*dog k* err'b'iling .J iltn on rbe opptrcc.l.{on, Fo( *,i5 (ot o€ed }o -tctke oatre og- th" Pfs(ftfio"t '-'' l6be)5, rprr',bc,tfznrmm, ftrcP-wpts, Cu'rrerrX'{mbol5 and e'Fc" " J Lwev' "^t' 'locoles 5ve,;hc P-Pis8 'J --r To enabte ittn on drl o?Pllco}lcnts cr rreeA mctnlr- n ,,Pno ffeJ-}.)''3 l"bf-c) $re is &-J v ff ;Hl.,n' ffi*'J: -,',#' ;;; B";q''.T: h : hB can use ffitc hon6loftn^ff .rn;cole gdittl taDlA togef gre*n*rrHsn lerkis : in d; F€.n<,.t o"udH * ,* ttE t-r":r'de nTY*,"re rurrrtrrs 'Jin d;Fft"ent Enguclo' @ tb Zq "-l - .*,,,^_6Je rurrrtfrs v rP hb.r con't be tgQed using Ergrtsb cttphobers $ef tbdt urvl -/ ard elpPued 'to fte ctpplicotlcna' 10 gei Uwc'de rutbers 'pntt" ct*"*o* J YeBIonoI lar6ua-ner livg 'lau6u'thndi c'nd elx"' trr- 666 use Unicodeedro/ J r: procedcrrc jb 0cj- Unicode rurrlaer o Qn certain bindi ctfde aed usirrtr J Unicode edircrr c'nd €elce furee' rntiveP"aecii rool 'J J p Dor:nloc.d unicode eclircn rcot Rorn urap'b'i8opi'cor'n ' @ Launcr,,''un,cgg-i&lz"t-@' rhu"rgh l^*-**tc.nd fuCIe tle {btroc'r;q + v biodi t wde F.1' t) 5r?-6'.- cofx aHm +bindi twtdsrb Norcpad Kt Fle ' v . -./ P1 -txb - ..^-,.- &,o nh*.efr..nodl.€ yt6 trdcode' _-/ T - llolE:- Nh;te stdn$ thrs f;rc chd l??t'z't 11t, :'1 ",|,l,ttt1 ilg ..-l St p+'; USe r$iEeosdi 16-0 I f0 get Uritde nr.mkz&
  • 57.
    cl€' o9' Ccrnttx i " &rtr pcnt . Pesrrr,rBrna ptloro6eh$xrre . iBrr,r'r*'try1)3-OveRc6cii _er€Odio$ hr;rt to r6e1 {13 p 9Ur cao rrnre ftpUcorto.oCorurcxt Conkdney oodg f* rfe &'oong SpriogBeon lraoiog prDfxr/hes fir" o,. Lx t Pa- tx t T-*nt 11i< gtrrr c"rcd unlcole rrrrnb rrpLe iten bg Crn Ftguri nX mfrfJ, Sftrg Uosea i6n frpp ts^arnPle apPn E:Af?6 l---_SPtlQg f---"--'- tT:-----.&p.progn;q [br"se Bte ) AfP- Pr- cA' ;ruPnes Af,p- Ae-oe' Prryxda [PP.- hl -IN ' WDfrsYn'lc{ ftmoCft,rml kmdtient'iotVc' / APp. p'op"te s [&:en re ) Srrr = del€-tC SFTa : Scrve th3=669 tlr4 -- 6ai641 ll NP - h-ce " Tolotnu ( F""cr"') SHl- = EFFACER Sftt = SAUF St13 = ARBET Sh+ = ANNULER // nPP- de - DE ' P'oP(ll % [t*) Sfri--- LOsOrrN S}T i : DENN Sn6 = zul, Sh4 = AtSAc)tN /tlttP -t,i- rN,Pnft'o{e [rctugu; " Srrt = uocx uontPuoqrst''ore 166r-rrcfaa :::; : f aos ?'o"n P2 rrt e're ttru -- --' J t4u,',icde n6ireser*afiorr ft" ft6lT1
  • 58.
    NOTE:- ]be F;ternmeoP Bose Fite is rocrsr be thcn in l.txofe.*ecjFic FtlanameS. -- + crl pro1arfiea Sre must ccrnt-cno Sorne |.<gs horriry d;Pftrftnr Vo'l-ere6 <1.-- ErooCPg'rrDl--> (beaob> /.Wo;r' d= LPtqtu{t1J .Lli6l> Lo"t. l2es*.."&*t" - f*rort&.*"; J J -i ,,J ,J -/' .J ) ---l ,J .J ",r**ogSrrce " cl&sg ='or3'5P' Ccillext' 3t{?o6t-' .'U L' Pi xed kantd rnrDe --'b'semrre6" > zaloe? APP elrnue z Avqlue> hPP- de- DE r-lvdcre> /a!re> *PP- Pt - CA zlVoluez zvolue> hP- 6i-fr'r 4wlttet 4lisr' u) P^oF'rfg' -rlbectn t zltaors> - /lDernocllcnJ'iovq iccrprvr ort' 5P ' c6nlt ^b' su{9cxT " * i irqpffi Jova' uli l' X; irnfr3nt javax - Sjiog' *i irnfurr "lava - aot' x; Publlc clcrss $-rn6Crrru [ P s v rn f3nngll a$s)thrDLos Eranrrrn { (0(fts . //Loc"le ouje* Ulql(BJr f f ---J-:- - langtrctr t {= rtlo lo,ote [orgs[o], or3sli J J' /i Annn"r" Apuc"ri"o oonrert c$lr-.Jy/,i r^ J Cussh*X'nrA6'Uortt"rG*tx+ elx = her'r) ClatsPorhX'"rAppticcttrooGnre-tqW**"7 //g+ lltgs h..,r r-r{*ias Brtca'*'cu'"r[raro"k ', S*"3 116g1 - ^x-gallersale("sttc, t{'n,4pu-rr$1'',*^4i. **-l?:* - S*"j msgz = *r'gerflrscrgelsrna', t*r,*ffi:rftuti :].' not w' - F"g mS03 =Cn. gaMessagq(Sta", null, "dek$ ^35'fl1*".ou*st"tq msg+ - c*t" xoMerr.5't+3*i.f,k^rdtF" ms6rr') r))
  • 59.
    // D*.top SrctngFarrre JFlc.me jp = rrc,o JFrameL ); G.rrcutr^r Q =.tF " getGrrenrPc'ne t)i /lL"tore bm6 b$ gLth"g lc.bela hro 6c$ru-ed gc- = neo JBulktn (ro€'t); 62 = rgro fBurknn [rosg z ) ; b6 : n€r, JBuilo''' Crnsg6); [4 = Dcto Jl]if(I., (rtsg+) ; aocs )r.€<,ro,<c ) Frfl Snitet 21<'rr< . J to< cs"'rii ' tV$< !lo<'*rce r"t-r'' XBurrcn JBulkrn [Bu-rfun JBu"ttuo cP'serl%oc,r (neto FhaL"Sr'+ t) ) : cP. crdd Lbr)l CP'add [ba); cP'&dd tbs),' Cf ' crd d Ll"'r) ; jf,- Pl* C ); iF'shococ:j $ //mc"n 3)lu"''r I > iavac 0erncc-umJ'Javt' (pq *pp- h-FP 'P*t""ttq) llz lav o ctetocu'Jnr f'' fto [uses fup.- h-FP'P'"{*JY ["T i'#:I'o: I' tuses hP"P'r"d"r) ...>Ctx"qct&ar)t.)givessPrx^€Beac,Cr&ssohje0tSirniue{xctr"getflctsc€e(-'-,-,)31.,€ Vdxre 4 lhe Wwa rtc3 Bre besed c't rhe gruan ket'
  • 60.
    ' Can gOclComFc.re &aoFaUzry Ccoiaine"{ crnd Feorul e ' ' Nirin (l betro J mrrrn l-i'r-H- / t-ffi ,*ng rnFr*r <m Abiliru rD uxJtElDirh rrr,rriiple SPnrt cqg'leJ [drh Single ln3iance oP Crnlc,ina . Appticr*t ctn Cc'r*e " r BeooFe.ctary Yes Ccrr*cct d,r, . {pp[tofkm(onRxl Yes )esNo spnog pre-iosnrn$&tton g+ $eana ,o )es Qecegnizattoa 4 phcebode'< anl pn4rt'rrofirts No Yet i6N swpct No ^ie6 .,. N0 )(s *WtiotronEwru llt,"aUg 4,ro*r1". 8ean fun P"ra,o.'{ re6+ht..Hc,"r No ) eS 4rrmnaiic EoonF.cn',jPxtPrucersc'l redst'oxan N0 1 e8 coocruiicrn:* tdure usrn3 fing in rneoot."*:* ,Tff;-X,#P#- L15mg Beo"FttaSCon'rcr;n'aa (t'ses lert mern6$ ) ' cln u-L' v. ,pucc,$on &*cxt Cont<t'no{' ' the lrnae]l 4atat'rtt "'- + Actr,'&rft:r,ret - ;; cornfxmenr/"?T is coJled *Evr"i' qic,gtpYre-,r,EY&trlspise-discc.$ea*!o**..oA.unt*.T0FrP.,,.Dttuspw.tth"dr5 tuX q1ed Etflrlistcr'Cx6 ' vlhen tte $pU*f-* Conrc"t Corrt<t'oor 5 t+r'ttea 0r Stcpwd the *wpucarrox]b'ent cdi -l be raig,. .Je @nhr.nale rhis APr,icartoEr,t'*' Crre Cc." c,-se 4WUatrlc'nj-'*rer' fnrtu: Prot'* tDe 64$ rohce tl^r crncc'nhoP - trrC ftc'r fne AfplfcoffcroCo*e"tGnrco-'ne'v is *rre in 'f..on)n* mccle' Exarople A0PlicaHoD"- sia-f,".- Keep lsr alpn w"dt' ('sesl) *,.f;t- Wi"€10? sPrrct'ffi L$eoo cc'rs / llgl;srrnet"'lav a imfr't org . SP " &tdext ' '( i irnfrnt iav& uh I 'X l imelcrrnxlnj on$' se' coYrrxi' ht'Y*!
  • 61.
    '- R.Lbi cctls6 llgLisrcd{ irop]errr.*s r!,p l; corr o.,Lisrcne,f 0 1 [1' . tl: ;'' #*r..:l' - t"t'* ('h'errcr*r"r'Ert nt o') { '. i-^,r -.rr* E,npsr zr* ' " ' S'o e 1'ooAfnlitatl6nEvt!-d op l-1gLsttoc^t clcls ) ) i F (ae. h3r,i ogt ) . f ndex Qp (" CmxntP. r-,-s be d Evenr " ) I = -l ) il -Tl .tffi' { $ttime =Sgsrcro - currt(rj-Tlme f'lirrle ( )l s'o'e(" The Conr<';rsr i6 g'f6rvred c*" +rr''" brcO): ' ! ^ Apr ")l=-l)/nlt'&nfr')n'o e6e tf (oe.roSniryL).in&xOP [''Conre*tC)oseaEwnt /' '"" ,rstorto'r- t ^ 'r: ,,lrir [); endnrne -- Sgt*^' ccnronl lirnt S'o'P ["Tt)t can'{d.,n?/, is sto?d a}'+ rr"i Doreo); (.0.r,(,-IhreEr.FenfCodf,dw^)6intunnloSrrod'e&n-+Ccnar''.-s+ti'a +''t,seas" ); ] /lt"r*oa t /1o"*Pp}carr onEw"t l- ) & /Jcratl ' 6,.pg- cooggu'e the ot$re Lisrartr clc!45 io sp"n{€cfu hrc' 4'-' f)etrnCtA'nml--7 z'trrttPi "-'z LU:ao|7 " r1$Ll'rcre{",l Z - 6k?fl; A4,l..le *pprlcc'ncmGnXxf Cortdrx
  • 62.
    ' -+ gprrogBancot, l^lau. trm crrv-de6rrd merbals qo Ukcgde rrerbode. O inrt liftcXcre nt-rtrct i Gotcrrrxrr execure fid5 rre$ocl r;5hr oPxl Eecn lnotrtnJn'aHctn aod kgrdeng inie -+ ThiS mertnd is urefur lo cecr ororbe{ ryeorn D?gtthea cfll_ asalgned ton*> J voll€d vatue$ o. not. Tb i5 ols0 qjeRx to checl coeorhe'{ wnrd'tarl J bean ptopo'rrre6 ar< Asai6oed Dlrb VoJues ct6 not ,J @ a.sr.og?il liPeqcte rra't^)od rrerbod otco it i5 a-bdl} to desr'og ocrr 6pdo38ea"o*oy cgde nerho€l rnr.r,st be sPecified io Spr;rX&an d"do$ conR6o''cin Sf i"$ cPt $ re crsin g ioit - rrettro d , de*rro5-rrerhod arh;buru Exorople nPPqg*tg-:- / *rrro'Java' pudl c inrrkce { E*,. $n.,$ 3 /DeqroDeao'java //oscr -&$ned prblia loid -z Qqlciofa execuns *L}s + Th,is merbd is a:cfur to Ye,lcurce6 cjlsbs61&tad Dero0 ArXHel0()l Sertt^a ( gefeae r,allih beon prop'*tes c'od tel ease Dnn -Jo'a u:irb Spngbeans (urte cltxin'tr <;dbc caat elal ) u( zbeon> la1. .J Dr.ftttF-- vi^rrd(--) ' '/!l{t$dljf4 'qAt ) utd. y Pr.,---+ S'll'"r' *arY v a4:"(a'J* J -These too )i9e r.l33 oge i mPleornrs Derno RrDi c ctoas DermBean t 1trt.o" trD?'{to.. povole Sr"ng P"uot" ir* iru r l;Fe c-Nc[e $eAvol roglnitt) ttrruos ErcePrkrn { ,.o O C'De.oogeun I rn3lorttl')I V,r,&rr19 f if tas..=ollrns$==nu11 ) ffffi; t ffi- n,- fn..r,r* f"s.. p"1,'volaer to koo g'pr'g')t
  • 63.
    ll use, -du?;rtJdeshraj C) tipe qjcle ,rsbod Prbic vo;d deewog t ) o t S o.P (" De'ooeon: roSDamSt)k),1 rtrouaro+ttt ( age= 0l I nulifurog lt.g = eurt ; J Beon Pr4wtiel ' ] /lB r.r$oA Pf,U. rcr{/{ n 3 ] .irnPler-oenJcrH c^n St'rina sag l-let to t ) ,,rrr5g"= "+msg t'o'ge =t+aBe; <l-r spnogch'xml-- 7 II.DACIIPL Lknn s - ^;;" ifl="db" clcrss= FrooBean 4/'J'Jtrl fvtYne ='aW !, /-Wp4tttl nome ='msg- .* tlrran Abeaos> /Droo c t; anr 'javc &me ot $rst oPPliconttn (coo use " init -rnef{iod ="mgJnlt $lue="&'lz {o[ue =" fello" / z , .', -']*psr'g; " dgwa5 -rro-rnt(r - s ao1 Ccsnfa'tnax) F.6lic clos5 Drrdlien'|- [' P 5 v rn (5w;r5ll args ') ( dt //A*ut* sPog cooktlnv Clc.:st'jbXro r Applccri'ion&rnrrx r Cl>. =(Ylo :l*) // cau B'r*-rfud .. S o'P (bobJ' sr'dHetoc)); // cld€ c(r-Idrc'l . ? l clx'closeL ); ig- Co"*rki 'rt Appuconc'nContscxt Conlcrlne iP *e C$nkai$el ft $ear,FoU.r,X CdrrJro,lhu fpsskrM.nr @ a4tcoCanttt"r (i*";it //9q ,$nngBe"n ct&ss ohje{- kmo "uoui = i*o) ux' getf3ccrn f'db" )l &d.t glx 'ctose( ) i o' the end ' then c.,q f."tot. duwo.y$ingteronsf ),'
  • 64.
    lzrlb;re Cooftguriog pre-deFned,ftrrrd po*S 8.rpp)ied iata clc.sseS &s sft"r€E€2n5 __ in 6Pnog Coo€igurotloo Bte :aer*iftcoticn oP liPecacte cocrbods P"or'r ^ hr$. no.o? w;rhocts #nt art ooojlobte in clcrss i5 P?rcticcrut t': tt^'n..-1 n6.telq lrr$ramrnol rmg &"rger fa don9iSue thete tiPec-Scfe nett'oda' ) -.l0 Ovcrcorne *,rr p'rutt"n ib is recorrrodeJ to crape 3pnogBec'n cra6 -/ impleroer*irg fu)o Sfr..-i..1 iner&.cas(rrr*o-0-iziog$a'nlDist/o6ibteBto")' -' ond [Jc cen u;e rned^]ocls of these +cm interPace CI9 rr,ltunalr f,'v 't-' . .i trren-deftncd riFeqcle rrr$ocb (*o,r#&*.-.,tt)d$hrr' t, I n o*to *"1"d v O*€'5P' beans, &rm''y 'TniHalizir8&an inrcTk'ce gitca aP+cllrrynal( ,rq.sp beons. &*"1 Dxrx.,n.tsean inrctPece 3!us #J;tl o,^u*noru+ - Currm - dertrog Cf mer''a' a ' J -->r,hl* tJfiung corh thesa tco ,'frF'eclg thre isno need 4 CoruPiXtontnl r rmhoa n@rrr3 n 3da$cq hre' I -', -, pOJr cIaA6 gxn acr os Bpa"gBea., h*itts not 6r'-n&roru *.',**errttu3p'{"3€e-'- rrrurrt be a FIo clolS' ruf'c', S-^6Bram clccrs irnpktrr'n6 tht-abn -/ Jtoo i^*rrk'Le-9 *'ao it c,.c*t ot mn-PoJo clal4' : -> r? sF^r5ftan crors irnplerrnrt * -*^ 'Y:.* *"#'* - Gw"tiPec6cte ftpkDda t+en bthuinbe €xe-ulta' tt-- - -'' geu|lt) a?r<^ gft<"ptq*'$uS<rt) t Cusn"n-dutn6*'fie^ exs'ru NH v dur'o6t)). Egl4g-g0t',- 7 Du-o .jouo &mc ag pre,lliour o{pn / Denno{&an .iav 6r r lr-rlCtc Cl&ss DrrnBeaD irnplcnncnfS Drmo, }rlBal.i-ang8eanrDfro.flCcBeen 'j ( ilfk"n Pqc*lrr ?: PnwJ* SFirS ms3 ' Pnuara tn+ a1e'
  • 65.
    -a Senrs|Aatt<a : public sr,if gsc4Hertot ) t . reJur ri rrrs$=" trns$ +"c,ge=" 1a$e I grit' . Voicl d.^mog( ) ihruos f,rccpitan a 9 ' So p('l)rroBeca,, 4e"t5cj')) afe= @; rns$=Dtrtl) 3{- frultic Voia ap+trP.q^oSatI tln"* LrtcEtlc"l { s'o nC }rrroBeao ,' .,et'P,orn'o1*9*t i'): iP la3e<=O l rns6'= nutr ) g thrurl ntnr E'rc'crvtr("ser propvr'l-ues h Beo'n W'rU 3 Zl-- DeroocPg.xrnl--) Same ae fnevidr-s G.pP')' blr dcr"r qrc'fo init-rrrrha:1, derrrug- merhoc at+nbte8 ' //DerooCltnt'jcrva Same &s fre{ious o{pto' aP 8$r€Bcan ctasS is not irrp)ernmHog Jrudd,ng&qn) Dis{bsideBean "*.rft.ces tho oo[ f?rink o-ba* Can$gurin6 Ce]talDvts%ocIs ax Crrstuyn-liPeqcle "yr$ocLs' ft Contcnn6 oDlg &YJng fcqptied ilc'v4qa-Jt€J $rn.e ftr;rd pawS *qplie cl cc1*e5, EF St4ptirJ clcLlt?-s Connol- implarrrs Jn;rfo.Uzlng Btan, D;"&,nst6teBenn inrcvPcrres, So ConPg&ft CtrslcnDl;Pru'6Je rrshods 6fule oohry 101$ @, those sP'tngBeoos'
  • 66.
    $pr;og Ergprrs Irrrodea sP Jqizu)cro:- ,) &*tcl Inig*tcrn U) Grrsrnrittl Jqjeotcn 3) lnrctk ce Jrueucr" Xx*A,mre ;6,P1ftccs tlr can 8o &rr q$t4 inrcrft.6a iqeuloo Loe can PYDqrrneS [xrAware lorcrfuces aYe Jorcr&ce Sojeuicm ' iniecr onlg sPcfrt oi Ot/oa/-L: lo crle sPnngBeaVl cU6 t1 @ 0q,59' b€4n6.{}.4 ' Be"tfom'9At""te a^;naBea' e)as -, useR-o lo irllectr &aoPc'rroq ccnloi rr.d fu eYtr gPri ngBean da'l Or$'s9' ccr&tc^t' frpricctrron Cz"*c*t Aoow ---ruseftx to iQ)eoi A{Plca$croGtr*e^t cdrfctr!"/ fo cr!'r qrongBean otox penPcrrriog Intulace inianoo d-.'{ q7$nggeo'n AT"liCorbdr'j w ctbtg o(.Js as rgn-l?soddJ3v 'J J (| 016'sF' kc.ns' &ci6'3' BeanName'koc're to SPngbeao c1o''rs ---ruseftr to i.Ue'-r Fanid Spnng bmn tr*.itC EromPe n*"** -ta'&sx A e#xibt&'w xOIEl- 1y6rg1-, Zr*uft.re Qec-tloo uie ccm irlfc-t Undertagiog carilftJir*ta t-D ftnoggean ond coe can uge rheee @old'.^o* *o ktrot'l ab<* d+fr VatrL Setng &"rn Clrrrenj frninSBran c-'E,rs' [O exArnPle o{ryn oo txl*.r(z,teateaf{crn .rePfi &pPtr'.(rdatrl vr'xrdituf smil.
  • 67.
    i J-4 IP U*ur.Dt.hD 1r1n;p Q61pfto1-rrHe$ VolidcrHon 1og;c crnd Jn-rncr"l-;ze,ficn', 165;. &tilide rhe Spnng8caD cl&sses coirhqt d-;srn-d;og tbesu-uce cde 4 Qristing SpAngWnS *ro coe C1n &se Speoar &va cla'ss au)Dg a-b S BeonPotrfioc.ssc"r. % *r;^ the cless rrxzst ;rnplcYDenf or5"sf'kao"'P-''Y! , *-b*tl'",:::zg) -n 1il5 frwrk'rc cc'rlfcr-ios ? rnert^,od6 O puuuc obre* posiP.c.,s&e.* In;*x'o*la''COaF' P'?t": @,,m-,- ref,."st',t6 qtdru06io Oqb-/ -- useftrr forrbdjftJ EaoT P'pr'xdq opv' d,.gtt*-u7fue4 a (1) por;. obdr.i ;rrurP**rA?otrdrroliz"orc'D (O*t-Lff'*"'* ffJ ' ---t ^A(&RS a?w ccrstorn ';ov n/:t'lvd' 'r"--- ' d-o{' Ltl..'loafr( + crscft.o a -o5fu tseon pop,rrt<5 c&rct ccnpleu:nit-tarzanorr- |9f- Crrsrorn initt ) rrrrbod aod agr P*r'fr6fuc') r€Jor€ct l6rce avt syra$cd to onreSpnogroecrnd!r'eag$eBec'oPtftrDdsscd(*'"wntcl)or-/ir{{ils/eLotzd {oqrs orc cc'flmcn4'r rrurlple SpqBrans)' E,rElornpleolPllca$anan&anPcgtRocos<,/,.*"-.*-nka*ts'|Plrrnl-vuk<rrU h.acr,t $v€n on oi"loalrota -:7 AppticcrlicrrrConrext'oolcdrE acdoroolicao3'"t%-tt^t. "l--*'t*tt BeooPootP,rcess.' *ao3 )bB ctnfig*'L^ i'r giag&fi8urcrtton F;a ' hlhls i,3.nkjog ro,fi fJeo",Fc'ct*5 c6n-t6rn&4 *t r":*t*:ej* 'flf'i.,t' nrr6isrc.,,ed expildr h or"'9 P,''roir ' oaaBeo.-'PctP,octts (-) '1!1 I SprogBeanLlPecgcle DiaSrctrcr N'r' to BconFecto'U 6^k!lYtc,t'
  • 68.
    b{ Hx<-- -t- trF 3 ,-----..--{ q Fo a ;F g d c./ l. ig=llE Fl E-lAEl le *l 5 L, .! tF Xt l.l rO I /11 I F -ai lA ^Fl rb l?fl ree-61 s--'Izsl EdE Rvd9 a^. F C c-c J r-;----1 lETl I glt lF ?1 I E gl ih$I C Jl I tr dl l?B lsEjI r-'l .( '---+ ; j d '.--, ts l] { F. I o -./ g <.vA Fj 5 r i..-. /--"r 9l- f F-d I I lr xl 4'u : l}+l I I leq {1g' l}-B.i I I l-. Fl t l^ F 16 El L_l I ?l 9-' h' ,{3I t^l F .tr- a a
  • 69.
    3l2DO13 9:21 AM 'l 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 '18 19 20 2'l 22 -23 24 z5 26 27 28 29 30 3'1 32 34 35 36 39 40 41 42 43 44 46 47 48 49 50 51 54 56 58 59 60 ol 62 bJ 64 65 66 67 68 SpringApp on Interface lnjection and Bean posl proccessor lmpl _Demo.java_*___ public interface Demo { public String sayHelloo; ] ------.-------DemoBean.java--.---- import org.springframework.beans.BeansException; import org.springframework.beans,factory.BeanFactory; import org.springframework.beans.faclory.BeanFactoryAware. impon org.springframework.beans.factory.BeanNameAware; import org.springframework.contextApplicationContext; import org.spdngframework.context.ApplicationContextAware; public class DemoBean implements Demo,BeanNameAware.BeanFactoryAware,ApplicatjonContextAware t //sp."iat Bean properties - tn*rat,* fu ffi-"', e";'l'ffi private String bname; private BeanFactory factory; private ApplicationContext ctx; String msg; //setxI(c) for setter lnjection public void setMsg(String msg) { Systern.out.println(!!D€FroBean:setMsg(-)"): this.msg = 659 ) //method of ApplicationContextAware(t) public void setAlirjlioefctriqdffFtr(Apptieationconten dx) throws BeansException { System.out.println("DemoBean:setApplicationContext(_),,): this.ctx=ctx; ] //method of BeanFactoryAware(l) public void setBeanFactory(BeanFactory factory) lhrows BeansException { System.out. println("DemoBean:setBeanFrctoryC),') : this.factory=faclory; ] //method of BeanNameAware(l) pub[c void setBeanName(String name) [ System.out.println{"Demodean,setgeanName(-),) this.bname=name; ) public String sayHetlo0 { System.out.println("current bean id,,+bname); System.out.println("current bean is singleton?,'+ctx.issingleton(bname)); System.out.println("current beab is prototype?"+ctx.isproiotypeibnamei); System.out.println("all beans are',); String idn=st(.gglgeanDefi nitionNames0; for(int i=0;i<id.length;++i) { System.out.println(idfrl+"....1. ) relurn "Good morning:msg="+rn59; )/method i//class *----DemoCfg.xml----------------. --------------" <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sorinoframework.org/schema/beans', xmlns:xsi="http:/ wvw.w3.oro/200 ,, xmlns:p="http://www. sprinqframework.oro/schema/p,' roerlodS SrlPc'rnoi nd +4Le lic*t oo Page 1 of 2
  • 70.
    69 70 71 72 73 74 75 76 77 78 79 80 81 82 84 85 86 a7 88 89 90 91 94 96 o-7 98 99 100 101 102 103 104 105 106 107 108 109 1 '10 111 112 113 114 116 117 118 'r 40 312120139:27 AM xsi:schemaLocation="httg://www.sDrinqframework.orq/schema/beans hfto;//www.sorinoframework.oro/schema/beans/sorino-bear 'Ee!jq:ll4 {q$='My?r999!!g{/> ,'.J Beo Post ?roccssrrr ConPiS t'raH cm <bean id="db" class="DemoBean" > ' <property name="msg" value="hello"/> </bean> <bean id="df' class='lava.util.Date"/> </beans> ----DemoClient.java------------------------------ import org.springframework.context-suppoIt.FileSystemxmlApplicationcontextj public class Democlient { public slalic void main(String0 args) { //Activate Spring conlainer FileSystemXmlApplicationContext ctx=new FileSystemXmlApplicationContext('.srcDemoCfg.xml"); // get Spring Bean class obj Demo bob.i=(Demo)ctx.getBean('db")i // call B.method System.out.println(bobj,sayHello0)' )/method )/class r Prwess<r{ import java.utll.Date; import org.springframework.beans.BeansException; import org. springframework.beans.faetory.config. BeanPoslProcessor; public class MyProcessor implements BeanPostProcessor { @Override public Object postProcessBeforeleitialization(Object bean, String bname) throws BeansException { System.out.printlnC'MyProcessor; postProcessBeforelnitialization0")l if(bean instanceof DemoBean ) t DemoBean objl =(DemoBean)bean; objl.msg="hello1"' return objl; ) if(bean instanceof java.util-Date) t Date obj2=(Date)bean; obj2.setYear(130); return obj2; ) return bean: ) public Object postProcessAfterlnitialization(Object bean, String bname) throws BeansException { System.out.println("MyProcessor: postProcessAft erlnitialization0"); return bean; ] ) Page 2 of 2
  • 71.
    a- Fcrcrorg Becm: - -> fP Norrrar 6ec(n i6 .Notmar 96..r-, class ConP;6ured as De?eodepfBean fo ohjed uirl be initucd d;rec*lg Beon pop h ka,o P1.?)Pcdtg rescrr}crli ohieci otLro46' aP FactvgBeat c|oss obect @il) Dor A( Facr<q8ectt' r.r:itt bt i5 si.rglercn ot rnf Qocxrrces oF rbe aPPt'cafirm r) fap6p,,lavc (sPingrntoFr'< gftrnde.o,iava (sF""Sm sJ ftmoCPg'rmt (sf,n'rd fitj +; e*oBS' jara (cticnr Arr,. G) TSi q€an'J&va (h.m'5Bc"n) oalor/rora e'rCTen "---- l".rtog tsec.n s a3 a bcan lbo-t 6enerarcs ftpn&ntBeon tkn FectogBaaois con86u'rd iai€Lted ro prufrr61g lx't lhe rgutkniBecrr) gc^'r'6c/.f€d bg idet-rtd. Eg:- /*qfi id ="4b" class ='Testgeor'' / z Til5 inl(t%ce C6ofr'io5 Ne+Beao 5 tgw: [DEs)ur Pc'r &vc' vendor'. 6uo11 5 (orc'cle aNP ) Ve{Sico: 6.1" I 66ren 50trr Ce U'*U GtassFsb ex a5 beilts-io5el^al to claorla'd slro : wNN'nerkan6'6{3 Po ducs, nnr^r' rrrbeans 'cng 0 g"rOhir.tc I @ ouObtJTvt'L') ----- @ isSi"gtto" L) -t L**cto id;''db' cla35 : PcnoBerto"Pz zFrB^tts rp'me ="t1" r€P--'rb"i 7 ' I zl&t'n> "61" pro*'ag o? kmoBeon clrrss iP "Iest8eap" nrrrd fi^mng!ec'n +htn lbe El lrrutu"d (oirl be lqjetrtd u'ifi 'TestB€on" cusS Ohj' ip "Testgean" b s Facfo!$ Bron rben the "L'' P^ru"s oP "*'::." 61619 toilt b€ lnr4Hi coirh rhe wsulhnJ obe{r $t''tn b: TestBean coss o - - ( rl SprrngBao brroroes F.oorg Bcar, ohn ib trnplerrrnr' O-'S''F ' bean6'fc'ct<l't ' .latrr"iLia'n ' ' 3 rrrrbods r€rurns *. ,*'*1"1,trr".- *t rerulr),5 rhe tgPa 4 rs reJLc6n'9 tl earbe-r YLsa lKrLf o hiet*
  • 72.
    , *) proredrrreio deaf orirt derrlqarertn bb Str'qg ekpr: p"..ot${5pac"raf ( ---------tNCro _-____r J.amjtcdj -___-r c&ssNme: @ ] ,/-/resr Beas .3oyo c-lars lestBcon inrplarfrr,is kchoqB€a.rx gerobie$ t) thvdas Llceavtc,rr I .t .Y P,ghrcrrcf ctn^ Sctuxc€plrX'---- rrle,:------+Jetacla-ss ------' cLo$Nj&rnet-@ //ormo{aeaDicsa irnplernenrt [}- 0 $ Billic c&!S DerooDeatn a t Obrrf ohi; {a$h}clid{-_-+ lnso,tcod € -) g]l-KK ----+ok ttMse*c.i nff6od &L1rpcrrttaS Sert"r-x irarerflan prbri c V6'd €elobj t Ob#,j oUi ) { ,tu.' 6*=cbj ) t Fr.blc Sh"nO rl-UbleltuC) [-,,^,, .' lef,uo "orcrrd rrrnlq --f*i .6ni'h$rogLl" ? I S.o.p{"Obj (rou naftf '+o$,gcrClat5() /: Frbic { O hjett "rt*@Yn 1r:irb use^deBrrd F-rt r'gBeaq Fi)eHene-, Nerr---)prqjert -- java--rjava oppttr.,u',-lJ Pvq.,@r^Jar'€lsY't"soi! --- -,---, n (rro*c nain ctoss - ----+ Fn's h lg-a;- AddsP$aS L,Lrttlce l-o *x fr'{)qr l-iUrc,'l<s g,anO Righrcltzb. "#f;H:f-_=* qdd L brcyd ---,a 6pangla.ro e u:nY 2 5 stcf-Il:- Add rbe alole 'javc. rescuxce6 to *$rr.. Pl"gs&rdor cf $e PrDiet4. Qinnrcff .fo on Sur(( P'g -)NctJJ --3&oof5rl'&ar-+a1or, *Yn.., @ /1 Dero o 'J G! c' llblic ir*crftrre Derrrr I prrdrc. $*n, srgHrttoC)) $c0-AI rrsrog 5l-c? -r :- creafe Jcvcr pyqje..r in Netgear)s tD E oppn $0+ &als rKtbeanS 6'+'r;- puUit, neo jc.va .utir , f)rre ( )- ----l rerc.vp5 Dafrclcrrs obr c'J the tIaqlicnr 'bi
  • 73.
    pDrfc Cta:s get0bjcr*'13pei1 i refarn Dr.l^c-cloJs " , sp€cigica ttr tgp. 3- f1 p)ci c booler, n isbirg lctc1",i l l eope is Slnglcfoo o @.n tnre )--.gpecifi<5 rtre rrstrtrcru obje.t 3- 1 of rbe Qesclra* Obocc f/ftrnro6rmr-;ava fllldic C&sb DemoCUent { ' P. u ,o Csrnngt I &*€ s ) t the Qesc'lt rtr S o. n (' obi (tc!l'J nam€ i!' + obj gcl Cl6$c)) i /i6ou B'rnerhoas 8.0'P (" tesuti i5: '+rcvrlt); 6tcp-fl: -=, nex t r @ DrD -crrr'sla'{'t DoC4rne-rrf -=+ n€lb '->': l/A*'vor" sl'ioS conttinet .ffiffiy, 1ffiu,t',ca*lor(oruq.*;Cffiffi"X-rAqrlicrrhrm Cavrlexr crx=neu) /1$ct Spnng Wc'o ttLiYils cr4s [,,1 ftmo bhi--(prno )ox - g.,B".12(g; il..,.,,0 c# DenDoBecro 3r:dtotodtl f -O&.r ,uo = crr.6e*8n ., ("pj,"u n id - o? TesrBear) ftFffi t0,ro-. oul - pnn*ln ("o4, aoll;sou; );g@q u , ^,- -,. -,..., ^,.*" '. " , -Lr ./, r ta l< C) ) : Sr,;ng resrtt = bohl" 4gtlerro OJ P-fl :* Add coog';gr,rotltol 'B'e ro tt'e WW R'c cnn Sartce Pltg s ---t lrro -j ggftl..---> Xr"r L-- -axl{LDdqrrfn'f ==-,tr't*"t"t@ DrD g{ strcl id t -+ FntSh Do&rrncr6 p*,: [-Ue"nS I Zbeans > z*rLy1 d:"tb" crast ="Test0aan' /z z&n ;1 = "do'' cl&ss ="Dcmo 0eonn > ,*i*., ;:Je; *e= ""1'r-ti:: l:Xl"'i5T3:tr,I)ak cx^is o,red os Qc{rtthr oba*. 9, 2.c dn iYLdat J f"fr9l"J -1 Pun -rn.,;^af^@, *r6trnwr- fll-i6J-- ot+ &/*eA* o' 5'eP5 ff)p,t4Jic id : I -ilsPo.^.ro.D// 8€one'O/FNl;"; aLEcLn > llkt'ns> ohi r,:itt 5q injuled ,rrt$ Dc*. crc.,rA5 oh-rtrr t$"e
  • 74.
    i; $(PvEt;- Tun+€ clicni o{'Pttcdt{dh AilhlcfrdA io DernocuenJ ";cNQ -: f)'nFte the prrrdeAncd SirhgBrrrn Cl.o:Se: troS Ond erc. ^ crre desiSrrcd cos 4 O OrB.sP .irtti . @D CrdiohjeltEctogBe c,n . firuFruoryBeo.n PrDr r€$5rrg kcltrvutJean arl exz" ' loset cornrmnd line oS(.rocftrs rc$e cq'Plico$an 4 rerBeon LDE Bg*cticr cn frraierl ' irrofr/fitza ---=tBurl- ffYioclcss rr'rne : rl-nr q'e del,Jorcd n g'1,u * %,*'u, fc.cto"trBeant. O*nocj tcru- orqu-rneffs : laU tt 1 ,.' -ilrda---rft]-l.-a^ ^t"r,r &.in 1*, dr,r- ) /Ltro t-tlirin$:- '| '? '1^-11"r' "r' €eo.P'aer'kr is coged clir)Dd ' u + prfltnnnio$ fti,ccritndecr{ ArUe{-Foq ^ .**'-,^^ -'/ Tlere or{ loo rrrdcs to 6rrrhrniog tLt ctiiq ' ") 0 Elpriclt @rring '.- cor.,$gured e^rllcrh *r, coining ustng J '+ heft -1"o.'p"'6r'tt*s Lo'll be ContiB({ccr -"t o J lsmg*t4>, z0.fwrt'chw-arg> lc..3s 'J @ *uto -'o,ng',- ..^^^rte conBgu,rzd sxpucttly Wy:^ .J -r krr.t lroo po{unr1c5 @;11 oo +r.r Lran V-{n'n"A -, ffffi'T," itr ;:,ff"5..*-''Ie' otn^hj!<-Q zvan>k$l lirnik'fico orirb Aryldg [" 4,. .".^ s,-ptt, sl-ring popcrtles' -ftt'rocar'l'9 lsPoaslrole : 0 A.rrotoiriog ir not l-tss)ble 6n Strnpk' Sl anlg - rcfo'{eote tgoe fao Wft]'8 '/ @ &r*Crir,ng ft-pg Tise owbigtrcxrs Sitaolc'n -1ococ'rds &irnacnry J"6ecdons' ''' O ro*;""; r',r, .,tt. Y€.odc'bllit, oe Gn€+.coc'1lo" f;re and &-'ua*{
  • 75.
    Crzr/ oaJrore e@ WeCcn rrrrxe 6priDgconr€dnet perfisrroing @ h1ruo'-e (o,trroo,n = "SNarne ") dtrfocoirin$ ln 4 rrndes. @ ---+ Per{tnni $nricr lqiedioo based on kop pmprotics and &perrlerzt bec.na ias ncroe5 rootchlr)9- 4lupe (qu-bdire ='bTuP" '' ) ---, Perft:n rrr Sertcr f4jeott arr bc'se d fuPe r.rlf&-rng an kon pvop'ni$ aod defendc6 bean dS pa€n'rfetizf'l cotnsr(4(}trx' @ (fl cootrrucrcr (cr.rrotol* t* carorru<tur " ) ----+ perfisrmu 6l'{$ircffor Jtuealto"o usiog ddodclcc} (a,lro,uir. = "attroa"re<* '' ) -, pe,r6,rr,s eiroer crns)[$#*rffi.-ffi) ir yc, ?cnma ---: a? Bc4o ccAS Cqlll g&rff"*---) pe,r6,rr,3 eih.J crnsr,ttttt't |!9:J orb$1,.r iJe 'rt Pcn Porm5 Crn srrud<rJ in'jerHcrn Faample oppt;ccrllto j - Ca*"Sl"tc k.-ce) Deroo . jav cr. ---? S&me a5 Ptati oug clpp o kmokon. javc. fsv.ng 0e.,n ) Test8ean . java (Pae.de'.t 8eoo) DernoCPg' xvor (st,'iogcfu Bre) DernoCticr,t ';ava (ctrenr o{'nt) // Deroo "xva 6aroe crs {"nevioq'4 /ftmo&c.n' .lrrvt^ fl$ic class Dr'ogtorr rmp'lemenr6 flro6 s t /i*., PrDWnl JqtBec'rr tb; l/o-toto* @nsnotrcr Dean8eanC ) c *, o,P (' D".6q"*n : e - lr.ftrn gnsw'ot<n") ; zLJ
  • 76.
    /10e.qoCPd-.*t 2b4o.9s> /Uf,o$ id =fb Clcr!S-- Jefl,sc6rt / .;;lt .til *:,L*-=" l"lto' Iz Si&i + rab$0e({ arrtrshfet i i // l- Potaro C$nfiuj.rrl/ EemoBeao ( Ta,B*", rb) { 65.o=o: S o. P [ '' frnogs6e" 4- PararD o J //rnerUocl &4 &Jfu e'q crl'lcr'-, firbti c Void SerTb (Tes$er.n tb) { € o P("cxmo$rrr' : sfTb[-) wtfiod " ), lhlr. tb= Eb , {rrblrc SU"g *.gHa-ro 61 t irgran tgtodan*r,]tt3 Tqhf&on'nzs $ = "+Bb;; 5 // IeltBtr.n ic.rra ccsnsrnrohol ' )) - -/ Publlc t ccrss Test8ec.n /&"o f"fg'nr 3i'rn5 r'ts3; /ltrts .rsrroa &r se-tttnJ+jcrfirn pubic y6i4 ,.rfitg [5r'r"g m$) { llrts ' msg -- n t3 i ] / imptemtn-r to $'lngL) rrr,rhoc lnL{ic Sung tSh;n61; a t Yefaln *t8i L l'
  • 77.
    a- zlbeqo > L*c$id = "db" class = Denro Beao" zlbec.o s > //ftmo Cricnr -.pva. pLtbic clo56 DerooCuen* [ p s v rn fSr*ngrl fttss) a L l/ruivo-te SPYlnS Gmia;rr,t ChssParbXrntftpticcrrr on C:n ru t llner sg-rtg &r.n rihi d-qfotoire =' 9 N<.m6" 1 7 -I ft" ttu a 'fra D.,ooBe<rn class B€&o prDp<^! ood TestBran c krss Bec..,; cl ( bb) rrrr ,-*.hC+ b) or-l = rle&r 61og5paJb rmr ftpp)rz''hl <rn Conlex- C'Y"fr k the kc'oid Oaro o:ire = Demo 5eq1 = (gemo) crx ,gelBean ('au' ); )t Col- a. rnettncl S o. P (uou; . ssJHeuoL ) )j I ;cr sPdogCcnr8gurc*krn Bre roel be "4TuPe Codeing ssnngcPg krc".- //in ktrncfu.xrnt Zl0ocrype - -. -. z /.beoe5> zbecn id-'tr " c1c65 -"-lestBEoo' 2 zfrotl,.tg ,'11ens:"msS votueJha'l-o' I 2 lll.dln= z-btsrt id =-db" clcas :' DerroBean " aitrbo@irr =''4'TUPe" / z - L[r'e rhe &a@oo-,a Lb'fune TastBeaD zllaos2 ana rfre nn"UegrUh* "br" tgpe(rcstc<oo' 9n rnatiipc.fimes toirb Efa*"1- Utt$re ict. otho<':lse q"{qt*),gy nrJjJ Ic,i4 cumbi5urry t.H9" Noc""- lilrn you CarrB5urc SomeTestBean cicrss lSeooid's *reo fuTgOe mode c'P autur:rirtng D 4xf6&rite : Gmshru(tl COdeing Sp,yingcFg fite;- .{ l0ocrgpe rnat YCriSe CrmbiSt-,.ti Ptod€ms
  • 78.
    Zbcrra > /hn-r,n id-' tr" 4Pr1J|,eftg Ll?af)> zlVons> Oulo(I)il€ = or(fodeftCt 61q.q5 =" Te$B€c.n" ) rr!mez''rns8r1 Vakre-" t "tNh *t^.-*?:l*{ $'ov -r'n'4r. ,_-/ vt I I/ I c.lcrrs n& st l-r.rr .l--p<rmty;' z&n id='hb" clors= EmoBa"'" crrl&ocoire = Consrru o-rcrf --iR"for 61,d"SB-" codo'ng 6frhg Ccm$SLtrafio'r -3re :- lWo6'2 zb€on 'ld 1'tt' et&16 =''TestBeaD" > Zl^D[s% rrirn€ --n55" 1t''tote:*bellb" /z 4beao> Ltreun id=tb' c1435,=- DemoBean zlVcoos> fonevrratq lar-r ing Tat8rcn lns rt, e pdrc,rDfu,0e. J Cfhc",<-olre S1-.6Got<,fnr'r y"tunS : arr-lotoire J ut*te"+ " I z -_-_-@- C4mStrufL^/ th.ln SfrA nS Cclnt-cnrr,'t grrfirtmO - Qotnllrntilrn J4rurq g Nho. l-{T'rx6 iPcoe coohgured lsrb c.drlurtn"S 4 sxpLiclrc41i'''n9 * ?ffi ry * borh orJccoldn5 (taqlrct uridnS gtPtnta Sertcri{eooo rltq ouiocniril in One Sp'lngB'eoD ctn'sS ' Onggrre C*ftoi. l$ofrnrf.g Pzn enpbcr't Urtnng crnd Centcrln Otbr'v prrqv'n]<g"', b-,,iria3 1ai ll ePk l t +pu"a ) . Curfooldng {e'gf'rc-l+ tolnnS ptfc,-tns Consracafc* i4.,n* tlO 1? 6*t CLrtooif.og g'rPorcns )r$Uaorr CLocl erptrcit coftlg fletfrnrs - the o.grit mng t^ir eeftc4' Coqsh-rlclor iticrHon fuZ ot tlise S?rkl:s'{e*roo 14)rr bL e€&,kd " fh.r the c,ll*n; fh"t fr"&t^n $o'b 66nrcrrne6 (B€onfaqtduco*ccrru' { +oou** cc'ru-e}i csn{-cat.''^ ) t,{rtos gerko( Vorsa @ xf &.mo[&on c[r-snot conkan arrl ex{xicit ^ $!rrJ to.fe setu4%<rr16n hle ccrn f. tre expict aP both Cu-tfooirYlU-
  • 79.
    L0bite usiDg Spriogcortt, 6rbe'r Java tf.hnologies ib i5 fecorD€nded hr placa $e logic o€ attiva-Fing SfJ'iog C{tor.dn€/l &nd g€tttn3 Sftnng Beato clcrls oQierr in one F me exer'l-Lbl crn bloc.k ccri,l e d ccfn SYtucf&i tcrt) 6t Lri c b [ocr< - + fi'n"U u,gbgL Ib i5 reroocnded to cc'rt EusiDess rnebocl C&6) SPnDg Eeao Clio("d App Awi/ tuing frame Apprer / ctgp+ &rvter Prq .)5P Pr3 6h{hs App JsFAPP P)ace ro o$ivale sPnng Crsoirrine4 ctnd ro getsP,loggean des6 ohj &rostrc'cfol / S*rf . Ut.r+ ftrrsrrulcr / slzir..,. blook l initC) CorDSr&aJz" I Storic b0+ f inirc ) z-t I PU.t]i c roid ispfnitt ) {_ _- - ---'1 "/.> cost&cfrd /Soui. blocta 64 gl-rat5, Acficm class Gmthulru{ l*. btoc.!-dF Homged Ber*n Pace 16 corr b'roertrods of sp*ng8enn Eveo bandt'n g rn crbocts &rqe serv;ce(-,*) / aoX^x e'J L'/" -"--"/.y €xealre(-r-r*' -) "P Errc*s Auron dass b.rrrrfiod oP llaocged Sear1
  • 80.
    fP Java olebo?pl)cction u6es opringAPI (rtr"d garg APJ) in tbe toeb rcsoerce pyoflrcrms tben trne Sp6r€ Apr relarcd rrD; n iaY gle sboatd be cdde d l-o CLAIII;aI H oDd 6pnn{Ap1 retrfid rc4tn and dePeDdent iot Ftes sFnrrd !e crc{ded irr r,]EB-J^1F/ltb lot*',,, jar eie e ddded fD C LAsnpAr H to)rl be used bg iovcr ComPt)e"r dtrr;og the (orfD'] idfi atl 0'f" .J tncby€ Socc(.e pyDgramo L6en,ner ft35 ) to 'f.cq,n;ze Sf dng c.Pi. qjar Filee qdded ) NEB-INF f iU ftraer Loirr be used Se{vteJ Contdod /j5p confrd r€.( ho re<og nize ond v; c6eg gpring api ') Reglt 6<t ohieci i6 Dor a Serlaizable ohJect ' so' @e cod E seocl Qesurtgef ohleu -7 ove( $e netaorv ' To solve 15''t problero lbe{e ore troo Goluhons -J sola$onO :- ugs Roco6€-rs insrcod o? Be$t-trt$et --2 --'' I?oarsers are Se'rl&li7&be ohiecrs ood u:e cGo 6e|-rl lhero over ftp nftocrt h - r -/' Rocoters - -> All collec$(In fiornec'rc;r I" orare*s . 50 Loe cctn €end rbero ove'r the r8-r{rrcnk ' ,"__;, ;r;;.; ";-;;,,* ou.r ru co,re,j'srrrlqroelrdk Dcdas.{udq}e '- r'r-t ?ft "' IdYf 6eft id't/zq,-ble- 0*a$rtuc-rures (lire ArroiLl6t ord e-rc"' )o'e Senia-t'rz<'l:teu S0ltrdon@ it good .'-^^ '{-,p. trkl coorc'n3 - -> rP gan &re lbop,,nS 16 lrtPolm onl9 Read o1x'r'Ho"t i^rn 1: coirh Non- &nr,von'rzed o*tt'-*.,*' R'r B**tPt*H;"i1^f I : -, Jp rou crye mgnq rd ?e'r*,,m borh Read "tt.-:"#i::H"*"*: ptn Smft:rr rt tt{r{V-,o$ toth fuocbroruzed 96'655c'c'kc-rf ror --,, (g3:- vecrt", tosbT&be ond erc " ' ; -/ -) frleo$ougb OeK,"(F- is rgt fiee ib is rtrt recornerded lo Scnd Pesurr5et o hie4' ftot. &rrinorioolcr6cr to 6arrcelrrlcr d;rettg ' Xt it vt{zr.icnled rD keep rhe Ytr$(ds oe : pfsci,t*r;t In Col le*rcrrrFrarneux,rk hrr^err..cru< onl eenA rhaf Dc.tt 56-a t*r.t"e to _, kem"Hct ).or1t^l .
  • 81.
    urtdeteranding probtero rocoPg #)e records o? l2e sar r3+ o$ of ,{rraXlls t 0rra Srn^ct<r6 gFR r s (Res&{rgrr obj ) cl( YAJ q IrSa - V7- <jb I ', Qfnq u,^Jl ALa E-ocb eemeoi Reart t&t csntui n 5 e6ch, rtCcrd Of Arra6l-i sr obj ) oP ArrcrdLi 6i Gllosro opl$ one ohje* or o h me ' Eacr' vecord oP mutliPle vques incluct ing rrxJliible 6$e{5 ' so) toe carl c coPj Qesrtr 3<-r to eoch) eleroeDt dF Arrog List dtreull . ----> To &lv€ 1hr aboYe obreLh on& add IfBr here, thts urel degned &vq cld56 ii genefoJrg q Jhvc{oec,n allli'ng dn d ]b t5 crued cs v,o ' closs / D't' O ttt'*t probero KeeP ec'cb f,ecurc{ vctlLr€s in USer Deened Jav aclcLs ohjeif tD eocb elerncot oG orro4Li6i cts $roon bolur't Cvoue Objeo ctess) (D*atrc'ns f<,r OhPtr Qesul t 6cf obj rtcoxd e fo ,l"c'6 L;s f clcrs s ) e leroeD tS Usiog V'o'tcrss/O"r;Po, i4tc o -lroosFcl Sr,tlenlBeao (o r'o ctossJv'o ctoss) pabric ctos6 Srr,&nlBeon :prt=$-e"elA'gSE$e f L>maodi r(Icq /bt6o ftruftt{-ies int SDo; SMng sr,&rne ; Sfrir,g 6cdd ; // t"ltite ser*s { gen'cnr ... I !9!E:- ohieLrs erdded to '*re elemenrS oF Coleu{6nFrarr€c:s6k Drftt6n&cr''Ye trrY€n c.5 Senncriznjcle Ohlerrs inatder to &nd Gratricrrframerl:O& D:rro5wuGuYe Ovfi ltre nerrl:o.tk ' 61q6t be
  • 82.
    Logicto coeg rterecor.lo o? Re"urt& obu tu Att$!6I , 6tt*ctfr rr.r fiesurr Se-r . fftrqList o'l- = n€ro ;1hre (t6 ne'rr () ) ftrrc.gList(;; t ll C* r" obo ft'r D'r'O/v'o clctss l'nving eoc-b 'recatsd ce Qautr&r ob5 6t : coo' t"r.ke 6tzrterreruC); J = ur' ero."r"6'utol ('e'* * Ro,. St<'ae'rr"i' ohj to rbe elero€nr6 f Ancrglisl oUrs ) olse Single 611 [Awc,XLtsr o4eu ) big Valtre bg Corobinlng rntlilp le Objer and its cl&ss 16 ftrjel 5rt,a.nrBeoo 6i -*n€r' $i2d36-Qeoot) i st. e*6",u (rs'gerlot tr)) ; 6t . sersrr,rne [ts'gu6]ong C") ) I 6r. sersoaa (rs'get6!'t"g Ca))l // ocrd eoc1., D.T.0 ctos6 /V'o ctass ol-add c8r) j l llroi'tte 'rs (Pescrrt6e-t ohit *) ,,---. Stnce, lgg' Oq;€c ot ve4wserrtlng /-" frrrilliplt SitoPle Vqlurs 4 YrT l$plf indivrduat lolueg" so, it 15 (cille d V 0, clcrsg Eochr recot d cF ----"..R",iiid ftra is mcrnsPevrrg ku'n it srrtrrnS 6oe singt biS lslue oh.ltlJ ftrroiJU6t Th;{s " Sb' objert iS co.t'ted D T o Lc.v' Pesert,flt t-o Arro4Lisr in ulrclhs rce,.a Thjs 6UJsf- is hcrlnsPta rbe oai"'tnxa Dcrra Tr<.rrsttr cUlrr* orqd ts da*E s coUzd Ya.ia bCd 55b rqrrrsb bCa Scrdd:hUd
  • 83.
    !1[ere clicl qouuse co]l€c]i6nFlo Dcda SlTQctQYr 3 in 9(I'.f 1>m;eu'1. o To Seo - Qesurt 5et objed yeccr( d s ove'r tbe perLocn lc c{s discul secl d.bc|r @ rLfirre garheriog JDBc propetries P'om PrDberries file roe need iqva'uti i ' &oper ti es @ ro rrnrnroro JNDI profr'1ieg uoe need !1"+ Dor€.SYtrt'cfilr€S @ .i.o rrleiDf'uo nai progrties ic'vct " uril ' fiop^ties closs @ rr, sesstorilroct'io$ rc rnc'ok,,o ht^ge c''"o'nr oP Dcfa *frff'ff::. @ f,lh,t. d'eveloping S'{rniDg c(Ppn5 io raratnt(err' buge q'-'61"1 Og tT::"t @ -fu mdu-Dt.dn hrrge ctrrccfoi oP cl..c'rc' tolrb 6c[f 96 5ltos €) To &snstrcccf 6u&u c-tod ccdoe' Arr:- Aos'"- Nh€re did gou use Javo0ectn in gcxl1 ?tDieuS O A5 v'o ccts6 | D'r'o trt'"s c0blle copgiog Gllecflcfn Frarnet'ct{k fLjasrrucfuYr A5 t1c!cF ore1 Qesoc'rce tDhi le l)elelDPing A5 sf$o$Bcctn in grxog ftPPf)s A5 h lcfr rrcr Pe'{ 515.tr nJ ct'tsS in ! 116aFctS o? (&sctt ftr io lvc r { tl'uca drcld tecf<rre bcrr ed Pnrieus G) +be"ndle c.Pfm s (rfUl re rrn^n{cr;ning rrotue ). bc.ge orroanf oP -) G) ^. Helpelcoi6 in &ssicirJrc'c-t<n9' DoJtt ct6 Sinqle &Saioo cd$rib(Ire lnliniProietr irrPo ".- J t is based on llvc? ard'itc$Lr{e Spriog CcT e n'p'dute dPplic&rtdn acfS JsP pYograms ctcl6 qs yl<rolc'xer S&tet PrDgrarn ucl3 as Ccr"rrota 6s llodetLrqex c'?PD fes(Irl ccs Lote1 T€sou{ce " --)
  • 84.
    (rrxgtaton tqt. )(yierrrq{ er) s€kaDesg: |ff,o*TJ @._4r.,_lrl!I_6.,l ^ :{rnng _ Errplogf e uT<.qC DBs)@ Pnfie4].App CrmrrDuC/dsnltq!) qqr)Broro f<" t riodrxl ----+ Senl€r pfogram PctsSes dolz( tD Qesutt ' jsp --- "tb€ Sptr.rgBeun cgss (modelB€qn) copt{s using (t+rc$t otfYla!+ts. fhe recarrdg Resurr3eJ obial lo clca6 ohjerls , Enu;'tunwft(t"',et) J @ frwagList €lern&rt6 uetog EmpBe",n closse.s llr,n8eovtcr fu /.rlr,u no.lq -;ouq /,a,.*s j > l'l o&t Eeon .& ta l"ctax _, o ErnpBcon .kvq /,r)u^ Pr ' '-J i* f;qq l! clAss pArH / l--' EmpBcan . clr.r ,r:- l---t ho*r O16.3. rr rrr J - rur lrib &rdc,r hrp: //iqarhtst tto>olPntetlwJ morn' rtrtl v Spnhg' js'l / commdns - logsrnq 'ic,/ oJdbcl+'ia{ -/ -> -to ese Jqva cless i., rrpwrtt*,-stbe pbrcd io rhe pocra.Se creard lerdescrrt '*r#: ^*-:?;il:/;:::'" S'a'r' Thar mecrns sP cao t ure rc,vc^.#"#1.#ff, nr'"' . R" *te Sarre cocle of ohj€ &agy&rn ep<rr crlfrn @ 4 *e pc.feuo, €g * @ NEB-INF f--+ *.jotLz) Neb. x rf) )
  • 85.
    tto rurcr oPannorrioos O Arpomriong &n ooct'-cn^rortan -+ useRrr 6ri te gocrcfi o5 javc-'^ ePt dccsrr(nf cttl o't) @Po-t, p;'*t g"ut'tt''* @F -* @rh-'os anl etc'^ ' --+ inlrodrrced &om idK!'i' @ Anrprrruons 8'r Pnogcmmlog -: useful &rr mercAotzt''rescutce cft oFttolon S @vetrtde @H,rohli"a @Pest"t @Fo"w*"r anA eF"' netr,.Dafa rr4og dc'tt ob* dcto"' - " *1,": ;:*;il{ nffi:l::' s'erkrr'ance bcz ),$L paJsct{s c"r€ l'"*tl trrJSh' glos to P$cesg Xmt dr-tr'rnerurs' ' --> Aoooraricrns 'ive Bc.a Pre^iuititg 4 rncxuPict'trt'n id'l tgood pPtttr'nce ' --t AII Javc^ TeatnoloSes irnr arc desixr'c't bsed tm Jdv-l's+ ere skfPo/'lo$ : A,r'notc^tio's krsed Plogrornicn -. ,. ,. o.y ,'{R?.x . - Ej:- Sp;rya't + , Hlberrule 3'?+' 6tdut5 ?')" 8f,83'x ' $prvl€t3'xand eic'-" '---+ toe Con o.q/ptg ftnnofariocrs ol 3 leu€'l v O Besoarce loef ( on cass/InrcrP-re ) : I nubod kr'et (^ j*c,*ahoct) - EJ Ferd )euel ( oo llember vo rade ) - and *q clre ott(rnc're P^ the Xm) ftte bc"se d OF/ratlcrn5 . It is tiKe xrn I tlnder6taodiog AnretalioDs :- AnnoruHonS Orc ic(va 6+arernea/- lrorr'trr., Sesour ce Con€;SurccHcrn Sgnrc.x :- 6 z Annotc*ioo -mme > ---+'inrrod-uced fi.rq .rdr t's
  • 86.
    Tg GnBgr-xc Sp.;ngBeancrteccr) c^e the St'o-i.,3 anr,okrfionE:- o+loaluz a) @Compooent -> rrc.keg iovcl ctcrss os efrtng Eaon aod 616 &btc'ale fot 21ag6(bi Pa tha*auocA inPctlon b) @ govi" recoroeod e d io use Rt, &o." Ia<^ 81''"'Xt*n/ (conra'rtiog !as;6<r.s l-ogit) c)@ Rqrsi'ttxg Ecme os @lornpcoe.* bL.t fo use fiii DAo s Bne S;mng (crnla.,rng Peraisterne tqi c) T0 Frf.rrm deff'ndcrg injewc'n cfus vearnco/'ea @ Be{i-h$ @vat,re --+ to iQfa'r $mt1g dile'/ arro4wlues, Llsi vcrtuaeE @{b*ut , r fu lotcd o-lues to rePcYcoce lgPe bee'n p'Ffi-e{ @A*Wt".a ---------t to erxf,-ble olrbtoirlng crn b€o/n PrDfr,,/dq ' tDe 3. ,Stitt Annolaltn' =a- noi reodt to ,eg d"P&* bJttcs Era n"+,let)ga4( -' fine bant PmPatt'cr' x) In Sping enviroorrrer* ur 3eocru"0 use tquth,ux ttl p*Rrrm llpn&nti I'gerttoos ' -7 F<n sprrng ?.b tased Ac.rot'.tiring *Pu alpn 0 oP rhe Saprirncnl<.ng h^&* .- g,eo cln Or/oa/>ore --> L? @rutoc,:;'rd &nnohatloq is pc.ced e6 fie top oP serXxx [-) rhon il- ]s SoPlr{ gertu( }Ydeo-tlcrq taseJ cru}oo:iring ZP @A,rm-i.red annofcilidr) is plareA cnrr rbe fap crfl goP- CanstrLrct-q f,ru'.do Lued arriacoivin3 ff @A,ao"i"a r0nno6r6o, i< plater{ 6v rht t''t 4 &tkx lxe"ncn to-r"J aunotin; , brt Xr.,r P;rs c'nd z4n"oulong parorn (crn5hrrcfor *len ir is Fefa d.r,r1 t5u fu
  • 87.
    or fas/roi3 I 'A Spring 2.5Applicaiton on Annotations (f OCl [41pf i rart.,o r ) 3 ------19.U /i // Testjava (Spdng lnterface) ' public interface Test 6{ 7 public String sayHeltoQ: *) 9 --------TestBeanjava_;, //TeslBeanjava "- ' '-'- -- $"- I : import org.springftamework.stereotype."; -> g€ef/rce o').oro$ 6r) 1? import org.springframework.beans.factory.annotation..; _S@,{.*a.:rrea dnrDt<fl oo ' import java.util.r; + Rr D,E ','(* t, - ii gsu*i". // lle cao dts6 place @rr,gonent fw.t es rte iJarl,r dors as SPong Bcan ./ 16 public class TestBean implements Test 1? { J:: // Bean property '- Dated; r-'' iefu,rrnce $e Bra n pmgml : W tvpe) on bean property .- { ?4 this.d=d; f]*n .f/ pubtic String sayHefloo .: { il _ return "good morning "+d.tostring0. :.4(; ) jj) : ---------Democfg.xml---- 'I ' <beans xmlns="$p44g{€pugta!0cwotk.oro/schema/beans" ernce ire a}D't add @ $"uice , @orn2org4.r anmrcrr air ir! top 4 predeftne d laya.(t$t , bft clq)r . so, ':./ :i x1?:1ig'ff,t;"jflffi_ t,r .rr'st &n$6rre rlor oiax io spr,gcFX $re .;l as Spnn5 Rzarn 1l lr$o:/,fwvw.sp4nolamewdfti sorino_aoo_2.5.xsd i . !++tluv$*.sor!nolrame*o"l :',. '' ii 5gontextannotation-config /> f> rn4v/?t fie sF'iog&'nlai rt{ to €'ognj2e Goa cae 4Dnol-'rttoos y; .t-?cond:comF6nEnEGn-uase-package=,'.,, /> --> l: <bean id=,'tb,' class=',TestBean,,/> {i <bean id=,df, class="java.util.Date,,/> r"-r.: </beans> ' , // Testclient.java Jo,r Bt6 ln cllssp*ft+ :- spiog lcr/ coyr r.l importorg.springframework.context.support.*; : public class Testclient i;,' 1 public static void main(Sking[ args) ' u FilesystemXmrAppricationcontext ch=new FiresystemxmrAppricationcontextc,oemocfg.xmr,,); . I esr oeanobl=(l est)cu.getBean(,'tb,'); .: System.out.prinfln('tesultis',+beanobj.sayHe o0); 1". tjt. Illmain ---------___TestClient.iava_____________ // Testclient.iava Jo" Bt6 ln cllssp*ft+ :- spnog lcr/ coynmrrt,s -,o56ln8.Jol import org.springframework.context.support.*; (sPi"g z's ) public class Testclient t public static void main(Sking[ args) t FileSystemxmlApplicationContext ch=new FilesystemxmlApplicationContexl(,DemoCfg.xml,,); Test beanobj=(f est)cU. getBean(,'tb,'); System.out.println('tesult is',+beanobj.sayHe o0); Illmain y/class ,l' Spring 3.x Application on Annotalions(toc) . -------------Tesflnter.java-___-______ --,{rruglq.ra..) Page 1 of 3
  • 88.
    #{''}-, sp",l"g Eair.e-*ionla,-1,urryc 3rl20139:46 AM i0 72 73 ?4 75 76 t'8 ;9 30 32 {J ai 8$ arg 9',: t5 ti{i ':i)l ".tt ': li i ir* ",1: 11-i ., ai ',Itt i lt ':2. : ": 2? :2.t '?,; :la ",2: :21i ') l"j, package P l: public interface Testlnter { public String sayHelloQ; TestBean.iava----- package pl: import iava.util.Date; import java.util.List; import javax.annotation.Resource; imDort iavax.annotation.Resources; imbort brg.springlramework.beans.factory.annotation.Value; import org.springframework.stereotype.Componenti import org.springiframework.stereotype.Service; racomoonentc'tb") l-o &on id iirttic itass rdsTB.-ean implements Testlnter { //Bean Prooertv i;;A;;;i;--, rcRhence TUp€ $er'n pnr[€r*5 @Value('1o") ql4)- int no; -J Sim0e tkc,n gn)ffrc5 iqje*s Valu a 1p ' to prop<rrq " no " L*!13' $uo lNO",-"st'"'rt"' h *",1 t*, Il* ftrastqr*crv< ,ci( { b{ itiar--fD ti4aaDate d1;-*'' - ' /-:S#'.gEx0Y?ssl6r t* J]l- t u.r lx/o' q's*-w'- @Value("fi (Sva.util.Arrays).aslist(' lndia','Bharat,'Hindustan'))") String nicknamesfl;]l ]r% tU0e trDlv-f-j ^ -.*.,,,,* e-, ffi11;.f'% 15 g$f!".""^srru*uvr frrrm o*"6 (ri;s List *,raStrr.,rlre Filt k i{t;ftI-fb (Dl lJE nC&K td,'O fr 3)v.5 LisrDarrf, @Value('S{f(iava.util.Arrays).ggtig!(Red','Blue','Green')]') List colors;r-r jao.uJil. List rgr( ^ ^..0, --. t'^^,-),^-, -,-.*^ .-9.*arc np p-fYa .--+ parforwrg *tltthnry -Jiclfl on vefax(n c( +Jt4 @ResburcL(name="sd') . 1,-',,-. ^^.,o, ffiFi#=,0"'lj6'i[J.t?r-'€(.,( l"iqc no I rsl { d1=d; i @Resource(name="Up') rt Y.gq lin€ no ' 13 tr public void setu 1(UseiBean u l) { this.ul=u1; ] public String sayHello0 t System.out.println("no"tno) ; System.out.println("dl "+d1 .toString0): System.out.println("nicknames"); for(int i=0;i<nicknames.length;i++) System.out.println(nicknameslil): System.out.println("Colors="+colors.toString0); System.out.println("u 1 ="+u 1 ); return "Good Morning"; ) 1 :Jl package p1; :. i import org.springframework.stereotype.*; Cdn Gleo uie @(uopcnrer* OnnsrcU{on ' @service('ub) f w€ pi,rL5[iE-Essn-serBean -- PaseT-i3-
  • 89.
    3rl2013 9:46 AM 13?{ 1 liB String msg="Hello World"' .139 140 public Stdng tostringo i41' t .,42 143 ] 'i44 |.l 45 ----DateFactoryBean java-------- i40 package pl; 447 i 43 import org.springftamework.beans.factory.FacloryBean; 1 4g import org.springframework.stereotype.Component; '!5-1 @Component('dfb") return "DemoBean.msg"+msg; '&xfcrob -3la [)i1'j<'r . Cn clf, qr0{lcrt -e'l'O'PcI Jal '{arc * l lo,-f.L!'ic'{ 0lfrDeH r€d Fecnlg Beon ct., q Y€Jc{tnio t *.!a.cr-ti t ' &rtE ctt6s ohjeat 'public class DateFac{oryBean implements FactoryBean t public Object gelobjecto throws Exception { . retumjgllqye4!!.qqlq} -> lcecrttn-t og€_rf I cornrDoDs - lo&io3 'i qr (cotterr ftom srdog r's ) o16 ' S$ - c,(Sh, - 3 .l 'o 'PLL" iat or1. sf 'LeanS -3 'o ' gci 'ia{ 157 public Class getobjectType0 { i i;l retum java.util.Date.class; j$9 ) i ait public boolean issingleton0 { 131 return false: ;-- i 1e: 'tta;, I i 65 ------------Testclientjava--------- ie6 package p'l; : -'rE import org.springftamework.context.annotation.AnnotationConfigApplicationConte)d; .: $9 import org.springframework.conlext.support.*; ':7Q .7: public class Testclient .::, fublrcstat'c void main(strins s0) a fttuHot 9&,"r +n'hrl"{""t : 7i; AnnotationconligApplicationcontext ch = new AnnotationconfigApplicationcontext0;--a An**- -'* ..*t-)).tc,l ctx.scanf'D1"): //o1 is the oackaoe name - cl|q +r wrv -' ck.relresh0; --ci src'ns Ae ora-cb.a o( l>t ?oe!'a1a "'l Testlnter test=Cfestlnter)ctx.getBean("tb"); :!, I System.out.println("result is"+test.sayHello0); ':! I -: ^ ) L-, To mar" Cr6arn€,( tocrli ra t{c cl"+e; .. r e E:nrps rj trdoq F!ft?g5srr'06s€s ''r:il: ,r"r,il:f +- *fu;'^' t' 'l-----r 'Y ' clors (F ) Jc,t *r.s ;n a-,ssPl'{it r) ,") 3) 4) s) s) 6&i . sF 6r.;.+ 6q.rf i N"{}.1- iur.e" "t 9xo,v,,r-r oti*i1n Polda t Page 3 of 3
  • 90.
    R" Sfriog 5x 1l1rhs$ usiot annofafions b,sed DepcnderrS ftieo-h'ctn crqptice-hlon bc'scd - ong xrnr &tes Yee<,r 6{?n @ o( rrnrch ors Lnd,"cq ! : @r.,iu.r ------+ h ctrnBgc're exPlicib depet'dtnca r,'ie4lcro ,.- @PoatGn6irctti ----+ to ConPi€ure or'9rorD ioit rrrerhool - @ P*esrroX > tT CooF€urc custom deswo5 T*' , @ s,oPe -- ---- - -> to Qeo springBe'on scope (sioglfgotorele ) '- @G.por.r*5con to Y€cogni?e sprrng*eans 1d csotrrces lbcrf are ffi..f,* 4'r4 rc*ar""w^ A* ,, tr^..,n6crs .,"ft, - x) trol $prrogz'o bc'xd Ixplicit ftrnswoeRJ' )niecrtcro ru*"'tgh Arnror'$crs 'e ft:/ v open $ o$ suPri'rrnrL'Ye [-nnao..t Si]encm :::U:t" frT6 [" *d,** x) Pt sPnn35 o onnotcr-Hons bascd exc'rnPle c{Pi'}co}lc.t Yerd ! lrc,nd{Xrl- $iucrn c'f' otf oalrs fie ifiFil€s. .^.. 1 a r.5flrn -deitrub . x) ft., spxo33.o anrotrrHcros bosecl e^arr{re o{Prr custum -t' "' t / @P*rcanst'"1r', rshods Ccm€rgurarton re?"r capn@ 4 fte ot[ot[ re ..,nda-'r ge"o"*l / +) q.,{ gpi,n$3'O OnnouJdons bc'*ed frcrurgk c.nDa'itJoPm ct'ui- onl idesrs it aponQ)4 A m[or/rj hdhdd,f -+ Openiog ot*q C.recrhnS P'Die4t in llSEcliPse f,DE File rrrcou ------+ irnpc* ----r Grcnercrl ----) EdisHnS PrDi€rfS io uo'r1aga< o *x* &rewr,5 Fn;sh NOIE:- ^n,'. NoEioS tolth AnnorcrrlcrrBosed D#'odecq&jer-rlon' iF Dq."'Aenca . ,l .--,1 ;"rr **i***, arr dcnre diretdq erq Bu.nP'oror'rcr **" tb*: d oo necucigJ 4 r,JntHng se*cx (-lrrrtoo., &il6rt-t."tu6 "'€-lcfea to .Iqle*tooS' 6tIoalzorl T(sutfqrt [b1e-t-t- ro anotk',^l BeanCXerE Fotof1 *fu
  • 91.
    i .krg".,",' .-"1 LjLc4l1 Glso cse Q.In;et annutafio4 otlobllr'ri td ciJo Pt! Fcq €xpttar setlc. JqccFl oo lo rlDc e -rir- -fi"sb.rn. . 3/0/2013 9:46 AM >>>>>>>>>>>>Example Applications on Spring Annotations(lOo)>>>>>>>>>>>> Same as qPr' e "f yt("y""'fl:lTi:lrt"T1-- - - &1 Pne6 in cLA6sPAft+"'-.pitlio"s @io'h'u on public interface Dem -- /, tr.,] tnnm6Lar<s+ /jovox ' iqi..r 'i..'t'/z ., t public String sayHello0i ) ______DemoBean.iava__F_________ import javax.injectin;e-a- -; &' @ tn;..* import org.springframework.beans.factory.annotation.Value; --) li'| @ wt< e i$8l1,if;3lli$TFilfll'i:*-t*"'component - R" @."-;("Li public class Dedo*Efean implements Demo { int aoe: 1 ' Stnn! name;l Bir nPo?ernq5 float avg; J @lnject public DemoBean(@Value('30")int age, @Value("Raja")String name, @Vatue("50.67")float avg) { this.age = age; --- this.name = name; ,rgre @ varue GDnokrllo.t ir{Je(ts fie v..qe 6 t Pcrrc'met(rs oJ-rd $f i{ ] this avg = avg; |nr&tlff(,| v.lt(rds &ye oJgitn€d b $rtn prq:c'rrl'! ' public String sayHello0 t return "Welcome to Spring age= "+age+" name= "+name+" avg= "+avg' ) ) DemoClient.iava----- import org.springframework.context.ApplicationContext; 1 -2 J 4 5 o 7 I I 10 11 12 13 14 15 16 17 18 '19 20 21 22 24 25 ?6 27 29 30 import org.springftamework.context.annotation.AnnotationconligApplicationContext; 31 import org.springframework.context.support.ClassPathxmlApplicationContext; 32 34 35 36 39 40 4'l 42 43 M 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 ot 68 public class Democlient { public static void main(String throws Exception { Demo lir'e nO , ll // calls B.method of SpringBean String result = dl.sayHello0; System.out.println(result); 3rl_R*1':g_ ::'i:il::_l Tri::_-15) (5", envir obrhc'a ) App.prop€rties jdbc.driver=oracle jdbc.driver.OracleDriver idbc.url=idbc:oracle:thin:@localhost: 1 521 :xe db.user=noc1 db.pwd=nocl -_---_-select. java____ _______ package p1; public interface Select t public void readDBDetailsO; ) --------SeleclBean.java---------- package p1; imporl org.springframework.beans.faclory.annotation.Value; AGrvatts -$,e anroralioos bsei lin i C/'jnfcttr(Jl ' jaretts in ct ss P4tr+ :- Sotr,e os appn@ 6?-et :Inicr-rs Vatoe Gtl4cltJ import org.springframework.context.annotation.lmportResource; import org.springframework.stereot p rcr orso (,.e *,,*.5r'*#r"'co!flpl{"lh*t Brc(Bcz r,-g.r*s &re )a co6rX4""a #r"e) @lmEIlBgsourcel"classpath :/SpringCfg.xml") @ffiiGii1qgi.'rluoi,;r public class SeleAE ean implements Select t 3ir$eun@m:eQltffi+tu popnes p;re (rep<^ 1;n< "'o"' 60) Paoe 1 of 4 kc-- db-,-,s.. ' k 1 off. popotr.'.* h't ro " Lul4me pYDP"5.
  • 92.
    3/8/2013 9:4&A 70 Stringpwd; 71 @Ovenide privale @ValueC'${db.pwdl') f,re6tlnano r s I 72 public void readDBDetails0 { ? 73 System.out.println("userName="+uname); b B "rrhod , 74 System.out.println("t"""*o16="+pwd); I i-pt"t'rtu * 75J 76) 77 --springcfg.xml-- 78 <?xml version=" 1 .0 ' encoding="UTF-8"?> 79 80 81 82 83 84 85 86 87 88 89 90 xsi:schemaLocationrillBJ&d€pgShg.ofg/colg http://cxf.aoache.orq/schemas/core.xsd 91 </beans> 92 ---_--------Setectctientjava------_93 package p1: 94 import org.springframework.context.support.ClassPathxmlApplicationConlext: 95 public class Selectclient e6{ 97 public static void main(Saing0 args) e8{ 99 System.out.println('main0:Selectclient); 100 ClassPathxmlApplicationcontext ctx=new ClassPathxmlApplicationcontext("Spdngcfg.xml"): 101 Selectbobj=(Select)ctx.getBean('sb"); 102 bobi.readDBDetailso; 103 i 104 ] 105 ------------ 106 App3 (custom init-meihod and custom-destroy methods cfg) 107 --------------Demo.java----------- '108 package p'l; 109 public interface Demo 11o { 11 1 public String sayHello0; 112 ] 1.13 __________DemoBean.iava__________ 114 package p1; 1 1 5 import javax.annotation.Postconstruct; 116 import javax.annotation.PreDestroy; 1 17 import org.springframework.beans.factory.annotation.Value: 1 18 import org.springframework.stereotype.Component; 119 ii6 Pcornpon"n("C$;- B*dd 121 public class DenibBean implements Demo { 122 @Value('satya") 123 String msg; 124 125 @Value("1o") 126 int age; 127 DemoBean0 128 { 133 ,tto". *t.orintln("DemoBean0:constructoc'); n ,oit t) cntJho<. 131 peo"rcon"t,ro -' **J**gfnrtl) n(d as cct'sto' 133 public void mylnitO 134 { 135 System.out-println("lnit-Method")i 136 if(age<ox Page 2 oI 4
  • 93.
    '42 43 44 45 46 47 48 49 50 51 52 53 54 155 t56 t57 t58 t59 160 161 162 163 't64 165 166 168 '169 170 171 172 173 174 175 176 177 17_8 't79 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 196 197 198 199 200 201 202 203 20,4 137 age=18; 138 System.out.println(Agecannot be -ve,it is set to 18"); r39 ) lli '""."*r*, --> rr"aKe fte'SDestost) merhod os cssitn -dert'Db() public void myDestroy0 t System.out.println("Destroy-method"); age=0; l public String sayHello0 { retum "Hello :" + msg+"n Your Age :"+age; ) ) ----------Democfg.xml---------<beans xmlns="http://www.sprinqframework.orq/schema/beans" </beans> --------DemoClient.java--------- package p'l; import org.springframework.context.support.ClassPathxmlApplicationContext; public class Democlient { public static void main(String s[) throws Exception t ClassPathxmlApplicationContext ctx=new ClassPathxmlApplicationContext('Democfg.xml"); // ask spring container to give springbean class ob.iect Demo dl = (Demo) ctx.getBean("db"); // calls B.method of SpringBean class String result = dl.sayHello0; System.out.println(result); clx.close0; l ) impori iava.text.SimpleDateFormat; import java.util.Date; import org.spdngframework.beans.factory.FactoryBean; import org.springframework.beans.faclory.annotation.Value; import org.springframework.context.annotation.Scope; import org.springframework.stereotype-Component; ff:H?q?:l[l*f,?** * -'q*d qFa", obi rdir bt (reoF a p-ubtic bislTesiBFan i mplemqnts Factory Bea n { L, nn.d;R'Y' @Value("z1 11U2O12") J private String dt: public Object getobject0 t Date d=null; ,S;i;-r,-,^("setobiectg:restBean"); Ir5'ct. c.^'dt Si"f}i}ffiP J SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); t 14ry. . uli ' VdF ' Ld = sdf.parse(dt); J ]catch(Exception e) t hF 61n avoid ttu6, xrnl Ble bl *ln t Aroo<,uon Gnfrt; Apli tt'HcT rG*t"t co{r.,n<, God 8l'€tr$lj)''"*'o ("tu *,,o r{ /"dilf l*"ar") AoD4 {on Faclorv Bean ) / -:-:---' ---te$qeeljeyeqFir<llpackage p1; &an 6<rrercr,ti n3 Drc ctals ohj Ys{'rtsocHo5 *t 6t"* htv&4 Page 3 ot 4
  • 94.
    2O5 System.out.println('ExceptionwhileParsingDf'+e); 206 l ;6;'return d: - g'ves .krvh' cdtl' Dar€ (14s3 ohj€G 208 '-209 public Class getobjectType0 21O t 211 System.out.println("getobjectType0:TestBean"); 212 retum iava.util.Date.class; 213 l 214 public boolean issingleton0 215 t 216 System.out.pnnflnC'issingleton0:TestBean"); 217 return false; 218 ) 219 I 221 222 223 224 225 226 227 228 229 230 231 232 233 2U 235 236 237 238 239 240 24'l 242 243 244 245 246 247 248 249 250 251 252 254 255 256 258 259 260 261 262 263 264 265 zob 267 22O _.---_-----.Demojava------ package p 1; public interface Demo t public String sayHello0; ) ---------DemoBean java------- package p l: import java.util.Date; import javax.annotation.Resource; import org.springframework.stereoiype.Component; @Component('db") public class DemoBean implements Demo t ' taR".our.elname='tb'1-') rt?t,r llne no 1 lg1 Date dt; public String sayHello0 t return "The time is"+dt; ) ] --------------DemoCfg.xml---------- <?xml version="1.0" encoding="UTF-8"?> <context:component-scan </beans> --------DemoClient java---------- package p1; import org.springframework.context.support.ClassPathxmlApplicationConteld; public class DemoClient t public static void main(String0 args) t System.out. printlnC'Hello"); ClassPathxmlApplicationContexl ctx=new ClassPathXmlApplicalionContext("DemoCfg.xml'); Demo bobt=(Demo)c8.getBean("db"); System.out.println(bobj.sayHello0); ) l Page 4 ol 4
  • 95.
    T!!L- -, To ProvideSloba in Yegi6tY$ SltD' Modue -a DAO nodue - viSibilirg lo iova ohrer*6 ctrrl f.ver3 crr-b 8e'6ve'{ / aeorlc'eulon trlologic te3i5rt'J -lorrrot A'e6i5hrS ,l oq/03/20'c rl'err €Pzrco ces coe kee+ drero &NF{ $ives orr rtg;or5 a)o' PP S6 ) to ioltrc'cl Lo)rh DBsk if$ &'t'Pl'go) 1" iDkYaLt oirt' Rc6tsq I java ddvq jauc, Nebotic glves -iomcCIj givgs Grfcr*fisb gNes JBcsl gives 6qrpicaltoob u6e o{,Pticcfkm 6 Use jndi ctp] Are Part APP' GtossFrb r6ist't [np qist'X o{'A at'-' jdocapi (huo* 'ql' €ra'g/l jndi c.Pi ( iou".^ - rnm)og aod a( JsE rrnd.rle ( jar sl'o) A90a - -) I DeYt 0 c(Yc kDo rurts o P t"g; sr"g sl,-,1s NcrminS Qe6terl dto -----' t1.in talos info as keg vatucs --4 @e rI.,usi lno(-o kctg lo 8o 8,3'"- {etepbc,ne hlr. f'earr;Pe ) Qmr t3;o Co "eglstg Anl CJc'.-. PcrY,5 r$e Va[ue8 Soqal --> obj ,4 &gq2. -----+ objl -----: obi1
  • 96.
    e) drectcq fegiSl'Y --",lloint&io5 in{b &iHbcrl€ as keX - vatue p^irs crod Val(les Cah enytq prcVn,'s f to g+ tbe Valueg (rear ti{e ) 4,- Y.ttu.o Pages fcorcacry coise hindoos filesgsi-cm Nebl€;c Yegisr3 GtossFsb t ft" DN6 Y€gl5q Crnd erc' ' ' Neblogl c hPe I AtPrirosoq grver elur Veocicr : grn fustcrns lOlc"re co"e) &nnmefelcd slLo lersicrn r ro'b (corryzrfiole oirh jcrr r'et) , ^ ^^^7:?.. Glloco6 to c"reele clorrgjnS' Erer6 dcnnaln octs ds oDe aryucel*lct Sexuen defuirrt Port :161 ^ l.^,nse. ecornne-{ce . bect. ccrrn fo doconlmd slco : tfiLl-D' oode" cf,rn lG@ f,P murnple prolecm op a compaoX ore uslo$ Sorx Nebl.ogic then rhe ltxbqi,c slco coirt 5e instarred onlttr once io a Cornmct c'fllwteq W 1o dorre'os cDilt be cnea}ed P"' loPtsieffi olr cme 1r,,t P.va1ttf bas-i s ' ---+ &r€ Coo u,se eirher kaf 5 31 P.xha *) procedcrve fu C-l'eole L-!'Se.I deffne dtrrrorn ln Wellryi cio'3 kfuo{ Qcrealt-a n&{, urelDlo€ic donasn Oroclenlcblogl c- t 6oicSbfic''rl- v.l Prop,i'; eJ o ,".) J 6rcP-a".- 5kx ----------'t ffitrem5----------> @cnethng 3tctrted mirh' Ncbt€ic '9;n.x-tt ------7 @Grt.oetctrc a doroain Conhgutd "' DmcnnNc,-me N?xt ---t Ukr N]aroe j4tvaboss t-IerparScoora jcrvc.boss.l- GlrlQxr. tlc.vlort jcdab665 j- ll D.l __--________-_) Nex b ------+ fi adm inlo' ofrlr.;.Fr4
  • 97.
    Ltstenpcrr, @ )Nexb ' -+ (zeat< rbe u:<btogic re3;shg op rue,btog;e SPrr'cx --------a ger f prccedure- to ke Srcpr:- 6rctyt fle obow flUDtrrdnl &d!?{ V'Jcbl€i. iosl-q,'n< ,lrcblogi - Dopova prqtrorn6 ---------+ orooeNcbloStc----------+ useaPT4iefS -*-+ llgDorodna gitr,- OPrl odroio CrnsoE 4 fte obo/e hrrrdn &wd 6pn Birocrltx oirdoco --_--a h*pt // leorhosr i'Itll lcc'nsole USern6rne : 6rvab6 S P&sstoord : Jrooboss1 ---a !6io 5FcP-s:- vieco tbe hr-btc6ic tr8iswt .--.-.'...- Qdroin Grosole ) Environrrfrri '9'rve{5 and ---+ Ne Can lxnftxm ingerr, UgCctre' lekrc'Vry bg us;og idbc code ' -----,--4 Admi n &rtx,r ------l Viap Ord i 5et€0t -tlbc opexofians crn EB trtble and list oPetrdficms drt bind ----- keePiog o$ Uobnd -------.> trnoviog qdroin Senrc-'r &tr r^r-btoglc ------r {€ Con perftrrm !ind, rebnd,unbiod' l0ol&+ JnAl rest'1 bg using jrr& code ' picrna-"J alicancrrne f jtnt norot in rc€i'srntr ftr. .%5t1 I coiTh Oicrmme J crtias narne and Do s/co' -I0 crecrre this Ctrn oh.ter cDen€ed jdUc prog'nrt* (U'W clrt(( rtrrn<' ctfl/ dbuser, du PcoJ ) o.r, these jdbc *loc dt'uol I db slo uc use corh c,b€!f qil!,,(, ------r qortrnng obar ft,* t Siswx t5t $arbennS 611 [lndrogs fu* ,tlshl (nicr'nc'mes' oO;s ) Telcrnd jdbc Conoet}l6-o ohje(f refneseff6 Gnne*fr,rtS Ul(.o ic'Vaafpn yrogxric.l coirl eVnnge baled o" the
  • 98.
    lcrra opPn tDBc Dnutr{;5 t1',g bidge olto ft.vao1pn and DB '5ltu' Namtng llc,rn.ge 'iS rhe Toitic^f Grnfe*t Ohj rePr€serfs lO cr€c$e *Li6 Jn'ulc,rConre*t b*dge Olo Jcl,a apno ctn d c{ronetrvit(i b[tl, jova olpn Ohl Loe r^ped indi propt{c* (9tnu ond slru . r<6tstry riLr: tt-rX a*e D r) itere T'iti"f Carntcxt fr'urry ctas s ?tovi&.'i url jndi PmPtxnes oill Undetstz,n&og root c(fnrex t ) (lJE. cbange h*ed Jndi Tfte @toKr.f ) oo the refi't"Y Slco c-'le (o--ouir) (urta;'g; Ccu'rrut ) (u--"*iz; i (c---,our)J Ccunte*) 9--*oYliclc&rrr cor) s)dl oalne aoA iE is paenr frm-ffit o( &rhnae, &dU*_l -----==-----; -) Df3slLo -l .!) , JdbC Drlvcl ,Rgirt? slt^l> Namin q Itanc,gci 1 $ibraor s $'!(onlext o? Sarbga CcrnFtnt
  • 99.
    N0IE'.- 1o recrlHme Prqi€.-r5 1be ftrra3o<rrce o$ed Tbof refresenfs JDB c Comneui(m fsol tDitl be Pl&ced in f* glCIbar visibitiB ' Jndt ptl*'6.s 6f lrJeblogic R"6ishY weblr4ic ,.;r,ai ' NLJninarGrnrexrFc'uzng (wuutog;' ' j..n; t3: // eboororrtne/ ret"aa'"ss > i 'W t)6> tt:/loco'tbusi: rt-tt *@nrirca ccroreQ$cnn blt-o JalaGPPn on4 u*r"rtdcrre6isho Jndi appn to esrabrish // JndiConnlesi.javc. Rqioq slLo h-tt nicFnoro-,€ fo.) cLLtQs Dc'n JnrrialGmfcxr Clas6 noroe : proridet Lrr I : Eg"- imgnt ,Javax.rr.,rniog- x : /i.t, oA rrnrc-n O{!la t*lt' * ; flabtic Jodi Coon?s r { o, u -tStang argstl) 'fi* ExcuPrtao / P..p.,te J"dj Pr"F,ttl % 4r:os,or.i o0 7 16hi.qr5h'"o> l-lcsU.r.Ufetl; lkof,r..ote' k)t = rrro ht.fx,, (G*-t . lN1rrA L - t:ot.lrrxlFAcroPY, "'d-botl c'iti' t"l LJtuir;1 .,=-- Gni<x+cr*cxg ,7 '__T- Jrin"G-x"iR *^g Ckcs oan h.r*o (G"*t, PRovTDER - uPL: t3:/tocc'rbcr:111 ')j obJ€g^ InrrrarG'nrcxt (l't;' S'o'e (" Coonil-kloo is rr* estu-blishea ")' etse S'o'? C Cotn.rr*-, is est-zoushed " ) ; !lt"*" ffr"- r,tty,ruE^r-to,rse'ruortiunrlto3''t-' tleblogic . jar ( er^r.,utooir -home I rnradeoare I "-'- io qcds Par( /i C*"t" Iruuc,r Conxrt In;riorCtrent ic -- rf,tt) iF (ic== nutr ) liaao
  • 100.
    ctas6 qives rbe4lro.rirrg rrEiio4 ft: e,r{<nn .ind,' Oparo.tto5&,rcrx . rn-i og . ln;ric,rCoruenr btna (-, -; unlind (-; asbind (-r-) list t- ) looP''d-) ulaalwt3 f'ftP Dofa6lt'adcrtY€ jnotf€r r3 yelaltd tD dS Et-d&4-|,C iqr. ,_-/ Eoch, Mmeoasshil claS &J rcl,Yxar one blodlng (orcrrntoe'Oj) .|:uror. noroirg , NhroiogEo<.roeror.t* (I) io &., ir*cl Asce o(- Jcrn.ool , EnunreratioorCf, ) . @ prornple o{Ptialr}oo Oo Jndi tisr oFrd}lon' / Jn61 1-;5t 'iava irDPdt javcrx " cnrnl 16 ' X', imPc'4' java' ufit' r.; {xLbic ccdt J'taiLlot s t o, v ,', (6un6tl ongs)tmrne fxcr?ticnr t / P.et"rc Jodi Ptog.^tl<3 -ll^t'rrol"tt < 6mng i string 7 bt -- rr-u '|-f*5p'ue asrn% ,, 5s437 ti j 'r bt.e"r [c'"1.^r . Jt{rrrA L - coNTExT- FAcloP) "'tntotqJlc' i')cli' l'JI-rT ti#fr'51- hrt.ed (cr*tur , PPOVrur-t - uRL ,"btt//l-oo'rb6t: rl'l l")i bt,r^* ( Grnrnt. Secutrriy - Parr'rcrPn L , " javoooss') ; ,.. ]:ffSr* ' h'p.'r f toiul-trt' SEc,Rf,TY - CREugrrrrrAI-S/ ' fttabosi!")iJ "^ **''-' lrr;tr.dCcn*t^. , ,&=re..u lr-rrfrcl G.nr'"ot [ht)) i/eoinra *n t*nf,fl,- biod;ogr bodioga Lindiot3
  • 101.
    i .,ofi {@rbnt<}' r l/?e, PuminX I isr opralt on , ,,I_- t'{reso ' - /Nc'miogEnurrrraH@ re= ic'lisr(" ")" llA'uo ca rhe bi''d;ng 4 '**- NarniogEnr,rn€rcr.tlcrn n€= ic' ri5' (''Jot't^^/ i-s') ; //gl*s our::t:H-f Ph;re Ine'hc'tHoret)) 3 /t's" 3 iiu* gives clclss narDe { rbe o4Yr o:tn !e rrsed @r. oP €xample oppi'icoloo on Jndl oPenHon6 rek c Jb-stJ"ai , java, TeotJnatr+ {hteno's @r@ $6s6fisb -t *, lotoaHoo &'vor slLa veriw: &rone (Orooeccne) Vc'{s)cn: a.X (Co-fariule -'nq -:drt'5t / donoalo6 ' de&"t'rt &r'aio to d"ttolnl I0 accesS admio 0rr6ole 4246 To accers hlcboQfticafloo i 8o8'd caroes co,rb {lc*3eon,9 .IOp slcu iostrlloHon NeTEoDeJDE ' Foce dure i0 crtci.fe User DeSesS DorfdD iD GtctsgFish' erre++demaan 0[€nS(Irrce anlu!6 to C'rcof. defu*nt poftrn-'O : C"rtcrgsFsb tlul tl^rrr roirb or ulifio&t rn#€roelo-e -- cdroioFx t- -- 46+5 -- user= t€stus€r mYlondoz 9iveo nicpnemc O:srn$posavtruin7 oeodrnio c*a'te -&morn
  • 102.
    proct'dur€ 6tcp-J: to &e GtassRbrqi6h? oe - 6rr.o t mg&rra;n 2 .!i-r,', 0:5un APPtcrwxbto > Qsadr'}lr) m5dorcc o t server' st&r r -d omr.in mgduoai o R' 6rcP-n:- Odmin Jodi prop-'rrres 4 GtcsaF.b GlossRsb LWrtt oo> +6+6 dppServ-rt'ic^r ond *uo Jr^r htc [rt"lt'S =,s(,o App&nrp(lib ib &tao, javaee. jar i-rqir,sT(i' ia '--+ 0r st'o hp'r'rur^ lib iDst<'t-t o-netrawn 'T @Stctr,.*,in$S"JsorPto{rcnicsogTesrJndi'ic^va/TesrJndir-'Jc'vqRtea tr€(on pn(c,rrn Jr'lfrr ppexcrfiens cll Other *X;s'U slm's (nfa ruer.n:g.P iioP --r intci irLK{net Ogb ?{uYoco q) f -oui* A"qrr., t Brcca.,r 5tQ-E:- OttD lbe ctdm'io Conote 4 rngdcnnciire *tnc" o[,cn Byu,fc{ totndoco ----------r Tgce ths Sttuott'X t'"1 httP:// locorhoot " t$+O Usrlt)ctme : rcstulc'[ tOsruse,i _---+ !6inpns*ocnd i giv€ $€ $)osstrsb r€flisrr1 ' Coosote ---1 AgonraflonSttLrur --------i- Jndtbvacoin3 .# *' -z(nttrsol-ish €€"rwI BiwB ,fl8ishr,J osrbe buitt-in "r"egrsrng Slrrr' lincUConfc"t[crUu'X c&ss n&roo : prurtdcx ur) i e$:- fi6 closb it ovoitcLble in wtlhpte deryndolt Jo, Frct' opgnerv - admin 'ic'{ OflBerv - ee.jct oppstw - ext' jar iioP://zbcst>: iioP;fJ tocotnosr ' --rb"J OriGilable in D:Sun Ar4sc"rt''r
  • 103.
    JBcas re /oa /,ro,e TuPe: Vergic,n r Veodor : > 9ive5 A{icc*'rm Servcr elrO S'x ( 6o-ponule trrirb jdr l't ) Apa,r,e [euanc*) 5 clektut t dorrrio 3 dePaurt (dePc,-rt ) hJeb 6l-ardar d 0.ll minimGl to Slarr $e ,grver/ ". @ procedure 1o See the JnP rejishrS oP JBms 5'x sevu€{ ' St(P-r;- Sia.,r JBoSS Se'i't't Ekp-n.- gpeq odrnio console o€ fBoS OEn bYursq u;lrdcro v:rlrc forrao'ng o'Yl 'lodo&rntoad s/co : AS ziP krc Rorn hluro'ofxlr-be'or3 rnrlstc Jb6s - 5;!-1'oo 'GA -JdK l'5 to instu-[ 61r-r] I etw(&t ap P;re toc^ &rtdert deh-t+ Frrr no : 6otro Cfo o4"rs *e cboapllccrl'tcrn s ) toog CtO accrrb rhe jne r"6;sr'X ) LJoo.s-born ) bioruo'bctl Ate prDblerr6 &re raisej rten re moue {(Io'bcf Llse (iP BrnStr tocrrd Bre crnrc,tu ) P.t hmr // lo@thost:toto / imr-ccmtole 99gt $;ue tbe jtPw6iore'ed roc,re d Jndi tre Odmin Gnsol e ,grvice = Jrdii ie-'.!, -------------) Selerf 1l5t - opcntrHcrn ----------5 inv6l4. e --,--: loor(lt Gtok^t Jndi Nanf,spa.e tb€ irrdi PruFrrtte 5 oP CNP rqi*n1 ; -*T"*1, y:*::'TWS JnrntrrG,..mxtR*t clc65 name : otfl.inJ.inxrg'ces ' Na-in8G'r*c^#"f.,tF -._t provi der u{l : jng: l/ zboat 2'. zptt'flo> irs *r*au,.'on qh ihp i // toccLhost : toQl <ibosl-h.m€> ct;cn'til"'-rosi't
  • 104.
    ,ic,r RreS rerlcired iD clrstF.rb to interacf crr;rb lnle.blo6tc re3 5lr"b 1 fapb)r4tc'ajax j".r Brea ye+dred in Closspar$ -|o iDKYcL+ Loi$ GlassFsh reSisng : App5erY -yt .jc.{ javaee.ja.r aPffe.lv - udrnln'Ja1 OPP5e-trv - €e"jcr{ aPPServ - ert'ja"t imq,jms'va'jav ,lrr Bret re+rired in cl&i,6pcrL ttl in*cracf c'oith UB0s6 r€ftshu: jnp-cticr*, jc.r itoss - logging - EPi'ia1 qs9! -> Sprin$ jndi provides a5srta{}lcrn lctger c'n Org' sprto6firc'rrsrtru' iod i' JnaiTempc'rc pbnn Jndi c tCrt6 , --- Ttrr6 Jndilkmplorc closs inf'rrrctl{ USes plolr, ,Todi ao d pn4rot",rtl o64 tvitl.-, 6n I23"t'X elto' S;r"pDPe rbe .Tr,d;E nPtre ''La 6' &feacare b3 Pr- Spno Pkrin inai ryo6tommio$ -) PrePore Jndl PtoPrtlcl -t C{€ol€ Jni nor Gmtcr"t oQj --o p.nRnrn jndi oPuroHon S -> tttvecotto? [xcqHoo lbnding lW15 itdi Pru€rcrm;og u q* JndtTernpbre class oU Af?: "#:,TfiL' orp'ra*ons .,r. L€ pyDcrJs "? P"ft"-t% f,ndi opr'rofion6 ryq Spdng Jndi ltltJtro to F's5 Jndi ProPonle-s fliuq pruiuirrft of rrPd;ficottc'n ' gc*'f;5uroda" Sre
  • 105.
    --> Sp"ng Jndiinicrr-)otl$ LrsfS ploinJndi btrr it rr-t-e"! rrr.L€-9 prDBroff,me4 t0 b*,ev &btut P[cdnJndi ( rtia it norhing htr ge*"g c''befrc'ctlcinl"d*)' Clitrii o{tica}loD oF €pnn3 o4pticaHoo i6 ioVacl&rb, &T** ir can be v toYen Gs Spring &on apd lt6 P'DPcnti€t can Le &t'$6t''""d 'R^ D1rt&,qlrgelrron /- ,..r,'h + JrraiTanplarc cl&sb gveS bind L,-),dgbiod f-'-), unbiod t-) ond looFu+c-) rrrthd hrr it is not Biuiog tistt). '*(D ft,r €xc.mple o4pn cto 6rn"6Jt'ai thor crsrs JndiTernPlaJe ctors *Pk" .., Page ruo, @4@** no:(! ..'' -, Spring Te$nol0gies provides o'bgtlc'cdcrn LoXer on plaro Terhnolqie-6' Jorho pnaeJS iF spri..,6ner f;rirs ro &,ppof- cexfcuo 6rpe'ic*tero lben c;:e Gn use &r'ng &4Plied CalrBc'ct< lnutcrPoces t0 irnplaroent lhc'l _ OProtlon b5 usiog plcun -Teabnolql APa' ---) fte inErPace t*rose rreAods irnplemearei in irnplerne-rrrorldn cla!5 adred bt un&victroX c6'nidrr^ o*nvnttc."t is cal-led Glgs-o2 inrer P'ce' Fxcrmp le SCenOrlO : - Tbe Spog[ndl su4ptie d J''arlemporc cl3ss doas pmvide 'nerbode 'r0 l]e,Rnrn tist opcrcrtlon cm veEi'I'A ' Thi's caobe ochdurd { as)n$ JtaiGltb"'L intcrk.ce. JndiGrrhrl. (r) gives dolnconrext t-) n{'ftod ' ln *us ,rrir'atnx co-n t{rrit€ pfurrrr jndi Code 1-6 frr?.otn lbt ofrro]lcm' o.aa N i naq.o Lis ren er (neto t.J inaorAatrutt ( ) t RAIrc v"td';;Ct*i"3 [riinaooEu'nr -t) 0q u n ^,.r-1ogsrem'eri(o) . 3l*rt"a , ",, 5//ilnach.{ ),llmc*laot
  • 106.
    ' .In'tbe alaovecod e I o) Onf, O[pr crs rhe b)-) 1l^6+ ohjetr ls $e lrltndoo Adt'Prev c1---+ ThiS Anonocmocrs hti''$ S:rne loglc ..-' Oddbindno[5pv 1 ) me,rbcrf i6 c4{0ed hc.rrng vz, &rturo(nt V4Lo/e Obje'f og &nonorrrncrr3 f,-nt'r c-1acf drc'f exren;" %t '- caEs. J Jnrrx c-loss is 6vortidd;nf NinaooGosrotlh) rncrboo 'J .J 'J trd,CoLtbacr' J:rtcr8c'ce to'ok*t Af,Pr ) aro.g tlr"*a, Etccp{ortoI' c*x= tt€-otc F.-ft*-Xt 'Av&^t*^w7 (ht cro'.torr)' '-- O Excrmple A1p1ica'Bcn 6n ioF"eax-rn the tat olxrc"tlo'n 4-rncnt.no-l;rg ' r;nws *-, spno? ? Oemocfu . r.n t ft mocri(n-t ia,ro l' Oa-rx Dorc C Pg . xrnt gc.me as a0dD grneco" 5t ll D"-uCtit'rt'&vo i ro frn r otg' Sg' cort-rcx r ' &tf Po{t " * l irorrI't Oq' SP'iodi " )r j imPffi idvox-nc(mlo3 ' +) --'-"-4ProlnJodt tocrtt- trrirh C"t/Lllc&t-L|t PrrU:c oosS DerooCticni- { ,stnhic JnatTe-plare lrsnpLa-k "' ItSert'n nltkrl 4* ett* nt ' Wbt;c uo'U siTexnpla'te(JnoiTemptare tt-plqtt) { *r'Kmplarre = ttsn]'re) &
  • 107.
    lernp)ofe. er(e&rr€ (ne@ P!b'iceLP'f JoarG,rboo<L) { dor,,Gnre FCG+er-a! *3t .*:] 1Ez'c+ rt "n 6', ve6 Tni tial Gn+e" t oUj -'(D t 11*. ploio Jndi CIpi to ,.,p'I,ott'* i't ort"t}t*'' lq;' Mmir5 Erwnr:wnc,t rE. = cirliBt-C' '' ); 66[r, r e I ne - hu llore C: ) 0 t Mrne Clr.ssP.,;'t t')P= (NotttCrossP'v) ne ' nextC); 5' o' e ("e' 6.* Nc'nne t ) * " - " * n p' g er Clctss NhmeL) ) l 3 //ul'ite TeKr{ D gul ] 3 /l dor"O*c.r(-) J /llntet ctoss ) ; l exec"ie C- ) $ /lt"r.;n 3 fl.rots &nonourtfus ihD€/i CnarOub"u r'''{<"e' ct6ss is deP+ni''1 fer)i"3 ltt b T ll> ,1avac * 'ieva /l r lava krocCticn-l- llrrrire gr't thcr't hlz-btogic fn St iog trnvi{crqrocnJ- iP "rnrurdit tlt-n coe use thtrt .nethocl ger.ud s *rte io ruooirg rnole ' eae a sr.rqg dcsor csnrcnD croS ro''crhod Spnng Jndr Cou bcdi|- Inrcrf<'ce to acterve @ rcroplare ' exeau'rt t ) rrrtt'ocf is Coue bg Lee-pin3 Ohfri o? CIct69 irnple-rncn$n X -lbiS Arono&rooki innet dolnC-onrext (- ) merbo.l P"P-q Lut oP'tc'tt on '
  • 108.
    1e fti% Appt;rononLoe CaD use' O 6Pr:ng'a Brriirin Ccrnocctto.n -) Ib 16 not reCoroeoded lo @ rr-,a Pa:rt JDBc crn Pol -' APode DB'P CsPO ( P.rn*na"a 16 g'{e io Ncbsene'r / fuoti.ort* (Reronoeodea to use Apcbe DBCP dwaCr'ssNc'*e initiatSize P.ssdor d Ltt use{rEm€ framgle o{PicaHon r: App5 h----_') sP"Dg - 5 rgpee oP Jdbc coo XloIS (Nrong co'rb Dn'vrflorrage{ &iaSq'Ke ctass ) u.g becturse it drr.s Wl ft'e crYn o$s Siz.od%lone sPog fues (*Pttc."n-s Seflrr ltmged 5Pg6 6aro@l rhe S;r',n3 amos atre de$ogable in W* cL$aie thc Sonrr ). rbe gY/u) fo1 acrmp)e lppsf'atqb Baitt-in Q'n pol cLtiuz4dlc/n vePr'r Fe'u w$app-n' 0 --+ .|UPe : tblrd Pc'rtt .inr 9;re I zpring-trome > llu ic'ravrto- ca*rtans corrrrooos * closs oafr€: orB' O{aahe ' cnrnrrsos'dbcp ' hgc}tra.fu'nce imfortcnt PtDfdtl{} clfl. Bosrcht''Scrtnce clctK dbce"ic.v Apo*eDBCPAfe ''t*L DBffr,ranon ' iava -*" ? - |--- Deor^orpnBeon'ia'ra I.*1r''|;.*" _ - DBoraaarznckufl* 'Jtua J I r SPnngcP6 'xrn
  • 109.
    6prio6C&6 . xrnt zlDocTlPL: ia. gEs in cl}ssPlrlt:- jar ftres tn 6;a55prh CmnrosDs -dbcf " Jc'l -> zsPnog-ttnoe 7 )ib ial<c.-ttbcr - spt'o€ .i"r Cwnrncros -ltrying'iat > ,lavac *'Java ) .lava DeoPtaHcnCliani ye bap., ttuna lxrfig idbc Ccrn Poo sltl "n, ftre : l.slnog -*-". t;;i caPo c'zPo - o9'l'e "rrrt cl4s5 rAme ttnr giues iroPorent FDFrrtlq {xsstDord [J,5e1 [nioPo16;ze ffux?mt6ize iduc Ur t &iver Coss zvxt)6> -',o,r,,arnrlc. (brnrrdns. dwp, fus;.fut.$ttott4 > ^*")*; ;6=.,dbcp,, cl&ss = org. d{ncf€. ire,r,O,ouaD,i_, zpljffr rrtrne = " dri verCl&!9 Mrr€' blue ="Orcde'idbc' at zprrlrxrnrrtrrf=''url'Value=&bc:ora"le:rho;@taorho51:l$>ir{rrcl zpmYfrb ftrrnd = t{sornerrE" hlcre ="&ott'/z 4nf tU mroe = WssouA" vrlrre='l;gw" )> L{rtory]5 F)G.ro€ =' injticr-rSze- lalttz.'^ 6" lz zllrcn> ziao id ="dob' O4ab = DBgperaltcrn Bcctt' z zIJnpW rsnne = 'd$ " re P='dkP' / z z_lt3,.aoz /-l&c'oE> ao.--, 4u-tq / l o o
  • 110.
    Pxarnple cfplic&lloD :- , 6aroe 6g llrevio(rs Appn hrf Perkrrn fhe R,,or',rg oPgrcltktns. ...-., 0 Add Srnutog erhirs iD ftv;ngCfu,xmr Sre, ...,,, . "Cot'rochange ' Ve' c6PO' Comuoblezlhradrcrce 2 L@o6, ,, -^-r..,nap.13, c6?o. Gmboftnrea fuaofat''<te" 2 'J Ad3.l id ='db(P' cl&s6: "ctrn'rncFon€e' lE:' r-or-(r - c. - 'r, '-) zp.Dqtr1;5 Doroe='6;q6Class" frlue =" Out'cJe'idbc' drivcr' O<rrel]''ev /> J z,xqvrrb rxlrnc=''.1auctkr" alugz" 6dbc', orooe; {"': @ lDccrlbo6}-- )5>):ool> 11JrDWtrH ryLrDe2"tJtr,ru Vlr;c --*gn*" J> J lqPe{g rxlnne= prssood' Value="figen" /t 'J L'./fD..JIs narr€ = ''p61ipfol6'"zr'' "'laJte="6' )= --l name>* rna"Rot5i="'' Vatcte=.)d'/z ttrrrd tr $e'ruCr 4aPutU zlwoo> zlxan zwr{rU oerne-- "d5" rt(='dtr.?" lz zl*cio2 Zl&aoS> odd <Spdo-h6rre>LIb cbPa capo- 0.9"1'?"'iat Bre to Vc,rxrble o5 &dd,'rksrCIJ. j..t f; re ' 0:- Uthot t$e JDBc Ccnnnaficrn trol $dk'i b hooe 113ef in : /rc,s; 1? gurr 4"ng pqiat is Stcodobne (cnl Desrtoq iC--" &b" clasS =" DBopzTctHc'n Eratt > t-*t lvlcrnoned Oolne;rrlon?oo'l ' ftpocle Bcf Sfyrrnt prrberi is lepo6eecble ucbatpticallon thcn wraLncrled oDqC fo."rrnectcmpct) '..-,/ _-/ J CLAgPAI-]+ oovironrrrrf..J _-/ $u,t'r pruje4 9 '--z prDjqt flren use J ."?, LLsE anA alt- -
  • 111.
    Undecrc.odiog rbe PioGsSop Worbiog coirb &.trrrr fla.,oXe d JDB c Ccrnne c,non Rn (on'a io,re ( U6in9 JDoc ConrEcfid''o lli)l Ne Dfi 6rt b9 usiog minirnkrn A 6onnaaficro OhJt in 6*rrqd'{on Pool D0 sor' Ey cDsc ConnecH6iP:o1 *sl C.rqnecfi on f}9l Ye0r€EnJS h-i"3 nicKo&rne <r{ atlcs octYr€ hteb 6e{u<J.{ Jo8.Dara8o(]rte Ohu aizl+l s orivw 4wf Can rrrru.€ rnlre Ctjef* c,pplicc*tcn- in tcrc.artog coi*r no.4 JDBc ccm ohj)6. f{^"eKJiJ6 canreesvrrS rc'irb 5clroe Orclde meaas o Coorearlon oql'a in Dam6orrrce ohjecl plclced in A:8,u"f rPve6enr€ jnuc ccm pot slio {t BloErr li6ibiri[ aod tils Dorc.6oeKe obj <oiLt 5e e (e] Server trtokes Josc sctrctfouce ohituJr ond kce?6 h&t $b;e* in fndt 'rt1;s Ocrnnec$ui ry toirh Srme ord'cle DR sftl .rd'r lqreseYlttns {0Bc Conneu{onPol N t'to the Dicrgrorn , lo ond l_o 0 6e1ve{ uses t.lp" r | ?' I + | s &'/eY tD inK{coc-t trrl rh Drd s crfole JDSC Cdnnedcm 1d |n'liog gpBa CorreLtidr' ob'js' !@ @' 99o €ofigo -> futa $rlrtc O$ l,+ui"g nir'lnarn( funr) al'al nat't"
  • 112.
    @ C[er,r opptic&-hio Lrsec Ondl code to ge+ Darc.Sorrcc offil ko" 'frkh5 @(!O Cr;cnf &ppl)cadoo ger3 SDBC Conrfr,tlcro Ohjear P'ort CcDrDe4i<,r,poct - ftmcrgh Darz. Satc o$e.!-' @ C[an] opplicc,$on crles *,;a trDBc cenoel]icm ohiot fa c.a'le orberr f,DBc crhPtrs ond fo deur'Lap Der(gstenLe l-'ogc ocIeflfcrppliccL"Ho.ncajls6a5r1'coseL)rreilnocltorelec'seUD8cc6onesil.J.n Chf* bc.dc ro Conne*tcrn Pool ' Thew are fcDo rufze oP idbc Ccmrrtficto ohi6 O D,rot JDBC ccm obi u tv]5 $e JDOC 6on ob'j Lle$<a h tht progrcrmmg mcnucdld ( Cta" ' fuName ( otcore 'iauc ' d"iwr " Or6'le >"i'/€'{ " ) j 1 - * {).,x1flcrno. et.g:tCa,'..cn.. j",r-ti"ooe: tttn : @toct.lrurt'l5rt;crt.-')'r L( On ne*tort U:x "' uztt"t hoted oOgc cdn 9bj ---i f,-t-i6 $e Jdbc Gtn obj Cofreted Sra- $" &bc Corr Poot ' ?L,{ O'iGc-le rogdornc,'nl terw and OFn 'rr5 erdrnioCctt'so le ' $Kp4r"- Qdroir' Ctnsoe &'(eo ----> Sefldces JDEc----------+ kua6atv<es ) p4r6 __-----,a Name ; rngdsl Jndtmme t @-- -2ltriaBc.setype ;lo*.€l- HrFo*.* Ott*^ tru tl g* se,rurc Conoeltl ^f ----n ncxt ) pax t --DatcoBose Naroe-: FZa ft*toarne ,ltoc.'rnofl por,[6tll A*avte Utu'nrme; [GrF TotG"69wcrlo^ @ Ptocedt.'" to cf hkutq A:L Statt ro6dr"'c"nr tsr'o( Cteorc JDBC GenneaFcrr) $ol ic" ft.sroord FrAf CunPcrQcrs kle,e ----r Dfut *--5
  • 113.
    ----iDexr -'-"-t V AdminSrv<,t-----+ FtLtsb' SK.iFg rbe JDSc Cnopoo Pctrarrffg'^ AdmlnGosot e -------------) Serrrices-------------' JDsc------r DatQ&)Lt{ceb &moduloo ltoc +.,Jo - aotuJr'Pciru 16.-1 nc,.xcopcl.ictJ 6, r .! I ) *r]*a --------a 6h.nvPwlu'n'x l-qoFl@d' cc,.Kit i6'115nerr.,t l.n.*r.r;";1. sboad be c'ro-red tnkra,o rhera is --------+s&€ aneed & cvcaHo3 nelD rdbc cdonedlcn. ohicrls ' de*roXe rDte f,lgg c6.org$o^n c,rrj&fs ct?t<,( errtf9m"se"-as fs.;^.-Jrr; NorE'.- in $e o.bow sl-Qg nhr'n Fnisl' hffon is cftk€d the $gc Ocd<'sac'r€.# o4e[f vekrffLe LdtI be f^&cad OdorncrhcoilS in Qgrst"x slul ' - x)ft'sP.indi' Jno;Ohe+Facrcnu&oq ia $e FocrcrgBeccn rhnr gcrrfexs oUle'r ftr* YetiShn1 slcD th"ounb Jndt ooF"p OfixcrHoo ond irger'ra thctf Dc,rufo..'ce oqf!'t .fft" Q"6''rl slto aod to inp* rhor objer ro out hancic,ss prqx,.Ird, - Excrmple sP.q$ o?Pllca$oo to (ase the above i"r-tlogic Serr'tx rrrLnc'Xe<l - JD0c Gnnernon Pool yli KeeB rogdorr^crnr Setut'T oP hybl%t in;nn)ng rnocle' 8tcPz'"- kee{ fblrh appt' ftodg' a'-'d P"h rbe lirrroln? rn'c'i;Bcafi"'s in Sprrqcfu " r-t R'Le' /| 3t'tngcfu , x* t ZlDmtgpe---> 4btsos 7 61165'o0rg' s9' jrrdi' furObjett fu""U8-" $ = Lb/C.ie i6 = " jo?b" c&iS? ors'ot' "':- /pyooertS r.arne -- *trndrN^*e' u"t"="!fl9,i:"
  • 114.
    Jndi PY1rfsft14 p565rish Connea$ctrr 4tm{>5> laq ZJ)YDP z-LwP6> to rhe Zptry,,q n61roe = "inoiEnv;ronroert-f " > 1ee6 - java. nc^rnin3 . fu*"U , inirlcd ) klbhtic.indi. tnJ Llnrsd Cc'r*e" t[.c.ny 4t*p z " keg =' ,javrrr{mi'q, DyDuJdonc,rrt > h6://loco.thos,r i zli 1.- tlwP, ".' zlpto[rn1z Loi rh I2eS's. lk.o,o> Lvan *& JaoS' 6ns5 ="DB0put..Ft''nBer.n'' > Q<rrhe..ed &om Ond;veX;s husins .._., JMtOup*facnrXBean. ihs Ksulknf ohrecr Lpwn,o eCtnoe = zlVao> l:llrrcc'r>t> uds' yap -",jolb' l> T-Jruetn JDBc a,63crxce OQ.1er.r jctr P res in ctass pc.rb ' Spnng. jat Gr.nnrcxrS - lq6;ng 'jc.r cdrlo8ic . j a't (D p.oua-^^'. t0 C''recfe JDBc Cooneolo'n (bol &,{ orac"ls io t%dorDdnR .- 9wu o? ot*tj:1"11 oid bc v+.i ci f; ss zbrca s6(h-ho"'e>1f,:S ffi;'d;"qba& ftrde/:<{L !-rr ' n dnw' tvted SA-O:- keeP O(6de 1tu rngdornCunt "-"'-----1r-----;" TdroioOc6ole . gljuo/ (ort l(b t .,.".. 5ra"4;- Skdr a6cdnnltl Sictt-dc'r'trln rn*ir.'.__-r, 3x?-al- R.rn $e cLicar 7 .lava sHP-a;- cfeclte JDBC &tnneexoobot Qd'tni9car60e S6-ctco -=--' Qemcrrtrs ---j {rKrU Wfto{e 1 Lryu--J -----------JnekF fDr,rirruYh plSizt l- $-_l trill be lrueu-(d apPlicotlcm DBOtorafio$f ticntr Gtade" JDBc - > jntut:n @16 -=-- ftr 11 TescLM,e rU pe Ijcvctr,sy' Drfasd. Y{e ' ----,-., Iyinaeand rnin[tnl.et:-e [.-+ l.--- poo| rcstzc $urirLHrg I [ .-: -_l ._J @{Aae
  • 115.
    --a V Cf,Lr&Ba!€r)6(m € E Dti<ryruPc ' @ f&sst'lo'a 'p f)rltNttrnbct B .fenwName E Se'tuicrNarne @ uct- E** --) Finish -)6l-cp-U:- Cxare JDOC guJ-a5cLrrce piotog fu the obov( dDBc O^"ffi AdrrrlnConsole Sc"reeo---------+ p66r.rt-<r5 ------ J0834 @n$gcPesctux(e8-- Orc I *rin ti$cr l5> to(a-(bosf l0c4J ho I F ,.tdbc: oraale ; ft-io', @ tocorho tt 3 l5>l eorcl SCcf-t sder rog@l L'---4 PioA ----+ s3JJe '- f,k-) w llero --------+ JNDI Nleme', to u.se RePu eppe crn lqlozlrorA mo0fg Sprrogcfu-xo cntcrsSEsh $tKrt mcocJed Caqn&$crn pool in q^r^nt w?c'{ tl$ rrrrnch cilscrrstlons . gK,P@:- 0xecurc fl'1e crieni olpo b6 cdd;og ----'[elname: I6sfi:oi{ -------; Q!**"-ffi;*l*,ttr ---rl.! '.thdt &.e< CyPFn 0 ff spng,ior, 6 --+ Olcrs6 Fsb oft. iar ft te Srt-ing ;r.r F;tcs ra'.<btS - 6kp(Di- Ke<p mgdomc.ina' hlctssFish in Qrrnning node skro'- Keel Po nfi cippn recrq &s shou:n 1n previous old'catlctcth+ Choqe rbe @SrtoO",3 Jalrrer in Qnin6C-Fa.x*r S,.. Chonge Jndinome tu llg0eJndi f.o- Sr'th1r. chonge v*blogc Q"$ p.oirrft$ t ith Cic"sE !'ecXt'*J P*l'*t* comrnons -loggln6.jaY rPw
  • 116.
    SpntgDno (c,,so cc.tr€dc.s Sptrog mAc) the. &va ctas 5 ard rrr res *)af oL"dfe JDoc 6t'ercrrrn* ohl geod ood exeaou{ s€}L o'ueru in qod*.x reslrs aod PrbLels rhe re Cos JDsc ,ohi5 t 5 lo ol"o r: O*er lq;cs 4 the alpt;ad{c,', DAO abstrc.ortcro lctg o"l ) wrrs & dedoplnSr fu,r se{r-r(-l'1c| Pe(s l5r<roc€ logic P"t- lo€ic5 Ci6 'reusobfe 1ogic5 is caued --+ 0AO P6igo partcrD is oo tr'rL5 re'tared co:r$ GptloSDAo t'6q1.!-{-tQ- --'> epdngDAo rnodule 6iw,5 oDBcTemplore ct&s6 l-a provlcle dn PUn JDBC frrograrnlry lha.r rnec.a| E;tnpllRu* the ilDBc petti sYunce Lo6ic. Pki. JDEc progrorn;og (]J o e re{i6rc{ idbc drr$at coitl DrnrCr tlancrSel E5Trdni5b he Omnel$cro t/)rh Doslo j DB 6lto t sitrs J frpplicr$o-n sledhc 6t -.- . (choqar in 4K'X afon / I Cororocolr:qicS 4 rhe i *nn ( ** 'n a.ll JoB( a+:r- ) ) :t"' rhe otac O,nd OPliccaron 64gli6aflcn pDt[affrd/r Spec,Ac "lo6i.s ' Shcx-rtd tclFt cc'Ye 4 Cornrnon taVe c&ra oP 0rnmo ioBfce Apptl cc.lon SPcihco logia5 3pn5 JDbc P6*T'"3 0 ff* ftbckoplorc ctcrss ohl b tufrhhi iout Dk.lrt.lce obi O Send ard execi*e SO,L Alc^e. in DB slOl+Cnf;c"tio", Spec,frc logics O Grtrf^r^ resulr5 t'c'cl prcLers fhe reeutn J An the crbc,ra 6$,n fdbcTennpc'rc cass coitl ist need to tertsecore ct+ on$ @ c €) 6ll,fo.,rng |;ceCflao *L"d-lu5 So Prugrtrnt't
  • 117.
    i --> to Cr(nKJdbcTemplote crosi ohj fih: Dorc,f6c.r ce ohj is &6-,-d.."r o6; ' - -> M.tfu-nce ia rhe irnpoterLt lr''oPof-g op JaUcTerrylare dass(oq'sr'"iabc'ffi I -lhe impcxtrr| rrgrboclb oP TdbcTemplo.fe ccrs.5 lo sr6d ond execr,1q rhe SgL $rr€Yics " * ''-''/ T0 e{ecu}e frro- Selecr ouerics - uPdc* (sn'"3 qq ) lueqfulnr (Stn3 m) t Nhen gte*yo-,.g reic,rn r'rn.^Ac vc.t.q WWI"o.t (sm"3 ot) JET:- senr cwnt(x) P..", stz,<tcn*. 1re.1F^h+ (Sr"^g %)J,0f,." srec.* 9l-t€,n3 yero{ng 3io6le *rcxd. Eg' &tetx * fiom 6rude{1* t:he"e Srro=lol q,r"tF*Lr.i [514"5 %)3wbco 5elq1 *"0 retrtu(ns lltrltrple rrc"rdg -lo txtRrrm Baxf'Pocrsstn3 ;- E6'.- &;lra X &or, src,dent. - krcnUfl,'t" ( Sr"rngt I ler;e s ) '-e Nl-ren olr ftys( rrBr6als are hro.raoS str61e at6urrcnr tl-rn 3'nple 661areenf oQ, ajrtt be uEed inrcroaftE t ' - - r'"rn n'r'd I troCfu6 ot fh"e e &8t{Fnqd1 -+hlhen cru these mtrtnc.lg are ca1teJ hooinS turo o'{'B6r'er - tk- Pr.Pcrted St +.tcrtr CIbi ('Di) be us€cl inKrnaut '
  • 118.
    Exarl.,pte APPI;ccflorr i- E: APP6 i , D8OPerdfioo'i4va D6OpednHcroBrco ' javo D00peroficrnCfg' xrn D8O g,rortcm C ti tn+'Ja'v a ccm finl tiKe APacfre DecP' PoP"t us,ng third pc'rg iduc DB iab)e inofc.d e 5r&dcoI I u9to +__ '_-)Srnrne F saad /l DbOf."an- -ic.vc-. irnfrott iava' (lj'i I ' 'lr / 'p,ff,ia -invtfF "t D6oftttc'ttc" rt^robex (+ ) larclnra (ro) Va{cho{a C2o) fxrbi c gr-lcic prbtic F-'b'i' Pdi. Foi' int. iff in-t inl t{o? Usi ;p6errl#o (int no,8t'tng mme, 6h'lng oaa); qPdrrrcDrtrrs (mt rro,sni"g rt'oovfittE'51-d'g Yfloc'ddf) V |,t&{ , U 1"c"1 % 1' +uut'R Safl 'lnl k reca^ cirq' -lttfte''ecL'j( g<fr4 q!<'J -' ' J c/ I -'q,r rn .m e lc oc ap'ra-r' ) v DBofraHon8ro'o ' joVa ,n#j iiil:fidH;#;"" { lthron tr'Df)./tg " fal.Te-P)are ib) irqrlcrrrrUs D@lxttallcn /lme*oa 5 Cc,nsrrudc't irlP-ttcn Trbic DgOfriro,len &un fOU.tt-pt"*e, t t $;s.jt = ftrnPlcrtl a .9 &ereFt<;rs (inr no)', c*rrtstt,.ftnrc( ); 6c* 6t ,aoDetaits (ior no;' g:tSt"Oet-rs (Sr"o5 KrnpraP)
  • 119.
    //;rnpteornr B.n.retbocls inr insecTnPo(int m, 5t ',g tn-e,8ung addrs )Purnrc { lor k [Lbic fL inr detetcDtrc'''to (int no ) o' . s'r<,delll- Eu 6mrne-- P Sadd=! mhcx = i b' upAett< L atfA"r" 6rade frl- Eu 6mrr ^ 5.,o-- ? " , ned ohr'rll lt*1"* '*tqq{!rn'i ) f L-, USng Prepar<aSfttt<ml,trl o4iecrs . uph.reDerr;Ls ( it" *'3.an6offo-"' Sr'"3 n$att) ,t' TritrlJ - it. u{dd( ( ins..r . fe[0 JDGcT(mpldlc throc.g b DcJdACa€rJ fixcq t'lco . Ttrr's ts an a1n1l,aJa-< I ekzq ll c,n. So, exc<pblo, 11ffi.3 in D(o.'o&l< j< 6Pild'1c( ' into €rcrdenf vc,tues(?,'1, ?')': O*eurt ] [ no"'d''f ' a&t'r63); &r?ptles he 98e""d Pc/xol-Jt*<4 vo-{ug CtulfoUt bo"rr8 aa.ncc0r refLrl D ltsqtt ; 3 prillc int { in Yuult {rurn I t? rJ FlbU c 0 t lff Tt.:ul rejuvn Tesuf ; - ir'uf dc'rt (" dtr'rt &q $..&nr re3ult) q J $iu'len-ra ( ) Qu-ldi c inf Cdrrr-l c { .- - rLt .2. 'ne- ohYtllt3) inr rtsoll = jt'guryEnL-* (" "* eocrnr (x) ff'orn stc'den* "Yenro resolt " 3 F o1(, llat { ILa Yo -* T€TINN jt.qpa*UF"t1"l (" soe*r + Prum gersrr,aDer<urs I irrr no ) Cd{$f'r.f m ] no.ts terbe,re g'o= l'rtr- Cbtt*t ] 1",3); ? "nar: eruAtrrr tPhu.^c sDo= ' / OhF,rL I t "'3); Lr* goSt"a.*rD.r.irs (Sr,iq c;t5 ) I I ,r.-n ; ) vdut6
  • 120.
    i OhF.rLll"ryl ) "/ U .J V.' Wuc { "p i J org. ap,cie-Comrnons' dbtp " Basl.DJc.fuc.'{(f," > MO+ fu1tu3f,&ltLc^(, ZPrDIrrYt n&rne = tJVsn) LWao id='dob' c)drs=^ D%6'co{i,," Bco'"'u > amsrncttx - uJ reP=" tetnPlote'/z Awoo, 4,wns, // Ogq"*x ^ C I i(rrrf iiav c irnpc.it- Q3. SP'Ccrilffxl- 'eqrrlf' " X ) cl0r5 D8Op."*r.lr.rCL;tr* Li., L=ir'g..'U[*Liat ("s.i.* + Bo- Sudeag 'ohc"' return 1; Lit Dotosr,'<tw . )t )L /l agownonoocfu'xrr,t . {bean5> zhean 16 ='ldbcP u clol5 = clas5=" 0r6'sP'idUc'o"" " ilAbcTernplafe > "ducP" / z" dofc,Su-.r cg ' reP -- .-- ' grJd=!",nt- fllrnc > " drive'iclabNarne 4Lron > &ao id*-'Krrplare s v rn(6r"nglJ attb)
  • 121.
    E,.Su*htra*r ovr GnraI (O:;Xi llgr&"", clors ohj DBq.rare^ Uhr= (D8op"<'nrm) o*'5et8ton6"'lob" )i . ]:til.i' l*r.u *or cre ieEtrtd " + boi' inse'nrlofa 6rori'4o' " )'Sa " ); .-r"' ' 6o.pCno.orQer'asthorco'eUeda*ea..-1bob.),u$axDo<^;ts[rorjx-'t;|.}""qp) S'o r I no u[ Rtca'd s *t* o'." deten"r" +bobi ' d ete+r Dero-rts (l" t )); So r I rp'of Stz.len+ s catnt" +bqhj ' Wful"']sc)) ) 6'o,r' (" (tit stuclcn* clcrurs' + bohj' getsrt'aDera'rs (or)) ; s.o.e[ @ hgd btucrcr* JexitE,, 1bob.r. grsyao*D.r.,rs ("b6ad')); icl List, ttoP 0uf<rsft?rcrurq &nd / All colferlt(Jn Pramc coorE orrx the otrqlrrY- L D***'.r ot" &'tt9zlble oUtc-'rs b dk"t ll P'tvwe Ccmraioc.t EifelXsxmX.r fupticaf,tcttl Conn*t c-i-x= h€u) 3il*' 311.oo ja., f;trs in cLAss PAl H :- ? Sprin6irrr 5 --"--. 6Pl]n3 "JqY' cornrDctns- Iog8hg "i,'^'l CornrnClo5 - dbcp'j ay 0 5d bc r+, jc.{ a 9' nrh* is rbe digP rjLo exec"log selecrlueYb ;n po-roJcBc s6d in 6*n35DBc : g:- plcin JDBc 8iv€5 QebLrlr&i oloJ€ct' aod )u is rpt &'rau7.tbte oby-ti ruseod Ovet tbe neruo6F ' 6Vnng ooec 6ere* quc:g ButA Qesutrs lr]( can Send rhis ]'ra5hru*ulcs drte*tX
  • 122.
    Sprrq JOBc inre{oatlt CbetledExceptlooCeled UncWoEed l;xcefilorr uses ploin,rDBc 66t-Fxceprton. 'ilr eu.nrho*B h ptarn3Dbc flrac,cs Ccrnve{rs rfro.l 6't1g fO $*"3oDBc aued D'raAc.eas["ctprt"o. g- FDric inr q,ue"6F"rlr,r(g6"3 ?n) $m<,x ftnffoerEJrccprtoo s L /ploin 6uccodc .L J Or,r<-t' IS8rExce{'ntcto e) I itrocr rrd DroAcae*ErcPrtcnL)) Ex<4*ion RerLmcotn3 IY ,, The Jnvo. cla55 CId{) ticcttt Cln i5 qrc ond tha hb t il^nt *trr,ireLr<b co,led 0&0. P'rststcoce o5ic DAo mov-es $e brd;h, {t* otrc,,o lqicsoP*e furgistr_nce qic cta tusclble Pleriote to6lc to
  • 123.
    p.xamp le Neba4plicattq bas"d o1 m'tc} Ar.hj kctqye aod irrple ot n* r>3 Dno Dn"n u^ o o @ llaioserv €.{- brdnsct tiiodq^] ro ' btr"tt (victo c;grr*,1--- l @(prevora416t1 fr4;c ) ic NcbPaq e De slLo In rhe abrve atpliceH crn DAO, l'1vce ft5i$.' part fn5 are implerne^reJ OA0 cl&s5 Gjntrrin SpnngJDEc bd.6ad 1-z.{sJ5ttnCe Lqic. Llse &xv€'t qDooc6€d dynrrzrtor' 55o) }n rbe cubot€ ap pt}c'oHor" ' fts;gnflrrton il a Betr sotuncrn % rcoccurrinl pyDb)em5 oe oa'$tcartoa Driiqnk^*c(ns a* ,he Sesr prartcts ro c<*top sla: aPeicano.nt b{*"Y ft$ @ prn.edut t0 .ler€rop rbe a&",e .odD appllc..tl .,n tU c{s;n3 l'lgEcti pse trl'x knz't 8i(P-Ii Crgle wlD [^j".t .,r flrtl'P rr,b^t rJt rct'tJnt F t e ""3 Ne cc *-, NcbPrc.ie Lt ttrli tct'el [6e.u,r --l ---.: Fnlsh StrP-s:- Add s0bng C.'{sbllHes to tbe Proie* R,ghJ dct- dr, pyqje{r ---- -,-+t'rgEcliP(e + Add sp*ng Ca.Debitihic3 ----) @srninaso'. ffl sp+r.3 j'o cclY6 r l)tLr*ts'(nce a""rt lvfJ#cf- isogc [trz'vic-s * sfl{"tq .-------c..m CCrrot o,ter ; e) tJ.rogi. ) voo"rttan (fui4 genn @cu.togt.l (Fscnt 4rp., l-r{ i() I-b&tDno I DAo cta"s ) (F.orrst o.e ro8i.
  • 124.
    6x?-]li, C{rnA6u.€ l"lXDorrrlioi- ,Seruc4 oP coellql. *""ct toirh lt F.L)P((.IDE- tJlndco rrgyL, --- Pr€fc€rlrt-s -) E)r'ese ---) Jcm,er{ ----s 514$lo6lc --- --r' [Jcdo5,. lo,x -------+ (fEoaole -----------J Bgn hoare D**o,'3 Arlmlnisrcafl cro . UStr name : passox,rd : Q.rcIlUctn D znnai n rOOl; 6tcpp:- Add f;1ooin3 €nt-rics ;n $il€cPt hLe .(r"roaercq. x*, ) /,,.ao ;6=".,oPb" Cosb = or5.sf 'inai' Jodi Ohfcrtr'oto'gBean - >/*trc..* T? apPt;raxo" {,p61 / * tr., ft, &4p!i l*rl+ Jndi Nary6 aJ rs n6 oecd .t g,rrn3 ..Tt,/;daN nnl t" ti -----) foel! ------------+ ok. Add 0.Dbcr+ , jar -&'. IIC"n P'oJcr* -------+ &rilaRarf: ltd,bcL+. jc.t hrc. torbe Buitd lle$4 r{.'e Fqie4 ---------+ M pa Ertcvrre0At..FaleJ Nlxt't tl-<tlt<&^S tpl'd^ MdcLLa,Z<n tI,4", 6-,a'r"1 W-rca,.l-H er lafa. -&ocar<-clrnAS<fu+ -/ lptogrt l D,irne=" gW' b v"Le:gN Ir *#;*;il,|;k zlbgrr> ana, p.f,srrrcG fali o;4 ,,*.ir.%.:fl^;-, t1 Lbecn id --" ter',p)a.te cdss = O€ 'sP ' .jC bc .co.e . JduTcroptalo lWdW harne= "6k&r,"c6" rc(=',lo(b" l7 j <Jaeao> -J -_,/ <&or> fd --' rnSdao " clcl-s ="n9Dko" = <WYfl r^o-, ="r#.* ref.-" ftmflu<' f 2 v 4Lr(rn > J z.bean )d --"fnO " class=" l*lodet Brc.tu > r zlrtyry fnn-r€ ='rnda6 " re| -'"t4Aati' 12 ' ) <lkon> r _) -..''
  • 125.
    6"pa, poelop *1sDAoclals as Eho.;,o blooc f$^.c.d,.|o"! Iv'dr'.*re tofic Pc cn g, c --J cla:.s -'-r clor3re.5rre: ^4Dde'DAa '=--+Fu tI' ftuwtc clats nd,aD+ol ' llLeat Wf"vu rnrvl+sl":tktb 2' JAVTT^P)aI< ib"' l/ nar strlrrl-; w'ohd krsttt'- InP!|on prt2rc Vold atJt ( JdbcTe'npla+c jc ) 0 ., ' i+ut'ib--ir; *,'.n s$fl;.,ir-," (sm"3 ctn, ) ,,rrt -H* &= ir'ry*xk& (" ** n P-- si.de"t n rf,,, oarttt [l l"n] Xnqo *ai ! l*"a 3 lo^ --ffii 4t'&'tsc'n pc oor (rc "------, pq, -------+ T:^l<x(arc -----., Na,"<,c'" Fl" &) ---------> l/tqodtl, ) att c, WiL inte^Pacr llder Ifi4Pljsr rtas.-ti".'+Swdr'rs (SH,J c tl) ; 3 pc so Src-------) M,t1 ------z cra-r. Noroe '' Mo&I B'arrt "--'--n add " nole) nW saad= ' ); #"ue. -_- (t"a yt,, ;.,ubl,rc cl6rs ltloderB@D itn/tr*'nrs f'foao I /u,." y'1'*3 llodc,rDAo rrdao', ll *x, k'ilkoL 1* s,r+- i"a*. Fldt c Voi / g1l'lda o (MoaoDl'o "dr.o ) U *. 'rndqo = wdao; p*:. ffi" sp^',4!k,J.,.6sC&.4 dt) I //b.to6rc
  • 126.
    if fcrq==nu, ll'ffisj 1.,u ='ha" 1 3 Iuse Wst@Q lo5;. og DAO ua's llictot z_1?wn> tt*j add odlsrlkar'{ [2 c ---- uan -------+D& F -__--_r Lr.t flapS= ,"d*. 6arD.r.-rs(crtg) rucon {r; ll,,'l.'"A Iz.c {d rrawa t ------'-----.+ t,t rrr r httn I ----------z Nlarne ; F rtn- btrn I LPrnm actloD = !"conwol)€x .,lr,+)d -" 3<f' > cilS mroe " /iorij-t tbtt -'ttxr'' rnrne ?' ci' l' Zinrur tgrt='ralrnit " Va-lue="'&arch aew:d 12 -----= SctV t€-t ------) Name: .?"r,rel /oP Yr.PPrn1 ut t : Po.bllc closS hoin&orl€t o,Kc/a l'ltrc9"vte+ {. " l'4odu boui I -/ fxtbUc void inlt() t ',J /f+*uuo sPr;Scrnlalnw Clar?arh,Xmr fuplrcat{orr Ca"*<xt c}' -^ clcrsPa4' XtorApplm'rrc'orConrc" C"XW il6+g"^fl&* o^ ,4n,'+ 'h- Co*-n'q !/ &e hhi-- Crb&-t) etx' grBeo"'(''u" ) I - J J fln*t) Prbrrc loid a"Go(tt6P ?eltrcrt/ ltSR *"p"^l')rf.-s SF)'TOE { : //ruaft'r..n dc.ra r 51' SYParornetar [-oT ") ) - rtq Q-- te14e5f 'Srralarn<rw L "'J J I coq g.rnar(uA . Fson-hh"r to $a6!rmt {t&,. cP$e 6rtqjerr gngr lftD?tra-r-1 nljc- rt'"ict+ i fl61e,!-rv lc.t Cmalrlllcd ---: B tr.;r {raler*6, FId6<dloP"nt) -E'"rcb.
  • 127.
    Lsr{cae *= Uui"aa,cr,6rcaerut (sr); //feP ru,rr+ in klrest o-tt,'&.r-< /'&"*"6 '1ta kryest fu rv-rct tle -,. - R.a*rDisg*<-het yd = r€lAest'6oR*1*otDtFi'I4" ("arsuti'jsp") I (/aoGaC-,-) )" : prHic . void d.P*r(FlsP r.p,st, Hre *'r*o)rf"* sE/JaE d doGu VI**'*^"*r") ) n" -J * pr-blrc Void desr-6 C) | ' bohj = nutr ) - 3 t It ' o'to" ^ 5rcp [i add rsar+ 'isP to Nerrmt to ' '-rco ------r flarne I tS Xejtrt'Jsl P'Con FLbroot rnuP '-----r $P- '- Ll'@paBe imPof :^'iava'ufi) ' *" !'> 1tt> /tb> ino Llth> ztb> smr'' r t lth > zth> SdAd /lfl', > 48> L/' P^ (i"t i=o I izl-si2e( ) ; +ti) JL 11,.p ,n = (moP).1' ge+(i)', /'z ltr> Ld> t1'=rn'sefc"s^io")'/'> LlLa > 21!> L/'= nD'getC"SNAmr") z' > 4d> /d> A'1': l'rr'get[''Snoo') v> AHz zlYt > )rt ,J '/7 4uw>
  • 128.
    &cp:.""- Ruo rbeprDjee-l Bc oo Prarer --+ l^t$loBl clo'x . .'l cst rtc Pilded OF,n Brocoltr L0ioaoco PlrnAs -_"- fyuklifrJe goaw ctPPl)catl aD ------) --------1 brein fiarrr : -/ procedrrre 6 Gnhgco.re g)eSSF,sh E.X Dorrg,n Seyucn (i]irh l'1U E<JJ'Pse JDE . j J l$lndo<omtnu--------e p^rrPaeocelo ------11"t[EdP{e-----i &nE-na "------- blarSFXXtr- &,tassFuha'x @E.nlte------" ]l''ned'vem'X' % ----- ^.M hlcb alPtlcoHc'n" r$ n .La -'l -> plain Ccoc su'r'ac"rs anX PosiHondl lmro"rto6t1) in lne "Vtel g('in]',xosc Sw9crs brb psiHo'(?) aod rnmcd par,"$()a{s (*'*'Vilii' 'U .--+trhrnePaT4rD€}e{scc'eset?descriprSue,fuoc,rV.Psitlcrrr.lrfufe$&o^u'(neeAt/ dDtscTernpla}eclalsrtocooucoirhr.l"*..,patamefo,let-n^red|*t,,"eAM,'#fu -----------+ Lr+?;/i tocalbost:11'zl f rc*Patf forn"hrml Gt?igrva.tt' d"'",r"^6 : In rbe Clrn9t26.rrortor, Rr" tr c}ange iind; mrnt ta 54rfu"- lo t'1 3 D5 [ha-, Senvcl cnar63ed Conr'ed'too pool trq JP ondertoXlo3 Se'rr.'t-rt dcxsnot provide pod5 tn frd avnr,|bcLsed pyogyarnm e,r cctn Ltse -lhiYd p&(tLJ ccrnnecllcn M,"..J f6,1apefr',3 *ki Jzgc No"5l{ss kwbc"H'"@ , v --,/' 4 Fr aa"rpte apPlicdlldD cn
  • 129.
    ?*p^.d5r.*,-.'*5.tt<,, - 51,.s P"tpr"a$tz*emenr og tou{e ib' 15) ,-oY exqmpl€ opplicdfid'o on spm,xDno '^- '--+ lnorder fo maLe oertcrin Bcratnes's Logic as Teuscrbte 103,c ux Cc(q urrk coirb pLl56L fttoaedatre6 c'od -'. PtlSgL flrDc€dqh€ and tr(ocJrc'ns are rlisiule 'in rnodulc c,nd ln mutFple rrrdulee op a prqiecr' |I)e nted fD f6ke c Jav( ClasS e^ed .---4 Usi",3 frr"ng JDac @e &D ccrll Pugo'u lrnrccdrrre Ct{ F<rr'Jrcro fcnd,lo3 -fioa Or5's?'jduc'ohjcot' e*tPffi iP Cafain (rrsisK'1i of)e'aLkloos Oab$ then toe Caq ]mp)crnen t possiSl€ coirl &e r*thado of- ra 6tTcrpla coirb 66tttbacr iDrctP6L6 g''p€rt ' ar( not dltcsl X ihcse og,ra,rlon6 Ro,r l"hppex -> -Io Poc€r5 one reccrrd oP rbe l?esut r5et oU RerrLrfuE ohacr^ --> ib P.ce^E *e rnutHple recerrde oF Pes'rt set ohj P."pr.aSr.."r.*.rutCrc.tar -_- Biu€6 &ro ohic* f0 c.reolc and c.ee idbc P"q-"ea6rt*t-t'*o$ cind coe use ex€cr.*ec) to c@ot rh,e PLlsst fmrc<&Ye to) fi'ncnon ' '- @ p" exarnple c,pplicc"ttcro ao (or-{-rrrg pl-fsor- proced"e 4 o't(!t-t" DB 61(o "€ee'{ Pofe rrro; @AO A-feoso: @ )-o1c A're ---? ro da,elop Ohrts b.sed ft-tq6Qie slto ;n'lepc#e'rt Lring soll6uedcs then Loe ne€d fo mcnlccoi/,.r fBaAoS, 16P lin k ond €-re ' ' ' plcrtD g65c and 5pY,ng ;Fbc 39rt- Ouevies c,n d *rse So, W rhese PcrrsisKoce :-r 6pnng ORn wrlule d ku<'t cn exi6tinl oPr4 crs not 3491t its ocon OPn slto' slrrr C.nJ lir^PliFic5 1te Prccer 4 yeqlsrc4e Logic oirt Ye &udzed g6L @uet're) e",<- DoraBcse sJL" LzEi <t t"-Jt l- ^*-'"n ?M+H6' flD6tffn (e Lo'd;' torl''a^f orrn sltos lirc ++&'n'*t* ' fiar its Pro^ride fSose Setact ofxnaHcrnS ond uJa{uDt (0lr-6 of?ticc*tctn ''fj '+ *' Prgt rrds QD * @ l{loe lror} togrc ond- cenhc"{-jzed R ncrong oP D'ruB*es) rnuttiPle oPPl'' collooS oPc p," *,rs !6 usln5 lelrnAenr E'*< Lca<MnX urt rd opr',t slot'
  • 130.
    f;" +u. lFe'rct;es ORn 6]co H;berDerc ibons 3do JIX. '1bpt;oE 6stflple -lemplat clc{s Sea . ir6Jeroplctt-e clas6 619 ' o? - oynr, ' bi&;rD-t<a ' lh r"ror<l etnp)6Je o€'5F'otr.o . )ba-H6, 5q,rYbpC0c"trcropl<rre oq,sf, , orro' .Ho'trdoTcmPlaf< afi.sP'or.o ' iPa 'JlJcrnol<tt'< iq'rf ^rt,roPl,,n t< ' llPL;nrT-Pl.rc oq.sp.orro.bib,eroor€ a.Lrat&satcnkcr."gk n 0hrs &s€jcnR'4'""u 4j' p.r trus JdbcDarcrSarrce ohJ ;r rcryiw d. lo L$.rle )Ab,&IAe't'PIat< clars oQJ futa"fr'cn y obj )e rq.rrtd a .-> Eeoo &aq @no rbsi Tlr,f B;t/e8 gl'ca JDtsc kd'<.8ctu-c€ obj t}'"u.trrrrc S.rrl*.,E.t3 oq1 ( b-t&ot'"F"4k'^^d) *# 6&^ Hibcr'areErnolare imgrrtenr rnerbcds 4 1-ItermrcTe'nryjt^t R , Sinatera,o oPx"ollonc : @ P"r reccrd iPseaic'"' "*"cj) -- y *il: :H[ **.^^ lard0-) I Wa'^t,.I*no 1€cc'd )-r^ur'-r-+ ft ,dd( ,^-birJ^,* et t*i'P ) ; {.n ioornng ) oeAoH'S e^ htE oPto$T'-j-J fl6,L B$ei ryrr-se)elr o?t"o,J^ urrrU@te kl -+ ^ - r e,,err oy@ *rc'"4 ' o"rrU$orc k) --5 trvrl- '.iH-r.. Eqrrt oytd^ il;r;ff.naxr^tr) ---n P^ |$r- 8c'reJ ,L or"n*.*' iftratc ('',W --> P^ Ho' b/t<ed I
  • 131.
    ilOdute -lll ug!ry rg"r" tpringcoirbHibetmreApp;coniraltrDprlog'APPDT€-PYeseofgB'Log;c aodHibcfnrc Afpn 'G{:reSenrb Jrraiereoce L-qlic' *--> Sp,,ng ood l'fiberrn-re Jnrcgrario'o i5 mrbiog h.r c'cldiog b;utt*"tt lrt6i5j-..rre : logic in 5pr;rg appo. _-> Jb trrl re l*beroa]< 64>r> pef6i5ieDce io6ic io fix,og&rn ctoes buqsiog 5gr;og CRrl rrodure &r need HibrrnoleTe-piore class o[i ' .-, , 1 - 6trrr,9 ufth Fhl*rrr'l<' Appn lusiq Hibcroorc Terop)c*e ctr-ns u-) J fii6ornqprtpp Byrffserr Ctind oCd lPrhere is no *{",tc,t< lcoinfssLogic ;D Spn$BcoD rr..,.nlJ*n*log;.re clcts cls B.Lc,g;c 4 rhe St riqgB€.,n ong 5Pr;ng Cronfigc,rc.Hon Firr qlso l"na,ntcriniog he tntr;% o? Fhbrrno_rc (crnBgo.rc,l"^,, ',hva ( HB PoJoc tc*l
  • 132.
    Pro€cdrrr-e 6icP-r:- jnPo'- ftvelup keeP jo, 8r.s l-l,bc.rnte -/ hJE6__r^)rh.$ 6,a.^) _ tnde.tttop tbe abow $;ng crltb l-hbetoc,t< erf el.':co6* Spnng aod in c$s6p4ru : 6prin6. jar, bibc'cnre a..ic.y dg$-r^,F lib Brac.r: ?----------) sprrng ,hr ftres ' t'-------e hi*'o..,'. .ht &lcs rroa-o class) rooPPiDS €.le fhbcroorc y€laJcd .t'av ftfeS in CMss pArq orrd CPg *re #'rro.o;t,3 bcaos in Spng cfo -> Beao givrn g filbchrc.Soc.rce -, Locrt &rs,t"lH*j ra...., flvin3 l-$berrr*e Eessronfr,ar<,g o&.r --J fHberno"reTernplore class as Springka.b our Spring $can iqlttng l-hhrnorelernplorc ctass o - Epnn g Inrcr$.ce, SPnng Eeon f€r6i5Knce l-ogic ir, 6p"ng&oo crass $ ersrng ll'tcrmrcJe'Dtlc.* ciass o[i & rt',e OfPo in v6ulcx Yr&nbet' bfeP-m:- Jar Eres in Srpry'-- deve lop NOTc :- Nrirc i B't c ObJe4 6rc?;[:- Deve]op the renrro'rnirrS'resocrrc€s Ro tna crbow st-t?6 base d Spnng u:rrlr Hik"nc*c olPh E-rpplime rLtc't 4tt'ndocrf AiLLr' 6n eo/ oal zort rePus lbe
  • 133.
    Tbe l-ht- 6uev9$crt is plc"ced and hj Nl&rrfd payam. *)Exeat',oX tta,.11.a Nrn,ie;,l,tnrs nf,i po$r;cnal pasa-r'elr.s gq a2, *.,irc Nahve seL q/rr'! 16ifl1 p0$ t)owJ Paran't<a zh-n> "t*l-- - ' Lllos; > /sql' qlletuJ e6Pg"- #s+N'' LretLLyn clars= -9s(d e ^.^A t!e:lidr-= fJ>-Clg poro rtr.s , -, -- ? and ulc ./t.LcD^1Al srxt+ ;P''; ulc'n< obo"e Lts"dd 7' ' - zlsq'vqutz zlh-m> €ltp-!'.' ettllo< lhe aJfiN llI+;w sar afm4. io rcr{,p;r,g 8re borr"6 loBic'I rrome ;s czued "*T:rryi *) skfilh. Lrt narre =" rutd > c lcrts =" Uy.n' I > W5i L l-lttcttx't 3e* fut/r. ( ) [ ^ l.rcste,, n",u 6q3c+[J {roo,eat3)' Lxr J= br' g"dBXNavPd t}-'et L 'r awattx ib: 't' ift{clto'() " wluro iL) & fiieot+' Mnrd Alo.t+ur SaL T airh Narred Pararnett^t 6lq-ri- pnpart Nanve eat ytv,1 ';ltl, NaLnxd fxta:tt*o"t, )n malpi ^6 (n" 2)ym2 Lclass --- 7 ,1cL"s> &/-1a LleWn .ftl4 rlsql-cyr'ttr 7 4h-n> a &o- u !cr.s u:Ft rt role =: ? r erco* rhe cLbar€ q/a$! pAlic Jerarrr getfuta t I l- V,r- ft " iBU rtto*"' 6*"i Amr Named Po'o- f "+"t2 " zE'.et}1{ it; '! - i hera*s c) /' 're, Sm"6 ! I t" ? ;i ,,"' 54Prl3[t r]
  • 134.
    fl h inst<r$ogle r*o,<d L/er ut--oeaa UarCr; ar -selUid(loot); &r . scr L/na.nef" p41at ",)t Ltr. fetPolr C'p.l', ); bt.soue (al; vef&t0;5; -' Wb;re Wnrl";o3 W;rb pb.;n Biklrrrk o1.{ non - &lect per{Gisrertt oPactftcDs rncast bt ..,,. P;elJ,J-red a5 -lrr.nSacHonal 6t€drrrrnJ6 " &* ;n .fi"6 lWnrc lhar i< nor YeoYnftl' P[$]ic Lruatzx AtDdJaL) l-i* r= hrl. pna 85 Namza 6u , fud Naxned la:'arn ("rutz",r''t'"t IftY,FL,t iL = !,ituafa< t)) .9'.5[rIt, " 3,nao @1..rl3 r,o'k"e ulvole=?'j W)tdes obsnadtn ltn cn pao kWna-t< onA +av't ** : /l tr 6npn- burr< rnrdt6'coFon using il6u int re,s= bt-br.tr?gdat<C"rtdro U*n u1 ser'o1'rb1e=-1 nw Ohy*tl{ ng.r'l 'i.r{); r<atcd6 *at a,< u?&xA" *):S,o'p("n0.4 rekfn ib; lliy'lrr,ara-templale cla'rs {ne 1,,'-,n6 lafunvl oyratlonl -) {nt &-YSuo Dqet*'
  • 135.
    = = =,==- =::)-':l::l- - - - - - -2 Tii!e:Spring with Hitrernate App {4#,sd€t L2) 13 14 {5 16 17 is) 1q public int getuid( X return uid; ) public void setuname(String s)t uname=s; ) public String getuname0{ return uname; } public void setRole(St.ing r){ role=r; } public String getRoleo{ return role; } 20 l* 2L create table users 2-2 ( userid number(s) primary key, 23 uname va rchar2( 20 ), 24 role varchar2( 20) 25 ); 76 */ zj -__,---_______ -_rrser.hbm.xmr-!hgs_*fr_i:_s_qs_____ 28 <?xml version="1-o"?> 29 <!DOCTYPE hibernate-mappins PUELIC 3O t'- / ,/Hibernatel Hibernate Mapping DTD 3.0//EN" 31 "http: / / hibernate.sourceforqe.netlhibernate:mappinq-3.O.dtd.i> 32 < h ibernate-mapping> f'tPotr6 cr6l S -+,34 <id name="u]T-column=..userid" /> l5 36 37 39 < / hibernate-mapping > 4rr -------------- -demointer.java-EPil&r$-tl!*!9-:-------:--- 41 inrport java.util. *; 42 public interface demointer 43{ 13 , ouot't rterator getDatq{}- fus;ncss mohod, Decramfiqd) Page I of 3 48 import org.springframework.orm.hit ernate3.x; 49 5O public class demoimpl implem6nts d€mointGr s1 { i3 f private HibernateTemplate ht; I fo6;. to ioj.., 21 { nubtic void setHt( HibernateTemptate ht) (, +;bet rrat( Tcmplotc itc..Si o6y^6 . ;; Jt this.ht=ht: | ;----ful s7 Lr ,) *1.^rs l_.!l*leL58 -59 public Iterator getData( ) 60 { r---t H6L g,ret) t1 List l= ht.find( "froin User',); 62 Iterator it = l. iterator( ); -63 54 return it; 46 47 import java. util.+; 55 56 67-...--------.--....------'----.sprinqHB'xml.-.--.. 68 <?xml version="t.O" encoding= "UTF-8,'?> 69 <!DOCTYPE beans PUBLIC "-//spRING//DTD BEAN//EN.
  • 136.
    '!httB: /./ www.sprinqframework'orq/dtd/ sDrinq-beans'dtdl' > 70 74 <beans> <bean id="myds" iitlJ!:.[]tl"t,"gframework'jdbc'datasource'DriverManagerDatasource"> gNc$ JDg C U,ra9'{rJ'9; ohre* 33 (rur,$en{Tl 77 L04 ios <bean id="template" class=" 106 iirii."v ".le=i'sessionFactorv" > <ref bean=" 1-o-1 </bean> <orooertv name="driverClassName">- ?"Jr""l o.u.r..jdbc.driver'oracleDriver< /vaiue> </propertY> < propertY name="url"> ?JJt-ueliaui:oracte:tnin:otocattrost: r szr:satva</value> < / ProPerty> <pioP".ty name= "username"> -J <value>scott< /value> lprop€rty> 104 Org snrnq i6s C<bean id="d1" class= "demoimpl"> ""-]-ll].1t ro { <propertv "J-t-=l t*"t <ref bean = "template" / > </propertv> lfan(otbfi$fD!. < Ttrean> l- y@ tioeno:lob inf,Ldng lhlilBol. l (q0bt-€ (lc.ss obJ 113 </beans> 114 -------------------------------selectservlet'java 1i5 imPort javax"servlet'*; 116 import iavax'servlet'http' *; rce {io€ no; *q iro ;;;;;;s.tp.i,,sft"*"*o'k'beans'ractorv'*; ili i-'p"* ".g.springframework'context'*;;;; ;;;;; o.i.sp.ln!f'amework'context'support'*; i;; ;;;ll;.1";s selJctservlet extends Httpservlet 111 ,r"0,,. void service(HttpservretRequest request,HttpservretResponse response) i;;'throws servletexception'roException t , { Pritltwriter out=response'getwriter( }; ;;; ' svstem.out'printlni"tn seivice method of servlet")i 117 imPort java.io. *; 1fS i-.f-.4-grgirhit'"'rffi 119 imPortjava.util.*; 13'3 t?Jpti.utior,-co",textctx=newrclassPathxmlApplicationcoht€xt( i1i {:K"*'ffi;tr{ffi;U6t-ttsiveast"^xw4'^ tta''< ;;3 lterator i1=d l'getData( ); ;;; out. piintlnl"<ooav- og""toi= *rfffcc text-= red>'l): 13s out.prlntln("<n iJit-t'oiuttafr users< / h-1>.<hi> <br><h3>" )i ;; out.println(;<tanlslvicllh=8oo/oborder=2>")i 1zz while( il'hasNext( )) 13a { 16?-rrr,r l68icro disptatd ret*Ls as I'lrhL+'hl. VffiSffi*,in Ur'L" Ft's'ncts nvd.ccls af h;5 &ct"
  • 137.
    4.39 r40 141 142 L43 t44 145 146 L17 144 +fe tF0 151 ls2 153 1,54 L55 156 157 158 1s9 16() 161 162 !63 194 -+6 5 166 L67 164 User u1=( User);1.next( ); €ut.println{"<tr> <td > ".} ul.gettrid{ )-1." <trr>" +u l.getU name( ) + " <td> " +ul.getRole0+ "< /tr>" ); ) out:println( "<i/table> " ); ) catch(ltffiException e) { out. println(e); e.printstackT.ta€9();, ,,..,"., ,,: : ,. i"l:i- <?xml version="1-O" encoding="ISO-a859-1"?> <web-app xmlns="@" xmlnsixsi=" " xsi :sch€maLocation= "http: / /iava.sun.com/xml /ns /i2ee http: / / iava.sun.cohr /xml /ns/i2ee/web-apD 2 4.xsd" version="2.4"> <servlet> <servlet-name>select</servlet-nam€> <servlet-class>selectservlet</servl€t-class> </servlet> <servlet-mapping> idervlet </q€rvlet-natI|e> <url-patterh>l!!! < /servlet-mapping> /r.rl rl.0qtl6rn > </web-app> SFioSt+gAeP 696 -r,NF clcss(6 .-J Lt!€{ '.t'(s.5 6Bl€.r6c' {l (t ' ( lAl S tilart'hbm'^rD SprirSDB xF) fLdi c l Lio n= hr. Fna Jtrtrzr 3 t€icq D Exe.r'"Hr) g HgL &tet't lltbli c lfcrotar Itqotcr gerDrat; d,,,Jf"'Jiy:!:? d"nol",et - iiass liu.*.la.,i"n t--r ilibrrrrrtc lcrr 6r<3 I --* ofD(icw,,ic.r 6t< Hib€irn}c?mPldJ{ clcae! . ai!> = i ord ui d <=l 1 Llor"-- ;j Ftfqmet<i JorFret in cga:pAn+ : scrrl€l._Ap;.jcr.,, +n"t,r.h*jr,r ftrts ;n ilE8'.rrocli b htocr .. e _____-, "p"n,;o6r.s l1ore PexSitEn.e o?e{oH6rr5 S crS;o 3 r) E^eGir; og HAL 6€.EI'! 1u 6j coi+ p6i 66rsl PcL,{.(rnef(Jrs [ " Poto {se,r r,oh.* L.ittrolrx(-)j nurr Ohiq,t tlt't."*3 ); lrpo--4o' r&f..S ir: ;r ) +) %d)t rorh Nanled P&rcrrnefo( g(tDttaC I pase 3 at 3 U ,,r, ,-, ht.PindByNr,,oede.^.- (" k*n Ustn r,oita,. '*3j ard uid 4= l'fa', n&o 5r"r6tlfll'n ,r,'er,,?^ it = I'ilcraf,6i),' G no"ta p"r'meSlarr cbtldJ liDo'r,ol)i .. ft.lzan iL,. .: L.) [8rt+r) WLb.nml
  • 138.
    Ex€dt'in q Mq.r€dH6'L q/aaB to)rh frgiil'rndl Ftctrtefu<S 4' -:.::::_ Slcp -r:- liJrire Naff€d HaL qr'!3 t; *o")og rrc'pe) q Sre 4qtu"l, 4h- .n> ereure *c abIe +o'Lquery pir8ic f,,tuat ,t 6aD'tat) -.$ v - t ,*. '' h+' F|"aftM'*a 6"o1("tr"rl nt- O$"r11 l'l'at 5 "1 ' fu6-nJ'^ '1Y -- !' )'t<xala'C> ) Kram ;t; Lh-m> z)ass --. 2 : zlcsu{s > /+eZ mne:"Lcsi$ " > 4to- lJec" cts rnltrt o ,r5..n1g liEe I and ur'uaz=:b Jl > $?-{ri fiunnq Namtd lr6t-@-(l-t sry]-;ri r,t{,^'r( t'.w..d HLdfltd ;o nl4flru (;tc htL:rnX /h-ff.> Afi'cA I ,/ rlcOATA Lc.larJ ---7 4ctcrgt> [ &t Uit" " fatL' > ub @heYe ttb'ctid >="' Pi- sk?4i ===:: . tlapr4z th,- ^, uro,x tL" o'br( ML+unJ' pl>Iit fu6"At{ trDd-" { L,s+ r-=-h*. ft"r 86 Na'ea o"'r An J M'^'aP^"' [ ]"#; n;smffil i;':"1 ;,' f&tzfiri i+ > I . Ifcra,",'- C) ) yelurn it )
  • 139.
    l1;&rrnl<Caub<ca Q;4execohng llibe.mtePe$i5ftr}ce Lo6ic 4 Cri tcrlaApl bU c{5jog Spo6OPn rodule. Brblic Jrctor,x ffbrztL) Ll* g= [Liot) bt' e^ec"rc (neoo l-1iue'ooreCar-ob"rrC) [ prric OhF'i dotroll'beroale (5*t'"' sen) {' ll A,t;o A?t I',.,sLd Pers;sta'nce lo6;c Grte';a cr; ses' c..'oor.Gra,io (Ue"'cr"'ss); ll aaa Co,',Atcn Gle; * co'nd = PestrtcHcrns ' l;tse ( "lole ", " '/ P'r" )"' CF'add (C"t'a ;; /l exer"te lo6;c l-.t3i "0.= ct' lisi t )i tetutn 'L', Jllncr+A Jll;nncr ctats )'' il"u^"a I-ttratzn it, = !' itevttu L)) y(farn it', l l 4$: rn the o.fuve code ht-ueto.,x().{ne6 k caued h""n5 dLnc'nomQs innuda*J Ohreq thdf ;rry)ternenK [lrWr"XCoufuc* (t1 16 e^eutl< *ts Cocle plare fr fortoui.,y jc,rPites iv't'rhe ctasparb' I I (Ss"g..1ar I h'Or,*t - ,o't ( 5.rn 1a- -a,41 jar -a rr.t 5p,rng ru;rl-r Hibp{rute appli(afic,ns ule cdn tcrY-e l}'ts{nclft CanfiXuraHcn €'re and D,'" ^,'*- VolJrrUJ w"" a.e rnc,st !c - p snparrtS , tl,tn l-ir brr nalc G-fur''radcrr ht Sfdng Conft5r''ro$cm f'te s1;arLrtJ' YILn rrr' 0l^.^,.--r-.7sr"n3 LUrrtrJ-- P ' ' ''- ']'- n^-at'r"tt l"'rn*on ivigo{t '4 w"*x&*v4 l;npea LDlrt, Spng rnfu ftre 4 uoni Coak6r'* Locanon avoYa(ry Trrrlrvs Situc*on fkr< isno nted 4 grnfiXr'ii$ ke'nttr'l gfru doraSxrce objc'r- in Sp';nq G,^f.3uvaH.* f,rt ,
  • 140.
    EB-INF P )t.jal Nc-b. IrDl RevtsedSpnog urid-, Ihk"lat_ thjt--P*"*g c)&6s $".5HBAee J----------------+ l.J ClAsg€B X ,Jovcr f+) derrointc,r , c 1,"*< derrrrimp I . clars SP'tnghS.xrn'l fi;,Utta,rc. cfu,lmt (I&'bbrn. 1pa1 U[<lr.ctctrs > 6ek*&wt*'ctali ) @po e*o,np," tPel ibe ;u I hiberod.t€' cfu. rrn) :- &rm ora lri*rnalt 6o-nf[crreHc"' Bre t'iqHg x-r z-lfucrlPE 4trDrrn rprDe= LIfuo> ZIXooO > LLf..a id -.rq56as]coTac.lzm6u cuos. of6 '5r'inskroecDc,,(p.6rrrr.}uberra.te3 .*t: JJ eam e ora 'lli bcr ncrrc-Ttnnplc're' teaa prei&s o?Pn' , -/ finnq, hibe,nofe ;^Fc6rat&/' zlbeons> * Arggl-o."n.r,' v4lue="ct?ssP&lfi ''b't4t'nle' tfo'xm "I > krod"-rp ctassu Corft3 uwjtoo C{p(lcorton crn SL{SlmC ncttz{v3 onnotctllcios baszd {t,ndocrl- 6*^ (sw"6 a, bibemorc + ) orl oaf zor:
  • 141.
    Mo&rle -iV 3pt,.rr lPgPlodule .LE 9ive3 APdicahic'o Co'w^t &nr<nrfx qqo@@ JT 50q0 t Igc+ - lqt{ -'> l4at.',ng &rr clpPttcct'Hcto execrrh'r,3 oo Cerrcrin oara cnd g-e orl'er ol$ fi" one hme ot) P^ rnutriple hmeS is norhnS bt'r €nabillng 1t'o-* on $e apptic&.*cm6. dhire &aiJ"3 cottb 'iirrerr-,rr-t'o aous ftjs et''cd-ltg' r5 Verj rrnprrn-(ni-, ExampleS i - Sffdin3 r€mainder,g an the lstoP e*-monrb' c)eaning Temporov5 $res ewldru d lt'o'clocL ,^_ F* fbese oe-.alio$ Ne can use T'tT vTctsK, -[ime r Clas's ctp idk envitor'rnen] r --> The Java cnsS thaf exteods Proro TimeTasta class def,'nee *'u iob oo cohjch' Coe ore PlcrnninS io endbte Sex!ice __ The Schredr,ted nfJhor cr| In'rr ctocj can erp'ble scbedr'un3 on the iob ! & idK leuzl ltrray Srvice anrpUcutton rek,t Of?lia3flor)(O e,lt. P"3::,'9 rrnP5: - ..-t ,."" :: lnnlr.l.,n r.r pnr.t,ta ri.rrn +]lice "d Cq"'t4+S-fqtz The log;c on ol"uc,F, Ltr aft lool';n3 lo en'ebtc lrrc'r gx Tnitio{ deleS in5 rrrilli irrrnd3 SFd615 in; Hor dalag" 6 s6c;6cs lne rrmc 0ep bluo * *&"Jf.-* " ' povides ctbehacdcto Lrge, *, &varrrdl o+ ?r^ mc'i)ing operaActrs provideS ab6hraortcm tagu ott i.rs €" rnessag)og ope'raf{cm5 ' fJr,ivldes crbstrocHoo 4o^ tmi, tdelrsew'tln t deveiP d'F;t'rc'l appticallo"< g;ve6 dire* dist ltr*ed terbrolqS cruecl HLTPJT'voEcx ' -ll'rr ba-ced schedul;n3 ovaollcxt3 ' obsl-racrtcm Lcrdcr orr ind; 'io ioierac* co;rl Re6rsrt5 6spttr'res' erc.... D ?) 3) 1) 5) 4 +) fop'* prDvide.g and ex€(!d,( rhe .fbb ctn S peci€rel Dal6 and ima
  • 142.
    odvc.ntag% o{- sP"n5$ned-ti'r6**tt* lr'x" *, ildts Eut, schedz.trnl ao cl $ivea the fttrrcrtng benfirs' Ollo(o5 io PetF.- &}edltiog SfreciFt prPorrn 6chedrting ttcr rrrcns da36€a Schedt urrg oh rrrrtHple JobS' ",etarcd W@Y{f,1<'{6 cFrla'rc*ive lX usrnS xr4l BleJ:- on rbe urc' dePrned flxJ&se' ur-ndeftrrd ner.d not b be etrcrr}.A Psc'"" -llrnaiF s V ctatj lfrrte ip61p66r1t beont oP €fr'ln3Based TirreT ope'aficios' o 0rg. €p. shedurifrs. tirrr-r--hrrerrFcrcroiBeotn,, __.-_r J [S*"a fuWT'rrr" 6e*rlire h]bren 6nit'..ner is stcocca 7 @ otg'sp. srhd,tin 1" fi""r' 5n*-iltmez-TasL' ., -r regrerrri6 the Job "n cpkrte|, @e trctt,'r to eoa',,'e avtvtt *xvice,) -'' -.- -,,.^-e '--r 1fu'a iob musrbe tt*-te inaiava ac't rlx* 6*coao ?-" Tit'u-fust^*: --1 Yegeir-firslhe job dn eohich ur uYLoJ to s*bIe -hvrr-'t &{ui ce ---t -tttr-5 Job cat' Le lbe€ in a u*-^'"g''ntd me-o,d & uxn-&hwl datn"l"u'' Pcr 6prriog k sed CI)ealalllng exarople O{?Plicorl do6 '6L91" o{P'i&"Hon l9'>n c:? r1* : Fte no's 68 io fu _/ 0 @ @ : &t$o5 to 0llo(o5 ro clc55e,) . ',J ,,/
  • 143.
    SpringHBAppAnno l-----.-----*-'wEB-lNF l----->classes ,_1i-:_': l: anl|l-2.7 .7 -jat commons{ogging.jar dom4j-1.6.1.iar l---------'pl I l-.-----'Demolnterjava/.class I F--- ---tDemolmple.java/.class I l----->Selectservlet.javal.class I F------>User.iava/.class Taloal'nt5 312312013 9:22 AN ,pt Bres io c,rxssPA Ttl j^0x " Persislcrre - jaY ai(.'sP ' @$<at qrff jcrygrf -5 1 'aELJ orl s9 a",rt"t'3'l l tzE Ls&s E J a{ o,i sg ' bens -l r 't PbE-lsE ' J6'{ orX *e urt - 31 1' W)l.As e ' ; o"l hg"'nc*e-c""c - +'t't Fn<'t' ic't qpr!!t.!4 I .2 4 5 6 7 B o 10 11 12 " 13 14 c15 0ro 117 lrs I rg lzo[ ^- i; 24: 25J 26 ize )25 1:o lsr 'l zz /ss lza lss :o 37 38 39 40 41 42 43 44 45 46 ,47 48 .49-50 53 54 56 59 '60 61 :62 63 64 65 66 68 rtl-----I F->SpringHB.xmt j-----'lib I l__-_.C.jar) F->web.xml l5-2? coltc$ Prom bg"t.sr< + 'l' )-e,5 cotecr P',,.6 Jc!.rFj'r der' aorn P7-8b Cbr'eL* ertra spnag6) hibemate-commons-annotations4.O. l.Final.iar hibernate-core-4.1.8.Fina!.jar hibernate-ehcache-4.1.8.Final jar hibernate-jpa-2.0-api-1.0.1 _Finat.jar javassist3. 1 5.0-cA jar javax.persistence.jar D jbosslogging-3. 1.O.cA.jar, jboss-transaction-api '1 .1_spec- 1 .0,0. Final..iar ojdbcl4.jar org.springframework.asm-3. 1. l.RELEASE.jar org.sprlngframework.aspects-3. l.l.RELEASE.jar org.springframework.beans-3.1.1.RELEASE jai org.springframework_context.suppo(-3..1. 1. RELEASE.jaT org.springframework.context-3..1. j. RELEASE.jaT org.springframework.core-3..t.1.RELEASE jar' org.springframework.expression-3. 1..1. RELEASE.jaT org.springframework.jdbc-3.1 _.I.RELEASE jar org.springframework.orm-3. j.I.RELEASE jar org.springframework.transaction-3.1. l.REaEASE..iar Demolnter-java package p1; import java.util.'; public interface Demolnter { - public lterator getData0throws Exception; l _D:T1T!1* package p'l; import org.hibernate."; import java.util."; import org.springframework.stereotype.": rmport org.springframework.beans.factory.annotation.Autowiredl @Component("d1") public class Demolmpl implements Demolnter t @Autowired private SessionFactory sesfact; public void setSesfact(SessionFactory f1) { sesfact=fl; ] public lterator getDataOthrows Exception { Page 1 of 3
  • 144.
    - sprint.q! 3D3t2013 9.22AM Session ses=sesfact.openSession0; Query query=ses.createQuery('from Usei'); Iterator i1=query.iterateO; return i1; ) 69 70 7'l 72 73 74 75 76 77 7a 79 80 81 84 85 86 87 88 89 90 91 92 o'l 94 96 98 99 100 101 102 '103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 taJ 124 125 '126 127 128 129 130 131 133 134 136 -!-:li_i1t" package p l; import javax.persistence.*; @Entity @Table (name= "users") public class User { @td @Generatedvalue @Column(name = "userid") private int uid; @Column(name= "uname") private Slring uname; @Column (name= "role") privale String role; public void setuid(int n) { uid=n; ) public int getuidO{ return uid; } public void setuname(Slring s){ uname=s; } public String getunameo{ return uname; } public void setRole(String rX role=r; ) public String getRoleo{ return role; } ) DBTable create table users ( userid number(5) primary key, uname varchar2(20), role varcha12(20) ); SpringHB.xml <beans xmlns="htto://www.sprinoframework.orq/schema/beans', xmlns:xsi="http:l/www.w3,orq/200 1 r(MLSchema-instance,' xmlns:context="hlto://www.sprinqframework.orq/schema/iontext,' xsi:sctlemaLocation="htto://www.sprinqframework.oro/sctrerna/beans htto:/,Adww.sorinqframework.orq/schema/context htto://wwwsDringframework.orq/schema/contexusDrino-conied-2.S.xsd',> <context:component-scan base-package=,'p1,, /> <bean id="myds" class="org.springframework.jdbc.datasource.DriverManagerDalaSource,,> <property name="driverclassName"><value>oracle.jdbc.driver.oracleDriier</value> </property> <property name="url"> <value>jdbc:oracle:thin </value> </property> ' <property name="username"> <value>scolt</value> </property> <property name="password"> <value>tiger</value> </property> €laltdn/ed l-a *eu":^H /ksrh4 t t{ </bean> <bean id="sesfact" class="org_sprangframework.orm.hibernate4.LocalsessionFactoryBean,,> Page 2 of 3 J[::'.5..*'
  • 145.
    sprint.lxt 3/23120'13 9:23AM lirk ctrerl^,e.e in' P, ' Poc 139 140 141 142 143 144 145 146 147 148 '149 150 151 152 153 154 155 156 158 159 160 161 162 163 164 .165 I Ot) .167 t06 '169 170 171 172 '173 174 175 176 177 17A '179 '180 181 182 .183 184 , 185- 186 187 188 189 190 191 192 193 194 -'195 196 197 '198 '199 200 201 202 <property name="dataSource" ref="myds"/> <!- use this to avoid configuring mapping file-> <property name="packaqesToScan" value="D1,'></orooertv> </- Lrrra*"U *f 6frnn6 Cor*ainey ftL%tu z;o3 sll </beans> cl.r9 s€8 the F€*.? ::::l:tl:lj"* package p1; import.javax.servlet.*i import iavax.servlet.http.*; import java.io.'; import org.hibernate.*; import java.util.-; import org.springframework.beans.factory.*; import org.springframework.context. *: import org.springframework.conte):t.support.r, publicclass Selectservlet eldends Httpservlet t public void service(HttpServletRequest request,HttpServletResponse response) throws ServlelException, lOException { Printwriler out=response. getwriter0, System.out.println("ln service method of Servlet,,); tryi ApplicationContext ctx=new ClasspathXmlApplicationContext(',SpringHB.xml"); demointer d1 =(demointelctx.getBean("d 1.'); Iterator il=d t.getData0; out.println("<body bgcolor=#ffffcc text=red>,,); out.prinlln("<h1><cenler>all users</hl ><hr><br><h3>,,). out.println("<table width=80% border=2>',); while(i1_hasNext0) t User u1=(User)i1.next0; . out.println("<tr><td>"+u 1 .getUid0+,, <td>,,+u1 .gstuname0+' <td>',+u1 .getRole0+,,</tr>,,). i out.println("</table>") : ) catch(Exception e) { out.println(e); e.printstackTrace0; ) web.xml <web-app> <servlet> <serylet-name>select</servlet-name> <servlet-class>p l.Selectservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>select</servlel-name> <url-patlern>/selectaction </url-pattern> </servlet-mappinq> </web-app> Page 3 of 3
  • 146.
    Io 6frr,.,9 5.![tibel oatcTemf]afe cl6ss l'tc l+iberrnfe Sessi-faoz.T ohjerr l" 8fr'5ilec"" brcn dqn cct+ea aod vemot rrd so, i D;€LI- olUte cooru,r6 c,r;rt Sl*n3 a ( l'r' Uroo,he + C.trhb narttoh -
  • 147.
    -> Ltlrr Ba$e 'r€f5hv .TcrLi'l&rvCr *) Jovct Opplicolltln -----+ Jc(Vct d0Pn .tava olpn Ftvcr lt,i I S/ur rrro,ol-c..io6 re(or dj' 6lut rr&ia tctins Ohjeo$ rre;nfcrio6 erDci l CtccounJ6 O-.rcl '.Xssc.geS ' U€e6 idbc 6rP; DbSf ir; (o'raue, 'sujtrse c^oA e+c " - )uses Jrtl c,fi Jala roai I 6rp; icva rrrd t af; rn€ r(r:$ DB sllo| , r,rlc-lo Seru<'{ Scos a4dr€J Qgtst'g d,o (w@il+e*l- jSpss regrarg c'r'd *c"-) llcl,lt servert slo [ &mes fta*-ser *t,Ui-"orn1ey'bffi, iavax-rrctir , javax 'r'rtl I ' iDt(ln€J- ere (Oa' t & Jzu- -tdttr e- ) crze rDt responsib rc fo efl:ril c+cocurt'l's aod eroa; I --> ttrX arl- troo tgfxs nrd ) 'ticnts D AoaX llade rna;t cucnrs (rlecur*r 'fl6atlavexprr5s ,,bt<'s nora ) z) lJ.cna66ble nail ctlcnrs l*t'o &^va,.r,a; oa'i uriti za{*) UndersrandirS n-rdl S€:rve-Y or I 6e'i ve'{ (rrac}une ro) frrirninq &r!et ( lbPa ltl.4AP 6argo'oQ se"vor [nre) Accoct ot r ]----+ aNBox UJe5 Jovayrrd, d?; f,l&i, cllcht
  • 148.
    ancomiog 6arve{ i5resPcno Sibl e inboxes o? errrn dc4l)(rnJ6. CtlSoing b{t)t i5 Y€spr,tlblt to CtnOtber Lfiou CLcltatrt| . fo Ytcrr't.e Ond monc,ge 6 Ei I messcls €6 hD fb e '-) $grLtd drlercl lhe err'4il ry11ssare'i {}otn inbox onne fi to 6end err,cf I rn€Jsc{A'z Pmt'> dne en:rl) 1 'L<abQnt elraril rrrseffA ip1 $e lnbox SLnftLbLe k"t }l1<xnef 0r'-ael ----t --'+ PoPa incornlD, al€ -lhe ,-d 4 rno-rl cJiorrs' &' lt ls &rep lnCDroirtg Selt'rtt rrain'taino 1.htl c.re a?to{ {ead {fum inSox, 3o, +^ inlrcrneJ rnoi)ing 64+c,rn--,t i aagang r r se ft.r-{ rhe ;t i5 3;wn mnitin3 Oporcrrlo'ns . ESI- iLe Wt^'lJ ' Gltoil'com i ---1 floJ clienrs use Poeal rm*e ?rDt0cols ta infc{crcf & rrt'i &fl€r6 ' P0PS > ,{)o'st 6Peic€ PYDtocD Tl4ftP-------------":'*n* l1:rt y'ccess pzrfoco' I l.lc,,tlctitntt ust sr',rrP frt0rocots to Jnfct'&r* 6+ no.;1 Sevu'ed5' SMTP---------n Simp)e 11411tt'nsF'v potoco ' @itb inccr-ning Setrucrr6 (oi$ &rd"tt(n6 ! gg '---r Cq lan CUetu b< r bl;nd &/&sq cliu'a+ ' 'Ibe Strucrrrve oP E",olt t sg To Fom c c bcc &Aiert Darc aDd ete," -. I4f e&nEr$., -" - . " A$acFrrrfr$ a Altad,m enl- a
  • 149.
    &mes l--, fg fe:, llai I &..ve.l ' e{5icrn : 2'^ vcnd o{ : Afcdo e dePcu'tt Pc'f no S 644 6drnio Ccrnsote : 45b 5 ft'r POP6 incDroiog &tutd i llg Fttt SnrP &riSoing Se'flrer i 25 -----+ Tnsrax crti(n 1 VIYGLI rhe zip +ir insrou 6't-14" To enrt he Til^tl 3€1"e-{ : L Jame i-bo-e >tlt tc'o'bc* P;te ' 4 sl,,:. in JameS rrfrl I Se'rvc'i "' - prccedo-e to cr€c$e errni I AccscrrLlrg n-}cnuall3 5rcpJ :- 6fnr rbe Jatr6 #'' vd n*t*'fo csnnef tosto.l-]n cm6o1L Q lrar*s xt*n sl-r.rt --' {uf)+ tglne} -------+ Of€n lOCc'-iboS f 4-5bb lqin id: r00t Err6cctCrr d "' 106 t fuetC666 le6t. letp G ddtrst^r 6dduS e'i ' lislus€r 6 CarctruQseY 6 deluser 164ri U5ti r&vi deleffd Sesaro,n ohieq oP 3vc mol API rr0J l Server ' To cware thi 5 prD00,r'3 ncrrnes ar< ftxed rn&r) sei'vor de u6t ' -rovrrarie .,- 9**' Srttanr|, 6tiranrl'' fi-rn i rrftzi feoree'1fs tar*.,rr obj .ioe Cotonechvt r5 Lf-t(i€en iol!- a49n otl J of, neecl YrpLl pmlre*ies ond the(e- cilueg toii uct'Ulrrg bctsed on rhe
  • 150.
    ' 6 P,"exampte opplicatlon on Oalrl Flclrt ^px 6oq6) p18eoo'6 opp'r) no,. -) lo r€o.t w$level mcd l crypti(atlaos rhe &vq noi ) APr Code ul;tl te Tre-frrv q in _ V&,brescrurre pyogram B like &:''''trcf ) CsP. to fuErnr, vrlJ | 67vaa tls1g 616 erncti Oatotrrt15. Detairs oP Gnor t rrsi I 5e'rvcr " - . gd Boro€ eerver mrne- : SnTP ' CnHol I " com MJaQ pol"r cur.hr,,r 4 cxrhSoiog ee{vc'f ( +b5 frf,oml og Sew&f rf.m€ : poP ' GrDorl t ' Co rO fryDml og &'rvrx pornurnkr : qqs D P"'Pvio celo rrni I APr bdsed o'Pr'}6 ro i nrcrrg c-oltb |I)drl se{wr c'P cnmol I Yerov o{'pltan$6r} € io opto 4 tbe ;;; +.h'Jd'r thJ('l c'4 o-tlcnf '>"re .:
  • 151.
    anloa i"o,u 312512013 5:5OPM message.setconlent(maitbody); -r &tting UoaX *tHJrn.ge ccqnfc* ood ntrit.iot $'le b rbe cLAsspAftt 1 2 3 4 5 .6 7 10 11 '13 '14 15 16 l7 18 19 20 21 24 26 27 28 30 32 34 Jt) 37 38 39 40 41 42 4J 44 45 47 48 49 50 5l 54 55 56 58 59 bU ot 62 63 64 oc 66 67 6B Java mailApps {rrginq plAI D i:av(( frIj I Apr )--App1 --*-----*----- -SendAttachment.iava-::--9--l-------- Java Application to send an E-mail with attachment import javax.mail.*; import javax-mail.internet.*; import javax.activation.*; import java.util.*; public class SendAftachment { public static void main(String [args) throws Exception t //Creating Properties Objct Properties properties=new Properlies0; //adding protocol,mailserver address & the port number ofthe mailserver properties.put("mail.transport.protocol","smtp,'); properties.put("mail.smtp-hosf ',"localhost"); properties.put("mail.smtp.port',"25"); /lCreating the Session Object Session session=Session.getlnstance(properties); //Creating and configuring the Message object Message message=new MimeMessage(session); message.setFrom(new lnternetAddress(,'sachin.l,,)); lnternetAddress address[={new lntemelAddressCdhonil',)}; message.setRecipients(Message.RecipientType.TO,address); message.setSentDale(new Date0); message.setSubjec("MAlL WtTH ATTACHMENT,,); // mail body obj Multipart mailb'ody=new MimeMullipart0; -+ represe,rts rhe emPB bodrJ c(- *t€ Endn| m49'(3€ // mail body partl obj (text content) .l MimeBody'Pirt partr?ie* rrrri*eg,jovp"rt(); I aadlno p&!il tb rnesqSe bod-5. partl.setText("hello see my resume'): ( " mailbody.addBodyPart(part1): .) mail body part2<attachmenl) FileDataSource fds=new FileDataSource(args[Ol);/A MimeBodyPartpart2=newMimeBodypart0; ( part2.setDataHandler(newDataHandler(fds)); lpart2.setFileName(fds.getName0); I mailbody.addBodyPart(part2); .) represents attachmeni tile c{ddiog Pc.Yla to rn:sscge bodX //Sending the mail_ Transport.send{message); )//main ]/class //>javac SendAft achment. java //iava SendAitachment one.txt // Prgs on plain java mail api (with Gmail Env,....) -*-- App2 //Mail.java import java.util.*; import javax.mail.*; import javax.mail.internet.*: public class SendMail { public SendMail0 i Fase i-itio
  • 152.
    TB-?4 tnardt rcn;(,-.Nre a!.cn b-.o5 tDlt+' tol &niil Se-rv€r ' public static void main(String0 argsx SendMail mail=new SendMail0; System.out-println("mail has been delivered"); llmain )// Mail class >.hvac &rdtaiit' jarv a 3/25/2013 5:50 PM 69 70 71 72 73 74 76 77 7A 79 80 81 82 B3 84 85 86 87 88 89 90 91 93 94 96 9B 100 't0t 102 103 144 105 106 107 108 '109 110 111 113 114 1 '15 116 '117 118 119 120 121 122 123 124 125 126 127 129 130 13'1 133 134 13s 136 trv { ffirTffifi::ff! new SMrpAuthenricaror0;---? obric <t c*r,gtn &t irrrx clclls Session session = Session.getlnstance(props,auth); //prepare mail msg MimeMessage msg = new MimeMessage(session), //set header values msg.setsubject("open lo it know if'), t isizav.{ 6 grd'i r . (oD msg.setFrom(new lnter netAddress("sa+Y#+*+@eBrail-€em")): msg.addRecipient(Message.RecipientType.TO, new lnternetAddress("!A!aEz(@goa!kg$")); //msg text msg.setText("mail from satya"); Transport.send(msg); tftry catch (Exception ex) { ex.printStackTrace0; ]/catch )//constructo r private class SMTPAuthentacator extends javax-mail.Authenticator { -1 ioncr crass k"'io 9- public PasswordAuthentication getPisswordAuthentacation0 i L arrrl,r,'.t'calloo lcJ; c return new PasswordAuthenti;tion("satva€ffiil+23@qsaitinm","ra$t2€e"); L.l-^ .-, *,* -,* rDcdl.nrn/(.5 ]/method t€st zov. tesri."o lt"ir. &4)c )s mqri) )//inner class ,/ ' ' odd rrra;t"iar in be cL'AssPArH ' import java.util.'; import javax.mail.'; public class GetMail { String host="pop.gmail.com": g512aya @gw . rom String emarlfrom="satvaemaifi 231m€em" : Sting passwo rd ="iavaj2€€-"; StringPort="995", tLstJC'v" GetMail0 t Properties props = new Properlies0; props.put("mail.pop3.host", host); props.put("mail.pop3.port", port); props.put("mail.pop3.aulh",''true"); props.put("mail.pop3.socketFactory.class", "javax.net-ssl.SSLSocketFactory"): trv { Authenticator auth = new SlvlTPAuthenticator0; Session sessioo = Session.getlnslance(props, auth); Store store = session.getstore("pop3s"), f-z Amr€cring lo popS incr-ming store.connect(host,emailfrom, password); ----r Cr,re*s tO eirylil ! d Folder folder = store.getFolde("inbox"); Page 2 of 6
  • 153.
    3/2512013 5:50 PM 137 138folder.open(Folder.READ-oNly);----r anbdv o?cn io Rg^D-!NLY *"' ".,,.^." Eom rbe rnb6x 139 Messagel msg = folder.getMessages0 - ) I€adiD8 ol-t *re errr. r n)')Jqd- 140 , 141 l4i6 r! C System.out.println((msg.length{)+" message lound,'): 142 d,scYt ) for (int i = 1; i <= msg tength; i++) { 143 ou rt''-,- ) Message mess=folder.getMessage(i); 1,14elf,oJlrnt'i mess.writeTo(System.out); 149 . L 1lfo, cv,rpa=r,.<.w,( u.tt m!g! tc, b..f!i r.d ) 146 lltty 147 catch(Exception e) 148 {e.printstackTrace0;} 149 )//constructor 150 151 private class SMTPAuthenticator extends javax.mail,Authenticator { 152 publicPasswordAuthenticationgetPasswordAuthentication0{ i53 returnnewPasswordAuthentication(emailfrom,password); 154 ] 155 ) //private class 156 157 public static void main(String argsl) 1s8 t 159 new GetMail0; 160 ]/main 161 ]/class '162 -*- *-App4-------*-----DeleteMailjava--*----- 163 import java.util.-; 164 importjavax.mail.'; 165 Dd€re 166 public class€€tl4ail { 167 '168 '169 170 171 String host="pop.gmail.com"; String emailfrom="sadya String password="ia+ai2ee"; Striog port="995"; itsr.i.'va 172 tVftjL 173 '- €etMail0 174 175 I /tt 177 178 179 180 t81 182 i84 185 186 187 188 190 191 192 193 194 195 196 197 198 199 2CO ?01 202 203 204 { Properties props = new Properties0; props.put("mail-pop3.host", host); props.put("mail.pop3.port", porl); props.put("mail.pop3_auth", "true"); props.put("mail.pop3.socketFactory.class", "javax.net.ssl.SSLSocketFactory.); try i Authenticator auth = new SMTPAuthenticator0; Session session = Session.getlnstance(props, auth); Store store = session.getstore(,,pop3s"); store.connect(host,emailfrom,password) ; Folder folder = store.getFolde("inbox',); dl?llE folder.open(Folder-RtAD_€NS: Messagefl msg = folder_getMessages0; Iol ..erFa? ( Fdt5' Fla 3'DF-LE' t D' b"." ) i/l T"'' hft 'q Srde r . t rose ( btt'€ ) : //clGc rte jnbor to;r$ 9la3 lrur Page 3 of 6 91.6. clore())
  • 154.
    3/2512013 5:50 PN 205 206 207 208 209 210 211 212 213 214 216 217 218 lao 220 221 222 224 226 227 230 231 233 234 z5c 237 238 239 240 241 242 243 244 ?45 246 247 248 249 250 252 254 255 257 258 260 262 263 264 265 267 268 269 270 272 privateclass SMTPAuthenticator extends javax.mail.Authenticator { public PasswordAuthentication getPasswordAuthentication0 { return new PasswordAuthentication(emailfrom, password); ] ) //private class public static void main(String args0) { fpretr new GI/ail0; i//main y/class Application sending sms........ -:-App5----------SendSMSjava----------------- * import java.io.*; --) i"T'ir )' rl,ct'." import java,net.lnetAddress; import java.util.Properties; import java.util.Date; import javax.mail.';. . - 1.h**, *rtrmpon lavax. ma .rnternet. -: " import javax.activation.'; J public class SendSMS { public SendSMS0 { ) llc(eate an account on ipipi.com with the given username and password public void msgsend0 {".,""SoEs Str ing username =' giditfqqw" | /l/our Credentials Strin! password = "sffi" 7"""b'-l- String smtphost = "ipipi.com"://lp/Name of Server Slrinq compressre.r:-':None": //l dont want any compression Strin6 from = "ffiE/S@ioipi com";//u r userid@ioipi.com //This mobile number need not be registered with ipipi.com String to = "9198610986.10@sms.ioipi.com";//mobile nurnber where u want to send sms String body = "HiThis Msg is sent through Java Code"; Transport lr = null; try { Prdperties props = System.getPropertiesg, ?. crttr,-n r)eLrr til'lI [nu{r/lP! props.put("mail.smtp.auth", "true'); J ruT* .;*": m(llt fqre{h:s // Gei a Session object Session mailSession = Session.getDefaultlnstance(props, null); // construct the message Message msg = new MimeMessage(mailSession); .---: o"6ptJ (.d'hlE //Set message attr ibutes r> t ' dr -!r{ ds}.{ msg.selFrom(new lnte(netAddress(from)) : lnternetAddressI address = {new lnternetAddress(ti})}: msg.selRecipients(Message.RecipientType.TO, address), msg.setSubject(compression) ; msg.setText(body); msg.setsentDate(new Date0); P{sPonin$ cmilmsJ getTransport("smtp") ; ;ft1 tfonspc'rrr o$ctt poinn h Fe o(rr6'ii-6 (6nJ!. + iPlPi tr = mailSession //lry to connect tr.connect(smtphost, username, Password);-J G'hhett-f la n,,.,.' of )eici dtqo'3 * msg.saveChanges0; //send msg to dll reciprents --," ,b^Lt* /{4lti r'',j,t lD f,. qec.t}f tr-sendMelsage(msg, msg.getAllRecipients0); -) s€rBJ rt€(t'G{ C-r J ltce,1t,"-ls tr.close0; ) catch (Exception e) { e.printStackTrace0; ) public static void main(StringU argv) { Page 4 of 6
  • 155.
    3/25120'13 5:51 PM 273 274 ?75 276 277 ,278 279 SendSMSsms = new SendSMS0; sms-msgsend0; System.out.println("Successfull"); cidd rrgir.iav ftle fo rl'e clatsta6 ' l> &,to-c *oa-6r+s 'i"nci 1> .i4!( S€dshl 280 - --------------Siudent.jau"4spciriS'--*erfc.a) 281 public interface Student { 282 public void sendEmailMsg0; 283 I 284'--- - - * - - - -*-- ------Sludenttmpt.jau"(Strlrla-A(q!)-- 285 import org.springframework.mail.'; - ?86 import org.springframework.mailjavamail.t; 287 import javax.mail.*; -* ujrog plaio t@4 fini I nei a{Ba4 ahfljr& 288 import javax.mail.internet.': '- &N<'lt4< So, t x t !. plarpe D.r,r roa), ^PE289 import org,springframework.core-io.*; 290 291 public class Studentlmpl implements Student 292 | ?93 private JavaMailsenderlmpl mailsender, -294 295 pubtic void setMaitsender(JavaMaitsenderlmpl maitsendef) { | ro in'iclr f,a-r:rlrb'{ l"QJd e .rrnpl cla6 oleJc{ 13? ) this'mailsender = mailsender; J *"11f RRa rt4tt tt ta 298 299 public void sendEmailMsgo 300 { 301 try{ 302 303 .. i91 ,.*C, ,, L. a public void prepare(MimeMessage mimeMessage) throws MessagingException { App6)>>>>>>>>>springMailwithAttachmentS<<<<<<s<<<<<<<<<< .send(new MimeMessagePreparator0 { 305 306 hadnS 307 crcsr oqj 308 309 310 dd 311 €lldl 312nqs'tr I J IJ P€f&YfL 314 St,.ed 315 317 318 319 lftry catch(MailException me) { me.printStackTrace0; i }/sendEmailMsg 320 )//class i,21 ---------------------------------------maircrg.xmr--4pleg-e-fu-tsaJ---- 322 <?xml version="1.0"encoding="UTF-8,'?> 323 <IDOCTYPE beans PUBLIC '.-//SPRING//DTD BEAN//EN" 324 "htto://www.sorinqframework.orq/dtd/sorinq-beans.dtd,'> 325 <beans> l?9 qr€se.* f <bean id="ms" class="org.springframework.mailjavamail.JavaMailsenderlmpj,'> l?1 u."^ .,,1 <properly name="host"><value>localhost</value></property> i<9 :_-;" I <property name="port"><value>25</value></property> . 29 {)iornn> [ <property name="prolocol"><value,smtp</vilue></property> . _ 330 .rbean' t) To run rfii s 331 332 <bean id="sti" class="Studen mpl',> ?lq <property name="mailsender"><ref bean="ms-'/></property> 334 </bean> -6y1p.n. tire Do:Ba6 335 </beans> - 336 -----. . --ft.4ailclient.iava ..Lel,knf -o+pn-)---.-- 337 irnport org.springframework.beans.tactory.", 338 import org.springframeviork.context."; 339 lmporl org.sp.ingframework.context.support."; 340 public class MailClient &rrrs n61 mete. o0pu(atloo K€€f Sarot ri"i., l2cronlng r) 4dr 'fatoto;n3 j"'r ftrz: in tk ctrrtssPrr* g'nrLd. ia-yi brpdl'j..Yl filr i6n-s']{ffi?X* Page 5 ofo ilfl lry) il::::8: ::ll:[iffffi,,!3;.,,'-.:,- messaqe.setText("hello This mail Con.r**5 ..^"-"-"Fs:ij1'l{"^-r.lj:ff|9"_19."1P_91{li-_ ro rr'e me$ore message.addAltachment("abc.!!!", new ClassPalhResource(',abc.ixt,'));
  • 156.
    3/2512013 5;5;1 PM 341{ 342 public static void main(String args0) 343 { 344 Applicationcontext ctx=new FilesystemxmlApplicationcontext("mailcfg.xml"); 345 Studentbeanrets(Student)ctx.getBean("sti"); 346 beanref.sendEmailMsgo; 347 System.oul.println("mailhasbeendelivered")l 348 1 349 ) 350 35'1 Page 6 oi 6
  • 157.
    --) ---+ -) --) J -----> SPting tlail"- '" --) 0rg. 6P. nrriI repr€seffg -----) oyg . 39. hrrnl . javarrrn t Leloer Sewrc<s io r'Jlndods -7 provi&s ab6rro.6 crD 1at3e.r o.r Pl&in Jc'va Ytd APr' As oP ncc Spring rlcri I i5 &aPfiJ r{ (ml[ Serrl rrr': t o PeYc(HctD5 ' Aloos eef ffr,il rosg prDp,tlie5 ond rndll prDgrriei in Sptn$ cq ftre DeLtaYc'$,ftr8' give.5 Gobc.cl< i yut{fu{e5 io 6end errnr I m5g'5 tntrh ot+zr-irro erut-s ' Org. SP.rmi I DoLFage, 1 qrreJenrb Orf " SF.mdil'iovdrr}ctil pocl4$€s J Sr,rln€rr^rdt APt ' sp^n$Pf*t ie& gt"o""t" lttrf"senrs spnng's cdrsr6cr4fton (crrefu tr.l ( use ftrl rD S€nd errni I |n€s"f 1 to'PrtP,*- rrru I cTxT cchtclns b,4- o" Pb;n java rrr.' t aPi' s€nd an'ail m€sso|<l tol$# ) - @ nr example cqrpicatloo oo gendl.,5 emcril m€Jsage b3 u:lng ftmngrrrttl .reeer( 6,4P., not@ oP fie P'6e oo's 6r ( e r t,rrh c*tc.alrrrar* b3 crsing Sp"tr6mcLt t -API ur need to Irlh&r€<ree fllrneYlessaflep"epe'mt"r t) { -e- M'*tf'u c-oirL '""/ .rfPcr 6r4pn no'.Qi oP fie F'B€.nos br q 6I ---, To s.nd & env:twnsgs tolrh ottc'alrrrar* b3 crsing *-t:tl1: .-.,, LOrdF io;Ih dre coubc'cja ltl-h&r€<ree [llrrrYlessogsp'tpe'rnt"t t) { ' cc.rued fli-eYlcsr'0eHeletn - @ fc^ €xcrople c'{Pliccrroo oo Spangrrlcn I bcrsed, *' fif' :'^' .' arr-&ehrreqr -Y;;6#; e'""^ r***''?i*l'"'' ' --> To seod @ errrU t rnsgt LOrdF io;rh rhe Coubc.c,la
  • 158.
    i Can t0 *.1 fu end 6rn6rnsg6 to mdrile nfrrnh,6 b6 .*1"3 &vamorl Apr.{pn@ Praedu.. u1"- SEpe:- 8Kp@.- Creote 666 Uslname C posstrrord ; fun rhe O&es$ spe--h Acccrrr* in J,tlTp.r "com. zavaboES zc.vabosO I frrccedu'c to 5K?0l- f"ee." : tutpuffr.ru..n3 t*['* 8*'* ")d9: the ufbd{pilmfloq o? Torcrorg*rr'r t,.tirh dorrc'in name- ""'-' do.rrrio m-e i.) brrr-1n -"# DNs re6'stt o? LDrndd!6XPf7 goto cwinaaossgsre-aa o.*'.,t" hosr6 f;re to l?+.0"0'-1 Nt^ll'.1 ' rnlaraz " in rh( ' tt 9 cknnge '-[omar &rv.,r pt-- ntxnvd 10 80 xf prt numbtn is not specificcl in lltQreryest trt) tben rhe grol-ocol hJfP tnes to send the re#-tesr tt a Serv;cc nLrost pc'rt-ltlrotor g lqgl-' odu ffrtoco;n$ cde in 6erver'xml Bre und"r LV'tne7 v1 Splofuing r+'.- Cbt,crlt yt6.,'rg and urebolrlpi cctidn qOrne N"1RS.s , IPrPI , 5oh R. feceive SFcific rf,es6ate5 Ob phone numlae.rs Gnd Qlc'. cre rbe efnai I rr€56c€€S 05 Sm5 rrcsscges Srrr Cnrcaco3S. These &crturrgs cond del;vers these rnesscfle{ S€rvo{ 6nd xeplace l?-+'o'O'l kort'osY [*XasrS cff iPiPisr ldcbga Errn, t rrrs6 coirt 5e Govc.ird info SMS
  • 159.
    $l'9 Z. Hoof rgme--" t,twt^J' rrol-t.raz' in' oppBose -''tt:tbo1p5 bzbo€.jr) rarn< unpockl^JAR5::;;;-;'- ar.roftPro5 "" vnte" > l, I LGnrc"r p{.rb ="" docBnse = Vorcr APe /> l-6ataPPtr t<'on on zll+oet > "Y9, ftploEee tbe atow ryec;fu Voa'&p ur-lD@ppD rbe reed ofl Dismr,urcd onou.*1Derolry "* frnbe sure lhGf lnletrorrpBte is 0ro$6a"ed in I gKf4',- Qgrc"vr the 6efv€,{ cnce . 6tQbl- "t6t CrPo brotgc't $e 6ryriar$on u;odoto - ond rgpe frls ot trrw '- Jl www ' rr'tc.raz' in I n tor!^caf&1rr ' rbarh arl&PPl^)' Urrdersrc,nding liad,ltlonol Ole.rf -&iwd-9{0! Trcdiriortdr c)ien'-se.(!e^ o{)plcollcr)s c6*'- PYD8fcrrning e""t ) ct* locolto"dq"-*"r .ttrof meonS o*.,l conge in rhe locot*r6 a4 Senror oqelf Cc*lc'n 1pc vrrul;t trctiE Gde {n rbe clien} &PPns' -Ibs indi'cc*re cllenr arrl 'Sev';e.r ri{tPhi &Yr H$M% - CouOed a4,Pn5[h"lpt*) h,*.* rP de6ree o? dq.,nJe",? ii * d* ft* ^*Y-Y::^:^':, lthHil o,;H c{pn6 s[- corre **a a'< b$eA leect6 - cor.tt cd-oppnr ,
  • 160.
    To deueloP rbe c{6dieuuoed Disi-,ibrjJdJ A?Ph ' Cl.lcni - 6eT!c'l wrz6 .e c(Pl ; catl c'n 3 Apfnl CrS LocaitcrD ti.erspe6,^cn5 l1pg rten deu toee the m Di*rits.,td Looc"Hon of no nerd oP oppns bg aNYA 6erva aharSe $efllng Druu*.d a{lns BLulnetl furmpontnis in .qJ- n'-iJisL"' @ t)l [ry,LrHPle $e'Yslr CLPPticafl ons There routHPle B'ct"ng'unrf dhbd. vi!;tllii-l. C cl;eni amns fre^ B'rornP"nc"* (E @, €l crien'r &?Pn taus wlt,"nxt 'k^ *7r'r'6 si' B'rncr{rodr o( B'tnt*'p^t"t a^J hAe{e B"'r'}'olg cD'tl be derlor"J scfcxcncea coit I fnGrhioe 1 Od I Rea;gttq s).o B'tompenP ' bd- irdia I -----+ B.cotrpe tef lftila? --,-, B'aorrPa r€ .canp?rag ' boat grpfrof [-.{oHcn ltuns?d-trd'4 rtrrt rneoog atutr c"lzanle ln rhr c,+pttc^do just needs io be infr'nrrd b *t1" efto ' antr rhtnLs in c{rde,nl Cient &ppns ' Ecz ott ciJcyl.t o?png l}<r{&at 6"5fi 5t-rrttar gugltrsGn"pnz+ oft*ntt ftt r7'uw7 rlo' xr,lprrt laatl bohnte btt tts' mut$ple S*- oPPllrorr^s ' thy oWo us n d"nl"P mtltlPle tr'"g rntJdPlr B'ct^Pw^n' V tttEli,eJ tDirh Tedlrh0 ol^s (-'t oF S",rrtX c,-fpl t'itr e^.."*a(Snol .'-.s,rrt 6ru LtU<. frb Cllor-t o|pvr'
  • 161.
    i To dax.toP Dish'iburedoyfx>g 6a oed rt''e E3 :- Rrf r , €JB , wcla ser! rces / l-ltbp Jn voker / --- slt% JEE pmrrlde.l a,b'r@art"0 Nfl&wicea a"'d ajso PrD'ldcs @ Pr{'.1-t sl.t ( *o.. b-omP rcftrena* 0s gl$a visiste JDts f lya B;rI, E<IB., f]utp 5uor"r ' ohts an d also ruroVcs Dlt*u,rea }qTb as lmarroo tlorr3Pat""r off".) @ Gvire Ct;er* nPP ( c"rrs Oe b.muhocb oP 8'co'F"c"rrs' Plain RHr :- btrirt - in Disl'lua}td lecbnoto6S at Qrni regist"tr q.5 Rq;ar'1 slttr pirg s oP troi c'Pi oYc : iava ' rrni ' ----+ ft i5 ---) useb -"' Cote iq"fq11qgu"l P}6s S;ldboi i5 he DPPetoce blLD Loco '!. = lru., Ig rbe oppo ood ;tg cl]cd- -=== Locor cticr* ft'o{'Pn' - IF otPn and it5 cUcn* regjde5 in J digft*nr CcmFrtcrs *rn it )s C&!ed .- 3;- lihad is rtre DiFP rlt'',, lso-t ohf* dnJ = - =*" rP trle,hoa' o9 rhe ohre'r Crn be currel Clded Locgi' objeor' TP tt-mentro& & rht ohJerr Orn tfl(n lb i5 Clffe-J ftcr.ote O{]tt]' gfltn* ood Qe,norc ctier* ! ye,eldes 6n 6ctme JVn theoir Is CarreJ tuo criP?e*er* ilns 4 SrrnLal Qc-ot'e cl,icnr Jo a-fltl' eernore Otuca* q' , ..,rrs the,n ib tr on1 .Ro* t-occ'l cx be @red hm !ltl^ LM4! reer'5ts cl|<rrj 9+w* 4 J;.niu.r"J lahnoloytte CoRBA ond Q}r-" "' lo6^ ^ er*trn6 d.tr*arrcd tahnolo6la im o"ro J^'n;b'rA hr-bnolo6; catted Jo D;sr,i tc,.re d App Dci re ioPrnent + Drlo:dts are involvzi ' O $g1y;1g J'*crPac"/Bt.,siness J,rr.rRace -- tosq&"Dmoo"t"*''X.;tT:T*i.lX-6; -> Drctc.raH oo c{ b..arbod,g ive &a't'e bY'ro'h"'/ qnl-r€ra'v i'tifi.* @ S,'* P,ovidor APP (* St"t,v' 'AfP fle' canJoln6 b"'rerboA3' io 8'coroewnt) Obtfit krz'ne: Ptrorchlr o' ol'u'' ics
  • 162.
    - class --+ hlhite G( imptcrrrnrs java. rrn I ,[2"'6o* deuloping &srnhted dppos krrr ra O$eer , (') d/ he b,rsnegs dUelfS rru.sr be att l"pq kcr .ic.va CS"onlo 7n*trft'ce-) ,Qrvcn App "iova C6e*rte Povrac,r *pp ) Cilcn*App"iavo f s"*t.u Cu".,r Ale) Qrni re6rsrrX Cpr6ur,1 st ) Jn ona ornpcrtcr ff,1/ripre JVHS @n be lbenc l-o wtn rnolkiple SirnurtancousB Cor) GncurrcnrlX 6.,'.rla r S:nvcrApp .i o'v a -Gie.l*#rc^ Cll.il A?P ",j c,rv a il k*' ir..'o(&"rire 3*rcr Fac' ) imPo* jara'rrni '* i PLtDi c i66* Pate Fat ertodg QernoK -f ' li*oo B'rrrrhroa< il. t* f;6Eerz"r<^i (int vc'r)'$nu'i: 3 Ba66tc Ex(Pd"n i @ E,*arople oppiicoHoo ch Plaln rrni /i|9*.Aw'i"vo'. imfrort J&Ct'lrni ' )t ) ,,-,'ffitf,,*tffi ic.uc. oppns xi PJb.ic E*T'npr t) tlwot':s Qc"ereEltq"l o' { S'o I f" €'*rtn r i s- sararn Grurn,.cr"r" ) i /',^03.-.* ,.'.'1'-1o* o (lnt vor) frtu. t^3 $nart
  • 163.
    f^ Linr =!-;i <=ttat ; ++ i ) a 1. 1a5: reg *i) 3 tl(lfn ,ftai J /l $naL*"'i'a B$lic class &wrhP n o'v.',(5rl1 o"6stJ)rtrocs fu'Pna - E rl-pt obj=nero krrfrnpl)i //B*r*s ou' Na.,i.2 '':;i.^l"a" i ouil i ll r'ro's'''" qrso N6'ios'bind C r U" 'v 5'o d ( " st"- *pp rs r"^at - - ' '" )' 3 5 il Ctic'$APP'iavq irnpolt "iala ' rrni'*r Fib[c ctos5 CtitnrApp J ElttPd on * n , v t(Sr""gtl u'.'s') w* t, ,* n t* "F fin,,., *oon5 stt'gl.' lo,w or"'ou^ E.j r"bj= LE"r)f.Ji-,ij .toova.(uinu;,): il*so6i=(ruu)r'n'rni'r*!'{'r'ri}lJtrIl ll col B't"ruat L-, lt ["lqtt to ''ntorr S'o' rCCut* hw :' +b's' fl'"a l..or''.* "r t5 )); 3ll-^^ 31o* Coroptte ,.1auo Bres' E:AppsspfingServer)'i'rvac 1'javQ c60t Far-t'cras Ptre il Ctpnr 6rderr' f ,fills SprinSCritnl> jc.voc +'Jo'va' $errrarc SnrU ftre ..-0,$;'$, r--, cl&sJ Ro.rn( o? B'al+ El Alrrssr,,rnc r".**;' ;Ll" Factl-nngt
  • 164.
    g)ve$ farJ'npt -&,,b.ctar,s Ct5 6n b P're to Ctierrr SLzPJ 6tc,.rr {mi re6t6tfU fr. 0n rrcrahof'l' 15 ' these rrcrshocornS {rn""-f--' P a'.vc'{ cPPn' rnM ful IU on b.hale oP k corred *trh"""'8' and Te$rxse is Cdled --+ T6e 6kib &f clienJ Side 4 or €e"ver s;ae grrhms oPc'rctl66n3 ' o, r urrrl cePn 4. gcz ) Iheie icoo Prolie5 Loiu ccrnrounicdl t0i$ on rroi cllc*d 4 St"'* 61'de dPPos" 9.aP's'de ec.cl, orhc'r 1 3t"'B'i!" l;--.r1-* ,'r * need,* 2 --, frrovide5 65g,6crrHon loter.on tuo'" l:'^. c",+rq c.l,p,s, I x,fl|] sh6P'.s --, frrovide5 ftbstrct(-nu" Ftr- s S,'inl c{,pns, I exprlcrrg o*cros b dewJ4 €r.w'r { cu'al apPns a l-, ,".*r,i'.*: .*:^ii. ,..- ; ;::, *l.". n 166orcin! urirh pc"n t-i aPi ' lffi;"X+if # #:ll :-/- . ^- *i r,ri I Oncrto-'/ari"s r'z'me @&wi..f"rq4""! ---t ot1.5P.rerno.n5'rrnl Pug "flo.et'fs tT* - t1'' "- ffi ; ;".';';.-,'la o *ni'"'", €,,.er*sn L"a'n3 ln 5n'5 vrnr apPos' r) lhe'.e is ho need op 6bY6nf rml re6sl^t$ Q'^Plicjtb -----i CaJ c,lofo corrh ftmnSCor*at:nt'l 6k''''tcd Yrni XisrI) ff( (c'n r''lc'(E fn'r explrcidj 6f'tltd Ylrri ltf i si"Y €e"*n Qoae'r E : ApP5 sP" n5 scvwr ) rmiregis Run tbe &rwx olPucafio' E', Ar0p6 si'*t 3e,r'/6. > ,Jc.!a 6c*<'rApp Qun fte Cr,.i(ni c.{Ptl.aH ffr'l €: nr:f,sqmng CU.* > o,,.va CunrrAo,o To chaoge Rrrri re6iot",1 poyr rf,rmtr4 i- Sntal i, - Ttrniregiarx Loeawtroo > E[} >rmirefi6rl 2ooo --> t)g proces 6 o? crnve*i n9 3:'rra rntcrllcne Data to rrrercpq' q61tt11on da-ta
  • 165.
    keeP hrs;rrrs O$eclrePcrr'oce Prbcess 6od ol[oco6 to tf* iqjeuton PrcceiI' 'in frDi re?;.3hr5 g.obj reP R"r ftrocr! dqz.'rle,<;--) dllc[o6 io jnje*i(m derr.den,l r-; ro8i"h} rbtat-t3l^, ----> ariaUJb lo de.etop ftr',=sc."ces c(3 Po0i's 4 p"to't '-) ouoc,rS lo 6*dfo rmi r€Bi5hrj relamd cFSs in xrnt ft13 &lar<tHr'"-16' 619 ' sP' Ycrnotlog ' rrnl ' Qoi Servire F-;^r'o'rcr cdn aPose 8ir'€,' Busi "'!s obeet to Rrni haornX 6Pet;P;od oarn q 6rX' 6('' rc,..,ohofi'rmi ' P-; P.*lFto-1t3ton ---- ''* [3aslne'r; 1r** ga$r''ea &"m ""''t6rsr5 rh' ou3[' IoaY ogtaH o>' @ n" exomple &1rpl;co'on cr' 3;-,"gR"^ri bt'eed Dsr'Jl,',-/'ecl ct{'one *?^ *ut.'";'6t t I-i n3 &r-c"'t5 -> hth;le deve lopiog picri6 erlr c.rier^tj- cr{?n Loe o'ed ro 6c'lte'i tol R*m Se.rve, cppucc+rc1-1. O) DicK lome $ivcr1 16 rr"i B ohjeti a acopy tp &rvice inirrpq.., 6k'b fttes '',". mn'#, oo'rn,..br,) c) Url ro p,. frrm Loovrrp o1c^otl o'r a4 trn rtfierl tt-' . d) prc-..t*oti oa a)8* Busintts acr+''o ds l,rl[.,,tt de'*-{,p'r3 SpogRyrr et;enf crPPn t'd- need 4u""1^3 4 some as otpve deta;is bk sk'b6rt )s rp{- r9/",w ' plain trni Servot Af,pn ( (''l* )-- Ploin'(roi clicnJ APPq gpnog rroi servc,r APpn n (vce) --- Spncg rrn; ciictf afPn plorn rroi &.rvcx ArPPO n (ttt) ' gPnog rrr)i cl ienf dPp/) fSr,to Flre sho(ld coPred lo Cr;e'* apnn side ] lI /' a€ia.ils *6t'r br't'* '{+t' ' f orrin rmi clie# Appn oeed 3nc6 ?ite !rr'r 5fri3 rrni $orrt<,re ft.s Stau fl're e,Vf:cfrig] -, In r(cd {.t!rld 6.Lt Ci€d.it ca{d Gnd Debit Card for4 pon ertF Dtsr;hrrca fompcvrenx / mrr;coti*s gp,nn! rmi Sgtw Appn * (to) , plcro rrrri clicrlt ctffn $ew<a alnn *rs hol- frrvcfe siinJ Cor rt dc't'loPel' ol
  • 166.
    &rv eromple cqplic&ficrn geEge mts or(ts Mhre d,rhptnS lqrrs in gprrog Ofzn, DAO rncrd&teJ Drloh,rfS O? Pnl :- O RmJ i3 Languaxe &fxnde'-tt (-tr.,* t"to"u ctelelo1rJ ft;qnnr Serl,<"r obre de.*'l'Prt e @ @ - Sp"TEfg pravi&s ehrdsrton le'dl't'') plornEJB ' br q$tn'afi^If cr'rt mAe ujcd iq rh€ &r4oprna- rP EJB 6rn1n*^r$or v iu'sr u*<|'^L in$e dad'srnpnJ-cf EW ctrut Aw ht6r*n fS. Sn"3 htl"v'* xtot'r tknPs "b* gfA1tr"r8 ) -- gr^6lrlcbsmr..r prwides abswa,,""J4w ^ bfn *'tut't ^a cLit* kn : *^ d'*rrk*cd Teor't'ologl rr ls slrri.rgs urln u'ieb ! rr ls slrria'gS u'ln ctt'b base d disttrtu-rca !-"- - o J r 6pdog &rnta,n r cots os Fe6lsr'5 SltO A.^l*nps in tbe sai"t,t -- Heie &r,.,or o4pq i5 rrotlrrn3 W a$oppficcrloo dtplof:el in the Sad'(,'l --', lbr( cu{^1i c4pn Can Le thand q"tone aPPD ot ufl*pgt 0'rg' 69' rr,o,rnX ' U;J* ft*tt*g..ni'ehr'*r"' 'YeEs 6'oars inthe * ,.. q,rt'1 Crp"nJ U''*'* ) h'"t"6 &rvice in-t'e cPoc e nttmL crs '')cts nort& (o")'- ** o*""^^ l-,-.,n!6r.,,r" ![rrrL**Pr^uh*g&"" g'x E'*ut "&'*ot-ot" 5F .vtffodng . hKP'r &'" ,Yt ..J oq 5prioSrmi &ri,5 Sg',.389 wslo4e ee1-, o++^ {04 aldrr{ o ctlc Grr) loue t$e. &'an<'rr- og &r"ln*s[o$t:' totb cuerd- clrld Se{x/rel!P q rtrt-r*t- be ln Java Lar4aafie ' ) , Rmr o{,Pn6 eorl r use J*e" ner rykrotlL as rb',t G-rnrrurrJ cq}lc'o d':aonel ' --, Awr"X middler-mre Se.vrcus on rhe S'srnesslo5tcs "P Rrtrt oryrrta it t/r.tr d,'PFJo.rt r I gt Rrnr re6rsry is a &rcalt retlslY5 to L"are lrtno'oP L'* ( LsluaoP"on@ '- T0 0ercorne thf5e 1y"blerng ose gtbc,r Dtst'iu-rreJ ]a'rrnolo6rea ltK EJB, HE"Fr'tt": Nclos3vvttr{ ond e}e.-. EJB, HnplnuoEor atc l-6*3u- d{tAt"rt. ltl6k"?rcrs v i< l.anguqe inde,{^1de'rl-, - SpgErO pravi&s ehrdsrton le'd'*'') plornEJB ' br q$tn'afi^Iry cc'n rPk - scd iq rh€ &r4oprna-,P EJB 6rn1n*^r$or v iu'sr u*<|'^L in$e dad'srnpnJ-c+ i'--/ JB dtent Aep *rxl^r4,,r,,* fs. Sn"3 htl"v'* xtot'r tknPs "b* grATE'n ) ' '.- 3rr'6 Llosor,* prwides alsrror.rr"nl-o6o'r ,n b*'' su''tu"t anA cLit* ka &t'latw ' HTTP lNVOKER
  • 167.
    is ak6 *g"%.&{".&t*' btU *"*,r. and oppl''caxons rtr'Jtte jaua Lrn6,ro6e. D to frc{ and tcrbe cr.u Httpre$rrst &,rnlng % urbo+pn i{ar-r clienr'5 aod to luus the reryrsis to aap#o Jal]a daNes . €ewwl JsP t,.^grarn, is coued FlorLrarfratl€,(' thie tatrnolq5 Nvittco in fte &.va clC^SSeS oP Wcbappticorlcrrr Corl b ond theX coo't fcrrroff llrrp"esp"nse '10 Ovsr Corne fhi S groHe m Coe icrke erne llhis Spedal FyonlccmrrDllaf i6 a sp€cjcd uj(byrso&6ce &it poin* ha'ndrhX aL d.i |64.,", aPn [.cPo. a]xw dic.Xrarn) h SWrs appn fr<l'larrSeru{ef 13 fior r.rtse l+ttP rt9/re6l- i;veat &om e-tie-nl-, dsrett n utet*, *eltrrl 6e'rv tel ftogram / el ft-6rahn rdtlongfi,r,,l qcrg ctars ) Trsr a [&va crars) ryxg'an 4 a *or aofs at ffJrX 4 c3' (Hatoa**t*, op crd,.nj Jarxtcte,crt a,^urb GxhDLl(^ $*ter. In Sp^"X a9pn5F*esS.wret k F"".tCo-r'tttr&rruter, F .rnrCcokollc,/ is tronr G*rrtttr Q*t.r. orO.se.H#'e^tcr.Di'g
  • 168.
    Foflr&nrtrDu({ *r.!tcf musl D;teca2maf.f'arl Prk-ro in utb lrn) krc ko;,g A<tud on rtr.tc], '0 1aw ruLfple'YY-1rr{rr . --) O or bz Caohflued -lo t'ap a"J Wtbgc'cvcT AptiQdon €orw,/ "o @ @ @ 4 +ounq ?O, as SpogGn$y'ta$"o S'}'"i* vlef -' fr{rrf > Cofittl| Nhreo DtsfarrheSftvlft i,5 ir6hr4n$okd ib inrcrncd[ activohcS WtfApof'*'+""G"'K"+G^"4"; N.r to ille Dqrarn prdgmmer dePlog€eb Htfpfrxofet $srucir Gtr{'D co hlela4plica-19c6- ir> vflo #:rW J i .,- ,,, r.*,-.^..! '"e,'r<s Drrr,o.r.r,a &rvler clans oulat - $cz oP load or' 6ra'fi(,p 9'tttlet1'pntcsttt't c eiftc,r drc,n3 *-t"'r 6ran-c'p Co) d-'-'vlng rbc deplogcetrn"* op t*Latnn' -tl'rrs D;srtrlclr'r 9"rt<J intcnrsrq activolea Ncbfippn *Confcxt Ot"ta:nn bX Iounl lDwo*r,te'nv*L'ofilo'rNamaF 5a{vl4' xml g'" * Sr"r5 c"ts6"'"tln hel .Ihis Sp*ns.c"..rdr{d 1x^ftr,ros f-lrr-ins-r,ntraftoD on a]r rhe 3r*'58eons c'F Sftryt.* f;re. t" * W@ o+ prelrsrantiaH'r'n tr lJrrp$rnort 9a'^ttceEzpotrs ktt{'6 Brssioess Cla* cqi€d in rt.;srr. tfo hru;ry S*itt1'"*o&6q ffirrncas o*Lo,nd C,.rni cern Uses g-" yqf{est url anA ' "b&* 8e..,^} -h dT* Etpe6r to &"w6 o4pucoHon. A €J GCrre.arCS {EAeJ+ h*p: // rrr,r hosr : roto/ B.ou.r rP; 6erl,-Jeerc: ; Nt"b olPn -1 F'gAtuer"1.F-- I br+iru.t ,* ..- .*.0 -,.tr .bt*ilrpt (gurrt"" ootn u'(l wta t tr}hleb( ) i-.....3 .rtrti. '> },*p;-pl otoss oqy (ni.*DaF< ) @$..f o4rr€ )
  • 169.
    '.-'- O Bored(rn rbe cr'bow auiuhiea :he Dsrorj'er&"vter garFrrs B'ahietr tcftEence fior" ReXiorrS a[o. - : /A - o ^.,"^, *rPr**.,rp ftom &"tg a+t'n O cti,* opn 9cl5 B'oUtar reforencc '- O lrs'.oP B.Fr'bod arec*<b ' ":|,#lL .,,r* apptt.ai';' ), --- g * €xcrrople o{pn er} HirPr'""b:go rffilJl;@ Pcrseno -'66{cr .--o A Dstdh.ttcl 6rppllco*loo Con beo WebopfJn of lon-r'oc'bapPo' " -+ weucppn *n* uses Yqist^d €'ppolt,o5 Uouo:x'iftc'*Pa"eDt aonA oJJJD<nt - -+ Htt?tr.,vole{r wb3{vices ate- f'e Nobaeea &ghlkded aopt's' '*'-4 ^Lnffur Servlet, J5? 1^r5o1,pDs a're rprar olr Dsniuxtr<J o?f't$' ; *lbe ctienr oppe dcudo;rr o? Hwf.uoFe'v shn'rd 6c,4r,r &ttoulvrg tg'tt P-omrhe' &"r" Omn 4 HtP.trnvo.c,r. C) DcrcrrnenkrHoo ohlt Bu.s;rrsg rrrr$'o61 , Sanrt crppn ippcopor Con Sand rtt-is dera;r6 fo clicnr- A?p Wd'ru nuil cn as a Cdnl€ai to do<pntoaJ, cD q aft of 8ervicel.rrcrf"r /Ar"l"essJnrt*Rece b) Teftst urt to ge*Qustrress 6qjar "rekrence rn&atrg pafuos uxblllic(S Gt-r $r';ngNeh&rvices a{Do. Qrbqa!;S. rheg UcP". uslng fifplnvotcat fudarlop ep,ngbc.ed bisilsrtt oppnE, Spr.,rger,rrls mr ln&srry gta,,r&qf Dts*ia*d 1e$notqy h drqlqp tht Oisurued rhe O{rfyyrj,
  • 170.
    tff S (Jouol-essogc &,vra ) :- --) I9 cl;er't ig b)ocre d 6r eiicrLt 6ide oPc,'otlc'o 6 (IY*i Se.r,t'r , rben i b ii Crrue d Clicru 5id e O|I/rc$tCm-l oor Ptee ro gcncYzLrc De^r requ€6 t t6t) fiwn vea#eSt wfg'l.ed Yesrffse CoT neg $nc$rcmtrS Cor'rr*-r rLiftrH on . io to fxt f="tO ne^r v€4,l,l€6t- $rr.ranan -) fD 6unchYu-o(.ls ond Senr'l d{fr8 aoPrts ' oi(rl+App reO P,.t; Ste f 1t^f*- Da(f yE&eF Cl,ciu si e{e bttRMi'' Jn ASSrrchYDftrLs Cornmer ru'cortlc'r; Clieff In Sgrfhruncxrs [ommtrruca]tto i? its idle crd Vtcc wdr.. Ln A65rcb.;ronc,t.s Ccrrqrnc.rru(at{crr-r in [us5 rrrte Cont{nuarrlX . ood &)r'r(/ ci{,Png ccre clicnl alpn ig ttt,scJ lme! Cc,4ted otf{''rs- fbe 8o'w dPPnS ((e$dc --) ---J Ci1nt and $"'Yut'r a+nnS el;c,ni- fi.-.'-_ ---J Xn G3ochronx-rs Com11-frnjca116rn e[icd appb ond €ert'e" ctpps6S 6^ fie 6htlX Cnqrled o-0pn5 gSrrtronot A Corffo{lrucotl oo Clicnt APP rErres l Cr) GrnrrfrruCCrrfon Alcx't* e". kshn cv'PE[ -) I8 Cticr* q)pn bneedg to poftrr- Cicrw5ide oF4al.tons And tl gerrgrctfc rgl- '{e$resr coirb o+crrctting &,r gj€o '1q.pJr r€,€sfd y€4enlz S.n g-rnr.opn ttrc,.t it i3 Calttd " Aqno**crs Ccrrrroc{nrcc.Hcrn." bofi
  • 171.
    I {uo'{t , ;2t', =-:-- oalor-l:oro to use. In this respect, ,n"rruain.,- tu^novontyuhal rnvocar,on /RNtl r,,h;^r .^^..: - - orrlers llom tightly coupled teciInvocation (Rlrll), ri,fri.f,,"0"-ir.-"" "]rrrLrr.rru'rr .rrgntty coupled technolQr);-,q N,essasino ar<^ .ri;-r-,,. a^pprrcar.)n ro knorv a rernore appricorioni X,!ir W-ts_Us&e_JMSJ8E a stngte transaction- ' 't''e" 4uuw J U++usgsret* dcstinalion l4ehod ( i ! * t i What ls Messaqinq? Mcssirging is a rrctlrL.1 r:f conrrrrurrication b"t*a, j, roiiruaa cornponeo!s or ;|ffi"r.,:"* :;i:]^i:_a pecr.ro_pccr lircrrrry: A rrressagins ctienr ca;;;A;;;;;;;;::=_fror any olhcr clicni e..l i.i;",,,"]llll: 'r nrc5sagrng u,lettl can send mEQET6]E-if# ,"n,r;,tg. .l."iui,,gi'il,..:"}j;i-:1il1,,:olrnects ro a rnessaging agent that pro;id"" fu"lii;; ,"",..,". ll":'::*,'""iii1.i'::.,.;'ili:l:l.con)rrlunicatib,r rhat is toosetv coupred. sender and the r.ce;vc. d^ ^^, ,.....-"-!,1,.n, ca:r.retrieve the message irorr rhe dtsender and the rcceiver ao no,tr,|V"-'t''"' vo'r rcLrrcve lne messaee ftonl lhe dr sendcr rloes no, n".a-io;ii;t#fF9*ir!4!l!-{rlre s-ame ri,ni in order to c aboLrt the sender' rh;;i;'";;;';i:'l::-10"* 'h: receiver; no-._r does the rcceiver to use. In this .p".,-, ,-^----, recelver need lo knorvonlyryhat messace fon . Nlessaging also diiTers li. '' -- -" 'lv NrvrY c rcmole apoltcation's m!d6^45'€r;:" -- r)qtwcen pcople or behvcen ,n,,,,.,."n "'tt'tonj" mail (e:rnail). i*i.r'' i1-*[S$i* | coru.rnunicarion n"**" 'l'n'i"'" "ool"",i"',i! li''jl',ii":";t:j;;::H,:"t p""pt. ,rr""lgieT.*€$a-'i*, .",i",*ii,iijl ;l:ffit:1F,i;ff*ffi,, tr;[l{-#,*,'';i: 'rui+',J1;*gffi *:",'1,''""'"ry:,il** #:::H:,,y: ;il,:"::::.:ff 1'" l:il ;l"lliff l,: :"t;i;;'l;ffi'::' :: ;';,'i; # ht:;*f'ffi lli*li-fi tf,,"'*",il,fu ffi 3#;,.r."Tifi j.jilil nf{inf ,**lt{t*+ri:riffi ifi *l"*,";*#* ffi;* .) '+! The Java fulcssarc Selvicc is ir javx Apl thar allorv, oppiijut;on,,iiirr.. ;n',T,-.::: ,ft''"-:::,j1,,t".1,,:l:.:.y.,ai pril,rcr "o,npuni",i'ii,b'ii,t '? 51""'' '"n6, receive, and ,erd coi,r',, i,, c:rrc rrirh orhcr In(ssi,.-ijr, ,;,,iii:1,,:iil:,jl::-',,',1' ".ii'.""t"t'iir'; il: lidffi;",lil:il :;' 'll'c Jt!.S Spccific,rri,n ,rrr r,.,Sptciiie,rrio. 't u".ri.,,'ir.ro.',.;,1),"i:' J'r'blishctl. i, Arr{:,rsr r908. Spccincarion i,o,",r,.,n,s *.",,,um;,*l*::;,1:;:ji,illll'rJ]:j';:1,;;:::: ::#:jH . lltc JMS Al,l rnrrrrrnr-zcs r Dr,t t,r'r,rirlcs cDorr-qlr li,rrlrr.cs ,,, .,.ll. tl'ol concepts a pro8.ramtnel mu {l)cr}r,rrrr,ir;ry Lrr-ji!rS a'pricirri.rrs 'r1't'rt s<'Ilristicrtcd ';"rr-"g,;; #i;:t' Iciuo 1e u5s Lnessrgi'rq proilucts I r)c rrrs A'r c'rbres coirrr r rnic ,i,::':;:1.11"'s f.o:i!l.,;l;;.F '"#i;::il;:[,j:;:;:'''*' ro mrxitnize , rs-rtrc1ror,",,r. a ir,ii ,,r,"t,'itJt ts not only loosc ly'iou plc'j bur also lrrrvr: 16 s11,x(51 'n".r"g; ;,, ;;;,:; ',; ,l .'.ll :l;..';liuer rlessrg'ei io r ct;, ni n, rh.y 0., i','"; a cii.nr ,Jo.,s nor . . . |ttti:rblc. llrc JIIS,l,t,,,,,.;,.,;"',;.'; " .^^ ll,:,T,1:::',',, ";.: .,,;;";;:';:i.'";i;,:ll:[:'il]j,.::;:]ij.j' lj,":::;1:1,::,"0 onry once Lory:r ,:vers lcss;ig.s o o ,ecei!e cluplicete ,
  • 172.
    Point-to-Poin t McssaeitgDomrrinr urrrr-ro-rornJ M cssaging Domirin A poinl'to-poinl llteffiOucr or aDolic.t;^n i< h,rirr ^- rh- ^.:.--^-. -rrvers. Each ,,je(,rop i< ^AA.---^).^ pplication is built on_tirc cdncept ol rncssage gueues, il"' fi :::",':1":i:ii:',':T"1.ii,L':a{ 1;'Gil ;#:: ;']l'H1.'fi'J:;ll'::f;;the queues establisbed ro tiota rrr#--'-- tv q )PELl]|'j queue' ano recervlng clients extract r are cons'jare., o*hril ih. *---^,^-- messages. eucues rerain all rnessages i"nt ,o ,ta^ uniil Ittepbo'e are consumcd or until the messa'ges expirc. - 'rdd Com4fbr o:irh ArxArrlr6tcr&lrtne #"i, *o u.."*"-Plt to onde! ste$ e $tifu o "tut ;>nrrro h.hr,,aq co4:ltncr. The JMS Apl durable r,,t.".;^,:^-- rnany rccipients. ,, i,r .-.... ! . . to crnddsrand '' l r::' l:,'1r,!!.riii:ji.. I l,Cller;il I llliJ:li ri.rr,ir I ftndd' n [3 @S€nd5 E @ffiFigure 3-r-3 Poinr-to.poinr ferch $e rht Asare dP,s tirrrftro b e.l*t'4$'e lu,.l tt F*tF6!Eb!' subscribers io create not active. Dujable to send messages to Gd"K"" ' I pl l9r'b matet think alarr Safill.ll€ -r:: -. ; Cl | r lr hlislr/$u bscr!b! M cssatl irrs l lo rrr:r irr *".,,",,':iJ;ll'j,';i:':',1i,.i,,,1,;:'#",*;.f,ooJ.' {+Jlfff:,ffJfiiTl"i.i,jl{,1;llTilc)na,nrcn lly publish or subscribe messascs rrrving frorn a ro'ic,s ,,1-t,.ln: t"l':nJ Tg-archy,f The sylrcm tlakes br'r- "i;;;;;br;;;;#onlv as 1,ng " i,i'r", i"',ri,,il"l" ;iili;ij; :*li:Llll'r<i .its"irrulriprc s,b'.';u.,r. i,pi., ;;;#;,..;,,i::-rv.ir,"g "' i,i"k;:';':':;i;:l'11il;il::;|liffii,J:,,ilri'urriprc subscrib.ii. i,pi", ;ff;j:,:il: Pub/sub r'essaging f,", ,t," .^,,-...,.i,f:'. l:/ ,H j 5::l l:.:,* .- u,r.-,,:;; ,:::::*tttt-'-'-. ruotrsners and subscr.ibers trv;i:.,l'-i-_,-con$rne onry rness:gcs pubrishcd t.lt-:u:iilil:"t depcndency. A cri con,inue ,o u. ..,i""i-",5.Jii.J;i"":1jH..;1*,;;i'.:,,"#:I."^.,.;i";:#:,,::,r.l;rJ.:fi,:.';jl.j,l
  • 173.
    ) rJ :1116;. c,!-.n crogie. Messaqe Consumption Messaging products arc inlrcrcnrly rsynchronoui: There is no fundr:n thc produition ona tf ," "o,,ru,nl,ion of a rnessroe l1^.o.v^. rh- ,^r" t::i3f tTi"hlbctrvccn thc produition and tlc "o;,; '.-"''' gJrr'llrrerluu5' I rlere ls no lundamenhl timing de n a r[ore Drecise sen* _,*..,,,.,^ ^..-u,J|ion ol a rnesrge. l.:lorvevcr, rhe JMs ,;";il";l;; b;, ll.;.i,l;;fl#" j.:,". M",",s.; ;;;;il';;;l;ffi ;":ii:, iil,l,",]il;,:i j -i.tttch rynou:trv. A srrbscribcr ;, ,-;; "- rrr sr'Ircr oI Iwo rvavs: .re reccive n,prh^.J -r.r- --^-.,..- - .,,.iiu.. cxplicitly ferchds rhe mcssagc from thethe reccive 'ethod. r'he receiuc ur.rt -- '!r !^F'vrrrJ rsrcncs tnc mcssao ,ol r.;v. ,;r,;- block until a rressage arriveinot arive rvithin a spccified tirne lilrrir ::'::::::,:,::,:::!; fl,:H,:::,:::,:: :_"^::::! t: 1", ":*wi,h a consumer. A messase il il:1I::ff*l:ff :::.i.1".:':1", ",'r";, ii,'i"'i"l'iJff "'iJ:i?fi;t,fr:: calti'g rhe risiencrs onruress,gc ;il;;:,;,.; il'ffi :iX:",:;,i:ifi,i,::.j:; dministered Obiecis l]:'o.p"',, Jlln,, applic:rion .desrin:,;ji, una .onn".,;on 12.r^. i.i'liJi"H*:I:",''#:ir;i::*','# i:*.";*l +r,::[;:^'ix'JH;:;l'i,,'i:;,TJii':j ;i,#::::'l'::,1':,l""r,on p,-,,-s#lu,",icalr), :rh.e tlii;tiliilH::i;*t#i{ir,rlt1u j';lF",u*iiil,":jp.:::fiil?;ff J:.,";ai:r;*:r'cr'r gs ,virh ,r,". "r,i,j";,,,,,'i,";.,:iJfi"il'"";'l;,:#ili::,J}"..".ji,i:; I;;*dl - .--iJ.'' rffi lffi W A qonncttioI Factorics . A ,o,,nurtio,u /o"-ifrs rhe obiecr r e ri""r ,,"--.^ "n"op,,iu,",, r.i Ji";;;.;,:;'":l::::r.uses ro cieare a connecrion ro !Llnnec-rron racrory is an ifii"n.; oftl:ujot;on P:rmmerers ;;;';;;;.1 pt""idcr' A co'tection facto'v loprcconnecrionFa",gryl,rrrr"." tr'' conn"J';onio.ro;1il;;:::"":;T;t"ffi,ifi"i'*.o'' e'; r/c |tlalions r: ;1, A d.'stit,oti()t is thc o'bject :r clicur nrcssirscs ir .,,ur,"*lin',i,""';:;f;, ':::: ]: spcci! thc rir-(ct of Dessf, u,.,s,E;,'g ,rn,uainl j;;;,;;il;:- j,:'.";;5:Hf s .r;,';;, ;;;,,,",'li'j'"','."..1,:ii[:::"'"TJ',,"ffiJJ Conneclions a ,o,,n"iiirupsuhres a vinuar , rcp/rp socker u",ri"",-.;,"",,j1"0 "."^l:::l:l' "r,l a Jrr4S provider. A cr scssrons. i'. - - 'r provider ser"i." ae.r'",, v"" ,i"'jT::t]".1 could reprcsenr ar open connection l,c crerte one or mor" A.rcsrirr is a single-threadcd conro 'n",,"s. pn,d,".,i il:i,,-. J:ffj:.t:l'."..*:lll and consurnins rne:L,r..l,nu rressages. ;sages You use sessions to create d{ !,:.r i i. t 6l r .l
  • 174.
    t--. I 3t I t t t Eessaqe prqducers A ncssageproduccr is an obiccr rh It implei'enrs ,rr. M.;;";;fi;:::1'n,.'.rtirt'J" by a sessio' iind uscd for sendin!r r])essages ro a desrinalion..',..'",. Messaqe ConSumers A: ness?8e "o^u.ullln obiecr rhar i< .r,6,-.r L.- - 1'l:::: t,i.pr"'.,u,"ii,."i'r:::jfi::ff'J:1 *ni.:.:*'"" and used ror receiving nressase! senr ro a/r mess3ge consumer a ou.s a tls c'j;.^r ;:;;;.;::.,,1:''.. . ipfovrder manages the delivcry ort']ll1:: tt*'ott 'nteresr in a dcsrir)al oesrnarron_ rncss;rges frorn a dcsrinariorr ," ,ll: ':l]',,1]t: provider. 1.he JMS .. .-_ lllc rcgtslcred consulhers of the . - Messiqe Listeners ! lessqe listetrcr is ar oUiccr rt, ;:',til';tr,'liyti#;:ilil,jrltiiil:,fi{il::';:"H',";LJ;'ytli::.:':r,:, 1,ris.hjcc, laken rvhen a r"-."g;;;.i;;r. "''r'ruo' onMeslase ln the onit{g554gs Messaqe SelectorsMessaqe Selectors .' If-your messcging applicarion nccd seJccror, rvhich alows a rnessac,. "j"l?,,11:t:^,T l:"tsoges ir receives, you can ,s ::lil;J"j::l:Hi:,ln'"':#1";nl jtiffi ;:r#tr;imi:":'i)::.1; j:,:'.,,:::assign rhc work of fihcring,ne;;";.,o.o" il"s;;;,J,'JJ";,i1.; appiicarion. Messaqeq The ulrirnate pu+ose of a JMS aooj orher soitw.aie aonlierria-. ,^,a a1:11t"" is to prod-uce. and roother soft*.are applications. lVil,,--'"" rr rw Pleuucerano loconsurne_nlessa3cs thJr ca,r ihsn be u.r,d bv you,ro crc'c '"";;,s.. ,il;.;;:;;;;;;::,":.1.il"""::;,i^j:11l,lI:,::l"pr" i,, r,igr,ry-n..;i;'";:::,;{you to crcltc mcssages rhJt mdtcl| fo rrrat r (l,nple but highly flerible, cl s Ltrs ,,",.,o"" i,ni,i,;;;;;i;:':',:,::,:i'::]':-'r.:r i:"l,Ys rppric.riorrs on hc,crc:jenco,,s rrirro,,ns i I cssagc Hcadcrs A Jtvlimesagc headcr contains ptouia.r.o." r?ii"J; * #ilI'l::;jf f'*'t"' lickh r|irr c.rn;ri, virr,cs rh:,r r,rr, crl's,rr.s irir(l . rylessage properties ..i ,.,. *#$:."11;'J'"T:i;:::';:'?,0T"-,:'.':"'#"i;;iJ",I:; r:""00',"n ,o,hose p,ovidcd by,he use them lo create m"s."g. ,"l"i,o^ other m.ssasing t;,r,.,ut, o, 1,ou .un Mcssage Dodics Thc JMS ApI defiaes to receiv€ data in many Contains TexlMessage ;i::';":fl"j:fiffdM scriatizabh objccr',,'iirJi;;;lilg;,;;;;-,g ti,;c,*;". -*. -- - - - tgc bu,dy lbcrrlts, also callcJ rllcsser fo-nns and provide c"^""iiii;.'., .il;"- '.',1c5- rvhich aJlow v()u to sc'd utd ,:.------.---:-_--:- 1 exlsllng messaging fon nets. tg. Cornposed of heao.rliJliiit prqp",r..s ""t). r h,_, ,*r;"r. ryp" l;when a message body is not required. ffi0wm, 1 'Fu"tt1'na ooitt, (tut .*""rp1", tt'" "on-rcnrrlr on-ex.nsiut" rrr,.,.r",p ;i:il1fr ty en,incraror u, .",",,r,,,,,ril-i-u.;:. ;;"fi*.il ,i: """::,::j:: ectMcssagc
  • 175.
    , it 5 6 7 8 9 10 11 12 c)Jli lrs lrs tl 18 t9 20 21 22 23 24t 25a 261 nl 28 1 zsl 30 I 3rl 321 ::l 34lt TIJD 3f 38 39 40 47I 42 I 43 I 41 I 45 I ael 471 aal 4eI 50' 51 52 53 s4 55 56 57 58 59 60 61 62 63 64 65 66 67 @ xgnvnrs cbnnedivl 19 bl to serda ooP n and JnJ $mx'l public class MyQueuesender { public stitlc void main($tsingE args) throws Exception t 4 a. /^ ." -r-.--.' Propetti€E propEnew Propenies(); . corn,scoo. er*6"prSse . rar,l'5' Sen;arJoitdo u$atn Irop,put{Conlext.lNIIIAL_CONTEXT_FACToRY,"@,,); prop.pu{contextPRovtDER_uRL,"B rfloiJ}&:lir.H lnitirlcontoxt ic:new InitialContexqprop); ,^- QueueConnectionFactory qcts(eueueConnectionFactorvlic,lookuDa.'conFactJndi,,I: l€) Quoueconn€ction qconn=qct.cEateQueueConncction(li-"qc41;.i4; -Til';""e'jlrro to J$C.""rghc't) QueueSossion qqession=q6onn.createeueugsession(tiiio,illsion,AUTo AcKNowlroen:E?i'rA!hbt+trtotti 6<sslot0hic* OS b4le b por(orD On{-JHl, Opootj oDS. - " todt' Queuequeue=(Queuelct(.lookup("QueueJndi,'); --+ potds .iO rhe er*redC Cesrlr,ol*rn Ce Crt(4 l,F<b Orvr,, Queuesender qsende.=qsession.createsender(queue); ___.j oqt(J -ir,n*. frrlnlng tO Stf|t€ d.j$Ddfb,, Iili|X"r:il,n" t""""n"t a5-60 ..- c'arr5 ?o 1cxr rrssases bool og ?o djgftJ,*'t 1txf onttrus ds beucs ' bor €i-rtri 5 m€tso3es &nia,os s"me kr!'e in rfrme PDg,nS. To nrn PlOln Omg) SprJng JrnS O{tPn6 Q teel rngdo.ncrio e 4sr'ruor cf CrrlassFsb ;n runninX rncete otffi:3i:P..il'6''*'&ft'-:S;1i&-,1,',11",-"lqr$ir*1 Cli)qD(a v -ert 'i4'l CID a{P&rv-alm)h'lc.t tir) a{Xr,r! - ee . jc.r Cr),huee.jar message=qs€ssion,croateToxtMossagg0; meslags.setstrin gProporty(,'Name",text); messa ge,setText("This is ltem "+k+,,"-,-."+toxt); System.outprintln("Sendirlg,,+k+,,t"+text);' qsender.gend(message); ' k#; I lot lltor qse3sion.close0; qconn'close(); yjrlr6a f1!6u<rre&n&r.ictvct {ava Hg6ueue&n&'t int k=l; for(int i=l;i<!4;i++) { if(i==1) texts"Hotrnail"; else if(i:=2) texts"Amazon"; else if(l==3) textr'Jcuru"; olse text!"Bazes"; fo(int 1=1;1<=5;1s1 t importravaxjms.r; import javax.naming.*; lmport Java.util.Properties; 68 60 70 71 72 73 74 75 publiccrass MvoueueReceiverimo"'""""""ii1tixr3ll -.uer ftam a..cr.edes"ffis"? public stadc void main(string argsp) rbrows Exception ' [r!c'.un! d"-,.i:,14 Ary".d"m't) @ chonge trsa Jndi pnfr,,tttr tt 6frsFsl (hDld'b Properties prqp=ney Properties(); prop.put{ContexllNlTlAL_CONTEXT_FACTORY,.lveblogicjndi.T3tnitialCo toarFartcr/.}; prop.puqContextPROVtDER_URL,,,t3://localhost'001"t' lnilialConlext ic=new lnitiatCont€xt(prop); QueucConnectionFactory qcts(eueueConnectionFactory)ic.lookup("ConFactJndi,,); QueueConnection qconn=qct crsabqueueConnection0; importjavaxjms.'; import ravax.naming :i n i-port j""r.uGiii.ilrti""; {.p rtie or c-rc*r oliar gornr'ng tD o}o$Fsb r€ttt5 I"":::'1f*')-_-.------Myeueuer",,o"r;"uo3odro-.,r...) --_ jr'!E applicarionB---
  • 176.
    ii Que!eSession qsossion=qconn.:reateeueuesession(false,Session,AUTO_ACKNOWLEDGE); l: Queuequeue=(eueue)ct(.lookup("Oud&ndi,,); I9 80 stdng serector=',Name tt{t,eazeel.,Hobn",,r".-- n"**"* 6 f;trct rtr srscng t;, QueseReceiverqreceiver=isesston.c.ei;ie;eive(queue.setector); tq uvQu"r"n""ui"". fi=?#iffffu3.,u"*".","k cQriog trs-vor pot"it'n ra B&e,.€ akltimlc*! u4 qFceiver.setJlessadeListengr{mq}; 85 -------L 86 qconn'start{)i ffi"-1l"""6c Lttt'<'t Titl'* current cla-x objcrf, !i , -E-e.-',tt [slan't h m<rsalc skrr< f.* dc rocxcSex ' 89 F-)yqrrtg4fs tarirae msfr €zlh firr€ , 90 public void onllossaqe(Messaoe mLot I 31f,r,ffi;;;i#i"a+"'(Edat<'acolr"'eoclrmesso-netor'il4t7 sr lgrran i6iaressag6 bnsg={Textuessago)ms9; r/csgest<tre ii## iJ"11i#:$Tlli R"?il?d($;"""s"'i"'".t*s Tffi 'i**.s a* ffi.,),Sf dl ' e,pdntstackTrace{)i 98) 9e) 100). tot *.-.___* t02 (App2l On Topic 163 -.--...*-________-____-Igpicpemojava-_B#j.:b(:_amD.) 104 importjavax.naming,'; '105 importiava.util.properties; 139'.o"nl:gtln".j_rrrn5 Apr) 108 public ctasi TopicDemo r09 t 1.19 public static finat String TOPIC_FACTORY =,,tconFacrJndi,.:'l'll pubfic static finat String TOpIC=,,TopicJndi,,; 112 public static void mainistring argsgiltrrows NamingFxception, JMsException.lt3 { 111 Properties prop=new Propeniesg: Jnf,r! properrtct 4 Cntrlss$rh rt6,s tj'115 prop'put{context'lNlrlAL-c-oNT_EXT-FACToRY,"corn-sun]enierprise,naming.seria nitcon texhactory,.);'!'!6 prop.put(context.pRovro-en_unl,"iiop:rir"" jiii"t.jiqs); """ 11.1 Contextctx=newtnitialconteit{prop); 118 ToplcDemo ttsnew Tep;sggrnsil. -j(ur'<'u rr6!s a!,krr- 113 qioiu!(gxFuJ."o"t*a,e*,a;#$ifu 121 ) 122 '123 public void dopubrconrext ctx) throws JMsExceptioo, llamingExcepticn 124 { 125 Topic topic=(Togiclcb(.lookuolToptcr: 126 -Ggr*iAf,|;'$e tn)( &$tnaHon c& OrhsFsh rqisrr5 iil €) rlT:ii:311ffi:li:ll::-':i,*:*l:i*:n:*nrcrory)cb(''|ookup(roprc-rnironv); ill i3ffi."Hi"Ye'+:#anr*i$,ieH#*ess ion.ruro_ec KNowLE DG E) ; |t; TopicPublisher tp:ts.createpubtisher(iopicli _) F6llshel is creareJ [r]r+i' lD lOp, c ili @ 136 f TerlMessaqe mso: 1!i i ;;#;:;r:,[i;r'iluessase(',rhis is rrom sathya rechsliz..t ,,t, lc*r,g 6ne ]e^r m5J. 133 L system.ourprinunfl n,ui-"r,ins,st on lr,Jirli3i""tiJijil,i;i,,;;, 1 iii lf.*:9il(r*s); --r &ods one le'(r rns0 tD ihe ropic d.esrinattcl 142 ) 143 ) 144 "--*--*- _subscriberDemo.iava_.-._6_____-_ 145 import javax.naming.'; t46 impoft iava-util.properties; 147 importjavaxjms,.; 148 public ctass SubscriberDemo{ 149 public static void mainfshi;g arys0) throws NamingException, Jlt/tsExceplion {150 Propertiesprop=newproperuis0i JorBte5 ;n closa p&rt Samg c6 p1g/iocad cr{po 0 1s| run trb5clibm c,+pn P<,r meotttpr( times from d)?k"&r* t lndrrog +ien vun rhe Pcr2nishor app6 .g' are firne.
  • 177.
    151 152 153 151 155 155 157 158 ts9 160 161 162 163 '164 165 166 167 {6E 169 170 171 172 173 174 175 176 ptop.put{ContextlNlTlAL CONTIXT_F,ACTORY,',com.sun.d'|torpr;6e_ni,ming.Ee.ia}|tritCor}iextFactory,,); prop.puqContextPROV|D:ER URL,"iiop:,,io"u it "*t,+C+$'i;-' Contrxt chnew lnitialcontex{prop}; SubscriberDemo tFnew SubscdberDemo0; r- C(lryrfll ( tds obf(+ tt do-Sub(gk);,-? i.,k, ftF,ff d-"teEa-ytg!,r rine no: l6()-l-l-r cq.closeo; ) public void dosub(Context ct() throws JMsExcep..ion, NamingException{ Topic topic=(Topic)ct(.lookup("ToDicJndi"t: rhe tDP;c d 'JrlDa$drt <g (nlalrF-sh Y<E;sh'l I:ti:::lT!Pl?crory rcf =_(To-picConnecrionFactory)cb(.!ookup(,,tconFacundi,,); %emF..r-;Topicsession tsEtc.createTopicsession(falss,Topicsession-AUTO_ACKNOWLEDGE), Topicsubscriber bub=ts.createsubcriber(topic);-> "Bp;(trbsc$br^ .rs Crc.Ilr(d fnly*iy rb tc.start{); Thl< o€stir!}l on ' (]'om lt*tc des6rr'Oorl System.outpdntln("Received message is:"+msg.getText0). rc.croseO; ---T-i',r,- TextMggsage msg; ms9=(TexaMessage)tsub.receive(); -----> 1rt ) .. 17A ) 179 ----------180 Applications on Spring JMS 181 {App4X or queue) 183 Send€rApp {on eueue} - 1s4 ---.----.:*'-:--l-j...-------.-rrlessasesenderlava(Si$&*d..-_h.c_rry.toS.tc tu 6o' d T(^r yn€rsa5 € 185 impolt javaxjms,.; 186 import org,springtrameworkjma.cor".-, @) cdero;ai:ct Jt45fc.rdaf,< tlc't{ 4tidt $mrutb Cf{<' ct'i"$"t 187 publlc class f essageSender { 188 iarBrcr io oarsrxrrtl SfrrinA Jan Bret : @ sar* 5 3s f,res .,p - ppoD lotrralr'r &lrff,sb erlrr shrrrd bC iO ruodoT moJe settdc.l f,-"- J }i 'Jav aL!) l-"- qn rng. "-1 E ndc^ > .i1vc4 x javq 6cJc. > i<lla k'dc t;z"l- ?9? MBsagecreatorcrcator:newMessagecreator() 203 { l3i public.MessagecreateMessage(Sessionsession) ?9q Texutilessage message = nu ; 207 tly 208 , i99 tffi!" rr'e.1 message = session,createTexfluessage{); z'tv -J tmessage.setstrinqproperty("text","HelloWortd,,): 211 ) l'etr4sd Jq''br f" 6Dl.r ihrfxr,i.tb r,r,.1 . 111 catch (J tsExceprion e) lii l s'Printstackrraceo; 216 return message; 1i:, ); ) eoe- art :- |e.t ohjcq F,, nreou,,e,s 219 inrx'r curs abof ir'fl.rr'an.rj 220 fitsend(creator); rn""a.1sCt a1"(rn<.L..a ) torcrtA 1li ,V *ft."*"i cDcr'sm..a-rc. lli -l'1.'- I :'s .----*:_.s.s!s..,..Gnryefu-fuc).-1.*;n3 rhe tqic ro iqcrr 225 <?xmt verston=,,1,0,, encoding=,,UiF-8;D irOfa*lota at,.rf ohjeq , *& r<((rvc,s m6d * c"ac* Q ln' *4" 133 plivateJmsremptatejt; 131 pubtic Messasesender0 O r93 194 195 196 197 '198 199 200 201 public void seut{JmsTemplate it) thisjr = jt; ) 1-. t.l so oeP;ned B' mabod public void sendMessaoelt
  • 178.
    @;irri r'-g,rti..s {a,tc.ss B:h Yeidtrty!* 226 <lDOCTypE beans PUBLIC ,,JripRtNG:tDrD BEANi E ., dll ;tthi//www.sprlrgtrirrnework.orgidtd/sprin;_;;;,d,-;:,> tzu <beaDs> ?11 <b6rnid=.igmptato" iiilrii*i,T#l1Je.""Xi??i"TF;??#'[il:X,,#,'::::"*]"-l:-*?,,", >qo 261 262 263 264 265 266 267 268 ?69 270 271 272 273 274 2ft 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 fi ffi l;:$g:Tl:,,ij;ework.co ntexi,s u ppo11. ; ( public static void main(Sttng argsll) ft{*##l[t#i':i,ffltf"'Jl'S3;ffii,tr&#;$??f,q]tri,-"ioncontext(,,sp,;ns.xmi,,); ) system.ouLprinfl n(.'message ser)t,,); RecelyerApp importjavaxjms.*i import org.sf rin gframework jms.core."; public class ilessageReceiver {private JmsTemplate jt; pubtic MessageReceiver0 O public void seUmsTemplate(JmsTemptate jt) t thisjt =jg ) public void receiveMessage0 t :;.eiv{ rtf msq frDrn Messi.ge message = il;eceivefl: O,c, rs-Ct $trlafidrl Tc:fltlessa ge tms g :;f iij<n (me$a9o instanceof Text rlessage) tnsgE(TextMossage)message; joi Brce in closS fiaA:- sane cr &ndrr4pen . {?&&'vlr, f- --+x jor:<o1 J--- sp*ng , ^m1 llecqua > i..vac t( 'Jcr!c >Jcrrrc. R-.rteC0c",r- j ifiX :t ru ;:;:=''ffi ;SlHBll'"f;'rework jrdi'r'rdiobjectractoryBean"> / ;l'1 -iH -:Effirfl ::i#;::ffiI,ffi'namins'seriarrnitcontextFactory<prop> 11,5 ;U*dXy:, nd i Name,, varue=,,rc o n Fa cu n d i,,D 23a (Ir 8t,rh&s c{nrrurd.,F<drrrJcLj.a frrm glc.rFsh rc5istr., 239
  • 179.
    i try { System.ouLprintln(trDsg,getTexq))i . System.outprintln(tnsg.gestlingproperry(,ierr',)); ) catcJ sErceptione) { 301 302 303 304 305 306 307 308 309 310 31t 312 321 322 323 324 325 326 327 328 329 330 331 332 333 334 e.prin6 ) !l/'? Itdd | //.b4 l!9 _:: -_--_-..-.spring.xrnt....-- M .tOOCWpe mans pUBLtC "./APR|NG/,DTD BEAN/E . 316 "http:/www.springframework.orgrdtOfspringn€a;.dto;> 316 <beans> 317 119 <bean id="cfl clas-s!',org.springframeworkjndi.JndiObiectFactorvBean,,> 319 <propertynam€="jndiEnvironmenf.> 320 <props> <Prop le}':'l1l1l11l!g.factory,initiat">com.sun.enterprise,namins.serialtnitcontexFactory<prop><prop ksy="F ROV?DER-IJRL,'>ilop:/,[ocalhost*d{S<./o;dD> <props> -btr'oorn)n8. prDvldk.urt {++t ' <property> <property name='JndiNamo', valueJ,GonFactJndi"/t </bean> .9:11-i91C" class.E'org.springframework jndi.JndiObiecrFacroryBean,,> <property name='lndiEnvlronment"> :LIRL">iiop:/localhost:+846</prop> . a/rt,&r.br | +6+b 135 <property name=.jndiName" value:"eueueJndi,.,/> 336 <,/bean> 337 119 <bean id="i€mplato', clas6=.'org.springlramework.ims.core.JmsTemp,ate,,> 919 <property name="connectionFaitory-. rets'ici/> ' - --'--'--'- 119 <propertyname=,.defauttDestinatio;', rets,'q"/> 341 <,/bean> u2 l{1 <beanid="ms" ctass=,'MessQgeReceiver,,> 1y <plopertynsmer"if' reF,'tdmptate"/> 345 </bean> 346 </beans> 347 .----."--.--*- *-*Receiveclientiava__.__4*__..___-__-_-___..--. 348 importolg.sp ngframework.contextsupportii -'-'- 349 public class Receiyeclient { public Etatic void main(String args!) t FilesystenxmlApplicationcontet ch=new-FilesystemXmlApplicationcontext(,,spring.xml ,); MessageReceiver mr =(Messas€Receiver){55k#ge16;t;i,;;;;i:--" ) mr.receivetlessage(); l <props> <prop <prop </props> </property> 350 35t 3s2 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 . 370 371 372 37t 374 375 Apps (on Toplc) Sender App fpublialxr gppn import iavarjnF.r; import org,sprlngtramework jms.core,'; public class Messagesender { private JmsTemplate jt public Messagesende{ O public void seUt{JmsTemptate it} t thlsjt = jt; )
  • 180.
    376. 377 public voidsendtlressageO 378 t 379 380 381 382 383 384 385 386 387 388 389 390 391 352 393 394 395 396 397 398 399 il6end(cteator); ---.> 6drds 400 ) 10r ) Messagecreator cl€etoJ = new Messagecreator0 t public Mosaage crcabM$sage{Session sess,on) A"dr!rrdlt{ ]!ln6 d(lr s TextMessage message = null; phkcr !Y ,,1'*ro,* { '"v*-- J messago ! lcsgion.creabTextltessage0; l.t.'.,(.6rGat-eaato.at4 messags.setstringProperty("text', "Hello world"); ld(. k ce message,setTgxq"thk is test msg"); ) catch (JilsExceptlon e) t o.priltffitackTrace(]; ) retum message; ) ]; rlE' Yr,essate t0 rb?;( de(hrd$oo , 133 *- ---.-.------***:-.s.tl,nsmL($.drs*3-Qr"j- .,..,.. r$sc..rr.d.-g..,a.J404 <?rmlyersionJ'1.0" encoding="UTF.8"?> 4o6-416 ----, urru " 405 <tDOCTypE beanE pUBLtC 'illSpntNet/Dto eEAH/ieN- oui.., ut $frn;ng i+ liDrn f,ndi r€{l(n-5 406 "http:/iwww.springframeworl,qrgldtdispring-beans.dtd"> 407 <beans> 408 409 110 411 4't2 414 415 416 4'17 414 <bean ld="cf ' class="org.springlrameworkjndi.JndiOb.iectFactoryBean"> <property namE=".indiEnvironmonf '> <props> <prop key='lava.naming,tactory.initial">com,sun.enterprise.naming.SeriallnitcontextFactory</prop> <prop key="PF|€V+F€tUR|Siiop:t/localhost*8,*l'</p.op> <prop$> &o'narri* . "-,ao . ,., t 4(+5 </property> <propefty name="indiName" value="lconFactJndi"/> </bean> 4tq-4r+ geft Tofic Ptor., 4191 <bean id=''q" class="org.springframeworkjodi.Jndi0bjeclFactoryBean"> Jodiyritsl.r! 4201 <propertyname="jndiEnvironment'> 421 I <props> 422 | <prop key="java.naming.factory.ini6al">com.sun.enterprise.naming.SeriallnitcontextFactory</prop> 423 | <propkey="FA#€e=!ql.'5iiop://localhost:40,+6</prop> 424 <,lprop* JGv." rl]ming I pr"v dor. ur, +t4{ 425 ll </properttp 426 J <ptoperty name="jndiNams" valus="Topic..;ndi"/> 42lJ 4bean> 428 425 430 ) <bean id:"template" class-"org.spdngtrameworkjms,core.Jm6Template,,> 431 L <property name="connectionFactory" reh"cf'F Pttfr-d,; 4og 1ll I <property name="defaultDestination" ret="Sr '4q : aq 433J <,lbean> a'a 'rb 66'sTc'oPb'r (lard oicr"t iii -r*, Sphosgr4n irl]c!rcd toirn Jrns r<"Px,'c 436Y <bean id=''ms" class="Messagesender"> 437 I <propetty name="it" ret"lgIqllEl -rttla : +60 43qI <beaD 439 e <,lbeans> 440 -*.-.--.*-- €endclienljava--- import org.springflamewoIk.conlextsupport'; public class sendclient { public static void main(String argsll) { FilesystemxmlApplicalionCont€t ch:new FilesystemxmlApplicalionContex("spring.xml"); Messagesender ms ={Messagesender)hclcry.getBean{"ms"); ms.sendMe$ag€0; clx System,ouLprintln("m€ssage s€nf 'h ) 4{1 u2 443 444 445 446 uf UE 49 450 €iooder f-- -- x 'iaYac!) |-'--'--':sp;%,{rn etn& >i"vac +.iava > i.ur^ Serl,dbe^.tr jarftres in clAssPAJH: Sqrh€ og pre"ioas app'A '.
  • 181.
    451 / 452 ' 453 454 455 ReceiverApp (SrO6cr,ler ) 456 ---llessageReceiverjava-- 457 import javaxjms.'; 458 importorgspringframeworkjms.core.*; its9 460 public class llessageRecoiver { 461 private JmsTemplats jt; 462 463 4U public llessageReceive() O 465 496 public void aet rFTemplate(JmsTemplate jt) 467 { 468 thisjt = jt; 469 ) 470 471 472 473 public yoid receiveMessage0 474 t 475 Message message =jtreceive0; 476 Textltessage lrosq - null; 477 if (messags inslanceof TextMessage) 478 t QecPi ver l------+ x 'ja'a fa) I l- ------ +ri og ' xml .).i1ys( tf -.jctva 7iaYc( f<ftflwclierLt F;r5i ,5kr1r a)al$ple Qeccivto I Subs'oi6ea .405 E$ stzrr amlS cne ?D'l'T aPPD- ' (tt/tkh'< efllD/ 479 ,i8o 481 482 483 4U 485 486 447 488 489 ) 490 ) 491 ) 492 _____________-_____spring,xml__._____...____.___-...-___-_-_.__ 493 <IDOCWPE beans PUBLTC "-//SpRtNGI/DTD BEAN'EN" 494 "http:rwww.sprinOframework,org/dtdlspring-beans.dtd"> 495 <beans> 496 497 <bean id="cf' class="org.springtrameworkjndi,JncliObiectFacto.vBean,,> 498 <propertyname."indiEnvironment,,> 499 <props> :99 <prop key='lava.naming,factory'jnitiai">com.sun.enterprise.narning.SeriallnitcontextFactory</prop> 501 <prop key="PR€V|DEf[-URf"iiiopy/tocathost:,t&*S<lp'rop> !9? </props> irva.(&rn,')6-. prD,,.<r(" (d I 11,+6 503 <,lproperty> 504 <properlyname="jndiName,,valuej'CcnFacundi"/> 505 </bean> 506 :9I <bean id="q" classE .org.springfrarreworkjndi.JndiObjectFactoryBean,,> 508 <propertyname='lndiEnvironmenf'> 509 <props> 919 <ptop keyi'lava.naming.factory.initlnl">com.sun.enterprise.naming.SeriallnitcontextFactory<lprop> :11 <propkey='qryryp54-g*t,'>iiop:t/tocathost:fiFt€</propi 512 <ptopg &vtr.nc,mirq . p761,atgr. 11, 1 46t6 513 </propefty> 514 <propertyname='JndiName"value=',fue*Jndit'D tmsg=(TextMessage)message; try { System.out.prinfl n(trnsg.getTextO); - System.outprlntln(tmsg.getst ngproperty("!ext'.)); ) catch (JMsException e) { e.printStackTrace(); ) G p;(J.td ;515 <bean> 510 117 <b€an idJ'lomplate', ctass=,'org.springframeworkjms,core.JmsTemplate.,> 518 <property name="connectionFactoryi ref=''cf,/> r-rt€t^ I a,a- 519 <property name="defaultDestinatio;,' reF'G-V>-- - . 520 <bean> Erc, s6-t 521 522 <beanid="ms" class=,,llltessageReceive]-.> t?q <property name="if' ret=]teripfate;f>f t4<4 : Srj 524 </bean> 525 <beang
  • 182.
    527 importorg.springframe*iork.contexfsuppoA.j 528 publicctass Receiveclient . 529 { 530 531 532 53i} . 53il 535 536 537 ) public static void main(string argsll) t FilesystentonlAppticationContet ct(Ener..FilesystemxmtArplicationconbxt{.sp.ing.xml,); ) *ff :ih"""":ilm' =(MessaseRecet"errliJ6;s"6;?K:i: *' - 538
  • 183.
    a-----: TO Ocheive Osgnch,rono&gCororn cfri(OHc.n .^s€ either A,Ja.x (Cli.nr5)dc rc4bn6log3) To C,cheiW mesSC.Xg bC.se d CrsgrrcbfDno, 'S 6randd6ne Java aIWb Lrse Jfl$ Uose a Ol€ sc.rct ?tDvU€,{ 6lco brocoscr co in 8oq:r aod ctebcrpp r) ol Jc'v o Rr,t ler6 Ccrm roudaofi crl ttPS6 c(gtnt , Peceiver OPo n (Jclued,de Ter"hhobJ) knrr?n lcoo *n&r qrnn --j US(S Fr, t fr.a hPo o^o E€ i,- ;m66e1vu I fvovldoi s H6S€rieS Prom f,bt't msna fto- nrtosdr t,dILE€ic nersage gmr,/ Grto,ssfish il€so6t twtl fi.ut"Wctd€t.- Flo- GusFrh (Io Qeait.E YtSq $1s i5 €wt, ro prR.m m€ssc{€s k^!e d As3nchronotts Ccrnrocrni(c*ton @lu-reYD tulO &va cepn6. ----4 JH5 Server / f,rDv;der fuppri c s ciesn rrrtt c,no h*i''g ci^?cJDi lrg to 6tore rn €xsagg ftmPorcrAl ----. frqBy*$1vfirr g4ptizs one brrtt-in Ot4s &'rvr4" P,n Bo:io ftr nessaging ond fiS vefu PaSe noa hc.nd{u+ 8wn oq oalotl mrr -) f,115 8q{f{rtr6 tio roelsc€irlg dortcti nt I me1 Point ro Point) hrrrdn q --J Use3 €ctecre OJ De,sUrrrrf<"oJ flestrge Str'q lrc+ 4 rbe s4lurrrntc'5 r1 prrul** Cot*,in Top,. as tbe Destlraklo" I ntso'Xt et^ thesr mersc,Xe-s clo,-rrdn te€o< paXe nds tlargc srut" / l( r- oF the o'-[c+l:otr'
  • 184.
    @ Ptaeaot' elrr0:- ro or(ol€in GlassFsb ?''X 6fart rngdorrOn?' Server Ern APe'va bin > OsadYo) n SerVctf o€ GrcrssFsb. crrd og,n it6 Odmto&oeole' skot-dwrrr:n mg&rtrcr:na er<f{91- Neo J fN0rruarrr.; Raurrce rSOe c hrtptlltocorttost tA*t Lt€lD "Jesrocc'{' trtsted: ir'srrrlal " '-'l --,(/a- c.res* Jt15(o!,neo$oqTacRru c.-** L"* :* c..eJsbaleertt't') -r Adnio G'soo k',ten - Qtsuxes------) fl4'5 R€s*n" - o Mctlo.TAatu#E J SHgGrnrEJ-ttan O4z'{'F -/ "--------r o[< Conredorl re?rrseofs Jngdortnc{'htdn IDo1 ' eo-eh bk, ctierri appn aod Jns e€nrer' &reue akr6rrrrr* !,""tg JNOI name &xee,D ----_+ dl{sResurrcea De sdvpfisn Qerd'rces idvax.irr6 Pl'X -> ft6 i F.cdn"'co"*r fiSCcrnarrna,-tcn1 K{rfestr*S the 6t{r'- o,erc Admin Conso [e JlNprName , fi6o^ Drn*r^)th*' CaofuatJod^ )ok Jw is Fftr oP iee mdule Jrqg a.Pi meaD$ trrrrUnq colfi ttre y. fttes Ibe iee o-P;f cc'nl<,.rrg itta opi 9 6e.ljogic g"rwr .--+ t'&dogic';ia1 in glasftsb Senrr -': jaleee ' ja{ in Sboss Sevw"l Jbos-.pvaee - ja'.1 o^krlpablirhe/ A-pp l.r**.i*€"'* IQetwttz-TX?e : O Plozrd..a to c+aorc -lbpl c Dcg*;vrattcm inr|'e ' a*dtt 6nvl vcnrnrth Mmtr(oo,ote su,en >Qas:rcree-r *------t lfor-rcer l]nffiffi* - r h[r, -----e JNDrNarne t@gkr6stzrL ,------' -:---1 ------: ftsar".rt ""@@sggeg--r - -/ ruc(n------) _-2' ftc.-ru<,r tm ) s"4p6ya AR urea .lms c+i to srd # to s'e t'lcnry sr1l< Lrsea jvns opi {-o rtrdr"e ms6-l furn Se flera'c
  • 185.
    the 6Furfttre cPO116 rnessqg e Ttrere i6 a p..,ss)bi li rg & Developtng *rese t1essc,ge6 Ye+kr FXe no : @ beade, nameg are Fxed propc,rg oornpr ori values * "ff;t:rT5:.. Tasard addiricnat inPo olonS <9)rh }ltssaJe 'oe ozed fo ctt^l' (olrh flersage p"op".+'q 5 4 OoeoeGoeneus'n (1) 6uecre (r) Sueore6esricnr [r) r-elor<d lbPic x) Sl&,t, rcceivc't Dorrrir r(R^{ crpplicortc,n dr"Jl$ coltlr, &,ere&s4blt" ---+ Irnporcr* rehJtd ?o: Froo: mn€i Org: arrrhor: Tt'€ .l€a! a4"tF.,roP rJm$ r',lCrsa 3c lsngrc€ 5 o? Jn6 opi 6oetre 6.treae Conrrcnoonro-Y [r ) rcrs og Husc'S€6 &" ttto.l-ct ine" 6 -'o?lo+lPra l;"* ' Otreue&nde'i &uzueQece;vr'l Ofd elo '-. To6eR*ushrr ToP;.Scrlec;ua c!o& ete..-. "yekx1td to llcssages Ib pi c GnneorcoFacry tr ) lbpcConnemon (r) -Ibprc (r) -lopi.&sl.' (t) Sr,uml"lesage llapllesage 0b&* l'1csscse and elc . .-. F+r pkunJos Apr bosed h*ea PTJP nesscqieg o{,plQ 4 $c o'loaf.r" td"*
  • 186.
    *> 1r€ rccrlti rne AafiP te o.{ptlcatl cro3 6tg 0m6 av( @ OrnO*"f rrorn8cme rq @ 8ug5 rrqnotemcr* (9 oPPttne ord'a boo&r6 and erc @ ft,, prcdn 6ms based ftllst''b $ncle- 4 roes6cr8in3 reW 04@ & &lo4 '. $p.''S ilr"tS :- -+ provide6 o.bsr{octtoo Lcler o9 plaio Jfl5', Ttn *tls ;hs4rt']lieg org'e€ ', jvos'c(rn'J-slt"vlv'-' + l[t,:s 'Jt16te-plot< clc,-w 9i"pti?ics $e gvucess cP Se'rung c{oc Qe'dviYEffa8s ' '/ -+ Nonecd 4 coorbjng rcirh PtuoJtls r*r'' Pt Jflqopor<lf{ans r c.rertf( -^ "o 'J -+ givus Coubeu< &ukrp.,ces it l& djeF BFs oP messc'6r' 1m&€ale JiloTe'platc c-torl o1 firSto""earo 6hi, TDPicfottt.,-tu desrinaflcrouu#'=y + Sp,tngJtis gnrc-a $e a"'*o.*e Caued rr'essc'geCttor<r to ctrdJe .--/ di?F tldtrs c-+ rmsa6ecrearors b3 u'srng rbe- e;posed gy6sr:*lcrn ohF4 O ftr, fu."5J145 bCIs€d P-ro4 €xorqPle crppucorrog *ePR'r o{Pn@ "P rhe : f:6errjs @ "0 gr/Anq crqs bclsed gth**h rncsaSing dofrc-,n kr( of gicrnpte c4Po 0n rhe Pge no's 0 t" @ o{,P(D "P rhe V'fleoo's A{rP.rO - AD
  • 187.
    Xcclure-v Sfxioq l"Jeb}lodclle ==:=a=-4'=:=::-- ----- SprioglJ{e.b modLrl e p&,i:t (0ri',cS Pluglng cncl fuc;t'ie6 - fror., orlt'r .oeh fl@ Si(os rrrrrre (sp"T ldabvr:v c / sn."g 'nn. / f-) rt r5 sPnog 6 orr,rr rt<b Flc.: I to.t o{pn6. to rDcrke +rioq ciPPDS cbmrnct rr-icafcr'!:l c bcsed o+pnl lire 6hc'r5{'?PDf ' Jerc^pp"' 4erc - Srrnog w'b fl,x,, ) siuc, ro der,eloP hlvc'L 61'rctLi lecict're bascd Strc*S srd Spring Inrgcrriorr ". - -) fn tbi 5 O{pn Slrctr3 Crppn ftfrreSerrfS and 6pring Cqrpn r€fm 5enr5 m€del tct'be'{ Cet'tl*t s y166r; reg.. q,t.l *Tr*;,Hi{,?j " (Fr€renFrl sn tog i c) L' l0$ic5 - [gic{ Pners iotcQce lcBic) Ilre frr:o &r$ s oP SrrcrrS aod Spnng Irfc8roH oo . Q eFu-rs Lo;rb gpytng{6hr*s ood Sfrfiogoppr,s .rtside ard .q$ircrts cQf') i5 )ocol ctien+ opPn to + b€re SftinS offrr, r ,.t not be a @ 6r'1115 h 6piog -+ he"-e 6hnrS c{l)pD and SDing apflh yesides cn f('o d; P ft-'re "tf JVvrS <:€ SalTr e cY di?Pete'r-t co-Prt't' -i StYars o{?n ;S fi€ff)5te cllerl-r o?pn 16 $ng a+eo ' -> h"'re sphn3 cr-ppn masr be a Disrri burcrl oePn, -) Jh€ plt{gir) rel1.rw d P.,. ,StYL(S 1' I arrd Spr;nq irultgr<r$f0 i+ i c,nd rus P)ugin i5 scqrPltcd b5 prg. ef: . @eb'6ttL+5. Gnrcx+Lx,cte'r PluSIo Spriog slto to ccnrfigr.re ir, SFtutS ConAgurol-icr{) Bre b;.rsr.'tg 4plr-rgin > k.x . Aaic,n&wrcr yecltnizei cru $e plu$ins c'onff6uwd in srn rs Cor,&6uianan $te . tlt rnar.rcrr i b ts iosEnrt ctJt^d lorole* c'.'rc*tcrn ) . Aettcm & :r,tet insra"ttrHo-n 'frtv€s 1:1666 eirlxr clr,,"lrg S{wd 6ktftrp .,t durrrg rhe deployccn'e'r-r r-( trr)ooppq' beccur se coe $erorrolr1 ers1cle &rd -crrr -stz'-tc+ crn Atri on'?"v Et ' --+ lhe crtr,w C}**, Lo,la.oPlt'glq ctchvdkt.s Lleloppn Ccrnxxr $pring&ruet-inc"i q 1rrE o3 6pec;6'ed ff't" ,r.*e Ccn) A.,t'&rutttlqicalnarne - Servtch ' Arnl &5 .gting Confi6ctY6$on f'te.ro"',e , -) IrL rh.is pmcsss o1-1 5f1e !er.r6 itrcrtart Cclnftiarrd tuit b€ freirstc/n]i.JtJ ere!-uj< crfr lbe 8Om€ ovM €fiJng efan Disrn {fad o{)Pl^}
  • 188.
    In ovn]lrg cP6hre ep)46 -in .*," fo* = "o'9 ' spr;e>gPmrt'r:zntr ' arb' strt*s ' Co..rGsl6a6ptplagln" /> iro fl-e acnvcred fio3 eon,r,irr4 1&rc6 (Irc*ia",&r vel l-rr€ i. Darr€> -se,v)et' Xml ID srrur6 cFX Fre J Zplug -ir) ctasoNar'' e -- tr€.sP . cuclo' srldts' Gt'tc^'Lt'ad* Pltr3Inu 7 zsei- - ttDrx-,ft$ ptDfrrrg =- " c*r tG.,BX locclHoo' Jcoue -- " / r,rre-rxr/ r-ngcPr ' xmt/ ta16'rog e,tJ&Se'xn'/Y f nw^rJ zl0r,g-in > -'hr.e tbe acl.',nra4 *pr;"g canl-cilrx,r tares .,8cP61,xml ' ro,cg€e.[m PiPs ca ft-xc$ff*;. -n In 5wur6 coirb Stdng o{tpD &tttopme"r tt'e St-&}6 Aeitancldl6 shocttdcon@n ''' Ciiealcide aod shrLrd cou tbe B'rre$od5 6P ft*$&^"' oDrdtagfe '-/ J io Sp"ng Ogrn. fxarrpre ; "" "s*fJult-Jfj8 u) @ o@ lw @tqar.1 b'raory coi.doto W.r,to $e d;cqtowl prDgrorre I deflcgeea 5fiots 6pn nt 6pl icorlic'n b€drdse A? Loacl oo 6ran'P Ser vtet Ccrntnnc/ €.ltbcr dcrring &rvca 6k<r'fct Ccn) dl-n lnX jn Lcrlgerv<t o'r Awlicc}lerD Sewt't ' Cfttl<a Artito'Servte'f ctass o5j the dealneenet't & opbaff6 ' @ fta6Servt* aaivales Ca,tt^tLca$|,3h' this pt'{in o(lh'i1fts rhe arbpllta$o16^+t'r (.adal^cJ" h t'rcng ZA*tonftwt.rl-{ticalnah€ -7 -'krvte't' Krnl os $y"ngGnBg,tanon P;rr, _ Corrhol) e'a ) gr€c.rt C-l -., -' - ) i -.-.. ^ . J Cc-r,,rr.r taracnl 6md rrtooiog floda szw iCl-. xrri f''t. f4d,l6 WLe4 olL d'te Lr^rs 4 5mn6C*9i5t*r-' fia noiuk pt<^lnrtcrnruxJ
  • 189.
    ' -. @&@endLr,Je{ lc'r'toO tbe Rrr'Pcr8e anJ &tL'mir l1e "'<1tLelr to ct-dx{r,'!D' ff6rrmcl@ dl6cussion.S : * frr- Xt" 3'Prr'* ctass ,,+ €grrng c+i ' Irle Nwn 5h11t5 AleHc/n cl&s3 & Kndg Crtn geh &(Iess fD 9l(us A(tlon (1035 dksfioe th'e &,.rertlooote,r PLt$ f.) to 0& acrelg J6 cnd cre a^ F rh.,s SP"nXc0nt''ir'ad -1? CaLt B. nrcr{rads 0rr i L ' @ Acn..n5e',vr€f it&ps and fuKe6 the rEuest an<l useg 3rtof5 ccn?;quvot1c"1 .- ftre gnt,;es to decjde Flrmbean . anJ fip;rcrn ctcrsS **'! c''- re7orcd to PYDceg5 the rellrrt @ A.g^&*rt prxkS rhc B"s'rrd +"t dt" to F-"-Beon clc'rs oent O A.r,o"fuvre. cefls a'aaurct'-'-'-) rn<rbod of p6Sonctcr-rs ' "J -@ 1h.,5 fx€cck(-r-r-'-) ,tethocl s'-eboc'r rnoncLBcS tu Bth ft-ngBcan ctavj ohj( @ oer*tG,-,-,-) rrrh6d oug Bu,sthe$rrncr{roc{ oP ff'5Beon *A fl* %- keP *t, rtour in refest a4w;e h rrt've i& viriote m r€.sLttf l']a6c- -O rnb Qx€-c-otlti,-,-t-),rerhod 'rt}.-'rhg 4te @"rmle At"s69'ntt-r ' '@ A*r&r,o uses sn*rA^an*r*^ &lo gnr;a +o cletla"+fu'1'1r pga"F* '-@,A,n*SovteF fi&rs€e $e G'tnte totesuttf,ne bix,r{,,{a$ndoco as -'6 oou,, PaXe.$.ax thc- rzcvttn ..na was lfu rtsrLlts tb -) tc-hea Jo &nlap 6r*rs (Drrr'' j ^ : - ^,^". coitrr 6e srw"' dTtrre q€ tzoo opprDac-hea +o &trtop 6r*rs 1o16' 6pAn3 oPPn' '-'") loo 3nr'-t5 Actton cklss Gs 6p''rng Atoate o oi5 A0prDaab l) Bg rrr')c"'U , A ,_,U*,'., Drsro.Lftrr o,i+fsrt t . " ;: ) | ^*^n r,#Ti*u["tj*T-.*," sfr".r' * :* p**@'rtu* he?dfD cfu 6*'6 A'tnonctc'rs c'" si*tX |,*.-ani't spicfS f:re) OCt VOIC/ Sil,an6k^ 3gnn6Conf"no' taN ati.d d -) in 6rtrr5 ond Spdng inqrarl on dllmxd gte+<'t tx'th6 Sp$ng Gntairr€a - be(l-use trfS Crntalnot Ccn be usel lh)s Gmtotnar tDit be crurva-Ftl eltho{ Chttn6 drflry.-.* 6p sr$'4n {hs ft'o@s iqnoves oolrb Gnr<rrl-oo*rPt"{In t€+}tJ h mulHPie krlcm cftrr<e{ c^d f.",- sa'tiL4 (a1 Ju'*q rhe tl* yxt?-"a^wilhc, o"nP":a a
  • 190.
    ocrivzrli ng Sp'tq &-tc!ine,l -) Sampie .shtrt$ A&16) ci"ss in e151 ft-nr.o crcts s €q-'"ol<)X ' Cocle S allroagQl ;- public c losS lestAcrtc'n f Flblic A+ionk"tood ti.* // c;t ftcresS lo Ne,uAPPuorto"G"*tx t- execue (-, -, ^, -) ep''r"g c1'"ou*o4*6'3"t Lcacle,.ipbr4i n "1, = gqfJn'oAPrticaHonG'*e*tC) ' exEods Ac}ione"frt ,t (rhis inri.acd,B trirri 5 Pror1 kda ctc'a a4 6ric.tt6t ";r{ c'P i ) ll gq acr€Jb to S6ng Bean ctcL% d'j rnoderinKr bobu = (nftrlerlnrcr ) ctx'5etBeot' / rnf I' L b""t;d Rt a^eP.n* arymoa}c: & ApLr-lo0m"t rut E-6c,-lg {,q"t g c{ph &€a {etrcLt€d cloCl'mr^rz+'tu- IfroOcf, @ UUsC$st(Jns :- -> l*re tce cbn6gurad Srrugfuricocl&rs os Sp,tn[*.,,n c-lc{g in stzttroSGn€J3u*H^' ftte. sor{.ot L& can iqenr 111a pr6de1 lrolpv' {,;ri5{}earr e'}a'6' ofuj<ct fo Sh'uis .- Aqi<m ctcrss fb Cb'l-L rhe EL|'sincl5 rnca{rods #n o",g'n^ Sr'"'rsA'cno' ctc'rs in S* tsG"95"*l- f;rt{'o vecdt< th( wq1-ttKl P*rn A,.rron9wrtr oyrJ J6 pas6e reqAestio cr)l$irrat 'shctts &f:o'c'42-6 !7 itrf $ Cc,nfrgured in 565 Con65'urc'rrc' f;'tt ' + Sprn3 Apr fu>pliel Or3'sF.'*" rn *.' Derlarr^g'4.+rcrrPirxs dc.qs 4a th)s :pcnpre rc0cn pa$eoo'S @ n@ 4 itre muo"ricd ' flcror;1,. ll'nrrtoct cf sPn6Bea6 bpd 'bm.r C-) j 13 @R" rn. af"" toirh 6Fng dtamm b,sA c{p1:n LW and tha afoire o{ftrDai}t (| krscl 6f'dz4s I"x .{,Pr, @ Poteoo ) t5 -++
  • 191.
    i -+ -Io StrottConB8urolrcn F te (c,crion frorb=" /x.-,tz' hpe** org'se'c.]cb' '5ld<r/-o ' Dere8cttlng Atd"" P-xB > t Prox! clost R'r origloor Ntlc'' clt{ Aat$<tl> lbeGr'6> ' -"'uu(*i^" 'z ru"*t-;*:*;ffi':-t:ffi' o n** q *"r'fsacn dard zl}roo> .^ -." t- -,--.-'tlodeflnPI l7' ,Zbean ;d =' dr, c)(:.s>-- tltF- L-sP;ngBeon Sarople ,slrcrre kltcln cl&rs o? $c obaa grrnru'o :- fJLrb)ic clcrss Gtfb;<"a exreod 6 Aedon { ro }od sP'tng kah cLats obi llodelforcr bohj j // B€oo P'+dg frlblic void sefl3.A; ( rf"atl Ttl+<l rr)hi) I rtnl'Ixb,j -- Wi 3 rrblic A*it,F-.-'a e'neurc (-'-' -'-) rb'otx'> V-rcat:o" v? { 5m1 rescrtt= bou';'gail'r'C )"1 eaitb'r'rt'd d) sPnog}ea'n cld'6 obic4 ' ..' .' ': -l -*"*'*j@ giws krtor pcoft'nonce ln s*rrl5 Jnlr#..,len |.*t,,'tJlt- ibi'04/5 5riltB* crqrs o$et to sr',rrs Auta" ctctss PID(l/t eirbeJr d:rrt lq',J, Sko/r&{ ot dtrrtng tu opprotuh no@ bored 8ffoo,.,77 y6+f retl<'r erpno: @ fhe dtptgrrr"+ ofr tfie a'rbctpptl' std-tfs trrlrh sPnnt c[Pn fu<r"prtrnr
  • 192.
    ' x; Htn;p,qiatShuring 6tyut6, <p'nq,h,*-arc &zrcgrarton v6vc? , OAO, g{rs$nes3 Deletojt Ws9r, @l+/.t!fx," --, the bafxr .hva CScrs 4 cllenr aapr, fbor &pc'rafeg Brsiness rrCrt^rod coUs &,** Aad- cr]s6 i rnpleyn e-rrt-jn9 tpr,,t Pre"luittto rnodlfu is carred BossnesDclSorccto-ra stroJ5 f0 sftioc Co;rb lh']fr nolc c{'P n C&rnt'dl,r tal.^) {ngr1, jsp(firrnpagr er@ft(-'-,-' -) t .Etyr,tylt'. E] R10if6 e ' trYi.l4 3 - atilr----) /-==----l @ n f t,)eb o{Plr'(afioD -./' HfiP lnti4,l nb--5r|-dr'Nl a &PA Fwi<m'totrLf plaad in Aa{oo ct^r inrt'acHn6 tal{ --) Irr *'e ab*t_ d..afa", iN UJOaa{)pnS dr11 fu,re (1 a"rts AlpcoA^, €r"n6 oen rrrdut4 tb ctflt-top the hrsinels, Wgrcncc Lo6lq. $r,nts appn iS Httplnuo.cr Ctle.il-app4 t0 ;eAt+** H-fltLoi.n&mra aryn, O ffu HftF&'r.laborgava d{Pn' B.tsinerr Lqt.,r 6afu,Aa.r+n3 fttz.[ run omJ ttttdrs bastJ .1 anL punr<tnta IrSr k iyLr(J,rlt 'reee.L - *r!:, Bxs -, -> Trrdre, aba.e ct{pn Sz'&t^Ja rrU$A 'rDO SErn€ bf<,1 ara t aa- Qd fnrhe ah.a d.lagr<.m &*a ,{,llan;s llftpbvdb#S,.-o{rpn.to}rtch ttns sprmgJEE.,
  • 193.
    Ptcud-:, ! deveropthe obcrrre dicigrc.m based ra-rin;prDjeoJ !16 us;ng l"lgEcrlpsE 19E l{fl Servel ofPli((rtido : - 6tq-l :- Cnarr t^J€b tlroje(r. fire -----i Net6 -----+ 6cb pr4i eLt - ftojea Name ' Lulgiglry l -'- F;nis b ' 6|A-S'.- GT ftgcr'e p;sprr'har ee'n''rer io urA'xrnl f;te l-r'"r og +'do ctrl Pa'rfc'/ o art d ., Teft"r oeb'rrrr oP f'5ero: @ .- C,lcp-sl:- C.r€alc HO- Stcrdenr trble io Of6cl € DgSlto' er€c.lf ta;rle llB-Srcrzlent (sno n'aLrr C+) Pdrm"tJ kcX ' &nme 1a<|r'r>t>o) ,, tota{ nur[er(5) , Avg nqrnbrr (t':) ,result Yarc']-r'1a(5)) j - 393- c",o*. DaraBaa p.Frc &$ *cilre in il8Edlr;se ]DE - oom ! hJlndoc,r -------+ Fed Klslrrrive ---'? tlJk ipg€ Ddrz B a5e Erolar<I --' 00 trut'ltc'r ---l v iqfir cUctt .J.- Oraoe (rr'in er"r )Dritt('tcrnlc'Fe ,. Lgraoe Ll Driw{ Ncim€ ,6 '- Gnr-rdf'n LrQL" Frt'-'u---------__-n" tr*"@r"t^rmtt: ta"l1-t! tllcrnarrr , t*".-f _ Frssrrxna', L!r"-J c,ddt&r s ardb.f,J4 -L : - *;-:^ffi::'T,--5", Hbe,rn4'}-r ",'pLtutt( ----- QI+1wr'IL 3> '-'' pEntote )+ibars-Fe Ar'notc*lon fu+Pd* UcrL-----tM^1 5 00d.,'c,i ,-lr.5-] -....-)N6c # f] e^,.ec.rc &srnFar,'1 ctrus?---FBh -,${'Tetpr^rn Hitr,'v.t< Qe't'rrittrrginecrinS on l'l8- st.'denr G' piodr.,o rrlKu P ot'tmpxs prn tre -------- -"{l.)5rtu P(e DB Er P/('rd -= -) DB Btotux'J'--j ------r Foand olzLP ---tExrllnA Cs're*a' *ol-':'*t *n+-_---e^ftS' &gh ctrck on Hb -slzl&/Lt --4 fiWnott Rar'rst Evr'$ntrr"g -+
  • 194.
    a- ,Kivrtsc{ S,r"flllttt** n*jlf_:] @ c*..t ?6f,6 z> D0 kdle W J*to Dd.raic(er5 OU<+ [p4o) O Ad.t FHtzr na.l't l'n qrxr5 Annofawr,x... W (t't.rcta< Ph'G s' F;nd Bi meuhoats ' [3upda*e l1ilxztvLb< ccm(15utav6, Dturiipe :OS'^]'J'6DM *----- D v*ne pop Bdtd.^r --) p'u'@:&ilIlilil ---=(u(xE * "E;;:Yd;sR.lzhr. - g€rutsf - ;rrl $tJ5P6fiecrury Beao id I ---------n l*|tr. 814'S i fi;s 51-(p fle'ne'rcles Hb6rud6* 'ic!u6 +bitaJeru DftP .jar:< P+,"1 1 N(*L + @ HiUerrrrre lgpeS -, -, JDGtne{a}<N j l]"C}t " w.'A4f -l ------_:) .g5-sruden* ---------) TDcnenc{alrri I',rts t-lc".il --_+p'd*', s-{-gi- Add fion9 o'{ct}ili6cs tu #-ta rfts.4+ .rr "--.!rv.ire,naLilih?{- oiSl-uteocrncnPDjats---------'F]U|=ttlxt--JA.ddsfd%cc'PcJilitx{--.----)@<r'"onr.5..-J -----) *)et cos, p:1l.,ltt14sjry'qp9c' gll4' q1-9l'!9 ' tr)i5c ubGric{' ----J^/(xl* r' p6ro cl4t3 Srcp--rffi ;- Add gpvtnqlr4erparfl 5v C- rYLo ----) T-nrcr ftrce clois spnn5lBeona : I t"ooer. I ro the PrRJelt ' foodel ' ia cr ft^ttlc IrWr(-aCe Aodel i qfi*r<*{k** (s-ng mt'e, in* mr /irrr m",itt mil Clrbu c $nng ? J ltfta,'z sr ----' oe-tn --).lars ; LlloderBean ) nrp I c'r^{ad.6 lnoule{ Frblic cla(S llodetgcan im)te:t'tzttt]o !nod"* I HbStr,de'-,rOno dc'o " r^-Lru*c 'voicl se0ao (Llb5r'du"*9no dt.'o) | tHS.dao -- dao ; o*,,. O*n, gonoro*',Quutt(S*"3 69'"'e' in+ m'')t'f *-, )d ', f /Htt" to,16u," inr tottrl t' rnr't-Yftlt mB l ftn,-r- ar.rg = lfirrr) totar I a'oF ; / $,ntla+e rour ,, ,) W@ $r""g ,rer. ) ses Poct
  • 195.
    *g,="ktlt"; f/insu,r .tc^a bbusry DAactaj3 hdn**,rr =ne.o Hbsrc,&,r ().' 5t" serNamefnor"e). sr.seilTtor (hw): St"sahuS (Cror*t.;-5;. St' serl?clrr+ (r.s )i dao-satr ( stJ' ttltrYn re' i else r€S="PGSS"; Sllnena Cbnftgu'e in --'/ /*do I -. 4Vt'o> '.,, /&an id ="'Wg'uA4x*A*o'' -- zl&on> z&-on id="rr$" cf&ss ='lvlocuBrao > qrofx rrtrne="'dao' tt'p=" llbStudentD[O 17 4rwrr+A a- lP [ovg eas ) *,e 4rraoin6 ,acldsHcnat kans in *-1 a"66lr*r ^ ]"' d;s6't<x" -. grn/tr}'xm I zlbaoz '-^-L1^, 't"rPoinvoYr,r ' l)tpTttow&n'iufu zb?ilo r!,rne=' l*'t't;ceu thtS'=" CJlA"se' *n'oan5'l'dtpinv /7nPrr1 Tnftt =" g*i a'T^xoPate' vo)l*-'mt'dg' I ' Mm€ =" &rwitt' rtl=-"nb" f , Ll&an> zbean i6'="5url Llots="ovg'3;niqParncrra"t' "tLLlo'8'd w"tl*,Lw 'St4tU'l-U'aur4n 2g*v lAme -' rrr4ernS 5 "> sooe$r l'lo"rtorfu+p;T zQnP6> z(rr,r1 ke6="m;.clo' > lser^.,;celP^O' z-lpnrzb > zlyxaT*g > zlbean , zlwn37
  • 196.
    CcnA gctre Torr(l.t€ewe,r eonh rng EcUPse 'ID E 6tcP -S ;- Pun Ae PYDier-t-J-' ,- ,t. , ^ o,^. >. A-no'l)ralJ cr) -------3"<are o ." Pi6nt clrct' on frrDi€rt - ) Ptiocts -------tnUE4Jp'e(cr'ticcAOpl)cafJ e.-1oY Chanqer'- Ccpg ditpe'tchel-6e$Jte-r'xtnr Bte to hlEB-rNF e?lcie<dg VJOtd-"l- changeli- Ctsr€e a'.- Add fl"m.6-home1 tiu esmasn-?'?-3'ia1 to tbe tulld Fnb oe$e fiqtel" b) ddd s1n og, ltU"n"re rebred jav Gter inra the libravlcl .'P ri( fI'"P hibonnrc 3.Jan stP+,i-a?t -l'e' f,itng jars Imn-r'r' jar i- l. 6,{ .,id,,l hlbcrnat-r -fha Aeflute g 5ar $ t! (jovossi s t {#{o. &,A icd rulrr,';t.Y-A!9 irrqle*- r<el?da < orP-r:- c.tule uJ€-b p"qPa h"';o j nane Strr-*aApP Fta rrr ocr ------t nerD -------' Ldb W;e4r '--) prderrlarrr : SltP-$i add 5gr;q A,pabil;hYs t-o It'e {marU' @ -1--"''"Foisl't fufl*ct;cv d, Wiei' "'-"----trogF-cuose '---------r Aad sp{og crnb}lil-i€d ---> (tsvflad>'s '$t- - t I t2 r'Aft ------ ;* svt'3tt C..,c' L)bo..,ics) sEE LibraYicr ,, lzerroliog Lura'ri.a ,, m;<c L;bY'{nq -'-t pexv -----= Eetol lc AoP Wdd -=- Fte: G lffttod.t'iavaPnn'' ser'a' ap"'(urtar'u'too)*nto* Tl!t::*l-., . -. -, , - 4 :'";;; swn'w?-y, Jrrdnj8cz.n bt"d l-o5t'to call rhe &rincxrvtrrh4r'=u O( E',,,* o+on '-Ioi"n' l-tut"tat' --, fuea gc-+Neur -'-1Sn*cr?ata----------+ t.tc.me: fcl,..a -l ---------r BU'rl, -' pdcic iru€{pa(e t6e t %.ffi*ffi-ng ncrme, inr rnrlin't rnrr;ru-r')- '-' 1 0':loerrerlt-.lRa- 1'o-af -1'o o ?rr'o-U6al CCgmrr$nS-Cll,ta$o'n -?' I'iOtY fl ierll.X r0 I -:Erde": Clnogear IP CnsV;ui* qrobtem i6 "rc,.i(ea O rcr'ow ll'bersffe, q'iogllblzdag {o-fP"tttd Frh c? rhe Spno$ 'ia'{ Ctrnrnorrd - tOgSlng iat 6fr'n6- Webm,c'icl'l I , 3rc,t5 *Ot'', -1{5e,.,crr}e Jar R+uS
  • 197.
    lfc--', ner-D --J CIASS-----r Narn(: Ct iaru Eean frrblic CIASS CtienlBdon4 irqlerrfr*-S Fodd brqj; Vrbti. void se*[oi (xoa"r a"oj ) I fhis'botri =bobi ) pusi€.Hode,t- Ft#! rtl+"-+--+#' in ctienl'x.^ lbeor, id -- /-l,(oPea zetw Ll&ao> zvdo id= cb ctdss ='c'i@B&o- l, L,[l|oPe4rX 1)orre =- bohj " re( =-' PP6 I z llb@o> /nrao oGme ='/de"'0" cas|=- lolrrrftcnoo > .. .b I lYroYrtrl rrm( ="mo" rff = cb /> 4@an> A,lbxai5 2 cticru- { ;' trrr.ls h & -L"**, a,-€4;-- t ? rck.do y(srrtt: 4+?<f& .s- Sre.l6,-++r*o etess. 1-l'tol"vorec R"a6E ro"dBe4rr > iro" class = or$' sP ' rrff.oh .,3 ' l-' t+p;ov olen ' '," "r.,r'ne ='serv; ce'F*crFace ' vatue -* t'lc'del " /> ' ' . " Deme = s.*;ttU't' ttclt'te- bttp:/raorr''os+1 >o>o/ )149-*rvfrn/o'J'ao/: lLblic Srioq elrB. rrl')".l (Sl"nq tet"€,, j.t r"'"inj. ro) ',-." -..J .*-,.._.'--. d "..,r r,'3) I ll coo b.F€t+rod o? st61^ aj0P *"g nr€-sult *- b$. gu-"oof. l2esrrtt'r'rne, m'f t,}n3); $t€#i- -= Lrc?-e'.' add Srrarb Cc'pa")tihYs to rhe Vgw ct't'on *** ='ou:---a WAe Wud,X<^ W rP-r-o clcrvtas --------, ftn;.l. 6it0ry- ddd k!!ap33, Fa'rnBeo^t' class' &rtrrn clars h proie' ,,,-* i,', *ffi Eiq.*[tii"' . .- " ^:" ----- t^Jcbstnar6 ---+strurs -; $rurs '3 Fz,rrrr, n.rf*{jse--a fgexf ------lN1meLjq1 gqierclrrt, @ )F'b-IgPei &p<*F"n ---) Md grrclfs Copalailitie-l --i Qswuls l-3 Wje'k Darn€ y)3 F -ltofcrnr€r -odA f- -----n $r.'rlrxl1.s l] desc'rrerr s6sched kxeJ -T- a t.:
  • 198.
    ' -----t Jsf-------, V ca&!< Jsp .Pr.."r 9. NLtr Jtp patt I i7i"r.u..itp-l a 7ac*ic|'yrh -- -----rnexb -'---- rftrfh "' ltaiao J trc,E4A.lt;l -_) #-, fre, -l __,____5 ft,.,,astarr----------: add.----HIi:Tff, € a/ d -----.2c,tor€, --- --J Tioisl, - sltp-il,.'- Do 4r,roorn3 mod.Aco$ons ,b 9nar5 C".?',Xur.nU -fl1,. , 0) ner* * exl6riog Acrton cta-rr drra2lSute.H* dn[ fum" <"*- -rrr!p;o3 ", *3 ) /aUon -rrt,+nir,g S > lorrr.o^ ynr.t=" latll'6' BdAe='613'sP'c'x5'sr^rure ' D-f13"*fryAttl '^P"-'L'? ..- z-ftx,ttat d narr€ = - scrc.er.5 ' F 1, -- 1rcstrt 'iue" l'= r'r'te- l(t ) ,, zV,cnan> atcrhoq - .r,4n'. DgS > Lr_Locorhe " r pla6So &S shocon ' ConAScore Gn*c"tLmde'r l-,ru8rr) f trndor /otttcn - firr+p>nc7.s t tq )L' ' zrnuscLSe - rf,y1QYLe$ (j$ann?+<4 -'" AI1arcano, Bcsocr:rci l> zplcrg*io crorsNo-u = or9'se'orb' s|rc,-rs' CPurLoal^Plftrt' 0' rX Wfenb= csftt<^t}n(t5Lo cottn" vo*e =- f us}-t"tr I cucn't''ti)'= zlPlufl-i, > sg?'w. Nriit fittoto'ng cole ;e fl<fion c'@vJ I[-o ^...-[4ro,,,jaro llJor-*-rt"'"" '- r ( Pstlic clcrss I"P*tNrl'^ e/rcnds Ad* 1 Clienj mo) c Qu',)tic vo;d ser|1"(6;ryg 60 J t {'rie ' rrn =mo ; 'lt J. Pbuc ftl^F^-'"i o<etulr C '-'- ' - ) a qv (,- LIH*'"" r{eear.-1'': ).1 :'.''t , wtf, = i{:r. ge+l vfn(1,/ t'J';,'-: ;; r"'* (itu' surl'())" int wtz = Islqu ' (atK Jnf r* flB = J,uk1b(' p"rxctxt tlta1,d g.rne-rhod o? tr;cur.r U'ac.'t J t t/ btf yrscr.tt = -o.Conr&".rbd (r"^< tttrrm>,m3 )'
  • 199.
    i ll!"q', t^ttt"ib r€lf-ert o,r+nAl*e "ftAfr-sl' 8e+Att,uc,re7'msS",v€slttt) ) . rntc.rD ffr'.{l,tn1, f;.a E-ara (. *tctr:s " ); ll-.wt"4 ofrn !v6io5q cpr, dnt^-l -----J tXpe rhis Uvt 1-,1+p : /7 locol host '-rrl>a I Sv'tLtskpp I t"n't ' jsf I J Xuou -,, gkp ':- Add Qescrrr.jsp ro r/{c.bmor lown & }ne P'"jtt}' :-, Q.c. anr ilexoor 4at ----.rxa"-"tf,spP ?in.* u: @ .-' P+"u,t ' i' Qes.u is = tt.=,ealrtst 'gctfi++sat:< Cq ") 'l'> :' t r- ^-!''! r^ tzrr"?at *ttuv't and atso tavt-*Lre tlrx* - or'(p-Ei Dqlo6ee fiss prr,3ej} iet wr{or ...-,-- - tbe k^r't avn ;5 olso inrctn"tlnS 'na4e' -1or,,a+6' - *_____--, Ok .7 ' 6tq3'; ?sr $e e{pticc4lon. .--
  • 200.
    mul nnicriat 4..- - Languog.Sare'!in.n to progrerffo€rS lnr:ing L' 6.:- Nbor is the d,Pft"c.'ce blt, prcgvcLmiog Lr.nguage, IeohnologS and Farnerrrorfl ? lcrtsic aod direcl PccitrHe$ tude!R)bI g€dQicc'lfan bo'l% at't se "rulcs cr;l gddioe'l .-....> are ure&.rr cokr;re c'recr'ng k}mogi6 r Flamernct6L6' .. to &r"tlop *ft<'*r<,s c;irt be uJed. Et Dt3a, 6edlct/ JsP, FIB and ele" ' Frrrnerm<cE c€ qe.'ai $lcp rpl"rnlqre's ohxh povide othcr rrr.r-tlipte Cove rchnotogie-s E3i sr...rs, Jsfi spring ( er. " . . tolute &xloping tt,s sttos sfi"ogta,'rn6 hg"'r* Ab6rA.*lcrr rra- * , d0pllcorioog. fhere ko6uogee EJ:- crc++, Jara, -> SoPhoare feahnotgg i6 q 6lLD
  • 201.
    $trlrrS 8.x ,J,ith*ttt5 3'5 tnlcironcb 2 <Vo@ -taglib prcfix=',html,' uri=.,/atruts-tags" %> 4/9/2013 5:01 Pn -13 </hlml> ------------success.isp-Cs-'4f-!pAg)-3-T:a ,1.1 .%@ taglib prefix="myHtml" uri="/struis-tags', %> 16 <html> '17 <head></head> 18 <body> '19 <h l>Success Page</h1> 20 <h4>Hello <elLll4hlqperty value=,,username',/></h4> 21 <lbody> Ltttrtws qt,'es u!e' na,lre Prb6 vo,l1,e StarlJE obj 22 4hlml> a. -r slnrf5 ?" 3 <html> 4 <head></head> 41 </web-app> 60 -trTiJ Ed ru t 'r, Smff ftrlon Cr{!l{ hd,rne l! /nc wrrs an-lltunyn {v!+ 24 <web-app> 25 <filter> 26 <filter-name>struts2</filter-name> ?! .<filter-class>org apache.struts2.dispatcher.ng.filter.strutsPrepareAndExecuteFilter</filler-class> 28 </filteP 29 <filter-mapping> 3G <filter-name->struts2.tritter-name'f src*s a a.?ptted $rro, 66, ff6,.r6j 6q 6.k]t 31 <url-paftem>f</url-pattern> | ."_ ., 17 </filter-mappinfr- i"':"t un *d^LYdl dta <ls C-rnw,r. 33 <welmme-file-lisF n'aFe f€rvrcrFGer+ 1,..1 "rd (z.Fe or! p.e- xn ar or.C "n*pors"J o( 11 . <welcome-file>register. jsp</wetcome_file> c,.tJ tltc ,t35 <A/velcome_file-list> J _-_,.'_lJ_,we,uu,,,y_ rEZ au thc "oth h.Jc'(ry ce JyrlrErg. 3,6 <listenep 37 <listener-class> ) **ltt ott't Lr sen^t lt d"$ u4ft srr' nEs t'*$ a4vn 9q org.springframework.web.context.Contexlloaderlistener t3J </listener-class> ) Gox.,t G^1o1n d.; "1 Se,r vo, s 1.,,r.+ . 40 </listenep t 42 ------------------------------strurs xlnr--C6lgt1-q{?-6gqg!1-9 Brc) s.'"+'a 43 <?xml version=" 1.0" encoding=',UTF_8,' ?> .14 <!DOCTYPE SKUTS PUBLIC 4? "-//ApacheSofrwareFoundation//DTDStrutsConfiguration2.0//EN,, 46 "http.//struts.apache.orq/dtds/struts2.0dld,.> 47 <struts> 19 :i-__I$-l"I: 1" srruts,that tnjgction(for Action Class) wi be done by spring-_> 4v <constant name="struts.objectFactory,' value='.springi. /> 50 <!-- <constant name="slruts.devMo69', ys;us=.'ylJs,' /"r-_, !1 <packagename="myPack"extends=,,struts-default'> ii O I .":H"l'g#leg;1'.Tilffi+'fu[PeffiC"i.9"Li?1"?flTji':?i"-'il ?;an in spr{s crs nre .> 54 L</action> , ) 55 </package> 56 </struts> !1 - --*-----------apptication6on1."1 *1--C$r11-Q1$€1J3{A f', sP* I58 <beans xmlns="ltto,ttt r*.sori"qtr"r " ?y xmtns:xsr=htto://www.w3.orq/200ir(MlSchemainstance,. 6l xsi:schemaLo""tion="h.p,l@ 62 htto;//www.sorinoframffi 99 hdp/wwrryspmgframewori;rclsci€;;/coiGi 64 http://www.sorinoframework.orqEitternay'coniexviorino-context-2.5.xsd,,, 65 66 <!--Configuringdatasource--> 67 <bean idJ'ds" crass="org.springframework.jdbc.datasource.DriverManagerDatasource,,> bd <property name="usemame,, value=',scott',/> Page 1 of3 Its Leanrd ir spazi ticl c.s spi clo*'-ta"'ra-@ h,ar,t e thar means uy sgt;01< d l*u tqw bt bJ+' {-"6Crnftyv*ta',. ftra Srrurs &fiq clat ds sfr,,i l&rrr ; '.,
  • 202.
    i 41912013 5:02.PM 69 <propertyname="password.value="tige/'/> 70<property name="url" value="idbc:oracle:thin: '/> 71 <property name="drive€lassName" value="oraclejdbc.driver.OracleDrivei'/> 13 :'3XT;**oonent-s*rn base-packase="gl'> J-F..q rrzer'ilrr" r'd &dh s 4 Pt w':k,'ae 74 </beans> 75 ----------------RegisterActoni"u"--Gtnrf:l-&.troa cl&ss Coo4nu'rzd rrc $e sft% 8€a) 76 package p1; 77 imporl javax.annolation.Resource: 78 import org.springftamework.stereotype.Component; 79 @component("regAction") 1--r l"r syn+sI k-dooclas6 is cc,nf,'5,,r.J at SpB%Beah 80 public class RegisterAction { J gl ' in sp;o3donh5 ..tr,ll.o^ e;Q . 33 r@.T"?"ts'ff[:l*El"?l?l-'[* q*n6&an cb$ 4i is ihJ€,"t-'/ tu apeq a-( 84 6r4{rs &do4 cl4-rl - 85 public void selDbstore(DBstore dbs) ? 86 { f Se*c. ,nertrocl &+rrn"i? gtt<./t ier.A.87 dbstore=dbs; 88) J u 89 private String username,password; ->pyDpnie4 fo |,of{ 8,"' J.f"_ 90 91 //getters and sefters 92 public String gelusername0 { 93 return usemame; 94) 95 96 public void setusername(String username) { this.username = username; W. O 4w"," glnu6"as o,1 Trrn r4ole4 ya,y*let . e8] 99 100 public String getPassword0 { 101 retum password; 1O2 ) 103 104 105 106 108 public String executeo { ]!i i$i#":J,:i$::ft.";ff:l;ys::ffxfg.*^ii *,,'"r cf ftr"x&* ct"ra 111 return "SUCCESS"; 112 ] 113 ) 1 1 4 ------------------------DBstore.java (fub+Arlo' Eare ) s F tnS 115 package p1; 1'16 public interface DBStore{ '117 public void storeUser(String uname,string Fiassword); -'t oeacxal.a ol6'mer$"ol 1i3 ] - --------DBstrorer,npr.;"u"-frp,-;'g8e'..l)sr"l'3 120 package p1; 121 importjavax.sql.*; 122 import java.sql.*; 123 imporl org.springframework.beans.factory.annotation.Autowired; 124 import org.springframework.slereotype.Component; 125 126 @Component("dbs-') P(urrefi} beao id 127 public class DBstbrelmpl implemqnts DBSlore{ 128 Conneclion con; L Sp""gfnr* Peco . . . 12g @Autowired - . s braSo'xe ohred r, ds r,"op,,-J rtr.,,.i a'-'*ot"t dt 130 DataSource ds: --r lded 131 132 public void storeUser(String uname,String password) 133 i ---E-0.-.,toa public void setPassword(String password) { this.password = password; ) 107 // all struts logic here 134 try 135 i 136 con=ds.getconnection0; Io tlis a4ptualoo hi.*.a t 6hF.t 4ryn &e-Clmnej'fjdh 061' Page2of3 toe ax Gn(lg<re {oq Sirn a A-.tto,'' ctar,r as tf',ri B*" cl..r| . 'trtt rreal SgrtnXGa'r 61av oll+ }s s ta*sa Arrr'cm cl 0t5. 8) rta* S ,,:t{ra .rF sp;1&"^ cn^ d ^ut l f,l.n 3 rruls 2 Adton c/&U
  • 203.
    i 41912013 5:O2 PM l?!Preparedstatement ps=con.preparestatement("insert into userdetaits values(?,?),,); 138 ps.setstring(1, uname): 139 ps.setstring(2,passwo;d): '1.7O int count=ps.executeupdate0; 141 |j? if(count!=0) Deplogeren+ otrett'y aM/&<Lre 1.4.3. System.out.prinflnc,successful,,); -- -d'' 144 else 175 System.out.printtn("Not Successfut',); Shafs?.sprtoq Ai-ro 146 con.closeQ; t " rWeO -r^F 147 ) LyP6rar,... t<D L ! cldsses 14a citchlException ey f rc€i'ni'i5P f J I )5nar5 )'Ynl li: i -":;;"^^" 4s,.n.ss.ip f-,i1*.2o, [*;ru.,u, 14.9 catch(Exceprion e) l_ "."":"::: Luu 150 e.printstackTrace6; I l-> ^ uq' L-------+ Pr rsl /d".cio;;b; ---"' l--*-*'*-t |-$::lT}z"lsl //don;io-;;b;'-:"' Fdd'' x''ll l--+Re6E'.tr'*'L ti2 ) "' Lo66,."r,-c**r.,,-, 1]"X.j#_1Lr53 ] r54 ) 155 r j1r Brcs in g1a!3Qdtb i 56 sQL> create table userdetails ;; e-tr'.-t34{'Ja'l r oY3'sP'coYdrxt-3'l't-PELE,SElart SB username varchar2(10), & * *"6rJZ+*p**AU org.Ee.beaos- 3l l?EtErsE ja{ t9 . password varchar2(1o) L|;*a.g=g=te'd60 ); --'-- 61 ',t iar B res in L,gB.-roF lib &lde{ l ) ccnnmons-togdin t ---.- Pram sr',inA l'5 P*rrn,"v -e3lq lg",', srr.*a a sl- Java55:5r - 3')I O.CDA I ognr-Eo.9 ) o,jducl+ -- --> Pott' otc'cJt Sh(JJs e - c..rt -73'+ ? p-- tn*? 3 slq) i*trg1"-1.t5 - SFInJ -Pltrg;O-2 )'C I NnutY- C.ne- ,. * t J Page 3 of 3 eolta*S ?tu m 6lf(-l+6 2'E slLd Porn Sp;n5a't 43m - 3.6 Asm -GbaooS'3'a AStn _ bye e _ A.z &rmmcm6- P;reudoq d - l': c.,rhnrh S -i0 -a'D"t CBnrfruS-taofl7-3.1 atg'sP. astn -s,1"1, PEI-EAsE be4ns-3.t t." " 4 , csttt{<t -3,1 t ' , . Cv-rr -J.t.l ! . . r OfrrsJi dh-J.t.t " " 'iasc-3ll' & ., v hJdD -3.1'l r n r r- qa11-!.5sr11o- - 3't l" " " . ut5 .J |ru-f6 -S'l l , n h*p r l/ tocar bost', rolo / 6r,trrs?5p', nX Anoo I
  • 204.
    'J Jn ttrcrrs8.r ..--- .J -> NO Brm beons '+ 6ftJt6 CcmB 6t r oacro Are rc'-rc 15 5|rur5 ' xrn I ..+ &'ntrollel i5 Seni E.lF l t(t .--u' 6trurs ?.o.A ----) FilrrDisrrf ie{ 6frui5 z'7'A -----> 6nt'tg gof,ate Ar'd E xecure F t rcr '-J 'A """-'1 -.. - lver6lon? '<i4{ - -> rrcin iar f,ras 4reffn-tnetr 6run?'x opi oYr t :H::.::l]r';.* - -, 3t ,-^rs p. gNes h.d u -in Jsp tu3 libray,eg ohose tagtib uri i a " f stwa't<'X5 i -, senJ rer LisEners a"re eru.., ra pett?ztrr1 EveotHand ti n3 on '(q/J"'Y i$g* ' 8c'<u1& conlcxi '---,. --l cdr;c)o ooirt be c(oivcr1€a r*en S,ervts Gnrtrt ohJ ert is c"o-rca / dest'og ' ']1't s Lisrcne'r 'j orr,.,*#Ir as rbe . O0iuarg rhe ccrb cq{n €crn-F& t cdn}dlrua S "tr'ra "X ry W., :--"'; n '- : a-,.r^^r^pr,ns colu be insr-on'dkd' .- 5nrrn2 conftSurarrun ft,a. rn rlt,s procas oll the ftno3beans .J @ P* exampla Gppticarron o.., .'wut6z'x cnd 5pring}'5 rd.cE,.zdJ c',r rt€cn rhe e'0c,llt*}ot '-J h-ao.o Bn n o,.t rOf o+lrore 'j u'rrb' 6o,iq5 d?Pn banet"c4 'rg lof o+ /rotz .J Pn: oP gccuttoo rel cted lo 5v'a'6 2 ; ac# --., O) pqrtogeerner* ; r. ,n;q dnplol*T*t#.-?j ..i b) fo6t(nlra}l on oP &rrtetFtte'r ei+rn d!,nn k"* sl.,Yfr4 crt ." -.., c); Ccnrcn r looae,r Lisrcrr'r crclivdtl .'n [o+-rq; ..--,,*C^rcrt.1yp1 cts rhe .,-,. €- S& 4l*" Conltx{tntor n q curivc*{ an bX tuuo3 GfPllco}{do LJ''n , ePting can66ur*Li'Lr,"r," -) Prc-lnsronHoricm of - spnn3 inialc.h to s*oAo-"otta.3isn M"n) -'' -v 6pdogBeon cr,as fDgstt*trnpl ohi) coxtue v d erdr*r qiu€s fc?uesr ra Fz"rnP€e f.regrtc' jsP ) fi,s {<|. tr€e srr,rnits $e *ayext (nP lto) i e1 &""roEl* ha{'J drd 14ves the raillesr (}6-3}) i P; **r.F"u psses tte rqlert h shrc'ts ktlon clcrs co'figrotion (u"-ul $"nxrFrq &$s ereurc () rnerhod' oP Srrt'rrs *+ron cta* ' (rot - tt l;
  • 205.
    this eaecutt O. Calls Sbr€@ tpr..its(-, -) + Xlm 6e re-t rrs bcicl' to e{erlrk t ) rrrefio<l 3pln6 &"'. clc.l4 (lZ2-)53J. Th; s nnerfro d .rP Atrlon dactS i) fxecu-x L ) reruvns ''SuccEts " sl-nng to $^,..I-rrcr onA *^.iretF t te'v ccsel rl'i 6 sM"3 lo get-6e rrs&rF PaSe (rtP ta) ,)) &"u'.tF trt* pcrsses rhe co{r'Dle io ncc",sjfue'
  • 206.
    Module -E gry:4'l: -> .gprir,X Aop isno ",-, .; orirh oop. oop ls rfre merbodt>togl fr c'r.,. ssmxrc>'roio1 | 4*'-* AoP io rbe rnerbodo loX 1 ro d{'Pl5 foidd lct'D&Ye s€vices on Laoguages' JITrr,.J' -' :._':;::.r""i::." ore rhe add,tror,al €eyvic€5 rhorare c{piiep-' rb" aPPi<c''n6h5 io rnat e u-t{ crpPn s mot per Pear oo crcurafc i 6 oLll - 5i t<rofl cm s ' . Et ,.-- ,--rnciPle oo +'e $*n .olt) Jrran5ouicnr rmr'a^SerncrLt (opprle s do e-rle'5rb; oX crr oo*do3 Ptnc ; 6ecuri r3 Service Ctt,oot'r rhe afptlcarr oo &o."' onc*-rhon:r A LrseY s ) . t ggt.g service C trp" 12g'cF o? Agpucc'frccn e/€{qrtcto ) .t tdbc con611olio$ ( KeEs setcp?ta{X cvcdldtre JBtsco'nreurrt" d6)' .-n trP coe ccnl ic ccie of rni dd le&r.Ye 6e ',r ceg &*"'l b in the oppllcalt clo ' roic{d le c,]e'.e gerv lceS Cod e laecorrrs 3peo- 6c Jb crre o?Pt;cdtl o'' I Y.,o "reusc&i I IFX ) n,t* u'ot rhe cmle oP llidJ )eor'te ServfceS trnl dortlrn'f-e c4plicofiol 6ode ' - --- Srn ^fl AoP ourrrx us tr' to'i re A?Pllcdr on cocle aoA rnldolteor:aT e 9:'6vi'e5 sep*'/<l"l ' o'nd oLl'coa Jo li nk mildlata've Servic4 €ode coirl alt'tscz';:ort 'h.roo|l xml Btes er,AnnotaFons.Dtreto{4jsttrerod,eo?mtddleeoo"refer'rlce-slera.'.egreusaj"le, -=+Tocrnderatandrl-roeedo?sgdngAoPaodonderrdlr"eidingrl-rcl-'€Perpc'genosl6eFolo?' mlddtet66ft Sern@ I lrcnSoctlan <eculiS__ , I Ospe*s f advicez I -,a) + Cross - 6t rrinX Corfe,(ng
  • 207.
    $e'r"g AOP Te{mirot€teg asftct advire joinr pornl Prinrcc* Odviscir hJ iriot hlea!iD3 fiargei beon f +<'Xcr ouj Ploxfl Lan /pnrd ahj i Advl (€ l^ fJ ioi.riPoi cr,k asf€u '- rbiS$e tpecj Fc&fiol c&niaini n3 TUIeJ c.nc -2 rol ddls,n''eAcdokltn€S ^ "ro lrnp lcrrrnt ts€ SeYViCeS .(rrd.]1c&. Odvlce :- Qaal mi dd le{rlavr &yvi ae ohido i 5 zhe imP}rrrf nr<rn crl 4 osfr* jrrir*Poinr;- possi{ol e po6i dong inooJ B si nus rnerhoJ cohsrc dd{';6el can b awfiel --) '--l ,* Loltn Et(l: lcegrnlog s0- Q.methocl , €nd 4 t5'nrr-$od , B'mubod r*crvns q tcLluf d$(,r@"l O rng{rod *ntm Wcc+acn and ett ' ,tutnfclrf ;- The xmr (u) -h.mrcficn Lar1d ewhl'thor liotrs 4&i rcs cot$ io;nt r-lru's of -, b. methocr , ' J od^.,isgI :- ad'isr + poinlcu.t 1o gottr,i is Cqled odvtscn ' Oekrce "+p':3 adrrite cro --l gusiner! m&hod ib coit be Jatceo n rhe &rrr oP cldui sc,Y 'sbrett' ' 3,i3.. conel€.,,i.Bbe?-(,d.r &. i*"1*g:'ri.or^ is ccued .,1n6'^ " ,a---,-^ r. :'n'€unct v'utgrr'- ' "; * 'ofinton o* 1i'no31 A+""qo"c''relP-6n"m;ng is - 6p5ioJ middltoave *:'t;G5 cr'.. sp'ioggcan aas cauaatrrecvinS'56n3Aoez&sPectJen|arrezrrren#4k'ppUno'JSntfuJlatl&Yzo'r;F4' &rnor e'pert fierd le,.t-r 6eo.ving (va";^rt"to-). Advlce 3 (Jo;or Point I fu^e"ns rb.3
  • 208.
    I tirger beo n/ ta$€r Ohle* : - 'SpngBeo.n clc'ls objel-t o.r ol-'i'h r€i toe are PlanDinS to c.pply'? roidcllerDer( &rvi( is c"ue d tcrrgetbean / u.t6a oa:e.* . 2; fr'cxtrrani rr'o1l!*, r Srh'hgBeo.n clcr33 ohJe* cn r.,ilrl cln m r.lcllerylye Se{vlces c."e olvuaQ oqpl ;e J ie Loued pwX oej-r. @ - -) 0.rstner s rncrtro d.s Ca11ef, o"., targer ohje* j us t exeo're tbe Btrrsi ness ro'erboJ ' ? --+ Bglnex rner{to{5 rnlled 6h pp{t ohj&f (xetut<tha Bctstr,e.rs rnet{r."I lqlc &tg* ,1A.*" There Ore + 4@5 oP Qdv;ca5 t . o rug.rcadv;ce (Erec.-t-res or the @;niog 4 tbe b'rnerhp"l e^""t'{-) .-, @ ngo* Advrce(E,reclt}cs ol-1he er|F 6'r'Y.:food ex'e!"nfr') ,., @ lbra,rs Mvice f Exeerr-.s ohen exceCo' is volsed '" *" .'':1-U ). -.*.n t @ AruunaAavice (Ereo-r-res of bqiniq a,?- b'rr€rhod and ctr loe ext|cP' B'merood/ u'lngSprrngAoP,Ag?e*Jnotool5tDLcoloM@useSp;o3Col)91vg.fsu{,pUed ll idd lec-care Qlefces cDe 'an o''o t"" '1" ft deve'lop Ure"rde$ned Y; lclLe.oe.'e- - Ser v tcce and odv;crs ' : P," rte a'Uo* + tUfsoe cldlices rePt'r Fc'8eno's 1o4 ro rab ' :
  • 209.
    tD proced(ye toder.'etop 65xrngAoP krsed aprioX crppliccrllon. Arep}'.: Deveop 1va clasS a6 $e odvice cf86 6KfokDecloPfuriogl.*crR.ce,spnogBec.n"-,,|'-,n&lsinesg''ffhodder-tanccHoa<> defl'ni iiorr s 6t P@l: gev€tgp SptgCaf'5-c'ron Bte a) CP3 sPrlo3 Be'ro closg b) cPa Advice class c) cF5 Adviscrr cl&s'9 Pil1ol 6 Advice ctarl5 d) cPX Ptox;Ecr'5Bec'n cpt'l-4;n1 dv;sert ' l?>tqBfar> V *;s r>nt'gTrttro.,xket'o 6;ns sg"r138eao clars ohFcr4s l.,tDa6 obielf' Sr'r1@ '- c lienl ftlprlaxr * e'x''r" ;';J;t"'g*Y [ec''-'r'm'x ^ fipprica*onG''rc"t ) " -> 9:Lr.z{ pra,,.'y ohial &- 6F 03 Coatun641 -+ cnLt! B. merbodg o^ pybxb oh)e'+ t _ t^^o <bir] yl;dllergye ruorEt &,s;ne.rs 6oerho{ Calted a F*3 &)e+ @;u be e^etuftd dcnA -" sw;ce.s (Aaur."t). - ,.-,,rvil -> Based on rhe advice coe durJop rhe .)otnt r,(J,* o*Ht;T"$" decided allkr"tl&uaX - ?) Advrpr i5 glvm rb l1a+ &trdo Nvtces @ith ce'rrddh' Busin€ss merhd$ te sC%81- e1..s5 . 'There &re t oo tgFs cf Adrlces 0darnetlatrttlcrtroofbin*o+1av;sr,/ r -L^)a l,r,<ca cm ltrte .,nes o( he -' -> vYe tbe advices toirl te unPed coirh b' ffd"nag b'ted cm -g'n'rtrbcds, !- @ Rge"PH"rhoa fu;*cut ffdvlsc.r -- benu 4* odvlces urirl be ltnFtcrl crriih b'wgfu,ds !66ed an fdei e^wstlon -. 4r, ,.rotta 3fz'trrof'n 6^ A&'';sar-s rcf&r lzqe rn"l tor{ro1
  • 210.
    Fir5t SpingAOP c{,Pl;Coh'c'n'- ' El APPS -5WtoX -se51 -FF- // l'lgAdvlre 'java(Before nari.- irnfxr* Org . SP" c.oP ' X Detr',o 'iavq (arog rnrcr Fe're ) Oe.r,oB.ar, 'iavc CsPYh g Beah ) l''lX Adv;ce . iav q (&Pa Advire'; sHDgcfu . al'ol (sr,,''g cfu P;rt ) clicoi App,ic.vc (crienrAee.,) oP B'rrrbod inpo{r java '}ant . reead ' X ',t llreP,/']-ttao hPJ tof-"t jarcr. ur;l'*j pallic clcrsS hgAl-urtt i6lplerren-t5 fl*r"aBce-*A" *...,o" ) t la.Hic vojd !e&'"(ile*oa @.t!.'Os"l/l] o(t 'Ohfo t ,,**o,,, detcdts *'Y-; ,arN-*e C))l i:;l ,.i*:.,t;:". ff.*- *"nr"e*'e"C'^(l)' ''' 6 o'n (merbocgetN^me[7*"t*ttt"* is sta*.d o!" 'trr'n DdreL)Ji llcr,aq;nx B'-crhud a..1 {'illre tP tt 't.';;t;s1 o'6*"r"r v'r'e Gr,inq e,-- (5nq)a'gsloJ r'lgtT" ''*.*"u, b.r'erhoc), "ilr''l'".,'i1""'u*t' '=z) il * "* I '""on.t'l =:'"ub1t''; l/ if- it is 'inrnried ! ll""t*oa 3 lluo's f/ Demo' Jd'(c^ fSr-"31"t* R'* ) pubic irLtel&ae Demo o.Lr'. voe *HarofSunJ *'.u); llu' l tfor**"'l.'.,". (sr'"3 S61 clarK ) frr.di c clc's DetnoReavl ihrpltrn#rs ftrno { 7,rn6ut,.no.r,* op- G rnerho4 lxt$Ic v614 so1|Jello f Sr"n3 nam€ )
  • 211.
    3op("Derru&an: S.o.e( *tn tn tn ") exat*ton Q l.!-- Advisc'r cfu --> ,,1,.oo id: "odvt - claJs = or5'sP ' aoP ' tuPFtr ' Na,''llaraXert" afu;nn*Nulscx "> zP*f odv i6'e rel = z?m?ery ffe{?edMmi' 4kot'> z,-- rru-,s Aao id = L{hnf(t ty ''PPu cfj $*n p'xl ohj H on t_aYg€r ohje6 4 afPldlni adulce --) ?e b' ctQss : orf ' sP ' oo? Flo.,re'l:o'k ' P,o*6f,"ft1y Ba'n '> 'aAv J> J-.rsq1l-leuo ' / 7 .-..{- L.: B' n-rthoa tr.rn e Lwwry nam€ =" ;nrocerr;rNa'e'f t LLi6t > ztar/? > advr 4ValLtt > -T- Allst > Lt Advtsc. o 6jera ZlVnpttW. Ll&an. 0orr€ -* narne -- Los LtYbptrtX Dh Dar',e = grorSJ-rzruiaas ' rnme = tovgel" "eF = tlafug " db" l- zlEzns" T--tgy.^ote Lt - - 6PYing Cfu , xrr, I l t DmYPr LkaoS> l}tar, id='9'' L&cLt ;d ?'94J // CrienrAPP' -Pva irnPrt aX$?"Crnlcxb ' *0f'/r^'x pcuri c clas6 Ctinru+pp 1 P s v -(sungtl a'6s) s i fitt-$1stem X*r ftlPticoH c"r G*t ctas.s = DernoBec'n " lz Lt''- c1os5 ="flJA'luie" l2 Lt"-' &Allerrot) ----+ Nanc : "'-Fnaras;,' P {)crars cfu '-> Advice CFg --2 ="D"*o" /7-f,-ry."a, r,'*afaca Ctx =nero
  • 212.
    I /i g+Pt^g oq;.* Dmo prox5ei = (D".0) ct" ' g.. Beo., f ' PFb") i //can S'tenod" ... cm frror5 ohl pn^sohj. *aHerra C" t}i"") ; gnx3obj, oSfielro C *'' ); tu l>.javac f ,jav a />iavo, Ctt<nrArp r^-.l,"q.ja{ / >.i4, 6'tes in clard Errt ", 3p;n6 "iar ' cdmnrns - ' "dkJ o -> t6 c.rle Se6ulelprpesnonP.iuG*A&rso plcr-ce rbe S"-tng c'de to tht 8t-1363 ctass = " org' sP'GoP - iufipoyt' Qt*9 llu*oaPoinra'-rAdv;stn ) zt -- Adv,so c(Z Zhan id ;"Odvr " L?ofrtctiftJ naroe -- * advi ce ' /W(r 0orr€ -- fntttxn LlVa$> t6f = '' adv &r)-rr e = "t, .*" l> &trpre Corle oP Arutna Advtce publl 4 I clcrss llgAdvrc" 't t*pler;r.nh| flerba InrctceP nrt Pbtrc c L 6h fir)ts obiear invopetnf*3##"Jl envirbbnpnr- cF rr.,e 6'at'ers "'r+p4' ir.proceed()1 /lcons *'e g' ner$ocl '-'-'-':' ll exentrcs af $t ent & re B ' rrrf:oo . a?pnO to oPPnCD c* ftr kb*+3 ftr, excrwte cpPlicct$cD cr$ rhe Avound A&lcc ?tteoo5 llt lb )lt cokrr a'e $e sl'Y)og *s1,ong is ured 6nt5 io JP sPnng is used anl; fP gro;ect is k^r"d m rrrcdrtes th,'f cre (sad in t* f-it-ti-' model Lald tlren Sofr'r Sp'ltni JEE' ofrrl'' AoP rrbcllrleg ' invia!,ccmt?Dllo{lntdfu^tr?^E',rn6we.brno./r-.1<' Shru+s,ryrtng (*iu'ror. :trc3,"r!t*r rhtn fltfu sCn1 AoPr a'EE) 6P1o1ux-b rnGrfulrA'.
  • 213.
    !g9" Cmemod,;e iArte &,str"rclcrV .&, 4t( rod,c.le. x)Keep;oX *t Nc,t* oP Prm oF exeirLrioD is caued 1qgt"6 uea P- {"1 ere e..uad lq rnesscSes ' opoltoo aoa rncss ace.q. x) hlnHn6 loX messoles us;o6 36,*,. 'o'l 'q#'nrtn f 1 is not in &sr'5 sic'nJa'nd ' *" Y€: O -+ 3o p() con t^lrtie mesr afles nl6 +o Gasoie Mdriw ' 'Tha'f mtans cantt b uae ) -fu rrdFc fistt k llt...2os"a!,'t, $vs , wx'l setvr-< anL ett" - 'v' O-) 6.o.pt) roj,r u,'.rinf f'Dce* is sl.6lethn*al"d otr*tcH o'1 ' I' mu'!'6ple''cssaxq Cc.n [c tptifq 61 4 +;ne ' I @-, f,o'pL) ds6no I atlaa -lo otor:';zt tl'a |to6nosc'6es cA--? s.o.p() dpesnal atrlpa to 1o;* ''l' l-otux' v r " a{'l/fo"l tPlnce lo6**"1* -6 oart*,, tl'ese y'oblems use L,T+J c+' I '-' ,'- (- : ^ 0-, lo6tj allocos f0 t.r.ib' b*'c.1o ra JiCFc,e^r J**ttr."t* tire fite' db'o*'lss'.t't - Co.n$l e aod etc' . -' oarrellej @--r Lo56 can ct'irc rnsfls Si*"'otne-'{1 " irUcgd' @ * lrS+j aar<at colap'"" log mr5s deLuq z in% z ct''' n < errc,l t P*a d @----r Log+,1 4J-roor6 to +lrc-t lqmussc'ie, cokte w*re;uin6 *e,'o' n @-r lq+j au.atstr #"n"r rhe lo6r'rssc1"r ' Lru*i , D f------.--" j*P-?'., 103+j -<vers;on> 'dc{Y I lructtog;c-hornt>lvliAd]"oowise{"t'r-to'esa"''<^rluGrsoreaop AW-rontiuloga'i-r 2it'oar b6'n3 Pn jouo Version i 1'I Ttndor : o4ruche (v"Mn c'n OPan $qrce tcot ia"frres lo$4i -<vers;or'> 'dc{Y , ,," loq4i-r.}riki S," t p*,t''s lq+'i oel
  • 214.
    use 4debQ3"lefl amRrrrr.fion ErFe,rs/ deh1g8ioistt's . {ogger . d.,ba3 ( t' r d,n in ,"si.,(- ) ' ) ,' " :'obeQ 4s{kde imPoccnt cn ---,c{lelDeoleL€.|tDFacedkr)r)imP('.4cntcncrrk[s&rmpieercJ. Ell Gonecuoo co6 = Dc;vr-r Tla-rngc " ' 5"+Con''to+l on C- ' -, -) i tog'r'inFo(' Jdbc can ohj i5 coc'rrJ')' - -> ctl€ " r,lorn" le''tl tD disPlr,3 o,atr,ing messctq ' iP [rs' oex tL) ) II .J etse I r€ cnx?t")) log3ar ' cdccr n ("Re'ctrtSt+ ou; rrrdl- Do{ l .- --) q6t "erfo{" re,x-l gs$ to*z}) b$w o( g"ocDn ExcaH'rts' $"[ cc'*a b&w or L^ ,r," uLov-no@n Era+rt-l' - use .9o*ol ' lo4 in Ae u!4 RctJx thar Dan4rc> tr3 t....... : "": -' llv"'o" e"c"gtlon en&ti"tx 1 ct'rtlt 661.E&4tion sc) //v'"n ( lot!({' erYo{ f m n-utc'n'') I 3 rr 'i --''- exf'dt t^a''"t ' &lch lExcePticrrr e) l/ ".t'*(Pn c ' { to'U* ' e',o-t L uornoto Po"re"l): 3 - 'There afe 3 ircrpcrnccLl o6;s in lo$+j P?Dftt*ln3 O Lossn ohi Q funetda' ou; @ l"^taq o'Ul - $s"'oh.l "-ti) snables t'3g11 ooctd* * B*o io'oct clc'tg '(iilu{oors to or€td€ l*"neua7o ------ ....r r-n,..- rur g* [41 based lqSi1J DPe,'dfion6 ' ffi- u-*"*' ""e;',.'.r''j -";:: * ::. ;d rqsirs ope'rofrorr 6' "-*t** te-me'oel) 1"ne., to$er = .!:$trfjf1t3u "_--G#".-l*,t.cr.$ poi"rrng o TcsrArp cloN- Su*icTacol motrod
  • 215.
    7--- lo6Xer.deh'6 ("t rrrt") ; lf' .d"ki (.l.,aroa. ;; .-, ryuku dr. dtlnn"rt"n otr1ert J"'-|,r.1 ,,:c can ..ar;r€ lo6tott"tr+(t* nt ou;,- 4 otloos to *+ TJ- Can !e ,{sad t0 ) -Ihe aPia-Iable W clatscz o-v? ' E*h *. &** o-s p1+.snA n"- btr me'{&f,e8' ,{sad t0 (rrxrv,n2l lk [rlivc"i ]- + lo6 wreur'1es ' i -,---/ [og.neva3<a info oe uxltt 0e+ t-[ tt.o* lod "*'-?t{ - ft1at'dor obj ; _> -L,e curdk$te a1pt"d"r &* A,," .* FleAflroJd (to t'uwt4&'+ / e;+*i"!1ff;trii .*&*1t'i,&:ili",f"^t'l^^l Il4Amt^dl,tl ar -ll*'4* S"o,J-,'a'* P"t*'-6*o X-,1--"6o"t and etc"' NbrEi rL+ ._5 aL,e O&" f,e lo6n"lr*t lo6- )o*l is S1r"3h aorrrrrt re+te;w le.,xl V= T^% ' ttre payocis@ *@ o00n ttcj- urqs ou rbe +rgOes 4- q{YlcercPcl c+P"@ctF v
  • 216.
    ' _ Tron6aclionrrnfftge roe nt l- l+lo+luv -+ T6e fJlocegs oF cdtrDioiDg tbe wl':,r<d O(x/fadotrs ]et'eotho! rheto ;nro Sir3 ie u-t' b7 awlgioS do e*-4 th;o3 or nofv og F)nCi o te k aAtp4 -Lfinsaedoo ff'il,aelln}^+ - - Att Sengldue /o6ico lixe trc.nsFt mc'neg de-birca'd P.nr.ers)hX r-rusr te &ulorzd tU eoadlin 3 ._- Tronsoqd on tnf61l 5efl/ I c€ ' &onsPtn Mot'es C-, -, ,)*, is r$e (s-ur"'$ on ol ttoo oy'rcIlas ' '' ----- -TtansPrc,t m6nt 6?( ' @ t^ti*', drono o-o,.* 4- hu'a aw. * rtis, €rc.,mc','.l€a to exea,ile rl'*. logcs *"'urrr"6 Aou"'X& * *& lt'dple -----e t'e con b;''3 rtrc e?P.*+T'con'a'ron fl6mt ''s;'tr 4t y o:* T*' b*i'maLatcJ,< : annrana6^bte ' 1o o'x'u'e tl';s 1'*blen *;'"'y*k' uet'V ,'^-n**'a G)Te.'"' ?.fdb.f lran sataoa n6rn't Qav;ce' Jr<nsalri,q (e*lc< ' ;; ffi;'-x.ti# Y-;X:i-'l--*'." @) &'ru<'rw''rya ,^'' -1Fiat V'a'llan ua;te' ti;r) f,h EJB csmPs uls uje g'axr 'rn"y) "fro"v'a 'n G'utce ' l6e 'tHOcc.t Cale 4 TEnso4rtc.') (prg€erren+ : - !: F$lic void bm, C) { t'st kqln Tronsacncn .v CF/(aHcrn l ' " - ' quancrng""' ofr{4tlc'r' 5 ' " " - Comrnlt fte Transodtc'n ] car'rrlExcootlo'r e) { bllb'ruc Jiansoq'ncm 1 qJ I
  • 217.
    a- lomscrylc'n rr{mt SiuesS.{tttt P" ACID f'o1rrlrr"r imPleq"rvrro#an( A :---) Atoroocirg (, ----+ Gms;src.rX L ----+ Solcrflcrrl D __-___.' Drlrrbili rg -+-[fu pwes 4 Cornbtni',g fnu]ttplt { retr"a iyrvidlar op'ra$ond iwa t;yle u*:O;i#j},, -llre alo,d 'Airrnoorg" &arr. Ror th. ,^6 " flrnm' - 'l - Cr.srrc.q :- Ev,^ $*fl]n ,.rlen k pt * .k,f'.kge doia c"t Violo'red *'* ^Yt':lj no rule Vioufion c't-il* eod c( i &Tram6c@tlon in fiere it a Y*'.'X ;;;;s; code' rhr"r ** olt I cou"e 'r G^s;src* cp'l' ' "-t ",ffi"+ doJ^ u'ndaltorotnJ a-{&'" -- J*roI*: -fhe Prex oP a6d;n5 lott &rr{. to nonlp"la}e ilc Lro - i< calltd enab[n6 ' 165 Jt"Lanon pevarl^rs Cunc-attTenl anJ $rnulhneou-l opam'l-ltrns ^ fuhk'^t J'+7 tl@0lik) S"iLU;ri,l:- Tfc o.biritX c,(- b''i"41"6 DnBale slo L.r^to rwrrsl skrlc n rh'^ &rtt-bort is furw-'ptcA'is cotrdh*Sh to6f;ru 6nd L'o'"'t fites u rrrde'n1 Et3 r.s ths D-.rabls &t'J^t' -[he Arfirc.rurf og Tntsaon on Tlc'noBerur+ lr,.neout^I1^t'n" Ccrrnmi$ o( roU'bctclcs 6pplicol-lon 1*.c [esurrtc trta^oflor '{a k"std cm d'e CQrlhrnit C*'i,a S.* -1'Fx',sotttnal a4fn t daru in 6 gn8are slt'r [or) ru ba+ ofrz' a-llcotl --l rlr"r (ibe Afpx.oHar cro rohirb S.flice i.3 eno[ted ) Tranrd4lto Hamn€4 (Gdx! tnitft.ctlans to rtu{' QE 4r.LrleturF,( lD r^-i r tr nnl,ark flrt TaqoaU arcr*e n".t'1av(S-)
  • 218.
    -> hsed ootbe pp.pf ft{<urceg (alar.re <leo.) rtar art involved ta Qorrraons cp -Ircrnso*trnral code LreCarr sa3 *r* ate e ruP€.! Trenc{m{nf6' forfu"'t ,/arr'6rq5 o( lrc'ne<'an ona'! @ Et ou rhe of;,crra'''s crP -l-hc'rrso'uiolE1 cde cl))rt ocr on fra,xPor flarraX o?.'..|oo d- 't* ['ft aonrunts S;,61e w slus of *t^e'k't'Jr , @ Dotar*.iT*s".ttco (rx) l^Pr'^a'A"-'^)' -.-ftcorcraftovrs ef, Thnsocuanot *lg 6oir) "6' - fl'li;eb Oe sl|@ Hibarsx ,stn ns,Ero le'hnoroii€s Y: Y:U*"i *O aBtutr'"ul -|-)iprnohr Anuna+ A^ D;<ru,rc; Tvorosaortoos' * D,srru*ei fia^ceatranl ' lelo+l:'t: ' Disrrib.,recl 'I{6 {on dn gpt(2fiole crroroit) pt*t =: Io pbaret, -Ihe DisrnbLradT)' trncroEd Loill Seel' pr.rmis5lcrr Po- 'pBslto * Ia@ the Tx, . ..n.- *,on tbe Dsn*q+r.t Tl 'oittbe ccwr'';'1+(a Ijn ghsea.,, iFotl Dbslcl]s oPto{ b* S ottc'cdse $e o'*t'*' fn u'tlt be s' 'rollbccck ' @insel )./otacl. -r r "r" 9 dlo} to! + &- .1€3 u fo (ptr.s"z)t ,t- ^^.t,rr>.- Dishiurrtd 1 rmrcr6ed t".4 {- rf tPhare! ) iabxcomlt Tr') eS Q can-) ?bsez') 0Ua-!al) -an I(ortn;t-l' 0f| 3l{' s -,, 1_l 1"") )e5 u cat 0 l-rcorT"*arla. frx) 11,.*3c*n+ . trboSg
  • 219.
    lt"sasf" rrudetS f ldtTraogaclc'rr lt$el NeCEd TyAngc.clon HOde I rPc're A,calrozht......- ,.' FairS .43,rrygm<- , futrcadl The tscaltse tr&ngfruion 6ri n b€ , iri Fbl lrangacnorr rolted,beq< iP cne o. cnte.1 Joornet h-d4ets ., AYe no+ at'Eila6t, rnDd4 4 q .i4rYnet ti.xet bb"$ ogxaltdos (oLI be flocei crs d;verr Cpanoo S mo;n fran6 ECficln - Ftot frar't3aora or't nt" ' ho, n T;t 3 (, joa:ntg 1 jarvrrx 1 joomet 5 jrurntlt & : .. journc'tr n 5 hlhtn *€ oboL€ to&r plon is Siuen to q 6fco d'PPn 'rhat tur' s oirh rlesr<A ftah'tattlo o, ofl'o^r jottt n eY fi c^L4tl aJr( ho+ jcrzr nerJ 1:cla*- kx4nX nln Lt 6cer &nbin3 yieret bm Fio3 ti.s<,t LootcinX licrc* Soobng tr*ex b<*W ntt I ttc u,.rr.r1 X.uct, crrirl re fcmff'rrneJ e*- fut l"l one cr,uai tabte . b,ecarue in Nelrci -Ianraot{ d mAd ar} + onesalrx J-oorot gp!<a 6{ner grsT}'s. -Ihi_-ies^z fi't fwws.ot &':Pn
  • 220.
    NeSRd Trccc6ctHc,o rnodeI '., frnin lx I fub txl t )a-t 'ncqfiicxu bwl'' a1 s- taB, lr,ibe t.,or" ,sfmrf '!"fx'd1'6 Fl&l1x *b4e'l Irz..,notr,:atrl donor s+P<T t esrcct 7: tood4 Se;n3 &+Ntr1 6stEtr l-rz''osood o.n ' &!blx E { i41r n.f I J = g.lb T'( n 1;<-t a b<roHq ,{ .,rcX n Ti&er kobl'q 3 ^ ' -- -. '(;m Appl; otlc"''5 io troo cmrl 5 --r y{t con c.1rltr Jhanscctloq rnrml 'S'rvicc on Sr-'t ' t' ^ -,,,* b.-dd ) D n"'o'*' Apr""h ffifi i-ry}{'$t#,:= t^"/-x J^'u*' -:::;::f;:,{ftj'Jil '-'* Cleo.r c^nd neal . - - - lnatr(, a-<- *el n CWU Co;rt '----rio.1c/ol'e -fiamarlron rn5m* on Jrg pJ' 4 p-*trctre loli& a) d;fe P"ar oF -fiamsc.alq qc"%d' O Ut g-."Ttt satronflcunnu --r J0 emble n ogrnb an idua 1t"t;tunce b6te O l+u'*.t"T*r, atttaoYbqa no,.n h.ik'c"r Y'*lsxnce Lo6t ---)'t0 ercble -faT "r ^ ploa'kb'n"tt ^ SCn0 OPJ1 |tk'*J. on -llpl;ol. g'csrc+e lq;c' @ JDOTt *toctr'o Pk-'roi',l -n.1,1 2rai>la nt'3t* t JDOP'^'ttnte lrr6;c S.,rrMa"t* Jr service- dnd erc.'-' @ T.oti nflt.**to "oYottrya '---aao ue!.e -To t5* @ Jf^T**"crr c^Yl'rc1u --, TD encDle f,i ngtnf o" frrtn3 o?Pn t$ us'tfl - U .,. creale Trc,.rsortl*nTe,nptarc da5s ohl -lio'nsoorro"llattt* oU b fr r b*e o$'crr-
  • 221.
    lZrua-.rl*l . DedoxoHLr€ -tri 03r Q e'r @ril ro Tx' rr:edhsr tbe b.m<&od D0 l.rc.nsac-ktcrn to,) dcoded ba,st o,.r tbe busloas vtrtad ' -ihe 6 n a#nu,'tcs r) rqP:td r) wryArdneo a) cqoo/rs (deh*lt) a) Nor s4ur''tct 4 tP^a'ru1 () rucuor br6<d local, Flat frc'nccctlaD manc'flerDe4 1lcXcno's tt r {ttt Leg^,.te irr,nlep_r tle [r6"a.ar ft tte B."tl".* $,.' bar"e ftclrPrr"ilx t6tt' , ,9 f* nf,"t Dao rnod.r.te re9e,r oao@ oF fie in pvoyvayct]tl c ary'ro eLL) P.6*rxUf cTrt- sa-aiilott tamqe"" i- U4 orrrtrrnfrtcr{ bg;oin6 rlrt -Jransc.rrloo , b,rmuoT (c,r) vclrUacen4 rte*f<*satuo"' fuofl, exel{}e cotrh n€ro Tionqolrl or: baaruc Trrr*cal.rlo'l ' fi. in4cater fu.-ol'.Ti *r6.nt ,-tr} ,nn-t ,,m -la'u'"u*t lt4fl"l ilu'rwwos B'*'l'dr &nvzttn cl;crf Sl-d,rdttd/'1} s.*i,e , ; ;;;; ',,r-, &src"t'rtrod crnrare::6 *"*.h" **" l'd'+ Itm,rr""e^ice rd'r ; ;t.; ,**'flh )v''r8Lo S o"'.,ilfr*'u ner-fi *stis 3fuurrczl ia b'ni.tpd ;tself- orr cohicb *etara'f$rrT1 ro3mt erc4teA rtrrs@itL J 1-p-q1 lansac+lcrD Cot) Cl ianr g+phe A Tuo,sc'aA6 (drl te - -Tc,rsr'clcn a$natrct *gle ct..n,1XuwL on rf-'c ' / Trctosa4ff anTemd cltt class grwides rbe absrantl c'(l a'6e" an - '{trid pnflrama}ic Jrqmnrflarr "n* ln ep? a?pD $tie m*e Codt 4 Jic,ftlee.iiE) "S*t & -nh -.-a fl oue'rcome *,^: pr,utcm est +"g f.e/ A€eq,J rhr ft.ssing Tiaosarxcn SrarKd ln ane resourc€ 'liavrsac-ttor). Tn gqrcrnortc -IX tn6rtf ctrotbea 'Ye o4rae isca@l ffr 4i.c,n;4 t(re &tr;nclo w*X Ctielt toa1Pl)xl "-' pr"ryrt*,.& .- Can'c Cnortyt&, calil, drer.-'t g#ttv- d6l tb
  • 222.
    i Tx aftdh.rtr5 Q{eoor rE4dJYe d roh)e Jroneo4lo6Teraplore cE{sS Dor nEiY€d &afrg cr:rtb PaD$aYnari c 11 vrgmt ' d,;te deouo5 oirh Dqlc'^s'n-Tx rrgmt' ;l"l coirb clicr* oPPn cartr 'tE b'' B' rrerhod ' c09:- rDKi Ie?dYcd .-- Tx. Qseb crierLt fuPPtrad -Tx ig Ji coitl be skJdt{d io tba rg+rfYecl bYnrt ) ., (EdYes n€ro:- Thi6 B.rrfrbo4 rLtns orr Lcr) Lolrb o&r- Tx cot$ neqo Tr iff€lPg$ue 4 derlr+*/ clicQr catls s'methad Tq^riY€s n€r' bro,t ) s L --- ne.oT x (rrs") 3 cr;.nr cfPn o,"o .dffrr"r9. "#-; y;3:^i:t&a B ' rrgbo| cloruns irQ me {"'"' Not Su{r$rrd:- B.r,r.rhod o-Lro%s ru.rS 1pifi6(lt T{ ivverpeuh'w * coecrhex 61;g.1. tlryn is &t-[in3 g.rnert'o4 rptrh crr co,rhoqf -Ti. [*" l-- erieru A?P f ,^* STnr ( ) I oofr S&?p(Xtg i- The garc 4 Tx irt 6* ,"ttt @)rb Tr rbcn CIiENT APP NO T,} umr () I fu oTx TTA _l 5a+Ptdrs brnrC) J t7::- l /.'t :--; J*""
  • 223.
    bYnr t ) . clienlAPP brnr() TTA Nbf 9r00on<i q Atkribur rb KEYed ' ......--.rl iS $r?P ctrr cl coirh T) N}(J 51 Crrf rbe 0 'rntrh o vuntatotl br&t ) Nctro{ btrqc) NOI} , NOTX 1 @ ft".f"r,t:- The otict'd-aPPn thrn s an E^cz$lo" 61;eq AoP NO l, NOT} f.- I N]OT) T}A TX @ r.ro*o,- :- 1^h ctienr App blr)/() m0st {lE PoFratlS u.sed Tx arhdhrcoePaut+ Tx
  • 224.
    Qeqlrire d rDne Tl Tg Tl Tz Te DTOC Tt |tcrndofor1 ttreEFFecxof lx a*trttrres :- TRanscrcHctn Atlri bcrte cLient'6 Trc.oscLfl cfi! Beon 5 -Traosacfi ,retuns fioxX oQllr on c-oh;th Tr '--> 0rg oe. borrsoLtton ' inr"'.tpto' Jit**-Pt'gF*1&- Servlce i 6 eoobied r "roll- Afi a'*&ttt i5 li*e Pinr.'* advas.t : '--- a6'a?'{ronsorrlon ' i ilcr eprur ' Nlo*}1tr"rt -=. +ta+ol7-T).,,"sc'il1cn ar$tut€t ot lhtbned'o'r- 4 9'1k^^ aa"< ' v-> rn OecloYc'fiue -Iirnsocfioo ma,,egtfi enj $g Trr'ngogl crn Ldll be Cornrn''t t.d t,rh€n no exc,crrron 5 rdsed in rhe salncr* rrradocl. orlcPr,coira rhe L- Pr, o ri meErrtPd on fvonsrr*icro tdll be volled b<'c-lr ,^.,.rTronseo-*ro. rr%^"ftJ refd afrn9 c+ ..- @ f- exam0tc ct{Pn on Dectctratrw l-bf,t l-ocoJTronse(}lort nq $e pc.Snoo )lo {ret ftctcrolive -Ix rtgmt bg us'nX onmrcr'h'cns o'- il*.*, joto grrnc o$ F€e oo" Bo ff.fio":cv4 moetfu Frruatog rttto€s i1&rodgecrD ,jav a .91Yne &s 13o DevrofFao 'jctua ul'r *) imQc,fr or$ 'SF ' tnLru<'ctf oD ' annof&tton 'fioD . annof&ttoh ' 't / , .fpED ) On bm.,() t' tt'e/^d orkn = ?ror.qail*r' QE6[J @Tranrc,*t'n "l' tttt"x = llofitqcn r'"r ' s- - ' -*-ET^ art'lur,rc " sod"$-ry:Y ' spdn$ -tx ' u&'g'[:il: + __-a a) odd b) atd /iOemo,xmt a) rnust bs ge1',rrra bc.se indodl't * ,Vtn$-o"oot'"*' sjl i-]i--
  • 225.
    b) ptc." l'rneno 4}to 63 4 Wl, Y)0" l3o as itis be'n c) 646 Srtoa.,in5 ccdt c.i- tba endop @sna ! L r 4.LI ', onn6trtlon -d'ritre n transol}lcrn - rrpncl?e-d= "df6" / > ClrcruAPP'jav( t- sG-t as rhe cuerLt o{PD'3o,^ cf lnSzr>o'' lal Jd-fIU- ct,q$nrh :- - spn5.ic'v, ao*r*, - to,16lo6 "la'r (sp"6"'s envl- - ) >"iaVqc *'Jcdq )ic,.ra Ctie{wAPP Oh* Jx dhhatcs tplute tm'tr4nrtr ur'rh '@1ic'socJ''<ttnt o P'ops"rr<'o' P;";;; .- NE^r' ?T&a*'Bneucee - fra6,n"o. SuP{'tars, P'op'6crHon 'Nor-SufuRr rp' P*P6"ff4n" l-kNDAT0lLl -, topcrtr<,raon' NFlETr, $'g5"rr- N esrgo (*'en*'"r'*Tt ") nloll*'' , To Cfph €pring based TranSa{flrnS on $ryio8OPn ftrrl]Ule fused h;k'rr'tt WEkttD(d" l$ic use rr{g. s?.orm. bibe.rrnrea . l-lrut nrT"t-tqq{orlrh"%u,, .+ F<n e^orde a?'PlicoB oD oD P'D$r4rrlfi c t locrtt', FhfTX wnrtlerrrttt o4 $n6oP.m - .)-"' tn, $;6rnoreBx;slante Lr,6r" '"Pu aPn@af-rlt< Pe'trends @-O*- I I 4 )Ltr-' on n [o + I t-c15 -T":::"*;:^o*o*n*, tro..t,, porris "n $"d"1 "d' e kae) ' w*<hce 16, *i:'t u- oppn oP /^u o:*^n"*" O; C g'41"'"a"t*1ry ffr^an lalorl^ts !
  • 226.
    - * $lobol/ 0istribcrlcd TvonscrcrionS )? |glo,-rlroL3I : ir'$ irnPlemento-tlorr. j Akornik'g g.pie' gp€dal idbc dr-ive16 Ana 16 6ilranaacrlonl'lc'rr'3w i'rplenenAt --, t0 'add Disrracrrca Tx rr€rnt St4pc'n- on sP"og oPPnS ' --) o Con doonload q1orcd resrYces ft- Ltlo@ ' orort'iKos 'com u9bstti ' fransPtx rr,6ne{ og^r&tlcm blo lrm d^?P alcs oP tt-,:o d;P?*'"Ve need cDtobcl Tiansc,l*loq Suprlo/r' .--,--+ w(drq)Oe alr.,t I * oxode DB 6lLo kwttrt [au t.,-lte ;Aanlrr'::?. (au r*re) I ,Yecu.ir:| u"'*'' ,l | Qgng lndr"na.ns bJ- accno h.ldet"r.-e bdl :::-:: ;ardvi qooo I tOt tqjc, 6ooO101 @ - ----a ule Deed DlswiLurcd ft tmI s4'P/aYr la pLtkxro ttcorse<,t n'"1 qx'raJao'ts <n '-/ the OJrrre t;g,O OtcE'LnlE " ' ' @ R" *qr'}ele *{Pn crn Decrc,ro.tiw orrd Dl6tflLg}iedTx rn'rnt_ oo -tri.ar,'ponrrrJnqJ OP,arron tPftn appn (BlLencm) arli@bte in ls[oVf>ot: b*a"t+ .!- * €clrrtij X Sgcl'r-',hd 1. ruetunr fuel secr;n1 ?' Appri(*lcrn lr.rxJ Se(rlyi 11 N et@ or F Laue I :----=;1" pro1zt1 rbr dc'-lz^ rtr't i3 Have)llql otc{ ttf r€nrrl k . ---. Apprfrudan detclopc-r-s aye nor rs fgrSible {" *rtS , pet.-ut1 crdnlos rrrltr ta'Lf rctre 4 t f;'""rot's a.d or$al ! AmrirgAr,n !&El D-- *ns6;zr*lon -Y A',6o' zarto" " " ''-, Pmtr..mYners 'rYg re6rxm6i btc {"r t{"s og"aH o"* tfr.ie rtrr"c''-$
  • 227.
    .--a Che,u'ng $rerdeft}; q oP a USe'. is -+ Cheo&log Ih e Accers Pe,. rn isstan a CaSteA Aud1en61crjl<ro & o' O1y.n cfn Ye&r.dcet /1 is CaU e d fluntril1;2e.Hc/ . g€oalYitb Sewlce s 6 appl;(a.}'torl i, -/ Dealan-e*lce 'aJtr"-> Ib [s 4-i,oordc "rexomended Fo errabte mode " Oan ure mo4c ogtht deqoxo-ulue O t" excrmpe afPn crn atPeaiJ profircmrr3 re-Bc.l- 6,e. trA oe t 6r fi." t'""rr. 6ori g1m1 ge.lzn1 Plo he"a''b/Le &4lj.h'q cln $'^t c{?ns. 2olo+lzot't alPas Xn'eoi o r2
  • 228.
    -) l6peJ.J Annotottoo5 i 6O*O'-"1"0u ------' -To rna[e rhe 'pnr*dna as -fhrde ^o"Jt'-'- @A,oc,-a -ro ,,,a< rbe iarn w+-d as ^*:.:H^*iH:*,"u exawra.- 6 g.*:,:::T.T. riu "ff,m&T,=ii ^= t*;'1 @ Aof*a "-"-n Ta rrnle $e j'rva crrss os rhe Advlce elc4s @Porn G.t _-- ao Pqnt fD B'"rrbods & vsf&e,.n c)ax ' '*' ' " ''*' hg ktct+ xz t ' t , ,',mrcur e'dn3 h alr $c g''"atats + rr""d L(d,?o,ntrnu (''e"o*rr* (* 141:"rcr '*("))')3*"r* t ?ubt;c vord t,..t'*,ort)t J rT d;;*"ri ---- T *o i: *#; HiL*'* 'ltstBclro ' iar,a 4 / trgmr,'t 'J*" 1.,or,- o.g ' *P*ti ' lang ^ anooturtao' * ) @A.p".t p.'blic. cr(rrg hgletctl- ,, u g.,,,.rtots4Jd"0B"- 3fl'lt8 rm] 3.."1- g a.e.,"('r.,u.,rcnOrtj') .. *, "".-. -- incttde ,.1-11]t_."r1^i.:gnft,". (' tesb;n-tc'{uFL / J ,. *, -".'.-.' _' incwde ,e""s -Fllt -rlr. ^,a',> fl*ri c void kp-cYcr6oa( ) s.i4$ -aDP -. t S,o 1.[' ia.n L,eP,nt aduite" )l I zit' id:"idr" clar' ='la'+*t{ l> | ,,v<an id =";d2" tlax =" S'yPtgr' Iz 6 on**'"'4 Co'1*'o*-f,1^rr., '*o' a'poa-o'tw?'^t/) f s.o o('to. aPta Y€J.^*4X ad"to )) clil]nt da,rq &s,e- w ctlu*-pt t tlcltrfi o4v5.tt I ^- -1,! -'.6 ' o .la I . gr'ri iar I ---- ;^,elo." ",,*.0*, 1?:1i::: ;l :;tl*Y":l* -,-- 7""- r ' r6lw4t'q to *flil ra'{ 1'""1",,s
  • 229.
    i Neb Promecocfl tglt,> s 6irnpli ftea rbe Pmaess J5F --------------; p16sn Nekaort ____-_-___-_, Rom fuioj Neb mvc/ sp;"g Nhril ib rhe dipf blo) 5trt1t{5 i- x "f eto4.deb arc AP: dcPcodcn i does not *.?0oa !,r556arl on hrsed p5T am;o dds not otlo(' fo uJ e Orkr rbq, btrnt ,, is P $rarndo6ies in victo Lo'X crr Sntrf 5 -----------) Prcrir o1x,,ct'r e 4rn&.rf .t @ @ o o a) alldrs rD 15p r/elril5, Seerncrl FCn, osp, hrt"' t Fahnolqies )r) vlco Lc[er. @ era1z*s dqlrtderlt3 l4elrtt'o crn e!€/t Jc,l:q re$cu(ce L"u*z -laqtzmT;"rana @ uses 5(,$n1r5 &-dlt-io r sl R'rmbeanS " @ th,r** ptu6io 16 drry, io penb,. TermrnolqS rcru*;n3 bl(o 5?dir5 4'A ord qtdn8nvc 6ltdi 6 -i 'x Acttuo€e{det furn9ean Aalao ctc':s Srmrs cPg ffte 3Prin8 rovc Dispor.r.n&*ter Ca;rnr,raotl class Gnnrmod &nftDlter cl'acS Spnog cfu ere Ter mi oo I og5 e-...-- &rnrrotle I &.rv let ZOog hleoar0e>'lro Acfionl-a4e;o3 4a66,5PNocLrdJ l-Dl5Rl,.tler5fr'lcrlSicrlrarne 2 - 8e!',1+' xm) qrt krrllev Vie!) Qcidvc'rs ar.{ Vk"rs 5pr'ng Neuflodule Po" -tr provide alghrt l.tton Lc"Xer dn C(ff€ 6eYvt$/ jsp tahrooX ies and oP delt'lbpin3 nVc[, c.rchi l-tz]Ltw brrse d ' Llr.b cLezt>$ ' fuoH5 [arcrre cc're) open $lmphong mvc/s1rt trxt Ptoo: ,-- Prom inrcrft'ccan 6hrcrt5 1"r and qi'r;ng rnvc 1. SrnlDg Yovc O *t*..*;bt de'rr'Paas Portr dasses g4lqtrts &trntatlcras brrse firro$ram i l3 ModetlrgVierr oklp.r (to canBSrr. Qoarrr o"Ses )
  • 230.
    €anf ct6 6mua1')( etoc,f, ' Flur: oP ereornn in Sp"% HVc aPPa :- p*y*c),or Q'aiet ' fie D p;,l""tt''nrQ,,0er- use^ Viet, anl laleb terver ApplicanooSe' v<e !dabdpfn N Y ro rbe diog.tc,rn i- 0 F{otrornr.e. dePlo$ee5 SPri ag t'lv c t'Jcb epPn in L'&t&wcx Cc'rl apgn sB*tc't ' @ becCrult Og locid,orr- stbrtT.+ €fdrt€f, rf' ?he DlSparztpr &rr,tl+ it coitl be iOSn'l*l cr'r-c J girter duving furr,cr su1,t -rp crr dc.ving flre &t%.rn€nt 6( ot'fupprt ' @ lrs D;urc,r.1", &*q.. affruarS aJ,) o4fro Gnrcxt cailz,)yLu I rz.ur"6 B[i!+lz#tt4h== .- <Dser.t*crss'rrc+lo6nanaroe ) -sewr€r, xral as rbe $.rr'g ConltTtvann Sre f' tfisfroic+t - -ou rhe b.,ns, Cn(:VoA tn fu1 e*,eV"*yor -!'rc 76tn k f)/t-t,lola! I1o+<e ' J T'rmm ff ;,'ffi"-;ff::, +o '.o(D d,o"aLanmttur "t'oo'G"t'*nt "- ell.sr $c* ort rtly:r<d * y*u, i" elrtat' Q D:ryd^o.Q*4 .o.ltz* lhe' *'"'t,.A 'E*rtAn-^ G-*,,'A 'LQa odt"-' J @ ,rr^^ 9*rc.t- caw ca+2,"n K'nd"a ot- G,''r,*^) G"*-tt'n "L"tl (9(0fn, E*A'"a rllt laott*s rfle r1rerr -anl etu'ns floJqA'rVt- "l* o4lettt: Viulflesolve^< t6 BerutPaee ' eA* G^fiq"t d iin sir"n6 afu fio r &.r.r ,riq) U Tetrt Pctfe3 ' Qupar:.J''qQ*Ler Ylr prefe"*arto'r LSnoF QeYrrFqe ft *1an d,e rutrtb anl En^lJ t,ilc, re a 5*^nc':tl'A{lut. *8., +'d 0 [r^r*ion rrart : [-----lL--------J @ra: I--=l ontrlmrcC,- -, ) ':'---6t%1c) r& ytXa flre GvWae @
  • 231.
    -> ComFr.od clc6sk PbJb c1(1s.5,,... and iava bean ' -. Ovnrnr,n d c)&t5 pyDtxrlias ..,€ed not tD 67ftk b uelrb Fitmcznf**,rt* '- '-. Gn"rcnnri alas6 FD[rorrk, rnurf F . Lo,,."J o;rb Tin-O-pa*tS CcnrnanJ 6rntmtterr ctass i5 sp,, '6 +nr 4rf--de'f ' --1 n-il clat! 616 '.**,,3 &.meco 6{F , ulrs' ,"*,.ri ,-" ' G"*a lot (i"mtt'e; 4ornes ' l4utt"X ZsPnt{'biD47 ruJ ' flwlt iffPlerP'Lt the oor;og &rn9,gurafio. Pre oF SpinX lJebrnl c agt) 6{ttutn5 $s frro{oi"'3 cfus' @ Urt haoarcr s ( r0 linx iretti:rromin3 rcqrsts rpirb Carn'nnd cc'trmllu ctasses ) (D G-.*na ccmrrDller/ ctc.sses ( G.-*nl elcrrses. o v;* Qusolve.rs. Vieco Qp561vg-{'- lbrs conprxuro$o.} Le.. te lp...'x?tto 1a s'eth *" ::t"t: *tt r*r* A..O9O Ont* r€5csY'es oe 1;a6 r*gj' ltrrs 'rlt-oQest'Uen ctlrsncrme crvies ha,re d csr1 ioe {ieao Lclcx teehn ooX1 toP u Se ' T&hnologl vie(oklotve'{ cl4ss name - ' - 1646a[[2cscirrce Vic'ol?eolver (deft"rr ) J6P Org sg ' co'b "*'tvet 'Yie1tr ' lelocrrg 6s.sp c,,tb 'f,'tLt''''":';:Y#:::tiaoResdr,e., P'errcovu or! "af c'tb ' '9e lt+ ' vra tlres e!'s?'c'tb' sertt<t v;at ' hLes' -l1LesG"'63"w v ,15rt (x,',ssrstrclLcrns<tse ;; :, * ' *'^)el vieru' xstt' Xtt'V;-i1s';H**V,-Pt'at* ^"" t i;'t;;;';#^j ur] 'a _, o./urer - victtt . jas?u(46rs ' Jc'r'crl€ .L.sp{ reporr6 016 (P'Lx-'zlt ' gadtet ' uic{t Urrt-landtcrg : - ^ g," L- t:ou lhe etienl Benr,-tte ;,{oningqP*:,' --, rrrpst 6ff 6e crc*ses ctmhxuwd '" ''1"(, tft i:: ""il:;,'",': K::*- ,,,pk* *1 ant!, G'vrnud C*+*11'- clat**t hd "" fr^d h^rtu*. g"ew+;; ,^,^-C,m"l';:?,, oir.*os to u,, Loontds,ka.h^tlu*' g&*r*Z-pk L!, Hdnfld,.llo?pr,'d :- This clcrss olJ.*L)s to u* Loontds'kae C"-a@ *mps onct ^ n,ur*presE;dns fu linr fu fir- urts(reluesta''ts)oorrfr G^*J G*nrttat clctre es ' O,.c,r * n'r*' j'n - ?N::'ur'fu1:Y|-1": :,##,ffi,:,l*ioi tl' C*ot +"tt : =-r o@., r qr rs ) rrrff G.o" i co^r'"ila' ctoq'r'
  • 232.
    ' Go,rrnnd G*tprs".' 'ftiL'e 15 a Frssibiltr$ fu e'i.lti d.Wr*nt r1p"s oP C-s^.^dCsrtrott, .LanE. (} org.+.*u. servrf .rovc. S'mptE'- G^t.nrpr i- useR^r to banale sing)? srbmit vt*n %'ow'ne, W thp R'mpa?t ..- - frurr t( )atrp<-}r qnder *t Cd'.t'dloroP Co-nrroUc^ &rr/tf . 6tw.s anG-r.ar";fG,-,.t')weina 76 O q.<f &rg. edt4'hv. ' AUr*+['t-Grt"f f ,v y I Ptt{8 rbe Ye?levr uc.f.,r to ha,nJln 9i61e ra-Lmir lut n h-q roX", l"ni-]r^e 4^^po4' a^ h latdz) dr"o ' B+!4 I,r^arc Peayrxt ) vu*a -.tv tr,orr;,.( r(e 'vlgqrrt . O 'O + L...-*.-u.'4g*o*Ji,o"aE tGmrlw9- '--.,/ @ ,X .f .t*.g,,ul€+.mvc' G*l,oat.E t G^U, .r 8//',,c * 9,'v1eT)*rCo*-tto't W aLoV*.ele4 --, "a.G^,e f C-l +6 Pro.eJ( ile ^c4tLr* Csa,,"6 $n 6db"k^("ererA"). ? o q..g *".gn)1€f.ryrvc. matilarrlor, FtrrrA.rroG^t}"tt""':- n hit b,nos /'r^"n, - l4kAkhaib 4c n'r;ple -qnr C';7 %- 4n niltsple 9 ,. ,,^, a- czJo+l"t:s &,ne 6*iors "* l'*"Pi*"--= ,-., ,-- ,^*G - ^ - " "'' class gef3 "A6' r{ rrt'od h'sel '- rhero fhe - -t -*" thls cf&e bclsed C:rnnandGmr'otte'l clAss ' lr.^,^rneA, dildrt - &trn Pnfle (,,]irr be lauocne d ' + ur6en 'tu6 clc*g LrT etr &mrrrinl G'r--llerr ctas Ber6 ''Po6r" rrcrbod barcd *en the *"rtttr -- coirr b€ processed and resrtt c;:ltr be gcrnctctrf 1l-€ imrtttcnt poparde* are : - ----------+ to syer$ loe &or, 4 ca-n'x'oA ebss ohJ e)cr-nrlM^e -------2 la t?'hrLe G- c^nAda*s t"4'* e aTo1rntC)aur ---------r -1" sP)fu &e G'-t"z^a cbN tnt>' e &,ne 6*iors ^Wu 9'*"fui91-Y -.--.------- ro ae" $t Jr"-W1e. ' fo sfr<;ej the xu*ffie ' G-nanl dc'*S )"d. N.r.to dt6grary1 gzn€/c,fes - enVr - "rlrrhod bct se d impllo t r4/ue s F ;J tvurhod GtEf a) &"sionF - u) f'.N1,." I e*no/,'* d,nd elt' ' . abve diasroro @ N",r-, poq. OlO ff'. Drrr,tlcr Setvter -F"{t { tc+q rhe 6ryef' @n*.t" O',+ linr.s flne rcye* o*1 &tmand Gnn'lttn tLoN ' 9o.. rl.. *2y'4qr thc &,^rrond CcnnoVttr cla-f hl^h€3 I g;tgN'aQnc+ ta lo'Lncl' rAe &nP"i e @F-^,-.a" 6cr.re,ard * pos{ ' mer{rod ** ff::;qr:ffi"T;# sr#- av& Ltrr{ $t eyt*- cotrl' G""^'njGnrnlit" dorA ' "'u'* :"''"-- teG^na,r*G,,trdk".; "bcrmes tt^Ib to ltroceYt fie "tr1Ferr-
  • 233.
    '.:l|P (wtttnoc ma. 1i+:fum!!rr.ge= oo&,a'11q-ll u t..t't,.ln "'''id: Oorrf,: ol],ae'. rl t--_--- i Ilrtdeu- d.f-'its /ayr ... ldr Errrsh gooo iP proArr+ it asrt - E*r:r"le fil.t;caUo.t o@@ Nab afpo Plsnar=1*" *,an o @ @ {*rlr, ^'h,. lbe FlmoP eteloL on al Disga*cl,e'r ).cpaX),* *'vlcr C-r.* lt &lircs +,e r<erhled ,{-*atrut" G-'*'a dats eiut ' le* coJl,e o-,.9-ur;.G,.-,-,-J *xl'o1 oh Co'--o^LCc"th,tle'r r C,i" tare exar.rpte aTpn refPor alo@ e *," P6eilis @@ Lctt' aa. tqp"@ pc(geroo @a€) ;- - @ so-. o, st pl rtlo*l-+: ' Dot'o'"r t'i qr.-e as sl€") oq 9ro+looE Dr"Xte'b) _ 6 :"_, ^ sr+s oQ z,o+r>.rs o'.I]-.*u. ). i"#*s .w*h, Tnde'isp Gi e?'eljJJe . Q) Ed*. 6t"'z't *a1',,sr'mt,"'barecLEd{nu') ::lh'fT " tTff;it*tntt* ' anA 'h:s ta'lc"* ?un' l-'*kt i-fl'an ny^[q"#]*'l*'^U '^ Y*'*, '?*;t;;*t; . , *rr,ns a,,J Jaues the eerft;r (*t:-'- ?,""ondCa',wrc,r..,^ gl*3 @ D'rpat t ovSi,.utef -trt4s an'' .._.. rbe qprst c"or rh L.l:alr.nn6 " '- * (rop,"ire)*- **' Fr -rt'e S'-ortW'Ut'rJtf1"o;ot 'tag ltnrs rbe r"qlrrst c-or rn . (:_/ u il, gts;,"#ml'*ff Q I,X ;n*K Yo^, ,r^)o* $ryL Dopont"'G*rc+-'(n?: t+'l2611 ) --@ *r,0, BrLg.,frtne &rrfo,r o. anJ Gtrt;a 4+ o47ur (,.+t*ttr; : O Duwrcpt},'v+ ia4s anA 1ov'z fl'e r'14er (reto-eros) - b eote c's @ f ^ t, o,.t..n*.-^t-rrr,r ) koo',no *oh +o p** da q1*t k<""* tl.'e .relT,norwethocl is P$r ^ .,.', J"J- o? &- yul, +" &.*'o"J ffi, D D;sg"ra^.x Gvrer ,;t tit wa"er +znt (usesaAn{:) r.edo& kce:r+r? ,v,ar))
  • 234.
    - (D prga&n9*rztc.Ilr one,*n;tG,-,-,-; rrrft4 4 G-r*A Gyn"ll""ct^rx oL.1" (zttt-:rtt't) @ o"S.rr"rr e,-, ,-) rrt*ro cl nla. os f'lodaA't V ictc. a5i pt nt'1 io "s b"co pi"dr.rr ' j.s e" (rep"- >rzo) " ,12 A @ D,nu+- 9.*rr* y*u {'e Ctnt-Ie n {ha-fn"e*at 'i'p C*tuiFrye ) -, Ve'gfuiog the lJ"r.cr and tafFevn 4 rbe Eyltl ddlct Grreg tr-fl,*r E.ymVa ti dorH crrs . /- n ur Lrse Vo l;r{aJcru ploq. io (or{) X Lrtt/& krti dctk"/ -Io g" t<'rn1 , 'I .--'s[,nr[l'1vc&wn3grcresscfltTfo-'!fzvo-lVatidcdonsiolitt-lebitGropiex'drdrrot Plsib'le u;nt FlaScYl Pt n vt'ltdo+tt"s ure for:Jale-- a.l5 liYofr&mcd c +{ Fl us)n9 jaic. code U -) r.0t can cAe kltars mcr$od's e4 V;at'tan u cw {., s;.pl; ft;.,q dne gtcex a $ 4^' Va1'rda-tlcr 'ul tJ. - ffr'it olrui! ttr d"*t e E,-aliaoNu., llles iir 91e,role jc'rraclc.v( *d tlut j^o", doU - &n beusei in ou lain& o( s6r.n-6 a'ggns indu&'5 g'nn,lluc d4Pn{. ?,1' clo,es MrLtt - iyr)enz*s a6 +,-71'"'reta^t'. Va-ct'l.n V,r.t'*.n (t) .rJ kn*t rVUa"re( ) r,,rAocls. r,Cui" L1..rJr.2 ioni< In h-Udon.'ug io6i< ;n Al;ao+66; 9qr* 4 ,a;e*Xx* GlvarLodr & V*a.H-(J*rs crcdj @ P,ocn&," to duolop rhe $;'6mu, aa'n V*,7 rh. $tr* of Q^e'steE^ W,n^ ime'lernenlia, Ord . sF.VolHofi. ,!*a*on(f) onJ inpiernant rbegtE-r :- lcrve c. jan clasS -r,-rs+ trrrovictc 't"rgleraa"ttc. 14 ' v,aa?.""{ u-tcco/r {ak i{e .- Er."Vrldc.rtcn lgrc lcfu P.oa.rctfu.ia"ror'.1avo' ftre oP F tr t'o:@ o+t" no'@' 6ttpl " 5ie,jfu ftr( alr,€ ca'6 h Comrrund ft,"n hollf-4 c )CErs Con f;6qrcr-tlcT r "of Splrrn ConF;3woll- 4tu' # *ku .x6s enrr{tr u( ga,.ni ^' Q) "9Kn-D| 1il61g furoroing l%i' ln rk Fa^ Yle bn odoa! n rfi< rJe og 2tl+ lo uLt 't f'3'@ - rolq,@tnr,fi; d (o',ohd nddq cro' 4rT rn5;bosBindhrurs ta^e ' "i"2 '1), * r"* *' = +" -. .ff; tt+JLT""::J,"i*' 1;n'"' "0o1" (rq"ere'*r - r"*'ST) LtiT t) :l' &jia3'd 4 rne u!! &tkr' aiftr{ i|1to!]1 ilc'o}l('a' --2 In f,t'tut' Crpplicad.n5 Ft irn Val idc*lc.n6 ' frYDtr arnffre.t &;cndl g . Forrn Val idan'on5 in SPriDg rnvc oppn6 Ce'6 veraioo) a. 6ervc{6 i de1' cticr*a; de r,nlu omarrrrncrfic kt rnlC' lida'tlOns Crvt
  • 235.
    Zst)rtT: rf€ 55.{c 4t, Lltikt,b"n> rcnr= "$ f e'aefo.,'1flest3e J /> ---' at ;s f6'eaLb l,JoP so' 6)e 4 dn e imprtenr cnmrch0n6 oP sPrirnmvcft'* 6 gPnng3 ^"u"''i,; Vq&'&-t'c4 erfors d:rpla.ra.{ a+lo'rlPr: - O @Coer"orr e'' rrf,tl€5 fie iava oass as d:mrnnd @nfrle/r - @@?qpatflagprnX- ,nsPS $e ior'ire$lesr ar'I- coitb GtnrndGr'rl€// clc.ss ' @ @HoderAr*,b,rt -----'--------r KrePs fie gt'an.et<" & 6l'reo b rrer6o4 b #r l'1oder4rr-"u'rre ro use in Via-ohc" ' =@ @ Soo-Arhibutq5 '-------, creor<.s &ssrcrD ortdb,rc io t^tlo Y€so tlYce fT ts ' .- O f- Aonotartona b'red Gn'nXhElrwc *Jnte- *t' €ft' $e aPPoC) "f Se : - n",i i'-"'::';*,"'", os *e''"-ra. .:"x';';J,J.[: "'* &"W'"d org ' 3g6ngP{a,.,C.Dcd v' 6h sweF'viet' ' tleot'N* Relor,rs n fne &n". tf PdP do.ttnenrl X-c4 she€'ts u:e &ot Y ::ffi; .- i t.rj{ u}itL rhbse o8lG n sieri c-l epnSbeons ctnd err e crrrve rbt .-@ {*Ihe gihmgl€ cLj.Ph onrbe 6!o.a disu'rttc,.n.hc a*.@o?fie *.*''spffi I -- ," er*rgrrvc tr'bandle tb( 6it-&a'on* -"tl:--*:*.J11*:"#_ -+ Jn er*rg rrvc tr' band le lD( sttaarx" ' "r tr.r16 fcnc-fa*ro llu" "nl a ftrrrr pc'Xe Loe mrtst use tbe G-rtno dGar-l le'v elals & +ye" aoe Sboc'rd also us( ' ; ;;- -';*. '.oJG*-o"* roitb rrrr?rde "? Con"anaG''nt,oua ^ - @ .p.n rhample &?pn 6n lrrrr*lrrrcrnGrr'crt<'l rt,fta fie aprrcadorr@cP- o+ltllal*r: h"d"+ llu7 zlsp"tg I bo"B;"dFrrs >
  • 236.
    -+ It prortdeethe 9P"9-NeUse'ni(cs Lrb5wodlcn bget a1 inx-ppc ' JAI-r^Js oe-bcrvlces" ir Set? provides erNi (Dnfffnt +o excu"t-c k-r-bg3'rDi ce an *,r.s proceeS rh e G^7'oe"t' tht as lt:tllkr^)ica Camgt'net* and €ong Crnlr^;ne't qryons l+L'e;s no ned oP fu.t"t" uzbsenrtn' &tC Cldts ObJ@ra-t U){bkwice &mpontnt. % * rat"'*-cntL- ttmrt6..io,os ' &ls ?"",P'o^'fi$n&."n u,nL*'2 h&nwne W'*"'#:#,;"* bos'r $n,uut*," dtuatr"D ^ *W# -t Sprrrn6S'r guptics 1loa clarse.s 40 -to Co,sume Ld'bwvi& h'V 1-- Qxpose iavacta'l cl;ut aPo' arfi' epaog &arrunr*. rcnbr;n.. Jilur9 . Sirnpietaxwo &*rtthett.r eao o'Fnr ffxn
  • 237.
    I would tryto update our site JavaEra.com everyday with various interesting facts, scenarios and interview questions. Keep visiting regularly..... Thanks and I wish all the readers all the best in the interviews. www.JavaEra.com A Perfect Place for All Java Resources