Seam - Contextual Components A Framework for Enterprise Java Version: @version@ Z !" # $%&&'( ) * $%&'( + &,-./ ) ) 012& 3456 789: ) ) ;<&=> ) ) ?,@,@ 6 ABC + )) -,D-EF45 GH-6 IJ# BC \ )+ EF45 KLMNOP- 6 IJBC g )Q ;RSTUVWX 6 YZ[ g )\ ]^ TUVWX 6 _`Z[ h )a b cd 6 e f eJZ[ k )g ^ TUVWX 6 B`fBZ[ o )h ^ ijTUVWX 6 Y Z[ o )k l 6 JZm[nJZm[ o )o ^#I TUVWX 6 YY[ Z[ )) /pqr ) + %GFGstuvwx6 yz{ + + ;<&=> Q + ?,@,@ 6 |JBC Q +) -,OEF45 6 |J|JBC \ ++ EF45 KLMNOP- 6 |J|JBC a +Q l6 JBY g +) /pqr g Q } B~| 6 *f wx h Q ;<&=> k Q) /pqr )Q \ OK6 2 )Q \ ;<&=> )\ \) /pqr +o a 3456 , +o a 1 +o a) & ++ a+ &=> ++ aQ *m A =HMH Qo a\ F Qo g } B~| 3456 - Q h ` 6 ` 4-, Q+ k I^*e[ 3456 [J Q+ k ~A ¡ |¢ &£ QQ k) FG¤Gtu¥¦§¨ Qa k+ I^*e[ 345& ~A ¡ |¢ &£ Qh ©C© f ¢Z[ ¢Y ) fJ 2 ª1«" \ ) ª1¬ \ )) ®¯° ^ [Y KPG&EFF \) )+ ®±&G45²³´¬ \Q )Q G45&µ¬O¶²³´¬ \\ )\ ·¸&N¹-º»345¼/²³´¬ \a )a ·¸& ~#½^+ ?,@,@º»345¼/²³´¬ \a )g ^#I¾¿%345KM´¬ \a )h }ÀÁFKM \g )k Qo % £´¬ \h )k Qo &M- \h )k) b ) I &M- \h + ;,Ã-ĸ;RSÅ \k + ;,Ã- \k + -,D-;,Ã- Æ[ ZÇ ao +) M¹;,Ã- ao ++ ;,Ã- Æ~J ZÇ ao +Q ;,Ã- Æ¢C ZÇ ao +\ EF45;,Ã- Æ ZÇ a +a lS-KE-;,Ã- Æ Y ZÇ a +g 345;,Ã- Æ#YY[ ZÇ a +h ;,Ã-È a) +k ;,Ã-¥¦ÉÊËÌ a) +o ÍÎÏ(Ð=Å a) +) ;RS a+ +) -,D-EF45 aQ +)) -,OEF45 aQ +)+ ?,@,@ a\ +)Q C a\ +)\ ÂFEÑ/¡ aa +)a MNE45 aa +)g ;RSÒ ag +)h ;RS-;&dÓ ah +)k ÔKÕÖ;RS ah +)o ×ØÙØ;RS ah ++ MPG45 ak +Q HMOMGÂÚF< g +\ ÛÜÝÞM- g) +a Kß g+ +g |`[ MNOP-} ©I[à gQ +h OáG}=;RS ga Q ;RS&cd gh Q Kâ,@cd«¬;RS&cd gh Q) YZ[«¬;RS&cd gk Q+ ãÁä¯cdOáM h) QQ cdtuvKâ,@&¡ h+ Q\ å| Òæç&£ hQ \ M¹nMNENnèéÐ= hg \ M¹ hg ©C© f ¢Z[ ¢Y \ G45 hg \ âHÂN hh \) êl45 ko \+ êl45nG45nâHÂN&dÓ£ãÁä¯OáM k+ \) ¢YfC C k+ \+ ;,Ã-ĸM¹ k\ \) MNEN ka \+ èé=´¬ kh \+ èéë«ìH8G45 kh \+) èéÐ=íî´¬ kk \++ èéÐ=¯2ï,45£´¬ kk \+Q èéÐ= å| £´¬ oo \+\ Z Y oo a }ðG--&= o) a &Å o) a) S-ñò oQ a+ ó^* G?-2ôª´¬ o\ aQ õ6[ö÷ } õ6`÷ &°º oa a\ ³ø&ÂFE og aa ù[ C oh aa ¢J [ C ok aa) I J [ C ok ag ðG--&= o ag ðG--=} b êl45 o ag) ðG--=} B~ OK ag+ úûüý agQ wx ) ag\ DF<GH Æ `Ç + ah ¡;RS} b ;RS&M@ + ak ¢ [[ C[ Y Q ak I mb #BZ \ g OK}lS-KE- g g %&OK g g ) Ö&êl45Å h g) } þ¬ÿN )o g) B~ OK&£ )) g) OK&cd )) g)) OK&ôª )) g)+ ï<}Āā )+ g)Q OK&Ăă )Q g)\ OK&Ąą )Q g)a OK&Ć³ Yććć )Q g+ %&lS-KE-= )\ gQ B~ lS-KE-dÓ&£ )a gQ KE-dÓ&cd )a gQ) GN&0Ĉä )a gQ+ lS-KE-&0Ĉä )g ©C© C f ¢Z[ ¢Y gQQ N-Gĉû 2 )g gQ\ N-G- )g gQa N-G&'( )h h }ĊPGċD45ê¤FČ +o h 1 +o h) =H8G45 + h) `[J fJ +) h)) ¢eJJ J +) h)+ * à mč ++ h+ =&ij;,Ã- ++ h+ ~# % =&ij;,Ã-£´¬ +Q h+) =& ` EF45£´¬ +Q h++ =&ij;,Ã-}Ďďv +\ hQ ~# Đđ£´¬ +a h\ ^fĒ ½Ē % ^ £´¬ēĔ +a ha ` O@N£´¬ +g k %& b O¶45 +h o óCà J Q+ o óCà Q+ o) ]J YY[ óCà Q+ o) ]J óCà Y Q+ o) ^à Q+ o)) Y QQ o)) fJ Q\ o+ Y[à Q\ o+ Y[àJ óCà Q\ o+) ùC JCà e[ Y[à C[Y Q\ o++ fJ Qa 345ODðG Qg MKĕG45 Qg ) ĊPG Qh + ĒàĊPG \ Q ¢[[ĊPG \+ ) I[ \\ ) &0Ĉä \\ )) AJ [ e Y \a )+ B~| KE-dÓº»£ \a + à \h + CC_ \h + ]m m Jm e à YY[ ć \h +) IĖ \h ++ `[J à \k +Q #m \k +Q ¢eJ \k +Q) ]J m m ao +Q) àI[ÆÇ ao +Q)) Y [ ¢ a +Q+ ]J [J e a +QQ Y[e ¢eJ f à a) ©C© C f ¢Z[ ¢Y +Q\ [J à ^Z Y a) +Qa J I a+ +Qg **~ #m a+ +Qg ]J J #m aQ +Qh #C #m b aQ +Qh AJ à ė ## eJ aQ +\ ^ |J a\ +a #mč a\ +a ¢ Y a\ +a) J Y aa +a) *m ©I aa +a)) [ ag +a+ à m e ag +aQ J YJ ah +a\ J ^ ak +a\ ^à à _m ~# go +a\) ^à à _m ` go +g ]J à I[ go +g ~ CC_ g +g) ¢eJJ [ e[ g +g+ ¢J à [ e[ g +g+ ][ Y m ö g+ +h à g+ +k ¢#~*¢# gQ +k ¢eJJ m ¢#~*¢# C[ gQ +k) #J ¢#~*¢# e gQ +k+ ¢J m ¢#~*¢# [Jm g\ +o à ^C g\ + ^ZJ m à Y ga Q Ęęä},¤ Æ[č mÇ gh Q K3 gh Q) H¹ gk Q) H¹dÓ´¬ gk Q)) H¹Ěz´¬ ho Q)+ b ÂFE ho Q+ NMě ho QQ ,¤ h Q\ K3},¤cd&GFë¬ijä h) \ *Z h+ \ O¶¤F&Ĝ h+ \) KH;<ĝĞğĠġĢ,Ã-&VW hQ \+ G h\ \Q *| &VW h\ a *Z ~b J hg a AJ ~b YY hg a ¢J hg a) *Z ^[ hh a+ b k) aQ ¢mY k+ ©C© C f ¢Z[ ¢Y g h k )o ) a\ kQ aa *`[ ka ag ¢ kh ag ¢[ [ kh ag) #[J [ kh ah ¢eJJ *Z kh a) ¢mJ kk a+ )og aQ IJ _J½#]* Y )oh a\ bm )oh ^[ )o g ÂFEp³´¬ )o g ģÝ ) g) *| ½*Z ĤüĥÁ )) g+ Ô&ĦħĨ )) gQ Ô&ÂFE )) g\ ,D&p³ )) ga Ęęä )+ gg !&ĩ&ĪFĕ )+ g) [ Ħħ´¬ )Q g+ cd )Q g+ [ )\ g+ # & ù FGF )\ g+) cd&E45 )\ gQ |[_ )\ g\ N )a īÍĈĬ}ÂFE )k h īÍĈĬ )k h īÍĈÂÚF< )k h) #à m m _m m Ēč Y m ))) h+ #à m C ))Q h) |JJ ))Q h) ¢eJ ))Q h)) J J ))Q h)+ I CJ J J JfC ` ))\ h)Q I CJ J m [ ))\ ÃĭF4 ))a k %¢ mĮ£´¬ ))g k) įİ&ÃĭF4 ))h ]` C ))k )o ¢eJ ~ öJJ ))k )o) ¢C[ ]` C ))k )o) # I Jà )+o )o+ # ZY[ _` C )+ IJ )++ ) cd )++ )) ĊPG )+Q )) [[ ][ )+Q ))) ¢Y )+\ ©C© C f ¢Z[ ¢Y ))) ¢Y_ ÆÇ )+\ )))) ¢YJ ÆÇ )+a )))+ ¢YJ¢YùÆÇ )+g ))+ IJ )+g ))+ IJ *àYÆÇ )+g ))+) IJJ*àYùÆÇ )+g )+ ^C[J ^ ^ZY )+g )Q GHM MNOP- )+h )\ ;,Ã- )+h )\ &cd}ıØÙØ )+k )\) I [[ _m m C Y )+k )a FG?- )+k )g NNM&IJûij° )Qo )g Ĵ,@¡ ½ ĜNM )Qo )g J ¡ )Qo )g) ù` ¡ )Qo )g+ [ ¡ )Qo )g) C )Qo )g+ ĵÝ}ÎĶ )Q )gQ ^ )Q )g\ ;DG45 )Q )g\ J )Q )g\) |Y )Q) )h Fķu )Q) )k ÂFEK<´¬ )Q) )k ÂFEÈĸ´¬ )Q) )k) K@ÂFEĹ´ )Q) )k+ L-N&K@M3N )Q+ )o ĺñò¬NĂă´¬ )Q+ )o Ļļ&O@<Ă´¬ )QQ )o) |Y } ;DG45Ă´¬ )QQ )o+ ĞdNM&ĊPGĂ´¬ )QQ )oQ ĂÍĽ×ØĆľĿ¬ )Q\ ) | ÂFE )Q\ ) cd )Q\ )) | *Y -GHM´¬ )Q\ )+ ČFG&-GHMŀŁ´¬ )Qa )Q R&KE-łŃ´¬ )Qa )) m óJ[ ]` *[ö )Qg )) ¢eJ )Qg ))) ~YJ à Y )Qg ))+ öJ Y ó]* _J m Y )Qh ))Q ó]* # *J )Qk )+ YJ b_ö ńĆ )\ )+ ;RS YJ ` MPG´¬ )\ )+) YJ ` ;RSMPG´¬ )\) )++ YJ ` ;RS´¬ )\+ )+Q -;& YJ ` )\+ )+\ AJ YJ ~[e* |J )\Q ©C© C f ¢Z[ ¢Y )+a AJ |J ~ ¢Z YJ )\\ )+g AJ |J ` YJ )\a )+h ;RS}¯2& YJ #YY[ ¢Z )\g )+k AJ YJ *ö^Z e ©#à m )\g )Q ` m )\k )Q )\k )Q) ¢eJ )\k )Q+ AJ )ao )\ ¢eJJ Y öJJ YY[ )a+ )\ eJ )a+ )\ JJ _m b à C[ )a+ )\) AJ e [ )a+ )\+ I C[ )aQ )\Q C[ e[ )aQ )\Q ^Z Y m[J )a\ )\Q) ¢C YYJ _m )a\ )\Q+ |[Y e ` )a\ )\QQ ¢m J )aa )\Q\ I mb )aa )\Qa à JJJ )ag )\Qg ¢Z J e C[ )ag )\Qh #J e[ )ag )\\ JJ _m à ^ )ah )\a ė eJŅ )ak )\) ¢eJJ C ^^ \ )ak )\) ~ öJJ )ak )\+ ¢eJJ )^^ )go )\+ YYJ ` )g )\+) YYJ ~# )g )\++ ~ öJJ )g) )\Q ¢eJJ C ^ņ _m ^` )g) )\\ ¢eJJ C ^ņ _m ^` )g+ )\\ [[J ^` )g+ )\\) ~ öJJ )gQ )\a ¢eJJ B~| )gQ )\a ~ öJJ )g\ )\g ¢eJJ ~[ )ga )\h ¢eJJ b * # )ga )a ¢Q )gh )a [[ Y e ¢Q )gh )a) *m B\½`öJ ZY[ )gk )a) öJ ^ZY[ Y )gk )a) ¢ Y )gk )a)) ^Z Y )gk )a)) ¢eJ e[ mJ )h )a)+ [J m B\½`öJ ZY[ )h )a+ Y[àJ m YY[ ¢Q )h) )aQ Y[àJ YY[ J fJ ¢Q )h+ )aQ óJ ` fJ YY[ )h+ ©C© Z f ¢Z[ ¢Y )aQ) ¢mJ e Y[à ¢Q )hQ )aQ) ¢eJ e[ mJ )hQ )aQ)) ^Z B Y )hg )aQ+ [J Y[àJ m fJė YY[ ¢Q )hh )aQQ ^ZJ ZY[ _m C J ¢IA [ )hk )aQQ C fJ J à ¢IA YY[ )hk )aQQ) ö Y [ m J à _ ¢IA YY[ )hk )a\ bmJ Y )ko )g ^#ė ]`[J )k )g [[ Y e ]`[J )k )g [[J o+*~ )k )g) ¢J à ]`[J )k) )g+ _ ½Y½# à )k) )g) *m B\½`öJ ZY[ )k+ )g) ^ [ ö _m ]`[J )kQ )g) à _m m * m ~C_ )kQ )g)) *m B\½`öJ ZY[ )k\ )g)) J Y m mĖ[ )k\ )g))) ¢eJ [ mJ )ka )g))+ Y[àJ m #YY[ )ka )g+ *m BY `öJ ZY[ )kg )g+ [J Y[àJ BY `öJ ZY[ )kg )g+ J Y m )kg )g+) [J m ZY[ )kh )g++ Y[àJ m ZY[ )kh )g+) ]mė ee _m ]`[J oZ )kh )gQ Y[àJ YY[ J fJ ]`[J oZ +oo )gQ IJ fJ Y +oo )gQ) ]m mJ e ]`[J oå +o )gQ) ¢eJ e[ mJ +o )gQ)) `à mJ +o) )gQ)+ fJ C[Y Ye[ +o+ )gQ+ [J Y[àJ à YY[ +o+ )gQ+ J Y m +o+ )gQ+) [J m YY[ +oQ )gQ++ Y[àJ m ZY[ +oQ )h |ė ]`Ym +o\ )h ]`Ym C Y[à e +o\ )h [[ C Y +o\ )h) IĖ YY +o\ )h) *m B\½`öJ ZY[ +oa )h) ¢eJ e[ mJ +oa )h)) [J m B\½`öJ ZY[ +ok )h)) ù_ [` Y +ok )h))) AYJ m `[Z[ e[ +ok )h)+ Y[àJ m YY[ ]`Ym +o )h+ *m BY `öJ ZY[ +) )h+ [J m BY ZY[ +) ©C© Z f ¢Z[ ¢Y )k +o + +) ++ )h+) Y[àJ m BY ZY[ ++ )h++ ]m ee e ]`Ym a ++ )hQ Y[àJ YY[ J fJ ]`Ym ao+ +\ )h\ ¢mJ e Y[à ]`Ym +a )h\ ¢eJ e[ mJ +a )h\) ¢J m #m # ^ +h )h\+ ^Z B Y m mJ m `[Z[ +h )h\Q [J Y[àJ m fJė YY[ ]`Ym +) ï,45 +)) )k ;RSdÓ£ï,45 +)) )k) MPG45£ï,45 +)\ )k+ ;RS&HMOMGÂÚF<£ï,45 +)h )kQ ;,Ã-Ňň£ï,45 +)k )k\ )^^ ʼnŇ% C ;RS£´¬1&ï,45 ++) )ka èé£&ï,45 +++ )kg IJ£&ï,45 ++Q )kh MNEN£&ï,45 ++Q )kk īÍĈ£&ï,45 ++\ )ko b £´¬1&ï,45 ++\ )ko b *`[ }Ŋ£´¬ï,45 ++a )k NM@£&ÂNï,45 ++g )k) âF3£&ï,45 ++g )k+ DF;,ê}ńĆ´¬1&ï,45 ++h ×ØÙØ ;RS ++k +o ;,Ã-MPG45&;RS ++k +o) 7,@,@;RS ++k +o+ Ęęä},¤&;RS +Q +oQ Ăă´¬1&;RS +Q+ +o\ B~| ŋŌ&;RS +QQ +oa EÃ,@ŋŌ&;RS +Qa +og | ŋŌ&;RS +Qa +oh ÂŋŌ&;RS +Qa +ok Ĝō}v¬;RS +Qg +oo | [[ Y +Qk +o Ğğv;RS +\o b ;K +\) + N +\) +) ï,45 +ag ^ +ak +) ~č ^ZY +ak +) £ēĔ +ak +)) +go +)) ~B +g 345&,- +g+ ++ ;RS&7ŎF,- +g+ ++) 345&ńĆ,- +gQ ++) AJ ö J +gQ +++ J J YY[ +g\ +++ ¢eJ +gh ©C© Z f ¢Z[ ¢Y +++) J *J _m | ö +gk ++++ J *J |[ +ho +Q ŏ +h) +Q B~| 8Mê } l +h) +Q lS-KE-8Mê +h) +Q) OKl +h) +\ ĸĬ +hQ +\ KPGĸĬ +hQ +\ ; +hQ +\) I mb +h\ +\+  +h\ +\Q ~b +ha +\\ I[ +ha +\a ~| +hg +\g ó]* +hg +\h YJ +hg +\k óCà +hh +\) |C £¯Ä¸Ĭ= +hh ©C© Z YY[ e_ö e ^Y C Y `à m e[[_J Y Y[6 ö e ee e e Y [ e [[ ` [J à YY[ # Y à ` e[ņ _m m _m à e C[ _[[fe Zņ [J m [JfJņ Yņ ` Y f Z m C Zņ _m m YC [Y[ _` Ė *m `_ Y Y ` [J f Y Ő [à à YY[ J _mC m à Cņ m m `J e mm à YY[ [J [ [àJ m e Y à `à _mC ` e CYY e_ö àė J à A[ö Y[ C ^^ )^^ Yņ Y à [[à _m m _` Ė m[ [ Æ_m m YYJ _` Ė [[à C m YÇ Ő Jm `B m m YY[ [àJ Y Y à `à m [ )^^ Y[e _ ó *mJ ][[ņ mJ Y à J ĖC[ [à m J őm ee m à J m à _ YY[ _m m [à m_ mà _ö Jm J b _m ^ +o b ^ +o _ e m ` _ e e C ^^ \ ^+ ` _ Y [ e C ` Y [J |_m[ņ b J Y [ e m Y Ae[àņ m Y f [ `[ [C [[ Y`[ YJ `à [e ņ b ^+ _ö ` Jm m C ^^ \ Y e YC _à Jf m _ Y [ b[àņ m e `m [ e_ m YC Z Y [[_ Z J _m m e_ö e m Y [ e b ^+ņ [J J[ ņ [J m C[Y mö ` m ` Y`[ Y`[ _ YY[ _m CàmJ ^ *m à Y e àė möJ e ^ fJņ f [[ mCàf _Jm `B _Cņ C +o m Y[[à mJ m e ^ e m Y e C_ e m C[Y # ^ efJ `B őmJ f Y[Z m C C J à ` b [Ņ m m mņ e à Ye Y ^ +o m ņ à ė mC [[à à C [ à ` Yņ YC [[ m e f ©C© Z [à m à ZY e [Jm_Jm ņ ņ e à Yņ ^ m_ J ##å YY m ` Y bf` ##å [6 I mb ¢^f e *m [ [ à ##å Y`[à à e _m m _ à C Y #[C[àņ YC `[f C Y J [à m [ à [[ Y à m[à e [f C Y _m m e f [à Ő C ` ` Cf | Y C f J C ##å Ym ùm e m YY m _[ _ö _[[ņ _ e ė `[f f à Jņ _m m m à efJņ àf m ##å Ė m[ e[à ee [à m C Y e [ Y[[àņ YC Y ` Y J C B~| Ő _ė `[C m_ à Y[ Y[Z _öe[_ņ [[` ö f J J B~| C [[_ à e Y YJe[_ J m [JJ ÆB~ Ç m B~| e ` Y e b YC `[à m C [ e m Y m m [ `à ZYJ B~|ė ` Y [ C C Z [à m C m[J mņ YCJ e C [ e ė e Y [ [C J ]ė [[ m Y e [C J [C à e m [à à e ^ ^ +o C [C Y Z J *m m ZY[ e ` Y`[ e JJ m _m Y [ Zņ _m[ J m [[ [Y _m m Z ö m Y e [C J m em YY[ YY[ *[[àņ )^^ YY[ f Y[ J [[àņ `à JJ J C[ Ė ` *m YY m J m e à `J à [ö _m YY[ e[ [ Y `ņ _m f _m ee _öe[_ [[ [f__ YY[ m m Y[ [ [à [ m [ e `J [C YY[ J Y`[ `à m m e m f Z [ e `à Z m Z [ e `à m C[ Y őĖņ ņ YY[ ő_m _ _ Ző C ` Y őm Je[ e m Y e C_ e m ` [J Őė[[ ` č m_ à mJ ` à J C C à C ee Y [J _m [čà e mJ I| [ [ö ` ~#ć ė Cf Y Y Z àė[[ ©C© ZC [à mC LazyInitializationException C à C m Y`[ _m m em `ć *m ` ö `ć ]m Y[ e `ć ]m YYJJ f J Yfmf ć ė C J [C m Y`f [ _m à C J [[à mö ` m *màė [[ àY e m `ö J m m m ` YC[ m [ à e m _` B *m e C e ¢[ Y à B Z `m b ^+ņ _[[ f [[ [Jm_Jm | e m f Ymč B e Y m Y[ [ C ^C _m B e e[ Y YY Æ m bÇņ C[[à f [ e m[J YY[ ` m Y e m e[ Y ` e _m ee e[Z`[àņ ` Y `[JJ _ Y à ` B Y `[JJ _ Y B ee e ¢ m à ņ Z[ņ ` [ Ő mö e m e [J Z[ C`[ Æ m C Z ` m mÇ ` e m Y B [[_ f`[à e e[ Y `à m C [[_ Y e[à [à Y[ m C[ e Z C`[ņ B `à JJ ` e m Y ]öY J [f__ `_J YY[ [ m e[à _ m `_ [Y[ `_ `ņ m f _m eeņ e[à [ņ C #YY[ à C ö f CJ e _öY Jņ [[_J m _ m `_ C Æ_öY Ç J[ `_ ` YC [à [f__ Yf ņ ` [ [f__f[ö Y J[ __Ņ ~e å| *[[àņ m C à m ` e Y e ` Yf [à _m ö e fe eJ )^^ YY[ [Jmf _Jm mC YC å| f` Y[à Y `m e mJ _m m [à eJ`[ `_ ee Y[à e m àņ e à m ö [ _m m [à ` ZY C C \ f mJ [[ m ^ +o ` eJ `à Z Y m _à YC e m [C e Ae[àņ b [[ mC[à Y C` å| eJ e[ Z m f YC `à ^ +o _m e e [C J [C Z *m [ à [ m à b J ` [ m Ė å| B m e _m m [à `f [J å| Æm b CJ [Ç J J à Yņ `J Y[ C [ņ `à `[ e f Y[Z YY[ ņ J [ ee J J m f [[à ` à ee [ ö e C _` YY[ *meņ ©C© ZC YC e `[à e YY[ e e m e_ö Ő [à _ A *ùó m Y _m[ _m ņ Z J [[ Y e m à Y e m C_ Æm ~ b [ YJÇ Ő m [à à ^ņ _m _[[ [[à Y[à ^ Y J ^` *m Y ė Ye ] mö m [ e C ^^ J _ ö_ ė C JJ ` Ye ]m m m[ m Y e Æe ZY[ņ [ m b [e à [ e ó^* ĖÇņ eZ m # m m e _öJ _m m ¢~ ZY JY ö m eZ ö m _à ` ö m Z C e m *mė _` YY[ m CJ *| YJ *àė _` e_ö mö [[ *mà [ à J Y ee e f à C `B # m mà [C à mJJ # [à Y[ _` YY[ f e_ö m[ Y`[ [ö Y ņ àņ à m àņ Jņ àņ [ņ JJņ ~b m Jņ _öe[_ņ _öZ Jņ _`C ņ mJ à m m e e ņ àė[[ ` č m_ à Y`[ ` Y[ J ~# `+ e Y ņ m ^ * C Ēč e [Jm_Jm à m àņ B~| e _öe[_ņ I[ e ` [ņ |[_ |[ e [ņ ` m e e[[ Z mņ | e JJ ¢ m e YJ eJ mJ [à CC [f ` à e_ö C ## I[ *mė C b J [` e J ~bņ JJ [ņ m _öZ Y à ` [[ àf m[à ]` C ņ à m[à e [f C Y óJ[ ]` *[ö ņ e ņ [à e b ó _Ņ _ö à C ^^ YY[ Cņ C _ö * e à Cf YY ^ +oņ JŅ e ėņ Y`[ņ à ė `[f J _m ~# `+ e Y ņ à Y[à ^` * ņ J e[[ YY e ^ +o m m ` e ņ b ^+ m Y[ _à _ Y[Z _` YY[ C Ő _ė `[C m_ [[ ĖŅ ©C© ZC !"# $%&#'()* Œ&%n # Q)o sĕœK<ñòŔ&}¯2ŕ1Ŗ´ŗ Ŗn &;ČŔĕœK<¯2n pŘ@DGřôñò2°¬Ŕ&}¯Ŗ´ŗ Ś &@DGnśŜ&ŝ%޳ñò2°Ŗ´ŗ ş ]` nMµ¬°-NM4n examples/registration/view µûŖ´ŗ ş TUVWXĝNMR-GvŠ&Ú-n µûŖ´ŗ ş C Ú-;<n examples/registration/src µûŖ´ŗ ş # l<-Gn examples/registration/build.xml µûŖ´ŗ examples/registration/resources + ,-.$%&#./0 š0n$ANT_HOME } $JAVA_HOME sŢ¯ţcdñòn # sŢ¯ţM-ñòŒ}Ťť¯2ţŦñ°ŗ ŧn M-¯O¶ĕµ¬ build.properties OáM # Q)o &K345cd¯2ţŦñ°ŗ ŖŦ./¯2°vŨòũn &@DGº» bin/run.sh Ŕ¯ţnbin/run.bat }NM¯2 345./¯2ţŦñ°ŗ ŧn examples/registration @DGº» }Ūū¯2&l<ë«ìKM(2ţŦñ°ŗ ant deploy Hœ8º»n http://localhost:8080/seam-registration/ ŬmY6½½[ [m6hoho½fJ½ŭ GE-¯2ţŦñ°ŗ 1 ,-.$%&#/0 š0n$ANT_HOME } $JAVA_HOME sŢ¯ţcdñòn # sŢ¯ţM-ñòŒ}Ťť¯2ţŦñ°ŗ ŧn M-¯O¶ĕµ¬ build.properties OáM * ao &K345cd¯2ţŦñ°ŗ* ao ×ØÙØ M-´¬1 )\\ņ ů[[J ^` Ű&M-HG45ű2ţŦñ°ŗ ×ØÙØ * ë°2345s/p´¬1Ųų%´ Æ×ØÙØ £ĿŴ * % Į£´¬Œ}Ŕtu%´ŵŗ ŧnexamples/registration @DGº» }Ūū¯2&l<ë«ìKM(°Ŗ´ŗ ant tomcat.deploy šŶn* ./¯2ţŦñ°ŗ ©C© Hœ8º»n http://localhost:8080/jboss-seam-registration/ ŬmY6½½[ [m6hoho½B`ffJ½ŭ GE-¯Ŗ´ŗ * KM¯ŷĆn ^+ ;RSn ;,ê ÆŸŹv-N<K ^ ;,êʼnŇÇ qĥ%p/¯Ŗ´ŗ 2 $%&#.34 ×ØÙØ ^+ 56 ź}ŻŠ& *ùó ńĆ,--Mż¯2°Ŗ´ŗ wŽžſv,-'(n examples/registration @DGº»n ant testexample }¯2./ñĿ¬Œ}%´ŗ Ŗnë°& ^ º» *ùó HMĮ£¯2,-'(´¬Œ}Ŕtu%´ŗ 1 789. "&!:;<%= >?@A$%&# 789:nN¹-®±78&78Òn 'Òn â-ð<N¹-ƀ¸%Þ¬žſv345%´ŗ Œ& &ƁƂvķu&Ź2ƃĿ¬Œ}%ÞŖĿŻsn b G45-ê}¯2 ^+ EF45 £´¬ēĔĝn Ĝv &cdēĔƃĿ2ţòŖ´ŗ ^ +o ŖŦƄƅòvēŔ°»¯Ɔ¬ºŔ¯òŖĿŻ&%n Ƈţûŕ12°ÞŖ´ŗ š0& + Ö&ŪūO@<ÕÖĜvO¶Ěz¯Ŗ´ŗ ¯nƈƉŪū¯2O¶ĴF¯2ţŦñ°ŗ Œò%78ĊPGN¹-ƀ¸ñòŖ´ŗ 1 BC.DE Œ&n) ©C© Ö& ~ n Ö&?,@,@ }n ) Ö&-,D-EF45 %'Ɗñò2°Ŗ´ŗ Ĝº»ª1¬1n;<ƃ2ØŖ¯Ƌ"ŗ 1 F%3G3G = User.java 78N}¯2 ^ ?,@,@ sŲ%´ŗ Œ&GH-%n ï,45«2 ijĬ } Nƌ Ĭ¥ƍ ƎƏdÓ¯2°Ŗ´ŗ ;RS}¯2&GH-dÓ´¬1nƐ°ţÖº&ï,45ŔŲ%´ŗ ^ZY[ @Entity @Name("user") @Scope(SESSION) @Table(name="users") public class User implements Serializable { private static final long serialVersionUID = 1881413500711441951L; private String username; private String password; private String name; (1) (2) (3) (4) (5) public User(String name, String password, String username) { this.name = name; this.password = password; this.username = username; } ©C© + public User() {} (6) @NotNull @Length(min=5, max=15) public String getPassword() { return password; } (7) public void setPassword(String password) { this.password = password; } @NotNull public String getName() { return name; } public void setName(String name) { this.name = name; } @Id @NotNull @Length(min=5, max=15) public String getUsername() { return username; } (8) public void setUsername(String username) { this.username = username; } } (1) (2) (3) (4) (5) (6) (7) ^+ Ƒƒ @Entity ï,45n User GH-s?,@,@ %µ¬Œ}z¯2°Ŗ´ŗ ;RSn @Name ï,45%Ɠdñò¬ ;RSÒ sŲ%´ŗ Œ&Ò 345ŀ%7ŎG%µ¬ŲsµûŖ´ŗ b s ;RSÒ}Í;,Ã-È&>Ɣƕ1¬În ;,Ã-Ès!&}ÞƖdÓ Æ[[Ç %µòũn M-N-²³¯2º»®¯°M-N-;,Ã-ÈM<¯Ŗ´ŗ Œ&%n b s012 user }°"È}ƗƘ"}Þn User M-N-ä¯Ŗ´ŗ sM-N-²³´¬În ŲŴ;RS& O¶;,Ã- µ¬;,Ã-È®¯°M-N-M<¯Ŗ´ŗ O¶;,Ã- @Scope ï,45£¯2dÓñòŖ´ŗ User EF45-;&;RS%´ŗ ^ Ƒƒ @Table ï,45n User GH-s users ,¤FČñò¬Œ}z¯2°Ŗ´ŗ namenpasswordnusername n ?,@,@ &ijƙĬ%´ŗ ´ƚ2&ijƙĬGE-ÂÚF<sdÓñò2°Ŗ´ŗ D-R-&DĕOPƛë«ìÅƜ&ĸ®OPƛ% b «ûŒ&;RSs£ñò¬}ÞŲ}vûŖ´ŗ æ;-HGNn^ } &Ɲē&ƞƟº»Ų}vûŖ´ŗ @NotNull } @Length ï,45n ` [ ODðG&wĥ%´ŗ ` [ ńĆ¯2°¬1n ©C© Q (8) N&ƌ Ĭ¥ƍŒò£´¬Œ}s%ÞŖ´ £¯2°v°ŷĆ%Ŕ£tu%´Çŗ ^ Ƒƒ @Id ï,45n &ƠÃƙĬ%µ¬Œ}z¯2°Ŗ´ŗ ÆijĬ ` ?,@,@ Œ&%nŔ}ŔơƉ¯2ź¯°ƢvŔ& @Name } @Scope ï,45%´ŗ Œ&ï,45n Œ&GH-s ;RS%µ¬Œ}±d¯2°Ŗ´ŗ śŜ%n User GH-&Kâ,@ ƣƤ b ;RSM<ñòn ÅƜ&ÈĸOPƛ% b «2ƥŪñò¬Œ}sľºûŖ´ŗ ~ }?,@,@ <ÂMÅç(ÞƦ´¬N&;ČƧƨv;<ŲµûŖĿŻŗ ¯º¯n ?,@,@ H8G45=ĝN¹-GE-(ľv°Ŵv&%n b &G45-ê}¯2£%ÞŖĿŻŗ Œ&1n sŲ}vûŖ´ŗ 11 43 Œ&;RS EF45 H4IJ;<% KL4= RegisterAction.java ź}ŻŠ& 345nEF45 G45-ê}¯2£¯Ŗ´ŗ ÆƩØż2 C "Œ}ŔtuÇ b 345q& b G45ŢŤ Ö&Ø%n ŒòEF45 ÂÚF<s ÖG¯2°Ŗ´ŗ Œ&%n G45ŋŌ´¬ƪƫ´ƚ2 User «2ƀÕñò¬1n -,D-EF45 £¯2°Ŗ´ŗ &ŀ%n ơƬ´ƚÞ;<śŜ&Ø%´ŗ ^ZY[ ) @Stateless @Name("register") public class RegisterAction implements Register { (1) @In private User user; (2) @PersistenceContext private EntityManager em; (3) @Logger private Log log; (4) public String register() { List existing = em.createQuery( "select username from User where username=#{user.username}") .getResultList(); (5) if (existing.size()==0) { em.persist(user); log.info("Registered new user #{user.username}"); return "/registered.xhtml"; } else ©C© (6) (7) (8) \ { FacesMessages.instance().add("User #{user.username} already exists"); (9) return null; } } } (1) (2) (3) (4) (5) (6) (7) (8) (9) ^ Ƒƒ @Stateless ï,45n Œ&GH--,D-EF45 }¯2¤G¯2°Ŗ´ŗ @In ï,45n «2MPGñò¬ &ƙĬ}¯2¤G¯2°Ŗ´ŗ ŒŒ%nŒ&ƙĬnuser ÆM-N-ÈÒÇ }°"Ò&;,Ã-Ⱥ»MPGñòŖ´ŗ ^ Ƒƒ @PersistenceContext ï,45n ^+ ?,@,@ ^à |J MPG´¬1£ñòŖ´ŗ @Logger ï,45n ;RS& Log M-N-MPG´¬1£ñòŖ´ŗ G45-êÂÚF<nN¹-}ĝûIJû´¬1n Ƒƒ ^+ EntityManager #~ £¯nb §¨ Æ Ç ĺ¯Ŗ´ŗ ŒòEF45 v&%n register() ÂÚF<sƭũò}Þn H8G45¼/ôªñònĄą¯}Þ;ĴFñò¬Œ}ƮƬ¯2ţŦñ °ŗ % ^fĒ q% b ^ ¿s£tu%µ¬Œ}ƮƬ¯2ţŦñ°ŗ FGHœ<%(ľò¬1ƃýŖĿŻsn Œò«ûƯĻ& ~# setParameter() sƑƒ ~# Query ĊPGƭìƗ´Œ}vûŖ´ŗ ưĮ%¯Ƌ"ć Log #~ n,DäñòKÂFErƱĚztu%´ŗ b G45-êÂÚF<nŧŠ&Ěz´¬ºƔd´¬-Ɯ&§¨ Æ Ç ĺ¯Ŗ´ŗ [[ §¨ Æ Ç Æµ¬°nC G45-êÂÚF<Ç n &ƲĚz¯Ŗ´ŗ ƯĻ& b %n §¨ Æ Ç º» b C_ Ɣd´¬1n ļ b êl45±Ƴ £´¬Œ}sƯĻ%´ŗ Ôƴv345}2nŒ&çƤƵƶn'£vƷ°ƅ(%´ŗ ¯º¯nŒ&«"v}2Ŕžſv&1n n§¨ Æ Ç }¯2 b C_ &£tu}¯n êl45±Ƴ&ŲĬIJûƸÞŖ¯ŗ §¨ Æ Ç }¯2 C_ £´¬ŷĆn nļHœ8ĕMDG("Œ}ƮƬ¯2ţŦñ°ŗ nƹĻ&ƺƻ>ƔƼƽ´¬1ƾţ& ×ØÙØ;RSƿǀ¯2°Ŗ´ŗ FacesMessages ;RSn ,Däñò?Hĝ³øÂFErƱĚztu%´ŗ ×ØÙØ ;RSn MPG45µ¬°ninstance() ÂÚF<ƭìƗ¯«2IJǁtu%´ŗ ŒŒ%n@Scope ǂzƓd¯2°v°Œ}ƮƬ¯2ţŦñ°ŗ Ś ;RSNMnǂz-;sƓdñòv°ŷĆn O¶&-;sǃ£ñòŖ´ŗ -,D-EF45 &O¶-;n-,D-;,Ã-%´ŗ 'ęn´ƚ2&-,D-EF45 n -,D-;,Ã-ƙ¯Ŗ´ŗ Œ&EF45 &G45-ênŒ&ďñv345&1n lS-KFG}ijKFGƿǀ¯2°Ŗ´ŗ ñ»Ôƴv345%n ;<DŽDžä¯ijKFGsdžLJ&NGE-;RS}v¬«"OáGN ©C© a ´¬Ųsµ¬ºŔ¯òŖĿŻŗ Œò´¬&žſ%´sn n345&DŽDžä&1ĞğvēĔLj¯2°v°Œ}ƮƬ¯2ţŦñ°ŗ ñ»nŒ&EF45 ]^ G?- Æèýũn User ĊPGq&O¶&ƜÇ ŋŌ´¬;,Ã-GE-´¬}ÍÎn H8G45ÚÆEntityManager ĊPGÇ %ƀÕñò¬ƪƫŔGE-´¬Œ}ơƉ¯2ţŦñ°ŗ űƦ& )^^ Ã,Gĭº»&ÁljNJvûŖ´ŗ Njûĺ¯Ŗ´sn űƦ& )^^ &DŽDžä&ēs°ƱŨòũn !nj»&ē 345'Ɗ´¬Œ}Ŕ%ÞŖ´ŗ Ŧ¯n ƾţ&345}2µŖûǍǎnjŖĿŻŗ 12 IJ;<% MN#O%PQR4 = Register.java ǏnEF45 nKLMNOP-sŲ%´ŗ ^ZY[ + @Local public interface Register { public String register(); } C;<ś$%´ŗj°2TUVWX%´ŗ 1S B%TU% VWXYZ = components.xml ·ƾţ& C ODðG£¯ǐǑsµ¬ēv»n KPGs³ǒ´¬ÖòǓǔǕÞţvû=¯ǖţv¬ å| OáM;RSGH-´ƚ2ƎƏ´¬Œ}Ŕ!&"njƅò2°ţŒ}%¯Ƌ"ŗ %345;RS å| ÝǗ´¬Ųsv°Œ}ǘ»n Þ}ź}´¬Œ}%¯Ƌ"ŗ ǕĥÁ& 345nźŻ&Ǚ¯& å| ¯ºŲ}¯ŖĿŻŗ Ŗn Œ& å| KPGsǕÞţv2°2Ŕn µŖûǕÞţvûŖĿŻŗ !òŔººľ»Ŵnµ¬ ;RS& µ¬ éĥcd&±dstu%µ¬Œ}n ƾţ&ŷĆní£%´ŗ ÆĞn ×ØÙŖò;RSÇ ŒŒ%n) Ö&ǚǛsµûŖ´ŗ ¯º¯nšŔǜǝĬ&µ¬ǚǛn WEB-INF @DGÌǞ´¬ components.xml }ƭũò¬OáMcd±d´¬Œ}%´ŗ nù % ^ ;RS&ƃÖŨēƓz´¬1ncomponents.xml OáM£¯Ŗ´ŗ ^ZY[ Q <?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2 ©C© g <core:init jndi-pattern="@jndiPattern@"/> </components> Œ&;<norg.jboss.seam.core.init }°"Ò& ;RS& }°"Ò&Kâ,@cd¯Ŗ´ŗ # -Gs345KM´¬}ÞŢ¯ţ ù TǞ´¬1nǟǠv @ 4ÿsµûŖ´ŗ jndiPattern `[ Y 1[ \] VWXYZ = web.xml Œ&ďñv345&Dǡ,45Dž]#IKMñòŖ´ŗ TUVWXsŲ%´ŗ ű2n]^ ^ZY[ \ <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <!-- Seam --> <listener> <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> </listener> <!-- JSF --> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.seam</url-pattern> </servlet-mapping> <session-config> <session-timeout>10</session-timeout> </session-config> </web-app> Œ& web.xml OáMn } 345%°ÖŔÍ%´ŗ ©C© b cd¯Ŗ´ŗ ŒŒ%ƃ¬cdn h 1^ _ `a = faces-config.xml ź}ŻŠ& 345Dǡ,45Dž}¯2 b l£¯Ŗ´ŗű2nĻļ faces-config.xml sŲ%´ŗ Œ&ŷĆnldÓ b [ £¯Ŗ´&%nb ,D?}¯2 b [ £´¬Œ}Ɠd´¬ŲsµûŖ´ŗ ^ZY[ a <?xml version="1.0" encoding="UTF-8"?> <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ <!-- Facelets support --> <application> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> </faces-config> b ¤S< ƎƏsƄ%µ¬Œ}ƮƬ¯2ţŦñ°ŗ ¤S< ;RS}¯2ï,45sÝŨ»ò2°Ŗ´ŗ 345%n facesconfig.xml ƯĻ& b }Ǣƚ2µŖû£ñòŖĿŻŗ 'ęnĜvVWX&cdŦŨ(ýũn Ŧ ©C© k %´ÆÖŖûnêl45ŖB~|lS-dÓÇŗ % KE-OK } cdNŦŨs å| }¯2µ¬ƚÞŔ&%µ¬}°"ƃē¯Ŗ´ŗ Œ&žſv%n C_ êl45±ƳñýƄ%´ŗ G45;<Ǧ1ÙŻŦ1n 1b ] VWXYZ = ejb-jar.xml OáMn LMŀ&´ƚ2&EF45 ÝǤ´¬Œ}«2 ^+ }ńĆ¯Ŗ´ŗ ejb-jar.xml SeamInterceptor <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0"> <interceptors> <interceptor> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor> </interceptors> <assembly-descriptor> <interceptor-binding> <ejb-name>*</ejb-name> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor-binding> </assembly-descriptor> </ejb-jar> 1c ] deVWXYZ = persistence.xml OáMn^ ijKMĕn NÚ-&ŷǧƓz¯Ŗ´ŗŖn¹ĕĞí&cdġŻ%°Ŗ´ŗ Œ&%./μ/-ä?Ã-Rtu}¯2°Ŗ´ŗ persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="userDatabase"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/DefaultDS</jta-data-source> <properties> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> </properties> </persistence-unit> </persistence> 1f g = register.xhtmlhregistered.xhtml 345&ln R´¬ƾţ&Ǩǩ£¯2'Ɗñò2°Ŗ´ŗ «ûÉò2°¬}Ǫý2°¬ b [ £¯2°Ŗ´ŗ ©C© b Œ&%n~ o ^ZY[ g <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <head> <title>Register New User</title> </head> <body> <f:view> <h:form> <s:validateAll> <h:panelGrid columns="2"> Username: <h:inputText value="#{user.username}" required="true"/> Real Name: <h:inputText value="#{user.name}" required="true"/> Password: <h:inputSecret value="#{user.password}" required="true"/> </h:panelGrid> </s:validateAll> <h:messages/> <h:commandButton value="Register" action="#{register.register}"/> </h:form> </f:view> </body> </html> ŒŒ% ǫí}v¬& <s:validateAll> N&Ø%´ŗ Œ& b ;RS b ġŖò¬´ƚ2&ŪūO@<?,@,@ Ɠdñò ` [ ï,45«û¥ƍ´¬«"Ɠz¯2°Ŗ´ŗ ^ZY[ h <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"> <head> <title>Successfully Registered New User</title> </head> <body> <f:view> Welcome, #{user.name}, you are successfully registered as #{user.username}. </f:view> </body> </html> Œòn×ØÙØ ^ ¿£¯Ǭ&ÈǭŔv°Ǯ¿& ǯĞ&Ŕ&µûŖĿŻŗ b [ %´ŗ 1i ]+j VWXYZ = application.xml ©C© šŶn^#I}¯2 345sKMñò¬1nTUVWXŔŲvûŖ´ŗ ^ZY[ k <?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"> <display-name>Seam Registration</display-name> <module> <web> <web-uri>jboss-seam-registration.war</web-uri> <context-root>/seam-registration</context-root> </web> </module> <module> <ejb>jboss-seam-registration.jar</ejb> </module> <module> <ejb>jboss-seam.jar</ejb> </module> <module> <java>jboss-el.jar</java> </module> </application> Œ&TUVWX?NHMƛLM&Å}G¯n ]^345;,Ã- /seam-registration M<¯Ŗ´ŗ ?NHMƛ345ŀ&´ƚ2&OáMƃĄľûŖ¯ŗ 11 6klm O¶sĴFñò}Þn b n user }°"Ò&È>Ɣ´¬«"ƕ¯Ŗ´ŗ !&ÒM<ñòƜs¸ǰ¯v°1 ÆŠ& ;,Ã-ŔÇn nuser ;RSM-N-ä¯n !ò EF45;,Ã-ƀ¯Ŷn User ?,@,@ M-N- b ĺ¯Ŗ´ŗ O¶&ŪūƜn User ?,@,@%Ɠdñò ` [ Ă¯2NŃĆĬ¥ƍs(ľò¬«"vûŖ´ŗ ĂDZDz¯2°¬ŷĆnb !&ƲĚz¯Ŗ´ŗ!"%vŨòũn O¶&ŪūƜ User ?,@,@ &Kâ,@M<¯Ŗ´ŗ ŧnb ÈÒ register &>Ɣƕ¯Ŗ´ŗ n-,D-;,Ã-ŀ& RegisterAction -,D-EF45 ƃÖŨn !òĺ¯Ŗ´ŗ b nregister() G45-êÂÚF<ƭìƗ¯Ŗ´ŗ Œ&ƭìƗ¯j(´¬n ÂÚF<;MNE¯n EF45;,Ã-º» User ?,@,@MPG¯Ŗ´ŗ ©C© ) ÂÚF<Ūūñò78Òs·¸ǰ´¬ºŠ"ºłƚŖ´ŗ ¸ǰ¯ŷĆn ?HÂFE FacesMessages ;RS%ÃMñòn [[ §¨ Æ Ç sĺñò2sƲĚzñò¬Œ}vûŖ´ŗ FacesMessages ;RSÂFEĠdz×ØÙŖò b ¿ǴŸ¯n C_ b FacesMessage ǣǤ¯Ŗ´ŗ register() !&78Ò&78s¸ǰ¯v°ŷĆn "/registered.xhtml" §¨ Æ Ç «û registered.xhtml ǵ&Hœ8ĕMDGsǶ²¯Ŗ´ŗ b s&DĕǷǸ´¬}n user }°"Ò&È&>Ɣƕ¯n &EF45-;º»ĺñò¬ User ?,@,@&Kâ,@Ɯ£¯Ŗ´ŗ 2 -K!JKnopqrs= tuv$%&# N¹-&¥¦§¨GFGstuvwx´¬Œ}n °Ŵò&ĊHM345ë°2Ŕ°ǵŻƢvĥÁ}vûŖ´ŗ b Ǥýñ»Ğğvķuƿǀ´¬Œ}%n ^fĒ Ŗ Ē N&G?rƱ¯n b <h:dataTable> GFGtuvwx}¯2&Ěz'ǹ¯Ŗ´ŗ Œ&yz{n Œ&ķu'Ǻ¯2°Ŗ´ŗ ©C© + 2 BC.DE Œ&yz{n Ö&?,@,@ %µ¬ Messagen Ö&EF45 %µ¬ MessageListBeann !¯2 Ö& ~ º»Ş³ñò2°Ŗ´ŗ 2 F%3G3G = Message.java ?,@,@ n NMn,Ã-nyzÂFE&ĵÝ}Îçn !¯2nÂFEs·ıºǻºz´OHdÓ¯2°Ŗ´ŗ Message ^ZY[ o @Entity @Name("message") @Scope(EVENT) public class Message implements Serializable { private Long id; private String title; private String text; private boolean read; private Date datetime; @Id @GeneratedValue public Long getId() { return id; } public void setId(Long id) { this.id = id; } @NotNull @Length(max=100) public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @NotNull @Lob public String getText() { return text; } public void setText(String text) { this.text = text; } @NotNull public boolean isRead() { return read; } public void setRead(boolean read) { this.read = read; } @NotNull @Basic @Temporal(TemporalType.TIMESTAMP) public Date getDatetime() { return datetime; } public void setDatetime(Date datetime) { this.datetime = datetime; } } ©C© Q 21 43 Q#IJ;<% = MessageManagerBean.java W&ÍƟn Ö&EF45 MessageManagerBean sµûŖ´ŗ !ònO¶µ¬ ) Ö&ÿNż´¬G45-êÂÚF<dÓ¯2°Ŗ´ŗ ÿN& Önwxº»ÂFEǚǛ¯n Ŕ" Ö&ÿNnÂFEǼƸ¯Ŗ´ŗ Œ&NJë°2nW&}ǕÞvDZ°µûŖĿŻŗ ¯º¯n 012yz{ǽƧĀā´¬}Þn MessageManagerBean nÂFEwx&IJǁŔ(°Ŗ´ŗ 78sǽƧĀāñĿ¬ēĔñŖǾŖµûŖ´sn Œò»&´ƚ2s b G45«2ŕ1»ò¬ľŨ%µûŖĿŻ ő èýũn 78s!&FG¤G¯2°¬ºŔ¯òŖĿŻŗ ű2nÂFEwxIJǁ´¬pŘn G45-êÂÚF<&Ĥľûn e f à m %(ľòŖ´ŗ ÂFE&wxG?-Ŗs2ÂÅÃĭF4¯°&%n -,OEF45 %Œò(°Ŗ´ŗ ^ZY[ @Stateful @Scope(SESSION) @Name("messageManager") public class MessageManagerBean implements Serializable, MessageManager { @DataModel private List<Message> messageList; (1) @DataModelSelection @Out(required=false) private Message message; (2) (3) @PersistenceContext(type=EXTENDED) private EntityManager em; (4) @Factory("messageList") (5) public void findMessages() { messageList = em.createQuery("from Message msg order by msg.datetime desc") .getResultList(); } public void select() { message.setRead(true); } (6) public void delete() { messageList.remove(message); em.remove(message); message=null; } (7) @Remove public void destroy() {} (8) } ©C© \ (1) (2) (3) (4) (5) (6) (7) (8) ï,45n java.util.List NM&ƙĬn javax.faces.model.DataModel M-N-}¯2 b ǿô¯Ŗ´ŗ ŒònŚ(¯2GFGtuvGÕÖ b <h:dataTable> ŀ&wx£tu}¯Ŗ´ŗ Œ&%n DataModel n messageList }°"Ò&EF45;,Ã-ŀ%Į£tuvûŖ´ŗ @DataModelSelection ï,45n GFGñòG}ŋŌ¯ List ȀMPG´¬«"Ɠz¯2°Ŗ´ŗ @Outï,45nŧǚǛñòƜƣƤǿô¯Ŗ´ŗ ű2nGFGtuwx&(sǚǛñò¬ìn Message n-,O &ƙĬMPG45ñòn j°2 message }°"Ò&M¹;,Ã-ÈœPG45ñòŖ´ŗ Œ&-,O n^+ ȁȂij;,Ã- Õ2°Ŗ´ŗ Œ& s¸ǰ´¬ȃûn G?¥¦ñò J n=ñòƪƫƀÕñòŖ´ŗ ű2n !òjţ-,O ǵ&ÂÚF<ƭìƗ¯n ǂz EntityManager ƭìƗ´Œ}vţn !ò»&ĸ®stu%´ŗ 012 ~ ǽƧĀā´¬}Þn messageList ;,Ã-ÈŀƜÕ2°ŖĿŻŗ @Factory ï,45n MessageManagerBean M-N-&²³Ɠz¯n 0ĈƜcd´¬1 findMessages() ÂÚF<ƭìƗ¯Ŗ´ŗ findMessages() messages & OáGÂÚF<}ƭìŖ´ŗ select() G45-êÂÚF<n ǚǛñò Message ·ı ¤GÝŨn N¹-ŀ&!òĸ®¯Ŗ´ŗ delete() G45-êÂÚF<n ǚǛñò Message N¹-º»ǼƸ¯Ŗ´ŗ ´ƚ2&-,OEF45 & ;RSn @Remove }¤GñòÂÚF<ÕÖŒ}s Ųų %´ŗ Œò«ûn ;,Ã-sĄľûnM<&µ»Ƈ¬ƪƫGF´¬}Þn nŤ'-,O &ǼƸ(°Ŗ´ŗ @DataModel ŒòsEF45-;& ;RS%µ¬Œ}ƮƬ¯2ţŦñ°ŗ 78KMEF45}ŋŌ¯KMEF45º»&´ƚ2&G?-n Í;RS&M-N-ƹí¯Ŗ´ŗ Æ 345%nEF45-;&;RSȄý1£¯2ţŦñ°ŗÇ 22 IJ;<% MN#O%PQR4 = MessageManager.java ŔnjȅŻn´ƚ2&EF45 MNOP-ÕnjŖ´ŗ @Local public interface MessageManager { public void findMessages(); public void select(); public void delete(); public void destroy(); } ŒŒº»n;<ŀ&KLMNOP-&yȆȇȈ¯Ŗ´ŗ components.xmlnpersistence.xmln !¯2 application.xml nWŖ%&}źȉÍv&%n-ÃF¯2 ~ ŕØŖ¯Ƌ"ŗ ©C© web.xmlnejb-jar.xmlnfaces-config.xmln a 2S g= messages.jsp Œ&~ b <h:dataTable> }¯2ĞƐvŔ&µûŖĿŻŗ ;RS£¯žſvŔ&%´ŗ ^ZY[ ) <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <html> <head> <title>Messages</title> </head> <body> <f:view> <h:form> <h2>Message List</h2> <h:outputText value="No messages to display" rendered="#{messageList.rowCount==0}"/> <h:dataTable var="msg" value="#{messageList}" rendered="#{messageList.rowCount>0}"> <h:column> <f:facet name="header"> <h:outputText value="Read"/> </f:facet> <h:selectBooleanCheckbox value="#{msg.read}" disabled="true"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Title"/> </f:facet> <h:commandLink value="#{msg.title}" action="#{messageManager.select}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Date/Time"/> </f:facet> <h:outputText value="#{msg.datetime}"> <f:convertDateTime type="both" dateStyle="medium" timeStyle="short"/> </h:outputText> </h:column> <h:column> <h:commandButton value="Delete" action="#{messageManager.delete}"/> </h:column> </h:dataTable> <h3><h:outputText value="#{message.title}"/></h3> <div><h:outputText value="#{message.text}"/></div> </h:form> </f:view> </body> </html> 21 6klm š0n messages.jsp ǽƧĀāñĿ¬}Þn b R-FG Æe G?-Ç %Ŕn Hœ8º»&ƣƤv ó^* G?- Æfe G?-Ç %Ŕn nmessageList ;,Ã-È>Ɣ¯«"} ØŖ´ŗ Œ&;,Ã-Èn0Ĉäñò2°v°1n nOáGÂÚF< findMessages()ƭìƗ¯Ŗ´ŗ !ònN¹-G?Ƕ(ĝn œPG ÆB Ç ñò DataModel &§¨IJǁ(°Ŗ´ŗ Œ& DataModel n <h:dataTable> ©C© g Dĕ´¬1Ųv(Nƿǀ¯Ŗ´ŗ 78s <h:commandLink> GFG´¬}n b select() G45-êƭìƗ¯Ŗ´ŗ Œ&ƭìƗ¯MNE¯2ǚǛñò(N messageManager ;RS& message ƙĬMPG¯Ŗ´ŗ G45-ês'(ñò2n ǚǛ Message ·ı¤GÝŨŖ´ŗ ƭìƗ¯&Ąľûn nǚǛ Message message }°"Ò&;,Ã-ÈœPG¯Ŗ´ŗ ŧn ^ ;,êH8G45;ĴF¯n Message ´¬ÈĸsN¹-OHF4ñòŖ´ŗ šŶn Œ&sƲƂDĕñò2ÂFEwxƲĚzn !&ŜǚǛÂFEsĚzñòŖ´ŗ 78s <h:commandButton> GFG´¬}n b ndelete() G45-êƭìƗ¯Ŗ´ŗ Œ&ƭìƗ¯MNE¯n ǚǛñò(N messageList ;RS& message ƙĬMPG¯Ŗ´ŗ G45-ês./¯n ǚǛ Message swxº»ǼƸñòn EntityManager & remove() sƭìƗñòŖ´ŗ ƭìƗ¯&Ąľûn messageList ;,Ã-Èĸ®¯n message }°"Ò&;,Ã-ÈȊȋ¯Ŗ´ŗ ^ ; ,êH8G45;ĴF¯n N¹-º» Message ǼƸ¯Ŗ´ŗ šŶn Œ&sƲƂDĕñòn ÂFEwxƲĚz¯Ŗ´ŗ S w xyz = {|}{ rs$%&# B~| nðGOKĝN-G=&Éòķuƿǀ¯Ŗ´ŗ Š&«" B~| s }ńĆñò2°¬ºǘ¬1n žſv *f wx345ëƃĿ¯Ŗ¯Ƌ"ŗ N-G&wx=´¬Œ}nB~| &ŀȌvķu%µ¬1n Œ& C ;<sź}ŻŠµûŖĿŻŗ ©C© h S BC.DE Œ&&ŀȌnB~| &KE-dÓ%´ŗ ) Ö& ~ } ) Ö&njƋ}¯ C ŔµûŖ´ŗ ÆN¹-GE-ĝH8G45ĞĬsv°&%n EF45 £´¬=ȍµûŖĿŻŗÇ !ò%KE-dÓº»ª1Ŗ¯Ƌ"ŗ ^ZY[ + <process-definition name="todo"> <start-state name="start"> <transition to="todo"/> </start-state> (1) <task-node name="todo"> <task name="todo" description="#{todoList.description}"> <assignment actor-id="#{actor.id}"/> </task> <transition to="done"/> </task-node> (2) (3) (4) <end-state name="done"/> (5) </process-definition> (1) (2) (3) ï<KE-&Ȏ=vôªĚ¯Ŗ´ŗ KE-sôª´¬}n ƣnj todo ï<Āā¯Ŗ´ŗ <task-node> ï< ȏnjƪƫ Ě¯Ŗ´ŗ lS-KE-&'(swÎȐŁñòn ÖŖÔ&N-Gs(ľò¬&ȏķ¯Ŗ´ŗ <task> Ȁn78«2'(ñò¬N-GdÓ¯Ŗ´ŗ Œ&ï< <start-state> ©C© k (4) (5) Ö&N-G¯ºdÓñò2°v°&%n !òsŸą´¬}'(sƲôñòn ĄąƪƫĀā¯2°ÞŖ´ŗ Œ&N-Gn todoList }°"Ò& ;RS ÆC & wȑÇ º» Y IJǁ¯Ŗ´ŗ N-Gs²³ñò}ÞnN-G78µ¬°78ĉû 2¬Ųsµû Ŗ´ŗ Œ&%nN-Gnǹǰ&78ĉû 2»ò2°Ŗ´ŗ !ònactor }°"Ò&×ØÙØ ;RSº»IJǁ¯Ŗ´ŗ Š&«"v ;RSŔN-Gĉû 2'(´¬1£ñò¬tuĬsµûŖ´ŗ <end-state>ï<nlS-KE-&Ȏ=vĄądÓ¯Ŗ´ŗ '(sŒ&ï<ǷǸ¯}Þn KE-M-N-ȒȓñòŖ´ŗ ^ ƿǀñòKE-dÓ?@N£¯2KE-dÓƃŷĆn śŜ&«"vûŖ´ŗ Œ&<ÃÂnï<&HO}¯2 lS-KEdÓ¯Ŗ´ŗ Œòññ°vǹ'µûǁ¬lS-KE-%´ŗ '(ñòvŨòũv»v° N-G n ÖŦŨ%´ŗ N-GsŸą¯}Þ lS-KE-Ąą¯Ŗ´ŗ š0& C KMǽƧ login.jsp Ð=¯Ŗ´ŗ ;RS£¯2 B~| Æ'ę&345%n 78ťƍŔŲ%´ŗÇ Ð=pŘn ſ actor 0Ĉä´¬ŦŨ%´ŗ ^ZY[ Q @Name("login") public class Login { @In private Actor actor; private String user; ©C© )o public String getUser() { return user; } public void setUser(String user) { this.user = user; } public String login() { actor.setId(user); return "/todo.jsp"; } } ŒŒ%n×ØÙØ Actor £¯2°¬&sľºûŖ´ŗ ;RSMPG´¬1n @In ŧ& ~ ¼ȔƢ%µûŖĿŻŗ ^ZY[ \ <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <html> <head> <title>Login</title> </head> <body> <h1>Login</h1> <f:view> <h:form> <div> <h:inputText value="#{login.user}"/> <h:commandButton value="Login" action="#{login.login}"/> </div> </h:form> </f:view> </body> </html> ) Ö1& C nlS-KE-M-N-&ôª}N-G&Ąąȕ ¯Ŗ´ŗ ^ZY[ a @Name("todoList") public class TodoList { private String description; public String getDescription() { return description; } (1) public void setDescription(String description) { this.description = description; } @CreateProcess(definition="todo") ©C© (2) ) public void createTodo() {} @StartTask @EndTask public void done() {} (3) } (1) (2) (3) Y Kâ,@n~ º»78ŪūĦŨIJûn N-Gqrscdñò¬«"n!òKE-dÓǿô¯Ŗ´ŗ @CreateProcess ï,45nÒÝÞKE-dÓ&1 B~| KE-M-N-²³¯Ŗ´ŗ @StartTask ï,45nN-G$%pŘôª¯Ŗ´ŗ @EndTask nN-GĄą¯nlS-KE-&Ʋôtu¯Ŗ´ŗ ǹ'v%n @StartTask } @EndTask sÍÂÚF<$Ɨǹ´¬Œ}µûŖĿŻŗ vȖv»n Ļļ!&N-GŸą´¬1n 345£¯2("ƚÞpŘsµ¬º»%´ŗ šŶnŒ&345&RM todo.jsp µûŖ´ŗ ^ZY[ g <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s" %> <html> <head> <title>Todo List</title> </head> <body> <h1>Todo List</h1> <f:view> <h:form id="list"> <div> <h:outputText value="There are no todo items." rendered="#{empty taskInstanceList}"/> <h:dataTable value="#{taskInstanceList}" var="task" rendered="#{not empty taskInstanceList}"> <h:column> <f:facet name="header"> <h:outputText value="Description"/> </f:facet> <h:inputText value="#{task.description}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Created"/> </f:facet> <h:outputText value="#{task.taskMgmtInstance.processInstance.start}"> <f:convertDateTime type="date"/> </h:outputText> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Priority"/> </f:facet> <h:inputText value="#{task.priority}" style="width: 30"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Due Date"/> </f:facet> ©C© )) <h:inputText value="#{task.dueDate}" style="width: 100"> <f:convertDateTime type="date" dateStyle="short"/> </h:inputText> </h:column> <h:column> <s:button value="Done" action="#{todoList.done}" taskInstance="#{task}"/> </h:column> </h:dataTable> </div> <div> <h:messages/> </div> <div> <h:commandButton value="Update Items" action="update"/> </div> </h:form> <h:form id="new"> <div> <h:inputText value="#{todoList.description}"/> <h:commandButton value="Create New Item" action="#{todoList.createTodo}"/> </div> </h:form> </f:view> </body> </html> ÖŴÖƃ2°ÞŖ´ŗ N-GwxDĕ¯2°Ŗ´ŗ ŒòntaskInstanceList }ƭũò¬ ×ØÙØ;RSº»IJǁ¯Ŗ´ŗ Œ&wxbO¶&ŀdÓñò2°Ŗ´ŗ <h:form id="list"> <div> <h:outputText value="There are no todo items." rendered="#{empty taskInstanceList}"/> <h:dataTable value="#{taskInstanceList}" var="task" rendered="#{not empty taskInstanceList}"> ... </h:dataTable> </div> </h:form> wx&ŚȀ B~| GHTaskInstance &M-N-%´ŗ śŜ&;<ſnwxŀ&ŚN-G&ȗȘș°Kâ,@Ěz¯2°Ŗ´ŗ VWqrn ÉÊËĝn ȚĈ&ƜÖ°2n 78sŒò»&Ɯĸ®%Þ¬«"Ūū;K£¯Ŗ´ŗ <h:column> <f:facet name="header"> <h:outputText value="Description"/> </f:facet> <h:inputText value="#{task.description}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Created"/> </f:facet> <h:outputText value="#{task.taskMgmtInstance.processInstance.start}"> <f:convertDateTime type="date"/> </h:outputText> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Priority"/> </f:facet> <h:inputText value="#{task.priority}" style="width: 30"/> ©C© )+ </h:column> <h:column> <f:facet name="header"> <h:outputText value="Due Date"/> </f:facet> <h:inputText value="#{task.dueDate}" style="width: 100"> <f:convertDateTime type="date" dateStyle="short"/> </h:inputText> </h:column> Œ&ÿNn @StartTask ï,45ÝÞ&G45ÂÚF<sƭìƗñò¬Œ}«ûĄą¯Ŗ´ŗ G?-âHÂN}¯2 ț¯Ŗ´ŗ @EndTask !ònö <h:column> <s:button value="Done" action="#{todoList.done}" taskInstance="#{task}"/> </h:column> Æseam-ui.jar âF3º»n ;K£¯2°¬Œ}ƮƬ¯2ţŦñ°ŗÇ <s:button> b Œ&ÿNn N-G&Kâ,@Èĸ´¬1£ñòŖ´ŗ O¶sĴFñò}Þn } B~| nN-G´¬Š&«"vÈäŔijä¯Ŗ´ŗ G45-êÂÚF<ŹţƄ%´ŗ <h:commandButton value="Update Items" action="update"/> & ) ÖƉ&O¶®¯°M,p³´¬1£ñòŖ´ŗ @CreateProcessï,45ÝÞG45ÂÚF<º»ƭìƗñò¬Œ}«û(ľòŖ´ŗ <h:form id="new"> <div> <h:inputText value="#{todoList.description}"/> <h:commandButton value="Create New Item" action="#{todoList.createTodo}"/> </div> </h:form> Œ&n!&ĩ°ţÖºŲvOáMsµûŖ´sn !ò» Ƒƒv B~| ĝ &cd%µûĞğvŔ&µûŖĿŻŗ S1 6klm * [ ~QM= 9$%&# ǢȜ¼ȍv Æ<FGÇ ǽƧĀāñĿ¬ 345&ŷĆn b½ êl45±ƳsOKdÓ´¬&šǃvēĔ}vûŖ´ŗ ǽƧĀāĂsƾ°-NM&345&ŷĆn Ğ«û-,Ov78MNOP-&ŷĆn êl45±Ƴ%4-,&ȝò =>´¬&ȞǖvûŖ´ŗ OK=>´¬n ln G45n êl45±Ƴº»OKŋ´¬ȟȠºÞȡ1¬ŲsµûŖ´ŗ ©C© )Q nB~ KE-dÓ"Œ}%OKdÓtu¯Ŗ´ŗ Œ&žſv 2º»Š&«"Œòs'ǹñò2°¬ºsľºûŖ´ŗ [ BC.DE Œ& Ö&Cn+ Ö& ~ n!ò} KE-OKdÓ%'Ɗñò2°Ŗ´ŗ OKº»ƃª1Ŗ¯Ƌ"ŗ B~ ^ZY[ h <pageflow-definition xmlns="http://jboss.com/products/seam/pageflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd" name="numberGuess"> <start-page name="displayGuess" view-id="/numberGuess.jspx"> <redirect/> <transition name="guess" to="evaluateGuess"> <action expression="#{numberGuess.guess}"/> </transition> <transition name="giveup" to="giveup"/> </start-page> (1) <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}"> <transition name="true" to="win"/> <transition name="false" to="evaluateRemainingGuesses"/> </decision> (4) (2) (3) <decision name="evaluateRemainingGuesses" expression="#{numberGuess.lastGuess}"> <transition name="true" to="lose"/> <transition name="false" to="displayGuess"/> </decision> <page name="giveup" view-id="/giveup.jspx"> <redirect/> <transition name="yes" to="lose"/> <transition name="no" to="displayGuess"/> </page> <page name="win" view-id="/win.jspx"> <redirect/> <end-conversation/> ©C© )\ </page> <page name="lose" view-id="/lose.jspx"> <redirect/> <end-conversation/> </page> </pageflow-definition> (1) (2) (3) (4) ȀnȏnjƪƫdÓ¯2°Ŗ´ŗ ŒŒ%n4-,Ğd& b lĚz¯n78Ūūȏ2°Ŗ´ŗ view-id ƯĻ& b êl45±Ƴ%£ñò2°¬ b C_ }ÍŔ&%´ŗ sǽƧĀā´¬}Þn redirect ƙĬn Yfmf &£Ɠz¯2°Ŗ´ŗ ÆŒ&§¨sHœ8 AI ĚzñòŖ´ŗÇ <transition> Ȁ b §¨ Æ Ç ÒÝŨŖ´ŗ b G45s!&§¨ Æ Ç }v¬ŷĆn s./ñòŖ´ŗ B~| sƭìƗñòŶn '(OKHO&ŧ&ï<ŕØŖ´ŗ & <action> n B~| & %!òs.Œ¬Œ}ƸŨũn b }Í%´ŗ nŠ&«"v ;RS%ŔƭìƗ´Œ}stu%´ŗ <decision> ï<OKÁljñĿn b ^ ¿Ȣȣ´¬Œ}«2ŧ'(ñò¬ï<Ɣd¯Ŗ´ŗ <page> ^ OK?@N%&OKśŜ&«"vûŖ´ŗ OKƃĄľûŖ¯ŗ 345&Ȥû&ĥÁ=>´¬Œ}Ŕ"žſ%´ŗ Œò345&Ơv numberGuess.jsp %´ŗ ©C© )a ^ZY[ k <<?xml version="1.0"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns="http://www.w3.org/1999/xhtml" version="2.0"> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <jsp:directive.page contentType="text/html"/> <html> <head> <title>Guess a number...</title> <link href="niceforms.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript" src="niceforms.js" /> </head> <body> <h1>Guess a number...</h1> <f:view> <h:form styleClass="niceform"> <div> <h:messages globalOnly="true"/> <h:outputText value="Higher!" rendered="#{numberGuess.randomNumber gt numberGuess.currentGuess}"/> <h:outputText value="Lower!" rendered="#{numberGuess.randomNumber lt numberGuess.currentGuess}"/> </div> <div> I'm thinking of a number between <h:outputText value="#{numberGuess.smallest}"/> and <h:outputText value="#{numberGuess.biggest}"/>. You have <h:outputText value="#{numberGuess.remainingGuesses}"/> guesses. </div> <div> Your guess: <h:inputText value="#{numberGuess.currentGuess}" id="inputGuess" required="true" size="3" rendered="#{(numberGuess.biggest-numberGuess.smallest) gt 20}"> <f:validateLongRange maximum="#{numberGuess.biggest}" minimum="#{numberGuess.smallest}"/> </h:inputText> <h:selectOneMenu value="#{numberGuess.currentGuess}" id="selectGuessMenu" required="true" rendered="#{(numberGuess.biggest-numberGuess.smallest) le 20 and (numberGuess.biggest-numberGuess.smallest) gt 4}"> <s:selectItems value="#{numberGuess.possibilities}" var="i" label="#{i}"/> </h:selectOneMenu> <h:selectOneRadio value="#{numberGuess.currentGuess}" id="selectGuessRadio" required="true" rendered="#{(numberGuess.biggest-numberGuess.smallest) le 4}"> <s:selectItems value="#{numberGuess.possibilities}" var="i" label="#{i}"/> </h:selectOneRadio> <h:commandButton value="Guess" action="guess"/> <s:button value="Cheat" view="/confirm.jspx"/> <s:button value="Give up" action="giveup"/> </div> <div> <h:message for="inputGuess" style="color: red"/> </div> </h:form> </f:view> ©C© )g </body> </html> </jsp:root> G45ƣƤƭìƗ´Ĥľûn ĀāƓd´¬ºÖ°2ȥƉ¯2ţŦñ°ŗ win.jspx Š&«";¤<ÿNs guess ȦţƯĻ&Ŕ&%´ŗ ^ZY[ )o <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns="http://www.w3.org/1999/xhtml" version="2.0"> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <jsp:directive.page contentType="text/html"/> <html> <head> <title>You won!</title> <link href="niceforms.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>You won!</h1> <f:view> Yes, the answer was <h:outputText value="#{numberGuess.currentGuess}" />. It took you <h:outputText value="#{numberGuess.guessCount}" /> guesses. <h:outputText value="But you cheated, so it doesn't count!" rendered="#{numberGuess.cheat}"/> Would you like to <a href="numberGuess.seam">play again</a>? </f:view> </body> </html> </jsp:root> lose.jspx ŔÍƟ%´ ÆÍƟv&%ȇȈ¯Ŗ´Çŗ šŶn C ;RS%´ŗ ^ZY[ ) @Name("numberGuess") @Scope(ScopeType.CONVERSATION) public class NumberGuess implements Serializable { private private private private private private private int randomNumber; Integer currentGuess; int biggest; int smallest; int guessCount; int maxGuesses; boolean cheated; @Create public void begin() { randomNumber = new Random().nextInt(100); guessCount = 0; biggest = 100; smallest = 1; ©C© (1) )h } public void setCurrentGuess(Integer guess) { this.currentGuess = guess; } public Integer getCurrentGuess() { return currentGuess; } public void guess() { if (currentGuess>randomNumber) { biggest = currentGuess - 1; } if (currentGuess<randomNumber) { smallest = currentGuess + 1; } guessCount ++; } public boolean isCorrectGuess() { return currentGuess==randomNumber; } public int getBiggest() { return biggest; } public int getSmallest() { return smallest; } public int getGuessCount() { return guessCount; } public boolean isLastGuess() { return guessCount==maxGuesses; } public int getRemainingGuesses() { return maxGuesses-guessCount; } public void setMaxGuesses(int maxGuesses) { this.maxGuesses = maxGuesses; } public int getMaxGuesses() { return maxGuesses; } public int getRandomNumber() { return randomNumber; } public void cheated() { cheated = true; } ©C© )k public boolean isCheat() { return cheated; } public List<Integer> getPossibilities() { List<Integer> result = new ArrayList<Integer>(); for(int i=smallest; i<=biggest; i++) result.add(i); return result; } } š0n~ s numberGuess ;RSƕ´¬}Þn ®¯°;RS²³¯Ŗ´ŗ !¯2n@Create ÂÚF<sƭũòn ;RS¼ȧ&0ĈästuvûŖ´ŗ (1) OáM ôª¯ Çn&OK£´¬1&OKdÓ±d¯Ŗ´ŗ pages.xml Æ ȨãŶW ^ZY[ )) <?xml version="1.0" encoding="UTF-8"?> <pages xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2 <page view-id="/numberGuess.jspx"> <begin-conversation join="true" pageflow="numberGuess"/> </page> <page view-id="/confirm.jspx"> <begin-conversation nested="true" pageflow="cheat"/> </page> </pages> ëÁºû&ĻûnŒ& ;RSȩȪvlS-KFG%´ŗ 78MNHG45&OKÖ°2=>´¬ŲŖţµûŖĿŻŗ Œò«û;RSƲĮ£&tuĬȫ$ñĿŖ´ŗ [1 6klm * ^ "&!:;<%= 3#$%&# ^ 8 Œ&345śŜ&ĞȬÕÖv,&ĥȭ4-,%´ŗ ©C© +o ş 789: ş KM ş Kœ ş â-ð<cd ş ,¥¦ ş ,ǚǛ ş ĥȭ ş Ťť ş ǹƪ&wx ©C© + Œ&345 bn^ +on }}Ŕl}¯2 b [ £¯2°Ŗ´ŗ bnb [nnC !¯2n`+ &345&āȮȯŔµûŖ´ Œ&345µ¬ȰƂ&Ĉçn °2ľº¬Œ}& Ön !òs}2Ŕ ȱȲ%µ¬Œ}%´ŗ þ¬ÿN°2Ŕn Hœ8&ĸ®¯2Ŕn Ô&œ@<ô°2Ŕn ȳƬȘvNƩÞvŦŨŪū¯2Ŕn 345GHF4ñĿ¬Œ}s}2ŔȞǖ%µ¬Œ}sľºûŖ´ŗ ŒòǸ³´¬1,-ĝIJûǬȴçŔȵº}ȶľò¬ºŔ¯òŖĿŻsn 'ę!ŻvŒ}µûŖĿŻŗ nȱȲv ]^ 345žſŞȷ%Þ¬«"cȸñò2°Ŗ´ŗ ©C© +) !¯2nŒòŖ%;@!&Ŕ&«2ǁ»ò2°ȱȲĬn £´¬Œ}%¼ǏºÖ¼/ǁ»òŖ´ŗ 345&Ú-;<ƃòũn Š&«"345s/p¯2°¬ºȹǁ%ÞŖ´ŗ !¯2nŒ&ȱȲĬǸ³´¬1n Š&«"ƎƏƪƫ=ĝńĆñòNƌ Ĭ¥ƍs£ñò2°¬ºƃ¬Œ}s%ÞŖ ´ŗ ^1 $%&#. KPG&޳ś&Ŕ&}Í%´ŗ ņ ů !"Ű ȺȻ¯2ţŦñ°ŗ "Ŗţ345s./¯v»ũn Hœ8º»Ɠd¯2 http://localhost:8080/seam-booking/ GE-´¬Œ}stu%´ŗ njƋ"Š k Ö&GHÆǤý2na Ö&EF45 &MNOP-} Ö&ï,45&MNOP-Ç sn Œ&345&'Ɗ&1ľò2°Ŗ´ŗ a Ö&EF45 G45-êwxVȆñòĞȬ&1´ƚ2&lS-KFGġŻ%°Ŗ´ŗ ş BookingListAction n!&Î&KM78&1ǹƪ&IJǁ¯Ŗ´ŗ ş ChangePasswordAction ş HotelBookingAction ş RegisterAction n!&Î&KM78&â-ð<Èĸ¯Ŗ´ŗ n345&ŀȼķu'Ɗ¯Ŗ´ŗ ,ĥȭ¥¦nǚǛnnŤťŗ Œ&ķun }¯2'Ɗñò2ëûn Œ&345%Ŕ}ŔŋȌȽţGH-%´ŗ n®¯°4-,789:¯Ŗ´ŗ + Ö&?,@,@ s345&ij<ÂMÅ'Ɗ¯2°Ŗ´ŗ ş Hotel n,Ě´?,@,@ %´ŗ ş Booking ş User nǹƪ&Ě´?,@,@ %´ŗ n,s%Þ¬78Ě´?,@,@ %´ŗ ^2 .DE Ⱦsȫ°v»ũÚ-;<ıŖò¬Œ}ëȿ1¯Ŗ´ŗ Œ&%nĞd&ķu Æ,¥¦nǚǛn}ŤťÇ ȡŀ¯Ŗ´ŗ 78&ɀNJº»ƃ¬}n ,&ǚǛº»ŤťŖ%&´ƚ2n Ö&Ōj¯ƞɁ&ſÌn ÖŖû %´ŗ ¯º¯n¥¦n&wĥ%µûŖĿŻŗ 78n ɂv¬Hœ8N%Í¥¦§¨º»Ô&,ǚǛtu%´ŗ ź}ŻŠ& ]^ 345&Ã,Gĭnǿô´¬1&ŞɃÕ2°ŖĿŻŗ ŋŌ´¬ƪƫ=ɄǕvƺƻȽÞ.Œ´1%´ŗ ĻļnC ]^ 345 ) Ö&Ǩǩ×ØĆľĿ2£¯Ŗ´ŗ š0nvŻ»º&ƪƫs HttpSes ©C© ++ ƥɅ»òn ŽƉnG?-&ŶŲŴijtuvƪƫsN¹-ɆÞÙØñò2º»n ®±G?-!òɇò&Ɉɉ%ijtuvƪƫsN¹-º»ƲŞȷñòŖ´ŗ sion ) N¹-šŔ-3Hl,@Ɋ¯°Džv&%n ɋrƄuvźŠ-3Hl,@Ɋ¯°§¨}v¬Œ}Ŕ«ţµûŖ´ŗ G?-Ȧ}N¹-(ÞƦ´¬ɌɍɎsÀǤ´¬1n ǣǤȏnjÎçŔƺƻ}vûŖ´ŗ Œ&ɏɐvɌɍɎɑǙñĿ¬1n C 345%G?-ç%«ţGE-ñò¬Nƀ´¬NÃĭF4 Æ) ŧD¹Ç ɒŪ´¬ŷĆs«ţµûŖ´ŗ Œ&ÃĭF4nŲŴ¯Ŕîɓ%µûŖĿŻŗ vȖv»Nsȳ"º&ɔį78sN&ɕpĄą¯ºŠ"ºĜ¯2(" &%vţn IA R4¹-}¯2("1%´ŗ ñ»n ÃĭF4ƾţ&ÏdzH8G45ç%ƹíñò¬&%n ÃĭF4ñòƪƫ}N¹-ç&wɖĬɗÕŋ´¬ƾţ&ƺƻŔIJûŪò2¯Ŗ"Œ }v¬1%´ŗ ñ2nHttpSession ƀñòƪƫǪɘ¯2ØŖ¯Ƌ"ŗ īļơƬșţKHĴ("Œ}«ûn EF45N&MƛĂă%Þ¬ŷĆsµ¬ºŔ¯òŖĿŻsn əɚ´¬«ûŴ}Ȟǖ%´ŗ vȖv»ũn ]^ Hœ8īɛ¾vǽƧɕpɜķżÈɋt¯2°¬1%´ŗ ¯º¯n4-,&ôǶɝŀ%n 78Ô&ÏdzÕÖŒ}ɋñò¬}Wƚ»ò4-,ÜɞǏƃÖŨ}¯Ŗ´ ÆɟŔÍƟ&ƪɠɡɢ¯Ŗ¯Çŗ Ɛǔ&ÏdzŋŌ´¬EF45-,Áɣ´¬ÂLŎƛôǶ´¬Œ}n !m¯2Hœ8œ@<œĝNɤ¬Œ}%78s&°ŴòºŀŁ´¬ŷĆ -,sŲŴȒȓñò¬«"OPEO×ØÙĢŒ}n Ⱦsďñţ2%Þv°%¯Ƌ"ŗ Æɟ ) ƂźŠ'Ɗ¯Œ}sµûŖ´ŗ ÖGHM345n Ö %¯ŗ ŦŨŠnɟɥvŒ}%íÒ%´ŗÇ ñ»«°ēĔsµûŖ´ŗ Oá-GH-&ŞɃ}¯2 ;,Ã-ɒŪ¯2°Ŗ´ŗ Œ&;,Ã-q%ƪƫɦŹɗÕ´¬Œ}s%Þn ŖɧÁdÓñòHMOMGsŲŴÕñòŖ´ŗ ñ»n ;,Ã-78sǹǰpŘ¯2°¬N&¼ǏvÃĭF4}v¬1n 345}N¹-ç%Nɨj(ÞƦñĿ¬ŲsµûŖĿŻŗ Ļļn;,Ã-ŀ%ƀÕ´¬;RS-,OEF45 %´ŗ Æ;,Ã-ŀ%?,@,@ ĝ C ƀÕ´¬Œ}Ŕ%ÞŖ´ŗÇ C ;ĴŎ,@n-,OEF45 s -3Hl,@ȳî¯2¯Ŗ"}°"¤sɩţº»µûŖ´ŗ khhɪ ]`b` o s-ñòɫɬ'ŦºŔ¯òŖĿŻsn ɭĵ%Ŕĝɬ'%µûŖĿŻŗ # &«"v345-,OEF45 -,&Ôɮ¯2īļÉòÂLŎƛÕ2°Ŗ´ŗ Æèýũn ^+ ;,êĎãvĥÁŖ%Ôɮ(°n 'ęÈä¯ ` ƙĬƜ&Ø&Ôɮ(°Ŗ´ŗÇ vȖ-,O sīîɓºŋ´¬űƦ&ǨǩvɯȎ´ƚ2 HttpSession Ŕɰ¯ţ 2ŖûŖ´ŗ ű2n âO¶¤-ɱɲ´¬1n lS-Dž&-,OEF45 º» ]^ EF45ā(´¬'ɳÖ°2ħ»òv°źŠɴēȫɵɒñò2°¬&%ơƬ¯2 ©C© +Q ţŦñ°ŗ -,OEF45 "n -,O ` ɴ2"n -,O ` ƄŢvŒ}"vŠ¯2ȁȂĬ&v°345VW´¬Œ}¯ºtu%´ŗ ¯º¯n ɶ"ƚÞ%v°}°"ƬȘ%µûŖĿŻŗ }ºţn ɦŹv£ÅƉ}¯2ɷq¯2°Ŗ´ŗ «"Œ!n )oo\ ɪǵŗ !ò%nţŠţŠƏ"&Ł12þûŖ¯Ƌ"ŗ Œ&345n Ôƴvɸ¬ɹ°'ǹ´¬1n ɂv¬-;ÕÖ-,O;RSsŠ&«"Ōɺ´¬Œ}stu%µ¬ºz ¯2°Ŗ´ŗ 345&ÂMn 78,¥¦tu¯2°Ŗ´ŗ ¥¦§¨n EF45-;ƀÕñòŖ´ŗ 78sŒò»&,& ÖĀā´¬}Þn nôª¯Ŗ´ŗ !¯2n-;&;RSn ǚǛñò,IJǁ´¬1n EF45-;&;RSƭìĺ¯Ŗ´ŗ ɻɆÞ& C Y £´¬Œ}vţFGHM&/p'Ɗ´¬1n b #BZ £¯2°¬Œ}Ŕz¯2°Ŗ´ŗ ¥¦ķunEF45-;&-,O !òn$V&ÂFEwxƃ»ò¬Ŕ&}ÍƟ%´ŗ I mf £¯2'ƊñòŖ´ŗ ^ZY[ )+ @Stateful @Name("hotelSearch") @Scope(ScopeType.SESSION) @Restrict("#{identity.loggedIn}") public class HotelSearchingAction implements HotelSearching { (1) (2) @PersistenceContext private EntityManager em; private String searchString; private int pageSize = 10; private int page; @DataModel private List<Hotel> hotels; (3) public void find() { page = 0; queryHotels(); } public void nextPage() { page++; queryHotels(); } private void queryHotels() { hotels = em.createQuery("select h from Hotel h where lower(h.name) like #{pattern} " + "or lower(h.city) like #{pattern} " + "or lower(h.zip) like #{pattern} " + "or lower(h.address) like #{pattern}") .setMaxResults(pageSize) .setFirstResult( page * pageSize ) .getResultList(); ©C© +\ } public boolean isNextPageAvailable() { return hotels!=null && hotels.size()==pageSize; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } @Factory(value="pattern", scope=ScopeType.EVENT) public String getSearchPattern() { return searchString==null ? "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%'; } public String getSearchString() { return searchString; } public void setSearchString(String searchString) { this.searchString = searchString; } (4) @Remove public void destroy() {} } (1) (2) (3) (4) ^ Ƒƒ @Stateful ï,45n Œ&GH-s-,OEF45 %µ¬Œ}ɼƐ¯2°Ŗ´ŗ -,OEF45 n O¶%;,Ã-&-;ÕnjŖ´ŗ @Restrict ï,45;RSǵ&EÃ,@Ăȃǃ£¯Ŗ´ŗ KM78ŦŨs;RSGE-ɋñò¬«"Ăȃ¯Ŗ´ŗ EÃ,@&ɽ%n ëŨ¬EÃ,@sñ»Ȩãɾǂñò2°Ŗ´ŗ @DataModel ï,45n b ListDataModel }¯2 List ǿô¯Ŗ´ŗ Œòn¥¦ǽƧ%&GFGtuwx&'ƊrƱ¯Ŗ´ŗ Œ&%n ,wxn hotels }°"Ò&È& ListDataModel }¯2ǿô¯Ŗ´ŗ ^ Ƒƒ @Remove ï,45n ï,45ÝÞ&ÂÚF<sƭũòŶn -,OEF45 sǼƸñòn!¯2n!&ƪƫsȒȓñò¬Œ}dÓ¯2°Ŗ´ŗ %n ´ƚ2& -,OEF45 âHÂN&v° @Remove ï,45ÝÞÂÚF<sdÓñò¬ŲsµûŖ´ŗ Œ&ÂÚF<n sEF45;,Ã-Ȓȓ´¬}ÞƭũòŖ´ŗ Œ&345&Ơvnb [ ,¥¦ŋŌ´¬ɿȪƃ2ØŖ¯Ƌ"ŗ %´ŗ ^ZY[ )Q <div class="section"> ©C© +a <span class="errors"> <h:messages globalOnly="true"/> </span> <h1>Search Hotels</h1> <h:form id="searchCriteria"> <fieldset> <h:inputText id="searchString" value="#{hotelSearch.searchString}" style="width: 165px;"> <a:support event="onkeyup" actionListener="#{hotelSearch.find}" reRender="searchResults" /> (1) </h:inputText>   <a:commandButton id="findHotels" value="Find Hotels" action="#{hotelSearch.find}" reRender="searchResults"/>   <a:status> (2) <f:facet name="start"> <h:graphicImage value="/img/spinner.gif"/> </f:facet> </a:status> <br/> <h:outputLabel for="pageSize">Maximum results:</h:outputLabel>  <h:selectOneMenu value="#{hotelSearch.pageSize}" id="pageSize"> <f:selectItem itemLabel="5" itemValue="5"/> <f:selectItem itemLabel="10" itemValue="10"/> <f:selectItem itemLabel="20" itemValue="20"/> </h:selectOneMenu> </fieldset> </h:form> </div> <a:outputPanel id="searchResults"> <div class="section"> <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/> <h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}"> <h:column> <f:facet name="header">Name</f:facet> #{hot.name} </h:column> <h:column> <f:facet name="header">Address</f:facet> #{hot.address} </h:column> <h:column> <f:facet name="header">City, State</f:facet> #{hot.city}, #{hot.state}, #{hot.country} </h:column> <h:column> <f:facet name="header">Zip</f:facet> #{hot.zip} </h:column> <h:column> <f:facet name="header">Action</f:facet> <s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/> </h:column> </h:dataTable> <s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/> </div> (3) (4) </a:outputPanel> (1) I mb #BZ ©C© <a:support> Nn onkeyup &«"v C Y +g (2) (3) (4) M¹sǶ²¯}Þn b G45M¹-êsīÍĈ& XMLHttpRequest º»ƭũò¬Œ}tu¯2°Ŗ´ŗ ñ»Ʒ°Œ}n ƲDĕƙĬnb &wĥÁŦŨ&Dĕtu}¯n īÍĈ&D-R-Ħħ¯}ÞnĥÁvĸ®&'(tu¯2°Ŗ´ŗ I mb #BZ <a:status> Nn īÍĈ&G?-sĺñò¬&ȏÖçn njƋ}¯ŎÂ45MÂĚzñĿŖ´ŗ I mb #BZ <a:outputPanel> Nn īÍĈG?-«2ƲDĕtuv&ŝʀdÓ¯Ŗ´ŗ <s:link> Nn b G45-êƯĻ& Æī C YÇ *| GÝŨ¬Œ}s%ÞŖ´ŗ Ƒƒ <h:commandLink> }Ǣƚ2ŒòsíĮv&n ®¯°œ@<œ%ôţ ĝ ®¯°N%ôţ}°ɕpʁvľv°Œ}%´ŗ âHÂN #{hotelBooking.selectHotel(hot)} &ÂÚF<M@Į£¯2°¬Œ}ŔƮƬ¯2ţŦñ°ŗ ŒònƑƒńwñò ^ ¿ %Ƅtu%´sn n ´ƚ2&ÂÚF<M@Ěǹ%âHÂN£%Þ¬«" ^ ¿ ȁȂ¯2°Ŗ´ŗ Œ&nNM¯}Þ¥¦§¨s/Ěz¯n BookingAction & selectHotel() !Œ%nºvûȗȘș°Œ}s.Œ2°Ŗ´ŗ ,&ǚǛñĿn HotelÂÚF<ǚǛ§¨ț¯Ŗ´ŗ }ŋʂ´¬ijN¼ǏÃĭF4´¬1n 345sŠ&«"-;&-,O Į£´¬ºƃ2ØŖ¯Ƌ"ŗ śŜ&;<ºvûɏɐ%´sn &Śȑ-,F'Ɗ´¬-GäñòG45&wx}Ǫý¬}=>¯ĝ´ţvû Ŗ´ŗ -ıĢ«"n ɉº»ËıŻ%ţŦñ°ŗ ^ZY[ )\ @Stateful @Name("hotelBooking") @Restrict("#{identity.loggedIn}") public class HotelBookingAction implements HotelBooking { @PersistenceContext(type=EXTENDED) private EntityManager em; (1) @In private User user; @In(required=false) @Out private Hotel hotel; @In(required=false) @Out(required=false) private Booking booking; (2) @In private FacesMessages facesMessages; @In private Events events; @Logger private Log log; private boolean bookingValid; ©C© +h @Begin public void selectHotel(Hotel selectedHotel) { hotel = em.merge(selectedHotel); } (3) public void bookHotel() { booking = new Booking(hotel, user); Calendar calendar = Calendar.getInstance(); booking.setCheckinDate( calendar.getTime() ); calendar.add(Calendar.DAY_OF_MONTH, 1); booking.setCheckoutDate( calendar.getTime() ); } public void setBookingDetails() { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DAY_OF_MONTH, -1); if ( booking.getCheckinDate().before( calendar.getTime() ) ) { facesMessages.addToControl("checkinDate", "Check in date must be a future date"); bookingValid=false; } else if ( !booking.getCheckinDate().before( booking.getCheckoutDate() ) ) { facesMessages.addToControl("checkoutDate", "Check out date must be later than check in date"); bookingValid=false; } else { bookingValid=true; } } public boolean isBookingValid() { return bookingValid; } @End public void confirm() { em.persist(booking); facesMessages.add("Thank you, #{user.name}, your confimation number " + " for #{hotel.name} is #{booking.id}"); log.info("New booking: #{booking.id} for #{user.username}"); events.raiseTransactionSuccessEvent("bookingConfirmed"); } (4) @End public void cancel() {} @Remove public void destroy() {} (1) Œ& n^+ !&§¨n?,@,@M-N-n &HMOMGŹȔ&=ɗÕ¯Ŗ´ŗ (5) ȁȂij;,Ã- £¯Ŗ´ŗ -,OEF45 ï,45n (2) @Out (3) ñò¬Œ}ƎƏ¯ ÂÚF<ƭìƗ¯&ŶnƙĬ&Ɯs;,Ã-ÈœPGŖ´ŗ Œ&%n´ƚ2&G45-ê&ƭìƗ¯sŸą¯Ŷn hotel &Ò&;,Ã-È hotel M-N-È&ƜcdñòŖ´ŗ @Begin ï,45n ©C© +k (4) (5) ï,45ÝÞÂÚF<sɐĈôª´¬Œ}dÓ¯2°Ŗ´ŗ ű2nG?-&Ąą%ǹǰ&;,Ã-ȒȓñòŖĿŻŗ !&Ĥľûn ǹǰ&œM<º»&´ƚ2&G?-ƲìŋŌ¯n &īʃ/«¬NMœµ¬°wʄ´¬ @End ÂÚF<&ƭìƗ¯«ûȒȓñòŖ´ŗ @End ï,45n ï,45ÝÞÂÚF<sǹǰ&ɐĈĄą´¬Œ}dÓ¯2°Ŗ´ŗ ű2nG?-&Ąľû%ǹǰ&;,Ã-ȒȓñòŖ´ŗ n;,Ã-Ȓȓ´¬}Þn Œ& ^ C ÂÚF<nƭìƗñòŖ´ŗ Œ&ÂÚF<dÓ´¬Œ}ʅòv°%ţŦñ°ŗ n HotelBookingAction ,¥¦nǚǛnnŤť'Ɗ¯´ƚ2&G45-êÕ2ëûn !¯2nŒ&ɕpŋŌ´¬ƪƫM-N-ƀÕ¯2°Ŗ´ŗ Œ&;<sn HttpSession ƙĬº» J½ ´¬Ŕ&}ǢȜ¯2n «ûG%žſv;<%µ¬Œ}ÍƬ¯2Ŕ»ý¬}Ǫý2°Ŗ´ŗ ñ»Ʒţ´¬1n78nKMEF45ʆÔ&ÁɣñòÕÖŒ}st u%´ŗ ¯2Ø2ţŦñ°ŗ ÍÎ ) Ö&ɂv¬,p³´¬Œ}stu%´ŗ ɐÎçnʇǞ¯ŷĆn nšĄNMœ¯nƪƫȒȓ¯Ŗ´ŗ sĄą¯Ŷn!&þ¬ÿNʈ¯nG45&'( ØŷĆn ns·Ąą¯Œ}¥Ɨ¯n¥¦ĕMDG¯Ŗ´ŗ ^S DLOL! 345& ]#I OáM&ŀȧPFG´òũn WEB-INF/lib @DGŀ seam-ui.jar sƃÖºûŖ´ŗ Œ&âF3n }ńĆ´¬ƾţ& b L-N;KġŻ%°Ŗ´ŗ Œ&345n ¥¦ǽƧº»,ǵ&ǽƧĀāĂă <s:link> £¯2°Ŗ´ŗ <s:link value="View Hotel" action="#{hotelBooking.selectHotel(hotel)}"/> ŒŒ%n<s:link> £´¬Œ}%n Hœ8& ®¯°œ@<œôţ ķuʉʊ´¬Œ}vţn G45-ê *| GÝŨ¬Œ}stu%´ŗ Ƒƒ b <h:commandLink> n®¯°œ@<œôţ }Ō/¯ŖĿŻŗ <s:link> n ʋʌġĢ!&ĩƾţ&ưĮvķuƿǀ¯Ŗ´ŗ 345nĞn/book.xhtml ë°2°ţÖº&ĩ& ;K} I mf b #BZ ;K£¯Ŗ´ŗ ŒŒ%n!ò»;K&ȨãʍòŖĿŻsn Œ&;<=>¯°v»ũn b O¶45&1& &ķuʎ}´¬ɽȺȻ¯2ţŦñ°ŗ ^[ J~ ]#I ŔġØŖ´ŗ F b [ }ĆľĿ2Œ& B sKMñòninit Kâ,@sśŜ&«"cdñòŷĆíîvûŖ´ŗ seam-debug.jar ;RS& `J WEB-INF/lib <core:init jndi-pattern="@jndiPattern@" debug="true"/> ©C© Qo Œ&%ǹǰKM¯2°¬EF45ŋŌ´¬´ƚ2& ;,Ã-ŀ& ;RSƃûn¥ʏ´¬Œ}s%ÞŖ´ŗ °ēſHœ8º» http://localhost:8080/seam-booking/debug.seam ŬmY6½½[ [m6hoho½f`öJ½`Jŭ Ɠd´¬ŦŨ%´ŗ b w 4 "$%&# xyz ' "&!:;<%= -&Å345n &'ɳv£ĔƃĿ2ţòŖ´ŗ N-G=}OK&1& 78ǽƧn¥¦ĝ45FČLķu&'Ɗ&1 OKĮ£¯2°Ŗ´ŗ ©C© }} B~| B~ Q Œ&=ǽƧnĊĕ&ʐťĝ45FČMG=´¬1 B~| Į£¯Ŗ´ŗ lS-KE-nɂv¬KE-dÓǚǛ´¬Œ}«û/Èĸñò¬ºŔ¯òŖĿŻ ŗ ©C© Q) * dvdstore @DG&ŀȦxţŦñ°ŗ c ' ;43$%&# $%&#= ` Ån ijĬ&1 `n EF45 &Ĥľû C £¯žſvÅ&āȮȯ%´ŗ * hibernate @DG&ŀȦxţŦñ°ŗ f j] "&!:;<%= $%&# nM<%ƪƫƀÕ´¬345&'Ɗ}2ŔrƱ¯Ŗ´ŗ ©C© Q+ ¯º¯nM<&ƪƫ=n°ÖŔǃú}°"ľŨ%µûŖĿŻŗ ÆĞn;,ŏ ƿǀ´¬ķuë°2 Ç Œ&ȑ&ƺƻ&1n78FG¤GñĿn !¯2nǢȜ-,D-v}´¬Ųs¯ũ¯ũµûŖ´n !&§¨nFG¤GĻ¯2°Ö%ŔŠŻvŔGE-tuvûŖ´ŗ Œ& [J n £¯ I^*e[ 345&'ƊēĔƃĿ2ţòŖ´ŗ ¥¦§¨ġĢ´ƚ2&345&n FG¤Gstu%´ŗ Œ& [J nȽʑû Æ~A Ç f -NM |¢ &£'Ǻ¯2°Ŗ´ŗ ŒŒ%nl&1&NIJǁ}NƒU&G45ÂÚF<-ꣴ¬Ĥľû n lnDĕ¯2°¬;RSº»NȽÞƗ¯Ŗ´ Æ~A Çŗ f y z .¡ index.xhtml e [ &wĥn š®& [J 9:&-Ěz¯2°Ŗ´ŗ ^ZY[ )a <h:dataTable value="#{blog.recentBlogEntries}" var="blogEntry" rows="3"> <h:column> <div class="blogEntry"> <h3>#{blogEntry.title}</h3> <div> <h:outputText escape="false" ©C© QQ value="#{blogEntry.excerpt==null ? blogEntry.body : blogEntry.excerpt}"/> </div> <p> <h:outputLink value="entry.seam" rendered="#{blogEntry.excerpt!=null}"> <f:param name="blogEntryId" value="#{blogEntry.id}"/> Read more... </h:outputLink> </p> <p> [Posted on <h:outputText value="#{blogEntry.date}"> <f:convertDateTime timeZone="#{blog.timeZone}" locale="#{blog.locale}" type="both"/> </h:outputText>]   <h:outputLink value="entry.seam">[Link] <f:param name="blogEntryId" value="#{blogEntry.id}"/> </h:outputLink> </p> </div> </h:column> </h:dataTable> FG¤Gº»Œ&ā/´¬ŷĆn <h:dataTable> «û£ñò¬N'ęŠ&«"0Ĉäñò¬&%¯Ƌ"ºŗ ŒŒ%Ǭs.Þ2°¬º}°"}n Blog Blog }°"Ò& ;RS«2n Ųv}Þʒʓ¯2IJǁñò2 ő ȽÞƗñò2 ő °¬ľŨ%´ŗ Œòn &«"vűƦ& ]^ G45ĜʔţODðG%wʕvOKĂă}ʖv2°Ŗ´ŗ ^ZY[ )g @Name("blog") @Scope(ScopeType.STATELESS) @AutoCreate public class BlogService { @In EntityManager entityManager; (1) @Unwrap (2) public Blog getBlog() { return (Blog) entityManager.createQuery("select distinct b from Blog b left join fetch b.blogEnt .setHint("org.hibernate.cacheable", true) .getSingleResult(); } } (1) (2) Œ&;RSn =ij;,Ã- £¯Ŗ´ŗ ŒòŖ%ƃ2Þĩ&}ɂvûn Œ&ij;,Ã-n «2=ñòŖ´ŗ Œ&ij;,Ã-n]^ G?-ŹȔ%íî%n IJǁ¯2°v°lŋŌGE-´¬}ÞǶ²´¬µ»Ƈ¬èé&ʗʘtu¯Ŗ´ ŗ @Unwrap ï,45n sGHM¯2'ę& BlogService ;RS%vţÂÚF<&ĺûƜ ő Blog ő ț´«"Ɠz¯Ŗ´ŗ Œòs =;RSâN %´ŗ ©C© Q\ ŒònŒòŖ%&}ŒȅƷ°%´sn ¥¦§¨&«"vO¶ĴF&§¨&FG¤G%Š"%¯Ƌ"ºʙ f1 JK¢Kop£¤¥¦~ Œ& [J n Ś&ʚ$78& [J VɁ&¥¦tu´¬ďñvO¶ÕnjŖ´ŗ Œòne [ ,Dntemplate.xhtml ġŖò¬ menu.xhtml OáMdÓñòŖ´ŗ ^ZY[ )h <div id="search"> <h:form> <h:inputText value="#{searchAction.searchPattern}"/> <h:commandButton value="Search" action="/search.xhtml"/> </h:form> </div> FG¤Gtu¥¦§¨&'Ɗ&1n ¥¦O¶&ĴFÐ=¯Ŷn Hœ8ĕMDG'(´¬ŲsµûŖ´ŗ G45§¨ Æ Ç }¯2 b l £¯2°¬&%n nO¶sĴFñò}Þn¼/ l ĕMDG¯Ŗ´ŗ Ɛ&ēĔ}¯2nśŜ&«"vêl45dÓ´¬Œ}Ŕtu%´ŗ ^ZY[ )k <navigation-rule> <navigation-case> <from-outcome>searchResults</from-outcome> <to-view-id>/search.xhtml</to-view-id> <redirect/> </navigation-case> </navigation-rule> O¶nśŜ}ʛ«"vŔ&v¬%¯Ƌ"ŗ ^ZY[ +o <div id="search"> <h:form> <h:inputText value="#{searchAction.searchPattern}"/> <h:commandButton value="Search" action="searchResults"/> </h:form> </div> ¯º¯nĕMDG´¬}Þn ht- &«"vFG¤G AI IJǁ´¬1n G?-âHÂN}¯2O¶«2ĴFñòƜġĢŲsµûŖ´ŗ b tp://localhost:8080/seam-blog/search.seam?searchPattern=seam ©C© Qa nŒò´¬žſvēĔƿǀ¯ŖĿŻsn %dÓñò YJ Y £¯Ŗ´ŗ ƿǀ¯Ŗ´ŗ WEB-INF/pages.xml ^ZY[ + <pages> <page view-id="/search.xhtml"> <param name="searchPattern" value="#{searchService.searchPattern}"/> </page> ... </pages> ŒònĕMDG´¬}Þn searchPattern &Ò&G?-âHÂN}¯2 #{searchService.searchPattern} &ƜġØnDĕ´¬nâHÂN&ƜÅƲǃ£´¬«"Ɠz¯Ŗ ´ŗ ĕMDG«2 search.xhtml ā/¯Ŗ´ŗ ^ZY[ +) <h:dataTable value="#{searchResults}" var="blogEntry"> <h:column> <div> <h:outputLink value="entry.seam"> <f:param name="blogEntryId" value="#{blogEntry.id}"/> #{blogEntry.title} </h:outputLink> posted on <h:outputText value="#{blogEntry.date}"> <f:convertDateTime timeZone="#{blog.timeZone}" locale="#{blog.locale}" type="both"/> </h:outputText> </div> </h:column> </h:dataTable> ŒòŔnŖ'ę&¥¦§¨IJǁ´¬1 ~A ¡ |¢ £¯2°Ŗ´ŗ ^ZY[ ++ @Name("searchService") public class SearchService { @In private EntityManager entityManager; private String searchPattern; @Factory("searchResults") public List<BlogEntry> getSearchResults() { if (searchPattern==null) { return null; } else { ©C© Qg return entityManager.createQuery("select be from BlogEntry be "" + "where lower(be.title) like :searchPattern " + "lower(be.body) like :searchPattern order by be.date desc") .setParameter( "searchPattern", getSqlSearchPattern() ) .setMaxResults(100) .getResultList(); } } private String getSqlSearchPattern() { return searchPattern==null ? "" : '%' + searchPattern.toLowerCase().replace('*', '%').replace('?', '_') + '%'; } public String getSearchPattern() { return searchPattern; } public void setSearchPattern(String searchPattern) { this.searchPattern = searchPattern; } } f2 j] "&!:;<%. y z .¡ ȦţʜnI^*e[ Ð=&1 ~A ¡ |¢ £´¬Œ}s Ǐ&ŷĆsµûŖ´ŗ !Œ%n nG45 &ʝƿǀ¯Ŗ´ŗ [J n [J VŪn entry.xhtml G45£¯2°Ŗ´ŗ ŒònǙ¯ľǾ}»¯°ʞ%nŒŒ%n~A ¡ |¢ £´¬ēsrƱºŔ¯òŖĿŻŗ ;RSn &«"vʟ¡v G45ƓȫODðG&«"/p¯Ŗ´ŗ entryAction ~A ¡ |¢ ^ZY[ +Q @Name("entryAction") @Scope(STATELESS) public class EntryAction { @In(create=true) private Blog blog; @Out private BlogEntry blogEntry; public void loadBlogEntry(String id) throws EntryNotFoundException { blogEntry = blog.getBlogEntry(id); if (blogEntry==null) throw new EntryNotFoundException(id); } } G45npages.xml %ŔƎƏñòŖ´ŗ ©C© Qh ^ZY[ +\ <pages> ... <page view-id="/entry.xhtml" action="#{entryAction.loadBlogEntry(blogEntry.id)}"> <param name="blogEntryId" value="#{blogEntry.id}"/> </page> <page view-id="/post.xhtml" action="#{loginAction.challenge}"/> <page view-id="*" action="#{blog.hitCount.hit}"/> </pages> $V&èn !&ĩ&ķu¯2G452°Ŗ´ ő KMĭDĝlLœNvŠŗ Ŗn G45ÂÚF<&M@âHÂN£¯2°¬&ŔơƉ¯2ţŦñ° ŗ Œò b ^ &Ƒƒķu%µûŖĿŻsn %G45ŦŨ%vţ b ÂÚF<&M@%Ŕ£%Þ¬«"v2°Ŗ´ŗ sG?-ñò¬}n š0âHÂN blogEntryId ÅM<¯n ŧŲvN ő blogEntry ő IJǁ´¬G45'(¯2º»n !ò M¹;,Ã-TǞ¯Ŗ´ŗ šŶnśŜsDĕñòŖ´ŗ entry.xhtml ^ZY[ +a <div class="blogEntry"> <h3>#{blogEntry.title}</h3> <div> <h:outputText escape="false" value="#{blogEntry.body}"/> </div> <p> [Posted on  <h:outputText value="#{blogEntry.date}"> <f:convertDateTime timezone="#{blog.timeZone}" locale="#{blog.locale}" type="both"/> </h:outputText>] </p> </div> `[J ?sN¹-%ƃÖº»v°ŷĆn èés-KñòŖ´ŗ Z Y m_ Œ&èé %µ2ʠ¯°&%n èéGH-&ï,45ÝŨŖ´ŗ EntryNotFoundException \o\ ?H%vţ QoQ ^ZY[ +g @ApplicationException(rollback=true) @HttpError(errorCode=HttpServletResponse.SC_NOT_FOUND) public class EntryNotFoundException extends Exception { EntryNotFoundException(String id) { super("entry not found: " + id); ©C© Qk } } Ɛ'Ɗ&nÂÚF<M@%âHÂN£¯ŖĿŻŗ ^ZY[ +h @Name("entryAction") @Scope(STATELESS) public class EntryAction { @In(create=true) private Blog blog; @In @Out private BlogEntry blogEntry; public void loadBlogEntry() throws EntryNotFoundException { blogEntry = blog.getBlogEntry( blogEntry.getId() ); if (blogEntry==null) throw new EntryNotFoundException(id); } } <pages> ... <page view-id="/entry.xhtml" action="#{entryAction.loadBlogEntry}"> <param name="blogEntryId" value="#{blogEntry.id}"/> </page> ... </pages> Š&'ƊǚǛ´¬ºƩØ&ƺƻ%´ŗ ©C© \o 1 | '9 '§8¨* @-l45n;¤<HM7,@,@ġŻ%ëûn ^ [Y KPG&EFFn &-3;<&²³n ·¸N¹-º»345&-?Ŏ}2Ŕžſ¯Ŗ´ŗ Œòn ŪLJ}¯2Ʒ°ēĔ%´ŗ !¯2nƪƫN¹-ƀ´¬}2ŔÖŖ»v°345Şȷ´¬1n ®¯°ëŔnjƆsŠòźŠ´ũ»¯°ºǕɅñ´ʡʢv I`à ʣʤ& ʥŧ?D¹N&ŀ%ʦŖ}ľºÎ&1n ʧʨʩʪʫý2ţòŖ´ŗ Œ&-%nfJ # %£´¬&sšƷ%´ŗ KPGcd¤Ŏ%Ǚ¯Èĸ´¬ŦŨ%ĩ& )^^ ĝ C ^^ \ 345£²³ñòKPGŔ£tu%´ŗ ^ [Y svţ2Ŕ fJ £tu%´sn Œ&%n^ [Y £¯2FĝńĆ,-("ēĔz¯°}ȶ°Ŗ´ŗ ^ [Y M-¯ţv°ēŔn Œ&jŨ¬Œ}s%ÞŖ´ ő ;¤<HMº»´ƚ2&-,F'(tu%´ŗ fJ nžſƏ2¯Ŗýũn,D}ƹ HFČ¯ǕÞvʬ° # ŒònŲ%µòũžſL-N¤Mƛ%Þ¬Œ}ƬȘ¯Ŗ´ŗ ` *[ -G%´ŗ 1 §8©ª ª1¬nʭ \ Ŗ ʭ a } # Q) } # an!¯2n!òĆ" ^ [Y £& ^ HM } *ùó HMsM-ñò2°¬Œ}Ťť¯2ţŦñ°ŗ ^ [Y & l cdǣǤ¯2ţŦñ°ŗ FÅ<% ./¯2ţŦñ°ŗ šŶn @-l45řô¯@DG%n ;¤<K./¯2ţŦñ°ŗ Éò ]#I ĝ ^#I &FƲKMÂR¯Ŗ´ŗ Ȥʝvs»n | sµ¬1n ő ôǶʮDŽ%wʕv ő ^#I &ƲKMÂNjûĺ´}nšĄ | s Y J --°¨¯2¯Ŗ"Œ}vûŖ´ŗ Œ&=ȍ«ûnKMÂÎ Y J Y ǕÞţŤƀ¯ | % ʯ/ñĿ¬Œ}ʰʱ¯Ŗ´ŗ ^ º» ʯ/ñĿ¬ŷĆn Đ| Ƚđ&Ŝµ¬./cd%Œòcd´¬Œ}s%ÞŖ´ŗ śŜ&«"vƜs«°%¯Ƌ"ŗ -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512 ɧÁvÂÅsv°}´¬}nśŜsšď&ʰʱƜ%´ŗ -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256 ;¤<HMº» Ċ45cdstu%´ŗ ©C© ./¯2°¬v»ũn bin/run.conf & | \ fJ 2 ª1«" ɭ´ʲÈĸ(°ţv°ŷĆĞ("ŲµûŖĿŻ sǶ²¯ÎNJ%Я2ţŦñ°ŗ 11 «¬ ] &MRK .IJ ő OutOfMemoryException "J& š0´ƚÞŒ}nµv&ʼnŇ£ fJ cd´¬Œ}%´ŗ Æ M-@DGn^ [Y ðG--n N¹-;SG45 !òžſ%´ŗśŜ&«"NM¯2ţŦñ°ŗ # Ç cd jboss-seam-1.1.x seam setup śŜ&«"ŲvȟȠ&Ūūƕñò¬%¯Ƌ"ŗ cd jboss-seam-2.0.x seam setup śŜ&«"vŲvȟȠŪūʳñòŖ´ŗ ~/workspace/jboss-seam$ ./seam setup Buildfile: build.xml init: setup: [echo] Welcome to seam-gen :-) [input] Enter your Java project workspace (the directory that contains your Seam projects) [C:/Pro /Users/pmuir/workspace [input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.2.GA] [C:/Program Files/jboss/Applications/jboss-4.2.2.GA [input] Enter the project name [myproject] [myproject] helloworld [echo] Accepted project name as: helloworld [input] Select a RichFaces skin (not applicable if using ICEFaces) [blueSky] ([blueSky], classic, [input] Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [e [input] Enter the Java package name for your session beans [com.mydomain.helloworld] [com.mydomain org.jboss.helloworld [input] Enter the Java package name for your entity beans [org.jboss.helloworld] [org.jboss.hellow [input] Enter the Java package name for your test cases [org.jboss.helloworld.test] [org.jboss.hel [input] What kind of database are you using? [hsql] ([hsql], mysql, oracle, postgres, mssql, db2, mysql [input] Enter the Hibernate dialect for your database [org.hibernate.dialect.MySQLDialect] [org.hi [input] Enter the filesystem path to the JDBC driver jar [lib/hsqldb.jar] [lib/hsqldb.jar] /Users/pmuir/java/mysql.jar [input] Enter JDBC driver class for your database [com.mysql.jdbc.Driver] [com.mysql.jdbc.Driver] [input] Enter the JDBC URL for your database [jdbc:mysql:///test] [jdbc:mysql:///test] jdbc:mysql:///helloworld [input] Enter database username [sa] [sa] pmuir [input] Enter database password [] [] [input] skipping input as property hibernate.default_schema.new has already been set. [input] Enter the database catalog name (it is OK to leave this blank) [] [] [input] Are you working with tables that already exist in the database? [n] (y, [n], ) y [input] Do you want to drop and recreate the database tables and data in import.sql each time you ©C© \) fJ 2 ª1«" n [input] Enter your ICEfaces home directory (leave blank to omit ICEfaces) [] [] [propertyfile] Creating new property file: /Users/pmuir/workspace/jboss-seam/seam-gen/build.properties [echo] Installing JDBC driver jar to JBoss server [echo] Type 'seam create-project' to create the new project BUILD SUCCESSFUL Total time: 1 minute 32 seconds ~/workspace/jboss-seam $ Œ&ŏȾ&Į°O¶Ɯƿǀ¯Ŗ´ŗ ʈ´ŦŨ%Ǖʴʵ%´ŗ K¯2ſ Ɣ1¬Ųsµ¬ƢvǚǛnKPG}¯2^#I¾¿KM}]#I¾¿KM&Šnj» ´¬º%´ŗ ^#I KPG ^+o ż¯n C ^^ \ sŲ%´ŗ ]#I KPG ^+o ż¯ŖĿŻsë!»ţ )^^ ʼnŇKMÂstu%¯Ƌ"ŗ ]#I ^#I Ǣƚ4%=>¯ĝ´°âF3%´ŗ &«"v ^+ s'(tuv345M-´¬ŷĆ ear ǚǛ¯2ţŦñ°ŗ Œòśé war ǚǛ¯2ţŦñ°ŗ śʶn Œ&% ^#I KMÂsǚǛñò}ʷd¯Ŗ´sn ]#I KMÂ&ŷĆŔŖţÍ-,F%ŕĢŒ}s%ÞŖ´ŗ ·¸&NÅ%pŘ¯2°¬ŷĆn fJ ŲŴǘ»Ŀ2ţŦñ°ŗ N¹-·,s¸ǰ¯2°¬Œ} cd seam-gen/build.properties Țñò2°Ŗ´sn '(´¬Œ}%Èĸ´¬Œ}Ŕtu%´ŗ śŜ&«"NM´¬Œ}%n^ [Y ®±KPG&²³stu%´ŗ ) ʗƉ& seam setup ðG--@DGn seam new-project C:\Projects\jboss-seam>seam new-project Buildfile: build.xml ... new-project: [echo] A new Seam project named 'helloworld' was created in the C:\Projects directory [echo] Type 'seam explode' and go to http://localhost:8080/helloworld [echo] Eclipse Users: Add the project into Eclipse using File > New > Project and select General [echo] NetBeans Users: Open the project in NetBeans BUILD SUCCESSFUL Total time: 7 seconds C:\Projects\jboss-seam> Œòn Bnĸ´¬ B !¯2 ¢ <HM B ®¯° ^ [Y KPG;Č¯n ^ [Y ÂNNë«ì # l<-Gű2Ų}v¬´ƚ2&Ú-}cdOáMʸn e [ ,DOáMn -NM4²³¯Ŗ´ŗ ^ [Y %n## -> ######... -> ## -> ###### -> ## &ɻË%KPGǣǤ¯n ####### ÆŒ&ŷĆn helloworldÇ Ūū¯2n ## GFG´òũn KPG¼/řô¾¿@DGŞɃ%KMñòŖ´ŗ ®±KPGœ@8<º» Java ###### ǚǛ¯v°%ţŦñ°ŗ ©C© \+ fJ 2 ª1«" ^ [Y &O¶ ʭ s C ^ \ µ¬° C ^ a ʭ %vŨòũn ###### -> ##### -> Java ##### &ɻË%nC ^ \ ʹʺ& ʭ ǚʻŲsµûŖ´ŗ Ɛ&ēĔ}¯2n^ [ &éĥº» seam }NM´¬Œ}%KPG&KMstu%´ŗ seam explode explode _[ YJ ƃ¬nhttp://localhost:8080/helloworld ŕŻ%ţŦñ°ŗ Œòn,D view/layout/template.xhtml £¯ e [ view/home.xhtml %´ŗ ^ [Y º»Œ&ĝ,D&ʼȡstu%´ŗ !¯2Hœ8ĸ®´¬Œ}%ʽʾ§¨ƃ¬Œ}stu%´ŗ KPG@DG å| cd<ÃÂs²³ñòŖ´sìţû¯v°%ţŦñ°ŗ Œò»&ź}ŻŠsƑƒ C ^^ ŋ´¬Ŕ&%n Ƃ²³¯» ) Ƃ}ƃ¬Ų&v°Ŕ&%´ŗ Ź KPG% koʿ ÍŔ&%´ŗ ÆfJ s%Þ¬źŠ%´º»VWsīļžſv<ÃÂ%´ŗÇ ²³ñòKPG+Ö&N¹-}ijĬcdġŻ%°Ŗ´ŗ Ē ¯2 *ùó 7ŎF,-'(´¬ŷĆnpersistence-test.xml } import-test.sql OáMs£ñòŖ´ŗ import-test.sql ŀ&N¹--ä},-Nn ļ,-s'(ñò¬N¹-?Ã-RñòŖ´ŗ myproject-dev-ds.xmln persistence-dev.xml } import-dev.sql OáMn 345ôǶN¹-KM´¬}Þ£¯Ŗ´ŗ fJ ·¸N¹-%pŘ¯2°¬ºʋý¬ºŠ"º«2n -äKMμ/?Ã-Rñò¬ŷĆsµûŖ´ŗ myproject-prod-ds.xmln persistence-prod.xml !¯2 import-prod.sql OáMn ŽʼnŇN¹-345KM´¬}Þ£¯Ŗ´ŗ KMÎ-ä¼/?Ã-RñòŖĿŻŗ 12 «®."K;<%'¯°±© űƦ&G45-NM& ]` ODðGƅò2°¬ŷĆn ë!»ţnŠ&«" C &-,D-G45ÂÚF<ÕÖžſv ]` s²³ñò¬&Ŧȅ"º}ȶľò¬%¯Ƌ"ŗ śŜ&«"NM¯2ţŦñ°ŗ seam new-action °ţÖº&ȟȠƕ12ÞŖ´ŗ !¯2n KPG£®¯° e [ } ;RS²³¯Ŗ´ŗ C:\Projects\jboss-seam>seam new-action Buildfile: build.xml validate-workspace: validate-project: action-input: [input] Enter the Seam component name ping [input] Enter the local interface name [Ping] [input] Enter the bean class name [PingBean] [input] Enter the action method name [ping] ©C© \Q fJ 2 ª1«" [input] Enter the page name [ping] setup-filters: new-action: [echo] [copy] [copy] [copy] [copy] [copy] [echo] Creating a new stateless session bean component with an action method Copying 1 file to C:\Projects\helloworld\src\action\org\jboss\helloworld Copying 1 file to C:\Projects\helloworld\src\action\org\jboss\helloworld Copying 1 file to C:\Projects\helloworld\src\action\org\jboss\helloworld\test Copying 1 file to C:\Projects\helloworld\src\action\org\jboss\helloworld\test Copying 1 file to C:\Projects\helloworld\view Type 'seam restart' and go to http://localhost:8080/helloworld/ping.seam BUILD SUCCESSFUL Total time: 13 seconds C:\Projects\jboss-seam> ®¯° ;RSǣǤ¯&%n řô¯@DG&KMƲ./´¬ŲsµûŖ´ŗ seam restart }Ūū´¬ºn ^ f [Y qº»²³ñòKPG build.xml OáM & restart NF'(´¬Œ}%("Œ}s%ÞŖ´ŗ Ʋ./LjĂ´¬Ɛ&ēĔn ^ [Y & resources/META-INF/application.xml OáMʼȡ´¬Œ}%´ŗ 345Èĸ´¬ì Ʋ./´¬Ųv°Œ}ƮƬ¯2ţŦñ°ŗ ñµnhttp://localhost:8080/helloworld/ping.seam ŕŻ%nGFGÿNʈ¯2ţŦñ°ŗ KPG& src à @DGƃòũnŒ&G45Ĺñò;<ƃ¬Œ}s%ÞŖ´ŗ ping() ÂÚF<DGRMǞ°2n GFGÿNŔ"wƂʈ¯2ţŦñ°ŗ šŶnPingTest.xml OáM âF3TǞ¯n ^ [Y & *ùó HM£¯2ńĆ,-'(¯Ŗ´ŗ ƐvēĔn seam test £¯2,-./´¬ºn ²³ñòl<º» test NF./´¬Œ}%´ŗ 1S "K;<%.²©Q³'¯°±© ŧ&-,FnśŜ&«"O¶²³´¬Œ}%´ŗ seam new-form C:\Projects\jboss-seam>seam new-form Buildfile: C:\Projects\jboss-seam\seam-gen\build.xml validate-workspace: validate-project: action-input: [input] Enter the Seam component name hello [input] Enter the local interface name [Hello] [input] Enter the bean class name [HelloBean] [input] Enter the action method name [hello] [input] Enter the page name [hello] ©C© \\ fJ 2 ª1«" setup-filters: new-form: [echo] [copy] [copy] [copy] [copy] [copy] [echo] Creating a new stateful session bean component with an action method Copying 1 file to C:\Projects\hello\src\com\hello Copying 1 file to C:\Projects\hello\src\com\hello Copying 1 file to C:\Projects\hello\src\com\hello\test Copying 1 file to C:\Projects\hello\view Copying 1 file to C:\Projects\hello\src\com\hello\test Type 'seam restart' and go to http://localhost:8080/hello/hello.seam BUILD SUCCESSFUL Total time: 5 seconds C:\Projects\jboss-seam> Ʋì345Ʋ./ñĿn http://localhost:8080/helloworld/hello.seam ŕØŖ´ŗ ²³ñò;<ƃ2ØŖ¯Ƌ"ŗ ,-'(¯Ŗ´ŗ Ǭº®¯°O@<O¶} ;RSǣǤ¯2ØŖ¯Ƌ"ŗ ÆC ;<Èĸ¯»ļKMƲ./´¬Œ}ʅòv°«"¯2ţŦñ°ŗÇ 1[ ´µ.P¶4·¸"&!:;<%'¹6¯°±© ɻ/%N¹-&ŀ,²³¯Ŗ´ŗ ÆƐ&N¹-úûüý¬Ųsµ¬ŷĆŔ"wƂ ŒŒ%ŧ&«"Ūū¯Ŗ´ŗ seam setup '(¯Ŗ´ŗÇ seam generate-entities KMƲ./¯2n http://localhost:8080/helloworld ŕŻ%ţŦñ°ŗ N¹-&ȺȻn ·¸ĊPG&ʼȡn ®¯°ĊPG&²³stu%´ŗ ²³ñò;<ƃ¬}n ë!»ţµŖûžſv&ˀºò}ȶ°Ŗ´ŗ NGE-;<sɻpŘ%žſVW%Þ¬«"cȸñò2°¬º»%´ŗ Ŗ f J £¯2Ŵ¬¯ţv°ʥ%ŔǕʴʵ%´ŗ 1^ ´µ. F%3G3G·¸"&!:;<%'¹6¯°±© y+º]2 ·¸&íîv?,@,@GH- src/model Ǟ°2nśŜNM¯2ţŦñ°ŗ seam generate-ui KMÂ-N¯2nhttp://localhost:8080/helloworld ŕŻ%ţŦñ°ŗ 1b ]+j»¼-"&!:;<%'&MO±© šŶn Ƒƒ C ^^ \ âF3£¯2345KM¯°}ȶ°Ŗ´ŗ ŖŴn seam unexplode '(¯2řô¾¿&@DGǼƸ´¬ŲsµûŖ´ŗ ^#I KM´¬n ;¤<K% seam deploy Ūū´¬ºn²³ñòKPG& `[ -G& deploy NF'(¯Ŗ´ŗ seam undeploy Ŗ undeploy ©C© \a fJ 2 ª1«" NF"}KMs%ÞŖ´ŗ O¶%n345 C Ye[ £¯2KMñòŖ´ŗ ^#I persistence-dev.xml OáM} import-dev.sql OáMġØn myproject-dev-ds.xml OáMsKMñòŖ´ŗ KOáMÈĸtu%n śŜ&«"Ūū¯2 Y Ye[ £¯Ŗ´ŗ seam -Dprofile=prod deploy 345£®¯°KMÂKOáMdÓ´¬Œ}Ŕ%ÞŖ´ŗ KPGǃúvÒsÝ°OáMǣǤ¯Ŗ´ ő èýũn persistence-staging.xmln import-staging.sql } myproject-staging-ds.xml vŠ%´ŗ -Dprofile=staging 2KOáM&ÒǚǛ¯Ŗ´ŗ 1c w½¾J &MO¿% řô¾¿&@DG% 345KM´¬ŷĆn ôǶÎÀÁFKM&RĦŨ¬%¯Ƌ"ŗ components.xml śŜ&(ǣǤ´¬Œ}%n } b [ &Ɲē%FÅ<íî´¬ŲsµûŖ´ŗ <core:init debug="true"/> śŜ&OáMn ]`345ŸŹƲ./´¬Œ}vţƲKMñò¬ºŔ¯òŖĿŻŗ ş e [ ş pages.xml OáM Ŧ¯n °Ŵòº& C ;<Èĸ´¬Ųsµ¬ŷĆn 345ŸŹƲ./´¬ŲsµûŖ´ŗ Æ %n FD¹&KMÂVWX}ŋŌ´¬Œ}%Œò(°Ŗ´ŗ ^#I KMÂv» application.xmln ]#I KMÂv» web.xml %´ŗÇ ¯º¯n ˁ°ʼȡ½;âM½,-&MG˂Ģv»ũn C ;RS&ÀÁƲKMÂR¯2°Ŗ´ŗ Œ&ķuíî´¬1n C ;RS WEB-INF/dev @DGKM´¬ŲsµûŖ´ŗ !&§¨n;RS ]#I µ¬° ^#I GH-Kĕ%vţn Ğğv GH-Kĕ«2K<ñò¬«"vûŖ´ŗ śŜ&Ăǘ2ëţŲsµûŖ´ŗ ş ;RS C ;RS%vŨòũvûŖĿŻŗ ^+ Ƅt%´ŗ ÆŒ&Ă˃Ţŀ%´ŗÇ ş ?,@,@FKM%ÞŖĿŻŗ ş components.xml %KMñò;RSFKM%Þv°ŷĆsµûŖ´ŗ ©C© \g fJ 2 ª1«" ş FKMtuv;RSn &éĥKMñòGH-º»ƃýŖĿŻŗ ş FGÅ<íî¯njboss-seam-debug.jar TǞ¯vòòũvûŖĿŻŗ ş _`Z[ O@NM-¯vŨòũvûŖĿŻŗ WEB-INF/dev WEB-INF/lib fJ £¯2 ]#I KPG²³´¬ŷĆn ÀÁFKMÂnsrc/ action Ú-@DGµ¬GH-!&ŖŖ£tu%´ŗ ¯º¯v»sn fJ ^#I KPG´¬ÀÁFKMż¯2°ŖĿŻŗ 1f Si - '¡±© )o CC b ) KMñòŖ´ŗ # £´¬v»ũn Q) £´¬Œ}ʰʱ¯Ŗ´ŗ Œò b ) OáD-'Ɗs<ñò2°Ŗ´ŗ%Ŕn Qo HFO¶% )o £´¬Œ}Ŕtu%´ŗ Œò(" ) -,FsŲ%´ŗ ^+ síîv5& Qo &M-n |àb b ) OáD-'Ɗ˄ʺŗ Œò»&-,F(ýũn )o 345sKMtuvûŖ´ŗ 1f Si .O%4 # Qo ʹʺ&O¶cd%Ɨ˅ñò2°ŖĿŻŗ '(´¬1n^+ KOáMǚǛ¯2 ^| ) M-H £¯2M-¯vŨòũvûŖĿŻŗ ^+ RġŖv°M-%/p¯ŖĿŻŗ ^| M-Hmf Y6½½[`B` ½B[[½_[ º»ĕœK<tu%´ŗ 1f1 _ 1 j .O%4 # Qo & ]` cd server/default/deploy/jbossweb-tomcat55.sar µûŖ´ŗ jsf-libs @DGº» myfaces-api.jar n myfaces-impl.jar ǼƸ´¬ŲsµûŖ´ŗ !¯2n@DG jsf-api.jarnjsf-impl.jarnel-api.jar } el-ri.jar ;Č´¬ŲsµûŖ´ŗ b & #I lib @DGµûŖ´ŗ [ & #I ) -º»IJǁtu%´ŗ ñ»nconf/web.xml ˄ʺ¯2ţŦñ°ŗ ©C© ʼȡ´¬ŲsµûŖ´ŗ myfaces-impl.jar jsf-impl.jar \h 2 B%3À4 ÁµB%TU% Â# ëŨ¬ ) Ö&ŀȌʝn ;,Ã- &ʝ};RS&ʝ%´ŗ ;RSn-,OvĊPGnĻļ ^ %´ŗ ;RS&M-N-n;,Ã-}ŋŌʔŨ»òn!&;,Ã-ŀ%Òʫ ý»òŖ´ŗ MPG45 ÆB Ç nqĥ&;RSÒ ÆM-N-ÈÇ ;,Ã-ŀ&Ò?M-¯n «¬;RSŏ&/v×Øǎ2nƲ×Øǎ2tu´¬ÂLŎƛƿǀ¯Ŗ´ ŗ ×ØÙŖò;,Ã-º»ɾǂª1Ŗ¯Ƌ"ŗ 2 B%3À4 ;,Ã-ODðG«2²³nȒȓñòŖ´ŗ 345 C #~ ƭìƗ¯«2;,Ã-ˆÁ Æ Ç ǂzĂă´¬Œ}%ÞŖĿŻŗ ;,Ã-Ļļnˇˈ%´snŷĆ«2;,Ã-ï,45«2ˆÁñ òŖ´ŗ Ĝ& ;,Ã-śŜ&Ļû%´ŗ ş -,D-;,Ã- Æ[ ZÇ ş M¹ ÆŖG?-Ç ;,Ã- Æ^C Æ ĖÇ ZÇ ş ;,Ã- Æ~J ZÇ ş ;,Ã- Æ¢C ZÇ ş EF45;,Ã- Æ ZÇ ş lS-KE-;,Ã- Æ Y ZÇ ş 345;,Ã- Æ#YY[ ZÇ Œò»&;,Ã-&°ţÖºnDFĝŋŌ´¬ƞƟɆº»ȍƦ¯2°¬Œ}sľº ûŖ´ŗ ¯º¯nŒ&"nj ) ÖƉ®¯°ºŔ¯òŖĿŻŗ ;,Ã-}lS-KE-;,Ã-%´ŗ ]^ 345ŀ%&ƪƫ=s}2Ŕˉˊ%?HsǶ²¯ĝ´° Ö&=ȍn + Ö&×ØÙØ;,Ã- ÆG?-nEF45n345Ç slS-KFG&ˋNJº»Ğd&ƬȘÕv°º»%´ŗ èýũn'ę&345&ðGOK&ˋNJº»ƃ¬}78KMEF45ˌ 12¼ȍˍɎvŞɃ%´ŗ !&1nź}ŻŠ& ;RSn;,Ã-µ¬°lS-KE-;,Ã-&-;TǞñ òŖ´ŗ vȖv»n!ò»345&ˋNJº»}2ŔƬȘ&µ¬;,Ã-Ŧº»%´ŗ Ën!òɇò&;,Ã-ƃ2°ÞŖ¯Ƌ"ŗ ©C© \k ;,Ã-ĸ;RSÅ 2 43 H4B%3À4 à ÄÅ ƪƫŔv°;RS ÆƠ-,D-EF45 Ç n°ÖŔ-,D-;,Ã- Æ'ę;,Ã-%µûŖĿŻÇ ǞºòŖ´ŗ -,D-;RSnµŖûȗȘș°Ŕ&%ŔvţnŖţĊPGƓȫ%Ŕµ ûŖĿŻŗ %ŔnŒò»Ƣ%¯ũ¯ũǍǎnjŖ´ŗ 21 O¶% B%3À4 M¹;,Ã-ĐšŔˎ°đƪƫÕÖ;,Ã-%n ĩ&ȑˏ&M¹ːˑ´¬ ]^G?-;,Ã-&ʝ&wʕä%´ŗ !òŔººľ»Ŵnb G?-&HMOMG}ŋŌʔŨ»òM¹;,Ã-n M¹;,Ã-&šŔƢv£è%µûnšŔ«ţĮ£ñò¬Ŕ&%´ŗ G?-ĄąÎnM¹;,Ã-ŋŌ´¬;RSȒȓñòŖ´sn !ò»&ƪƫnǙvţ}ŔG?-&HMOMG&ç%íîºÖǂŤ%´ŗ I| ǐȍµ¬° IJ «û ;RSƭìƗ´}Þn M¹;,Ã-n!&ƭìƗ¯ŦŨ&1²³nȒȓñòŖ´ŗ 22 ~B%3À4 Ãy ÄÅ ;,Ã-nƪƫDĕñò&Ğd&M-N-}ŋŌʔŨtu ¯Ŗ´ŗ M¹-êŀ%ƪƫ&0Ĉästu%n 'ęDĕ¯2°¬çn ȍƦ´¬ŠŻvM¹º»ŔƪƫGE-stu%´ŗ ŒòĞM<&NÈä-sŌ/¯2°¬GFL-&«"vķu ǍǎnjŖ´ŗ ƪƫ'ęGHM&14HMƛñòŖ´ŗ !&1nŒ&ŞɃÔœM<&ɕpĝþ¬ÿN¯2ˌ12ȱȲ%´ŗ 2S B%3À4 Ã Æ ÄÅ ;,Ã- %ŖñŀȌ}v¬;E%´ŗ Æ CÇ n78&ˋNJº»& Ö&pŘſÌ%´ŗ !ò78}&MNHG45nG?-në«ìN¹-H8G45Ŗʲ ºŔ¯òŖĿŻŗ ¯º¯n78}2n Ö&ƺƻ>Ɣ¯Ŗ´ŗ èýũnĐ,đnĐ˒ʐťđnĐơĠp³đ´ƚ2%´ŗ }°"Ŕ&s Ö&Đ7-3-𵬰Đ78-đ'Ɗ¯2°¬}Ǫý°ºŔ¯òŖĿŻs ŋʂŲŴ¯Ŕ!&ĻûvûŖĿŻŗ nĐ78sŒ&œ@<œ&ŀ%ǹǰ¯2°¬Œ}đ}ŋŌʔŨ»òƪƫƀÕ¯Ŗ´ ŗ ʥ&78nĻļ¤œ@<œ%nµ¬ÎNJŕ(ŀ&Ô&Õ2°¬ºŔ¯òŖ ĿŻŗ ;,Ã-nɂv¬º»&ƪƫ&˓ɞvţ¯n&˔˕}v»v°Œ}ƀƍ¯ Ŗ´ŗ &ˋNJº»345Ö°2Ǫý¬Œ}ƅò¬Îçsºº¬ºŔ¯òŖĿŻŗ ¯º¯nƅò2¯Ŗ"}nŒ&;EsǕƩÞvûnŔ"v¯%Ǫý»òvţv¬Ŧ ©C© ao ;,Ã-ĸ;RSÅ ȅ"}ȶ°Ŗ´ŗ µ¬ſ Ö&G?-&çj°2°Ŗ´ŗ Ô&G?-Ŗʲn «2ƿǀñòï,452nˆÁzñòvŨòũvûŖĿŻŗ µ¬Ŗ N-G N-GɐĈlS-KE-&ˋNJ%ƢvƬȘÕÖ%µûn N-Gs˖˗«ţŸą´¬ŷĆn lS-KE-&ƪƫĀāȽÞ.Œ´tuĬÕ2°Ŗ´ŗ N-GˆÁ£ĞƐvï,45&EFƿǀ¯Ŗ´ŗ %´ŗ «û˘°& qĥ %Ƕ²ñĿ¬«"v S- Ŕtu%´ŗ ŒòÉòķu%´ŗ Ļļn'ęG?-}G?-&ç C[ EF45ŀ% «ûƪƫƀÕñòŖ´ŗ cdtuv NMœ 'Ɗ¯n ¼/ƄʃĬvȒȓ¯n 78sŀį¯2Ŕn78KMEF45«ûƀÕñò¬ƪƫęȃvţÀǤ¯v °Œ}sƀƍñò2°Ŗ´ŗ ÍKE-ŀ&ÍɐĈ;,Ã-ŀ%Ƕ²´¬Ïdz&G?-Ð=4ä¯ Ŗ´ŗ µ¬°n GHMHœ8&ŀ&ƪƫƀÕ´¬«"cdñò¬ŷĆŔµûŖ´ŗ 2[ IJ;<%B%3À4 à ÄÅ EF45;,Ã-78KMŋ´¬ƪƫƀÕ¯Ŗ´ŗ °ţÖº&Ɂè%&ç%ƪƫƹí´¬Œ}sí£vŒ}sµûŖ´sn KM78ŋ´¬KȟȠśé&;RSƀÕ´¬1n EF45;,Ã-£´¬Œ}˙³%ÞŖĿŻŗ Ifah Y[ ʼnŇ%nEF45;,Ã- Y[ EF45ƬȘ¯Ŗ´ŗ 2^ gU4&MI4B%3À4 à ÄÅ lS-KE-;,Ã-ɐĈlS-KE-ŋ´¬ƪƫƀÕ¯Ŗ´ŗ Œ&ƪƫ ~| ? Æ B~|Ç «2=}ijäs(ľòŖ´ŗ lS-KE-nÔ78&ÔMNHG45˚ț¯¯Ŗ´ŗ ű2nŒ&ƪƫÔ78&ç%ǂŤvēĔ%ƹíñòŖ´ŗ ǹǰ&N-Gǹǰ&lS-KE-M-N-Ɣd¯n lS-KE-&HMOMG KE-dÓƏ˛ £´¬Œ}%éĥdÓñòŖ´ŗ ű2nlS-KE-&ˆÁ&1ĞƐvï,45µûŖĿŻŗ 2b "&!:;<%B%3À4 Ã+ ÄÅ 345;,Ã-DFƞƟº»ëvØ&DF&;,Ã-% ´ŗ ©C© a ;,Ã-ĸ;RSÅ 345;,Ã-ƠncdNnȺȻNnÂNÅ&«"v˜vȟȠ ƀÕ´¬1ǍǎnjŖ´ŗ èýũn 345;,Ã-ŀ !&Ŕ&&cdĝÂNÅƀ¯2°Ŗ´ŗ 2c B%3À4 Ç ;,Ã-Òæçn;,Ã-È &EFdÓ¯Ŗ´ŗ Œò»DFƞƟ&EF45ĝG?-ƙĬ}ÍƟķu¯Ŗ´ŗ Š&«"vƜ%Ŕ;,Ã-È}M<s%ÞŖ´sn Ļļn ;RSM-N-;,Ã-ÈM<¯Ŗ´ŗ ű2n;,Ã-ŀ%n ;RSM-N-;,Ã-ÈÒ Æ°ÖŔ%v°sĻļ;RSÒ}ÍÇ %ɼƐñòŖ´ŗ Contexts GH-Ļ¯2Ğd&-;&Ɠdñò;RSM-N-KHGE -Ŕ%ÞŖ´ŗ !ò Context MNOP-&-DF<§ìÖ°M-N-ǵ&GE-ƿǀ¯Ŗ´ŗ User user = (User) Contexts.getSessionContext().get("user"); Òż´¬Ɯcd¯ûÈĸ¯û´¬Œ}Ŕ%ÞŖ´ŗ Contexts.getSessionContext().set("user", user); ¯º¯vs»nĻļnMPG45Ļ¯2;,Ã-º»;RSIJǁ¯n œPG45Ļ¯2;RSM-N-;,Ã-TǞ¯Ŗ´ŗ 2f B%3À4 £¤ÈÉÊË $V&«"n;RSM-N-Ğd&˝ǘ&-;º»IJǁ´¬Œ}ŔµûŖ´ sn !òśé&ŷĆn´ƚ2&-,O-; ÉÊËÌ ű2¥¦ñòŖ´ŗ !&Ë˞śŜ&Ļû%´ŗ ş M¹;,Ã- ş ;,Ã- Æ~J ZÇ ş ;,Ã- Æ¢C ZÇ ş EF45;,Ã- Æ ZÇ ş lS-KE-;,Ã- Æ Y ZÇ ş 345;,Ã- Æ#YY[ ZÇ ƭìƗ´Œ}«2ÉÊËÌ&¥¦Ŕtu%´ŗ º»Ò«2GE-´¬ŷĆ°ÖŔnÉÊËÌ¥¦sǶ²¯Ŗ´ŗ Contexts.lookupInStatefulContexts() b 2i ÌÍÎ0ÏDÂ# ©C© a) ;,Ã-ĸ;RSÅ C[ ƞƟŔ ^ ƞƟŔÍGHMº».Œ¬ÍÎÏ(&G?-=´¬1&ķŞŖţdÓ¯ 2°ŖĿŻŗ C[ ;,êſȩ´ƚ2&-DF<ÍÎÏ(ʯ/ñĿn -DF<EO}´¬Œ}345;<˟ĿŖ´ŗ ^ ;,ê-,D-;RSsÍÎÏ(GE-ñò¬Œ}tu¯n Ô&-DF<sˠ}Ö&-,D-EF45 GE-´¬v»ũèé-K¯Ŗ´ŗ Œ&ɸ¬ɹ°ˡƂ&㺰ÍĈG?-¹-}´¬ɩ°-NM& ]` 345%Ǖʴʵ%µºŔ¯òŖĿŻŗ ¯º¯nƾţ&ˡƂ&㺰īÍĈG?- Æ##åÇ ƾ£´¬š®&345&1n ÍÎÏ(ŖˢòŔv°Ɂ'%µûnKHÅ}¯2RñòvŨòũvûŖĿŻŗ ÍÎÏ(=DMˣ;,Ã-ÅˤûÙØŖ´ŗ EF45}345;,Ã-¤-DF<v2°Ŗ´ŗ ÍÎÏ(Ð=ñò¬1;,Ã-ŀ%&ÍÎÏ(G?-ɋ¯Ŗ´ŗ M¹};,Ã-Ʀ4-DF<%´ŗ ˥˦ƏýũlS-KE-;,Ã-¤-DF<%´sn 'ęÍÎÏ(}2ŔŖò%nŒ&Ɂ'ź}ŻŠȥƉñòv°ºŔ¯òŖĿŻŗ šŶn ÍɐĈ;,Ã-ŀ&ÍÎÏ(G?-4HMƛ´¬Œ}«2n n;,Ã-&1 KE-Ȧ}Ȧ}&4-DF< Å'˧¯Ŗ´ŗ EF45;,Ã-¤-DF<%¯ũ¯ũ˨ǶĬ&ƪƫġĢ&%n «ûEF45-;;RSÍÎÏ(GE-º»°ÖŔƀ˩ñò2°Ŗ´ŗ O¶%G?- EF45-;EF45 } C 4HMƛ¯Ŗ´ŗ Æ !¯2nǶ²´¬ŠŻvF<KFGŔ¥Ɨ¯2˪ô¯Ŗ´ŗÇ 345-;&;RSĻļ˨ǶĬ&ƪƫƀÕ¯v°1n Œò345-;&;RS&1&O¶&ɸ¬ɹ°%µûŖĿŻ ŗ vȖv»nKD¹&ÍĈä ˌ˫ ;-sºº¬º»%´ŗ ¯º¯n @Synchronized ï,45ǣǤ´¬Œ}%n EF45 Ŗ C ;RS4HMƛñò-DF<ÅLjĂtu%´ŗ Œ&ÍÎÏ(Ån ôǶĨˬ%&ĞƐvpŘŖţŲ}´¬Œ}vţn GHMsɦŹ˨ǶĬEF45ĝƪƫ£%Þ¬Œ}ƬȘ¯Ŗ´ŗ ##å 21 B%TU% ;RS ~ Æ~[ [ C `B Ç %´ŗ ˭Ȕn ;RS C Ŕ¯ţ ^ +o ?NHMƛ %´ŗ ;RSs ^ sŲų%vţnŖ ^ +o ƒˮ&;,êsvţ2Ŕ£%ÞŖ´sn ^ +o ʝɉ¯2cȸñòn^ +o }LjţńĆñò2°Ŗ´ŗ śŜ& ;RSNM R¯Ŗ´ŗ ş ^ +o -,D-EF45 ş ^ +o -,OEF45 ş ^ +o ?,@,@ ©C© a+ ;,Ã-ĸ;RSÅ ş C ş ^ +o ÂFEÑ/¡ 21 43 H4IJ;<% -,D-EF45 ;RSnÔ&ƭƗ¯¯2ƪƫƀÕ´¬Œ}s%ÞŖĿŻŗ ű2n!ò»ĻļñŖǾŖv ;,Ã-q&Ɛ;RS&ƪƫɕp´¬&ǍǎnjŖ´ŗ !ò» &G45-ê}¯2£%Þ¬ºŔ¯òŖĿŻsn Ěz&1 ;RSKâ,@ƿǀ´¬Œ}%ÞŖĿŻŗ b b -,D-EF45 °ÖŔ-,D-;,Ã-ǞºòŖ´ŗ ®¯°M-N-sŚG?-%£ñò¬&}ÍƟ-,D-EF45 ÍÎÏ(GE-ñò¬Œ}stu%´ŗ M-N-G?-ĉû 2¬Œ} ^+ ;,ê&˯˰%´ŗ Æ ĻļM-N-ƲĮ£tuvº»ĉû 2»òŖ´n ÖŖûn &£˱Ø&Ŕ&º»NġĢM-N-ÈƃÖŨ¬Œ}s%ÞŖ¬Œ}ƬȘ¯Ŗ´ ŗÇ -,D-EF45 šŔȗȘ&ľºv°ȑˏ& ;RS%´ŗ -,D-EF45 ;RS Component.getInstance() Ŗ @In(create=true) £¯2M-N-ätu%´ŗŒò» ù FGFĝ ƣƤ new ĊDN%M-N-äñò¬ƚÞ%µûŖĿŻŗ 211 43 Q#IJ;<% -,OEF45 ;RSn &Ô&ƭƗ¯¯2ƪƫƀÕ´¬Œ}s%Þ¬ŦŨ%vţn Ô&G?-¯2ƪƫƀÕ´¬Œ}Ŕ%ÞŖ´ŗ N¹-ƀÕñò2°v°345&ƪƫn Ļļn-,OEF45 «2ƀÕñò¬ŲsµûŖ´ŗ Œò }ĩ&ƾţ& ]^ 345ODðG}&ǕÞvDZ°%´ŗ ǹǰ&&ȟȠƣƤ HttpSession ʈ¯Ù1¬Ĥľûn ;,Ã-§ìÖ°-,OEF45 &M-N-È&ŀ!òƀÕ´ƚÞ%´ŗ Œòn sŒ&ƪƫ&HMOMG&=tu¯n ɂv¬ÍÎ'(ŀ&ŋŌ´¬ƪƫ&ç˓ɞsv°Œ}ƀƍ¯Ŗ´ŗ -,OEF45 ¯ũ¯ũ b ĚzŔ¯ţO¶&ĴF&1Kâ,@ƿǀ´¬ ;RS&Fà }¯2£ñòŖ´ŗ G45-ênŖn b O¶%n-,OEF45 ;,Ã-}M<¯Ŗ´ŗ !ò»Ŕ¯ţ-,D-;,Ã-}M<%ÞŖĿŻŗ EF45-;&-,D-EF45 ǵ&ÍÎÏ(G?-n °Ö%Ŕ «24HMƛñòŖ´ŗ ©C© aQ ;,Ã-ĸ;RSÅ -,OEF45 ;RS Component.getInstance() Ŗ @In(create=true) £¯2M-N-ätu%´ŗŒò» ù FGFĝ ƣƤ new ĊDN%M-N-äñò¬ƚÞ%µûŖĿŻŗ 212 F%3G3G ?,@,@ ;,Ã-È}M<¯n;RS}¯2ķu´¬Œ}ŔµûŖ´ŗ ?,@,@n;,Ã-ĸɼƐXǤý2ijɼƐXÕÖ1n ?,@,@&M-N-n «2ˇˈM-N-äñò¬«ûn Ģ¯ȅ C ;<ŀ%ǂzM<ñòŖ´ŗ ?,@,@ ;RSMPG45Ŕ;,Ã-ˆÁŔR¯ŖĿŻŗ Ŗn?,@,@ ˲&Nƌ Ĭ¥ƍ&ƭìƗ¯ŔR¯2°ŖĿŻŗ ?,@,@ nĻļ b G45-ê}¯2£ñòŖĿŻsn ¯ũ¯ũnĚzµ¬°O¶&ĴF&1 b ;RSKâ,@ƿǀ´¬Fà }¯2ķu¯Ŗ´ŗ Ğn?,@,@ Fà }¯2£´¬Œ}wʕ%µûn ǣǤ ½ Èĸ ½ ǼƸNM&ķu&'Ɗ&1&-,D-EF45 G45-ê}°¯Ƌ£ñòŖ´ŗ O¶%n?,@,@ -,D-EF45 }M<¯ŖĿŻŗ ;,Ã-}M<¯Ŗ´ŗ GH-NñòʼnŇ%n -,OEF45 ŀ%?,@,@ &ȺȻƀÕ´¬Œ}«ûn ?,@,@ ƣƤµ¬°EF45-;& ;,Ã-ÈM<´¬ēsīî¨%µ¬Œ}ƮƬ¯2ţŦñ°ŗ Œ&=ȍ&1n´ƚ2& 345s ;RS%µ¬1?,@,@ dÓ´¬ľŨ%µûŖĿŻŗ ?,@,@ ;RS Component.getInstance() Ŗ @In(create=true) £¯2M-N-ätu%´ŗµ¬°nƣƤ new ĊDN£´¬Œ}stu%´ŗ 21S Æ C -,D-µ¬°-,OEF45 &«"£ñò¬Œ}ŔµûŖ´ŗ ¯º¯n!ò»EF45 &ķuƿǀ¯2°ŖĿŻŗ ÆƎƏH8G45ˆÁn ƎƏEÃ,@n îɓGH-NäñòƪƫD345n ^ +o ijĬn NMœÂÚF<vŠÇ Ŷ&ɽ%n^ ;,êv¯% ĝ ` £´¬ēĔ˳˴¯2°Ŗ´ŗ Œ&7-3-%n;RSEF45 &Ĥľû C %´ŗ ¯º¯nƾţ&345%n -,OEF45 ;RSGH-N´¬«ûn µ¬°EF45-;& C ;RSGH-N´¬ēsƾǙīîɓ%µ¬Œ}ƮƬ¯2ţŦñ°ŗ O¶%nC M¹;,Ã-}M<¯Ŗ´ŗ EF45-;& ©C© C ǵ&ÍÎÏ(G?-°ÖŔ a\ ;,Ã-ĸ;RSÅ «û4HMƛñòŖ´ŗ C ;RS Component.getInstance() £¯2M-N-ätu%´ŗŒò»ƣƤ ĊDN%M-N-äñò¬ƚÞ%µûŖĿŻŗ Ŗ @In(create=true) new 21[ ¿JIÐ6 ÂFEÑ/¾ ;RS}¯2ķu´¬Œ}s%ÞŖ´ŗ ¯º¯nÂFEÑ/¡ nĩ& ;RS}Ŗţɂv¾%ƭìƗñòŖ´ŗ ;,Ã-ÈĻ2!ò»ƭìƗ´Ĥľûn | Ė µ¬°nY ɍħñòÂFEȏnjĦŨŖ´ŗ ÂFEÑ/¾ n ;,Ã-}M<%ÞŖĿŻŗ Ŗn!ò»&ĐƭìƗ¯˵đ&EF45ĝƪƫGE-%ÞŖĿŻŗ ¯º¯nÂFEÑ/¾ nMPG45}ĩ& &ķuR¯Ŗ´ŗ ÂFEÑ/¡ 345«2M-N-äñòŖĿŻŗŒò»ÂFEĦħ¯}Þ ^ ;,ê«2M-N-äñòŖ´ŗ 21^ O%PI&;<% !&¤FG ÆMPG45n;,Ã-ˆÁnNƌ Ĭ¥ƍvŠÇ '(´¬1n ;RS&ƭìƗ¯MNE¯vŨòũvûŖĿŻŗ C %n ;RS&M-N-äŸŹĂă´¬1nĞƐvcdƄ%´ŗ ?,@,@ %nMPG45};,Ã-ˆÁsƓdñò2°v°1nMNE45Ƅ %´ŗ EF45 %n^ MNENEF45 ;RS&19:¯vŨòũvûŖĿŻŗ ï,45śŜ&«"£¯Ŗ´ŗ @Stateless @Interceptors(SeamInterceptor.class) public class LoginAction implements Login { ... } ¯º¯nŔ}Ʒ°ēĔnejb-jar.xml MNENdÓ´¬Œ}%´ŗ <interceptors> <interceptor> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor> </interceptors> <assembly-descriptor> <interceptor-binding> <ejb-name>*</ejb-name> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor-binding> </assembly-descriptor> ©C© aa ;,Ã-ĸ;RSÅ 21b B%TU% Ñ ´ƚ2& ;RSÒsŲ%´ŗ ï,45£¯2;RSÒĉû 2Ŗ´ŗ @Name @Name("loginAction") @Stateless public class LoginAction implements Login { ... } Œ&Òn ;RSÒ Æ Y Ç %n ^ Ƒƒ%dÓñòĩ&Ò}&ŋŌµûŖĿŻŗ ¯º¯n ;RSÒnjƋ"Š b = &«"/p´¬1n ) Ö&;EÍw}Ǫý¬Œ}s%ÞŖ´ŗ ;RSÒdÓ´¬˶w&ēĔ%µûŖĿŻsn ÒƓd´¬ŲsµûŖ´ŗ Ŕ¯!"¯v°}nĩ& ï,45ŠòŔķu¯v°%¯Ƌ"ŗ @Name °ÖŔnŠŒº% njƋ"Š b &«"n ;RSM-N-n Ļļ;RSÒ}ÍÒ&;,Ã-È}§Ć¯Ŗ´ŗ ű2nèýũnContexts.getStatelessContext().get("loginAction") 2n LoginAction GE-%Þ¬%¯Ƌ"ŗ ˭Ȕn ¼ȧs;RSM-N-䴬ΰÖ%Ŕn !ò;RSÒ«2®¯°M-N-È}§Ć¯Ŗ´ŗ ¯º¯nŒ&ŷĆŔ b &«"n 345KHĜʔ° #~ ;«2;RSĩ&;,Ã-È}§ĆñĿ¬Œ}Ŕtu%´ŗ Ğd&;RSs4-,&ŀ%Ô&Kƿǀ´¬ŷĆ&ØnŒòí£%´ŗ èýũnǹǰ&KM User currentUser EF45;,Ã-ȧĆñò2°¬ºŔ¯òŖĿŻsn wē%nµ¬=ķu&ƠȔ%µ¬ User user ;,Ã-ȧĆñò2°¬ºŔ¯òŖĿŻŗ īļǕ±˷v345&1n!¯2×ØÙØ ;RS&1n˃˸Ò¯ũ¯ũľòŖ´ŗ @Name("com.jboss.myapp.loginAction") @Stateless public class LoginAction implements Login { ... } C ;<ŀ%Ŕ b &¿Ə˛ŀ%Ŕ˃˸ñò;RSÒ£%ÞŖ´ŗ <h:commandButton type="submit" value="Login" action="#{com.jboss.myapp.loginAction.login}"/> Œò"}"¯°&%n ˃˸ÒžſvÒ?M-´¬ķuŔƿǀ¯Ŗ´ŗ śŜ&«"v( components.xml OáMǣǤ¯2ţŦñ°ŗ <factory name="loginAction" scope="STATELESS" value="#{com.jboss.myapp.loginAction}"/> ´ƚ2&×ØÙØ ;RS˃˸ÒÕ2°Ŗ´sn !ò»&ź}ŻŠ ©C© ag ;,Ã-ĸ;RSÅ B ġŖò2°¬ components.xml OáM«2žſvÒ?M-ñòŖ´ŗ 21c B%TU% 4B&.aÒ @Scopeï,45£¯2n;RS&O¶-; Æ;,Ã-Ç ĊHM<´¬Œ}s%ÞŖ´ŗ Œò«2 «2M-N-äñò¬În ;RSM-N-sŠŻv;,Ã-}§Ć´¬ºdÓs%ÞŖ´ŗ @Name("user") @Entity @Scope(SESSION) public class User { ... } org.jboss.seam.ScopeType tuv-;&dz˹dÓ¯Ŗ´ŗ 21f ÓM#'ÔÕB%TU% wĥ& ;RSGH-4-,&ŀ%Ô&K¨´Œ}s%ÞŖ´ŗ èýũnEF45-;&;RS User GH-n «ţǹǰ&78}¯2£ñòŖ´sn78=ǽƧ%-;&;RS}¯ 2£ñòŖ´ŗ @Role ï,45n;RS¯2ɂv-;ÕÖǣǤƓd&K&dÓt u¯2°Ŗ´ŗ Œò«ûn Í;RSGH-ɂv¬;,Ã-ÈM<´¬Œ}s%Þ¬«"vûŖ´ ŗ ÆŠ& ;RS M-NŔÔ&;,Ã-ÈM<stu%´sn ŒòGH-D¹%tu%µû¼/M-N-äĮ£¯2°Ŗ´ŗÇ @Name("user") @Entity @Scope(CONVERSATION) @Role(name="currentUser", scope=SESSION) public class User { ... } @Roles ï,45nʠ¯°ŦŨƾţ&ǣǤ&K&Ɠdtu¯Ŗ´ŗ @Name("user") @Entity @Scope(CONVERSATION) @Roles({@Role(name="currentUser", scope=SESSION), @Role(name="tempUser", scope=EVENT)}) public class User { ... } 21i Ö×Ø×B%TU% ƾţ&«°ODðG&«"n ¼Á¼ȧsƿǀ¯2°¬ķu"Œ}ȌȵŨ2°¬ Æ^ Ő _ J bÇŗ ×ØÙØ& MNEN ÆŶWÇ } ;RS&EF%'Ɗñò2°Ŗ´ŗ ©C© ah ;,Ã-ĸ;RSÅ Œòn345sHNM%×ØÙØ&;RS}ĝûIJû("Œ}rƱ ¯Ŗ´ŗ ĸn×ØÙØ&;RSǯ¼&'ƊǞÞʺý¬Œ}«2 &ĜķuL-N¤Mƛ´¬Œ}ñýrƱ¯Ŗ´ŗ ×ØÙØ&;RS &Òæç org.jboss.seam.core } ÍÒ& C âF3ë°2dÓñòŖ´ŗ ×ØÙØ;RSn ;RS}ÍƟMPG´¬Œ}Ŕtu%´sn ưĮv-N,@FG instance() ÂÚF<Ŕƿǀ¯Ŗ´ŗ FacesMessages.instance().add("Welcome back, #{user.name}!"); 22 ORK;<% ĸĬ&ơŪ µ¬° Ăă&ʖɌ ɭ%Ŕ"Ǖƾ& C ôǶĨ˺¯°ʝ%´ŗ ĸĬ&ơŪµ¬;RSsĩ&;RS&ȺȻtu¯Ŗ´ŗ !ò;,ê ÂÚF<µ¬°M-N-Èĩ&;RSĐMPG ÆơŪÇ đñĿ¬Œ}%'ǹ¯Ŗ´ŗ ŒòŖ%ƃ2Þ´ƚ2&ĸĬ&ơŪ&'Ɗ%n MPG45;RSs²³ñò}Þ.Œûn !&ŶnȺȻ;RS&HMOMG&ç%Èä¯ŖĿŻŗ -,D-;RSë°2nŒò=ºv2°Ŗ´ŗ GHM&ˋNJº»nĞd&-,D-v;RS&´ƚ2&M-N-˄ʺt u%´ŗ wēn-,Ov;RS&£ƢNJǞ°2°Ŗ´ŗ ű2nʟ¡vĸĬ&ơŪŔĝµŖûí£vŞɃ%µûŖĿŻŗ MPG45&wʕä}¯2nMPG45 Æ`B Ç &ʝɒŪ¯Ŗ¯ŗ MPG45}Ȼ´¬}nMPG45śŜ&Ļû%´ŗ ş ;,Ã-ĸ f MPG45ñŖǾŖvɂv¬;,Ã-º»-,Ov;RS×Øǎ 2¬1£ñòŖ´ŗ ÆĐ«û˘° Æ_Ç đ;,Ã-º»&;RSĐ«ûˎ° Æ_Ç đ;,Ã-º»&ȺȻŔÕÖºŔ¯òŖĿŻŗÇ ş ˻ēȫ f Ɯ;,Ã-Ⱥ»ƭũò¬;RS&ƙĬMPGñòn Ŗn;RSƙĬº»;,Ã-œPG ÆB Ç ñòþñòŖ´ŗ M-N-È!&Ŕ&cd´¬Œ}%nƭũò;RSsžſ;,Ã-È &Ɯɕp´¬Œ}tu¯Ŗ´ŗ ş / f MPG45;RSsƭũò¬ìǶ²¯Ŗ´ŗ vȖv»n;,Ã-&ƜÎçǐ˼%Èä¯n ;RSs-,OŦº»%´ŗ ˽nM-N-È&ƜMPGnœPG&ƝēƓd´¬Œ}%M PG45;,Ã-È;RS&M-N-È?M-tu¯Ŗ´ ŗ ŔnjȅŻnMPG45tu´¬1ï,45s£ñò2°Ŗ´ŗ @In ï,45ƜsM-N-ÈMPGñò¬Œ}Ɠd¯2°Ŗ´ŗ @Name("loginAction") @Stateless public class LoginAction implements Login { ©C© ak ;,Ã-ĸ;RSÅ @In User user; ... } µ¬°n ÂÚF< @Name("loginAction") @Stateless public class LoginAction implements Login { User user; @In public void setUser(User user) { this.user=user; } ... } O¶%n Kâ,@Òµ¬°MPGñòM-N-ÈÒ£¯2n ´ƚ2&;,Ã-&ÉÊËÌ¥¦(°Ŗ´ŗ èýũn @In("currentUser")£´¬Œ}%ǂz;,Ã-ÈƓd´¬Œ}Ŕ%ÞŖ´ŗ Ɠdñò;,Ã-È}ŋŌ¯·¸&;RSM-N-s¸ǰ¯v°}Þn ;RS&M-N-&²³˂Ģv»ũn @In(create=true) Ɠd´¬ŲsµûŖ´ŗ ƜsĊ45% Æ[[ %ŔtuÇ %µòũn@In(required=false) Ɠd¯2ţŦñ°ŗ °ţÖº&;RS%n !ò»s£ñò¬}Œȅ%ŠŒ%ŔNjûĺ¯ @In(create=true) Ɠd´¬Ųsµ¬ºŔ¯òŖĿŻŗ Œ&«"vŷĆn ;RS @AutoCreate ï,45ÝŨ¬Œ}stu%n create=true ǂz£¯vţ2Ŕn Ųv}Þļp³ñò¬«"vûŖ´ŗ ¿&ƜMPG´¬Œ}Ŕtu%´ŗ @Name("loginAction") @Stateless public class LoginAction implements Login { @In("#{user.username}") String username; ... } ơŪñòƜÂÚF<sĄą¯œPGñòŶʖēȫơŪñòŖ´Æ cdñòŖ´ Çŗ èýũ null Æ;RSHMOMG}MPG45Ö°2ŧɽ«ûƾţ&ȟȠsµûŖ´ŗ Ç ï,45nƙĬsM-N-Ⱥ»ŔœPGñò¬ƚÞŒ}Ɠd¯Ŗ @Out´ŗ @Name("loginAction") @Stateless @Interceptors(SeamInterceptor.class) public class LoginAction implements Login { @Out User user; ... } ©C© go ;,Ã-ĸ;RSÅ µ¬° J ÂÚF<º» @Name("loginAction") @Stateless @Interceptors(SeamInterceptor.class) public class LoginAction implements Login { User user; @Out public User getUser() { return user; } ... } ƙĬMPG}œPG&Ɲēñò¬Œ}Ŕtu%´ŗ @Name("loginAction") @Stateless public class LoginAction implements Login { @In @Out User user; ... } µ¬° @Name("loginAction") @Stateless public class LoginAction implements Login { User user; @In public void setUser(User user) { this.user=user; } @Out public User getUser() { return user; } ... } 2S LOQ$OK#¿ÙJC EF45 }?,@,@ ;RSĻļ& ^ +o &HMOMG&;FG Æ@PostConstructn@PreDestroy vŠÇ &´ƚ2R¯2°Ŗ´ŗ ¯ºŔn C ;RS %&Œò»;FG&£ŔR¯2°Ŗ´ŗ ¯º¯nŒò»&ï,45 )^^ ʼnŇ%íî}v»v°1n @PostConstruct } @PreDestroy }ɰȣv ) Ö&ǣǤ;RSHMOMG;FGdÓ¯2°Ŗ´ŗ ÂÚF< s;RSM-N-ä¯ŶƭũòŖ´ŗ ;RS Ö& @Create ÂÚF<&ØdÓtu%´ŗ @Create ÂÚF< ;RSsM<´¬;,Ã-sĄą´¬}ÞƭũòŖ´ŗ @Destroy ©C© ;RS g ;,Ã-ĸ;RSÅ Ö& @Destroy ÂÚF<&ØdÓtu%´ŗ ñ»n-,OEF45 ;RSâHÂNȳ¯& ÝŨ¬Œ}sŲų%´ŗŒ&ÂÚF<;,Ã-sĄą´¬}Þ «ûƭũòŖ´ŗ @Remove šŶnŋŌ´¬ï,45 @Startup ï,45%´ŗŒòƾţ&345ĝEF45-;&;RSǃ £tu%´ŗ @Startup ï,45GHMº»012ȺȻñò¬&ȏÖ&%vţ;,Ã-sôªñò »ʽʾ;RSM-N-ä´¬«" Ɠz¯Ŗ´ŗ @Startup(depends={....}) Ɠd´¬Œ}«ûôª´¬;RS&M-N-ä&ËŽ&Ăăstu%´ŗ 2[ ÚÛÜÝO%4 # ï,45n Ğd&KMÂ4êĊ%Ųų%Ɛ&ŷĆ!"%v°«"v;RS&ÛÜÝM -D45tu¯Ŗ´ŗ ŒòśŜ&ŷĆưĮ%´ŗ @Install ş ,-%Ğd&MOH-HGĭ&;RSÅFG}¯°ŗ ş Ğd&KMÂ4êĊ%;RS'ƊÈĸ¯°ŗ ş ĸĬsíîvŷĆŦŨĞd&;RSM-¯° ÆODðG&pĨưĮÇŗ @Install ÉÊËÌ } ĸĬ Ɠd´¬Œ}%/p¯Ŗ´ŗ ;RS&ÉÊËÌn GH-â-ŀÍ;RSÒÕÖÔ&GH-sµ¬ŷĆn M-´ƚÞ;RSƔd´¬1 s£´¬Ž˾%´ŗ «ûÉÊ˿ËÌsƁ°;RSǚǛ¯Ŗ´ŗ µ»º1Ɣ1»òÉÊËÌ&ƜsµûŖ´ Æ̀ËÇŗ BUILT_IN ) FRAMEWORK ő ×ØÙŖòšŔÉÊËÌś°;RS%´ŗ ő <â,@ODðG«2dÓñò;RS×ØÙØ;RS ĊHM<´¬tuĬsµûŖ´sn 345«2ĊHM<ñòŖ´ŗ + APPLICATION ő O¶ÉÊËÌn Œòź}ŻŠ&345;RSë°2ǃú%´ŗ Q DEPLOYMENT \ MOCK ő KMÂǫí&345;RS£%´ŗ ő ,-£ñò¬ÅFGĊPG£%´ŗ | Ã}´¬ messageSender }°"Ò&;RSsµ¬}´¬}n ©C© g) ;,Ã-ĸ;RSÅ @Name("messageSender") public class MessageSender { public void sendMessage() { //do something with JMS } } 7ŎF,-%n íîv| Ãsv°&%nŒ&ÂÚF<Ȋ¯2¯Ŗ°ţvûŖ´ŗ 7ŎF,-s'(ñò¬}ÞGH-â-¸ǰ´¬ŨòŠ345%KMñ òv° ö ;RSp³¯Ŗ´ŗ @Name("messageSender") @Install(precedence=MOCK) public class MockMessageSender extends MessageSender { public void sendMessage() { //do nothing! } } GH-â-%Ɲē&;RSǶƃ¯}Þn sŠnj»&5£´¬º̂ŨŖ´ŗ #### GH-â-µ¬Ô&GH-ŢŤĂă%Þ¬v»ũn Œò´ũ»¯°Œ}%´ŗ ¯º¯n ƾţ&ĸĬÕÖƲĮ£tuvODðGVW¯2°¬ŷĆn ƾţ& ŹȔ!&ODðGDGñĿ°}ȶľv°%¯Ƌ"ŗ ĩŠ&«"v;RSsM-ñò2°¬ºn GH-â-ŀŠŻvGH-s£tu%µ¬ºż2n M-´ƚÞ;RSƔ1¬ēĔ&ēsƩŖò¬Ŵ%´ŗ @Install ï,45Œ&ķuŔĂă¯2°Ŗ´ŗ ƾţ&×ØÙØ;RS&ÛÜÝÞM-'ǹ´¬1qĥ%Œ&ÂLŎƛ £¯Ŗ´ŗ ¯º¯n345%̃»ţ£´¬Ųsv°%¯Ƌ"ŗ 2^ MÞ% ŒŻv"}"¯°;<ƃ¬&̄Þ̄Þ¯2°¬&̅%´ºʙ private static final Log log = LogFactory.getLog(CreateOrderAction.class); public Order createOrder(User user, Product product, int quantity) { if ( log.isDebugEnabled() ) { log.debug("Creating new order for user: " + user.username() + " product: " + product.name() + " quantity: " + quantity); } return new Order(user, product, quantity); } žſvKÂFE&1&;<Š"¯2ŒŻvɏɐ´¬Œ}s%Þ¬&ºəɚ´¬& Ȟǖ%´ŗ 'ę&lS-KFGŋŌ´¬;<(«ûKßŋŌ´¬ēs«ûƾţµûŖ´ŗ C ;ĴŎ,@s o ɪ&çŔ}Ʒ°Ŕ&ǪýƗĿvºŒ} ˀÞ%´ŗ ţñŻ&;<žȀä´¬Kß #~ ƿǀ¯Ŗ´ŗ @Logger private Log log; ©C© g+ ;,Ã-ĸ;RSÅ public Order createOrder(User user, Product product, int quantity) { log.debug("Creating new order for user: #0 product: #1 quantity: #2", user.username(), product.nam return new Order(user, product, quantity); } Ès˜%µ¬}ƎƏ´¬ºŠ"ºƺƻ%µûŖĿŻ ő ## Ès˜%µ¬Ųsµ¬?,@,@ ;RSśév»n Šnj»&ēĔ%Ŕ"Ŗţ°ţ%¯Ƌ"ŗ ## -Ō§ndebug( ÂÚF<&qĥ%.Œ¬1n "}"¯° if ( log.isDebugEnabled() ) «¬̆ɀƄ%µ¬Œ}ƮƬ¯2ţŦñ°ŗ Š&;RS Log MPG¯ºǘ2°¬1n ĻļnKL,̇ǂzƓd´¬Ųv°Œ}ŔƮƬ¯2ţŦñ°ŗ } Product sn ;RS&ŷĆn!òñ»ƷţvûŖ´ŗ User ǹǰ&;,Ã-%íîv @Logger private Log log; public Order createOrder(User user, Product product, int quantity) { log.debug("Creating new order for user: #{user.username} product: #{product.name} quantity: #0", q return new Order(user, product, quantity); } Kß¼/ [JQB µ¬° ʭ [JJJ ƗūɍÝ´¬ºǚǛ¯Ŗ´ŗ [JQB sGH-â-Ļ2°òũn !ò£¯Ŗ´ŗ !"%vŨòũn ʭ [JJJ £¯Ŗ´ŗ 2b Mutable O%PQR4w @ReadOnly 345sǂz setAttribute() ƭìƗ´}}Þn EF45M<¯tÈĊPG&ƪƫÈäsÔɮñò¬ŦŨv&%n ƾţ&345&ķuˀţźŠ°°Ǥɑv HttpSession GH-N&'ƊÕ2°Ŗ´ŗ ŒòOPMĊsǶ²´¬}ÞŦŨǹò¬&%n î¨ôǶÎç%,-ñò¬Œ}s%Þv°&˔˕%´ŗ ñ»'ę&ÔɮÂFEEF45ƙĬ}M<¯4HMƛñòĊPG HOŹȔġŻ%°Ŗ´ŗ !¯2n!òīîɓ%´ŗ ŔnjȅŻn^ -,OEF45 ¼/ĕ,@vPFG'(sŲ%µûn tÈƪƫ&Ôɮ}̈̉ñò ^ ;,êƙĬD¹&ÔɮvŠšǃäs("Œ}stu%´ŗ µ°ţn´ƚ2& 78s ^ +o R´¬̊ŖòʼnŇ%pŘ¯2°¬ľŨ%µûŖĿŻŗ !Œ%nEF45}-;& C }?,@,@ ;RS&1n ]` ;,êEF45GH-N&$%GH-NEOvƪƫ=&ĞƐvDMˣƿǀ¯Ŗ´ ŗ EF45ĝ-;& C ;RS&1n n ;RSs345«ûƭìƗñò¬G?-&ʆn setAttribute() ƭʻŒ}«û¼/ÔɮƵŖ´ŗ ©C© gQ ;,Ã-ĸ;RSÅ ŔnjȅŻnŒ&-H,ıØIJûũºû´¬;RS%ƄɧÁ%´ŗ Œ&ɸ¬ɹ°n org.jboss.seam.core.Mutable MNOP-'Ɗ´¬ºn org.jboss.seam.core.AbstractMutable ȁȂ´¬ºn µ¬°n;RSŀǯ¼&ĕ,@PFG&KFGVW´¬º«ûĂătu% ´ŗ śŜèz¯Ŗ´ŗ @Name("account") public class Account extends AbstractMutable { private BigDecimal balance; public void setBalance(BigDecimal balance) { setDirty(this.balance, balance); this.balance = balance; } public BigDecimal getBalance() { return balance; } ... } µ¬°nÍƟ&î¨ǁ¬1 @ReadOnly ï,45&£Ŕtu%´ŗ @Name("account") public class Account { private BigDecimal balance; public void setBalance(BigDecimal balance) { this.balance = balance; } @ReadOnly public BigDecimal getBalance() { return balance; } ... } EF45ĝ-;&?,@,@ ;RS&ŷĆn ÔɮsƄvŷĆn Æ -;&Ç ?,@,@sǹǰ& =&ijĬ;,Ã-ŋŌÝŨ»ò2°¬ȃûn G?-ʆ setAttribute() ƭʻŒ}«û¼/Ôɮ&p³LjĂ¯Ŗ´ŗ Œ&-H,ŲŴ¯Ŕîɓ%v°&%n EF45ĝ-;?,@,@ ơƬ¯2£¯2ţŦñ°ŗ ?,@,@ M-N-Đ=đ´¬1n -,OEF45 ĝ C °Ö%ŔVW´¬Œ}s%ÞŖ´ŗ śŜèz¯Ŗ´ŗ @Stateful @Name("account") public class AccountManager extends AbstractMutable { private Account account; // an entity bean @Unwrap ©C© g\ ;,Ã-ĸ;RSÅ public void getAccount() { return account; } ... } 345ODðGë°2 EntityHome GH- ;RS£´¬Œ}%?,@,@ M-N-=´¬Éòƿǀ¯2°¬Œ}ƮƬ¯2ţŦñ°ŗ 2c QßK !wDB%TU% ;RS%v°ĊPG}Ōɺ´¬Œ}Ŕ¯ũ¯ũµûŖ´ŗ %Ŕnĝû @In £¯2 ;RSMPG¯n ƜĝÂÚF<M@¿vŠ%!ò»°°}ȶ"Œ}sµûŖ´ŗ În!ò ;,Ã-&HMOMGŋŌÝŨ¬ŲñýµûŖ´ Æèýũ @DestroyÇŗ !Œ%n ;,Ã- %v°°ĊPGġĢŒ}stu%n n;,Ã-M<´¬ī;RS}Ōɺ´¬Œ}rƱ´¬ )n+ &Éòķuƿǀ¯Ŗ´ŗ OáG;RSâN n ;RSī;RSĊPG£&M-N-ä´¬ķu}¯2/pñĿŖ´ ŗ OáGÂÚF< n ;,Ã-ÈsȺȻñò}ÞƭìƗñòŖ´sn !ò}M<¯ƜÕ2°ŖĿŻŗ @Factory ï,45£¯2OáGÂÚF<dÓ¯Ŗ´ŗ OáGÂÚF<Ɯ;,Ã-È}M<¯n M<ñòƜ&-;Ɣd¯Ŗ´ŗ ) ȑˏ&OáGÂÚF<-NMsµûŖ´ŗ š0&-NMn «û;,Ã-M<ñòƜĺ¯Ŗ´ŗ @Factory(scope=CONVERSATION) public List<Customer> getCustomerList() { return ... ; } ) ŽƉ&-NMn NM&ÂÚF<%´ŗ Ɯ;,Ã-È!&Ŕ&M<¯ void @DataModel List<Customer> customerList; @Factory("customerList") public void initCustomerList() { customerList = ... ; } Šnj»&ŷĆŔn customerList ;,Ã-ÈȺȻ¯2!&Ɯs [[ vûn !&Ɯ&HMOMG%("Œ}sŒòś$v°ŷĆn OáGÂÚF<sƭũòŖ´ŗ ñ»LjūvâN =;RSâN %´ŗ Œ&ŷĆn ;,Ã-ÈM<´¬ ;RSsµûn Œ&;RSs;,Ã-È&Ɯ=ûn ȤûGHM%ƃýv°ŷĆ%´ŗ ©C© ga ;,Ã-ĸ;RSÅ =;RS @Unwrap ÂÚF<ÕÖ´ƚ2&;RS%´ŗ Œ&ÂÚF<nGHMƃývţv¬Ɯĺ¯n ʆʗ ;,Ã-ÈsȺȻñòòũƭìƗñòŖ´ŗ @Name("customerList") @Scope(CONVERSATION) public class CustomerListManager { ... @Unwrap public List<Customer> getCustomerList() { return ... ; } } ¤Sĭ;RSâN;RS&HMOMG%«ûĂăŲ}´¬ŷƧ ĊPGsµ¬}ÞĞí£%´ŗ èýũn;,Ã-ĄąÎGFŲ}´¬ƢɎ̋&ĊPGsµ¬}ÞnĊ PG @Unwrap ¯n¤Sĭ;RS& @Destroy ÂÚF<%GF´¬Œ}stu%´ŗ @Name("hens") @Scope(APPLICATION) public class HenHouse { Set<Hen> hens; @In(required=false) Hen hen; @Unwrap public List<Hen> getHens() { if (hens == null) { // Setup our hens } return hens; } @Observer({"chickBorn", "chickenBoughtAtMarket"}) public addHen() { hens.add(hen); } @Observer("chickenSoldAtMarket") public removeHen() { hens.remove(hen); } @Observer("foxGetsIn") public removeAllHens() { hens.clear(); } ... } ŒŒ%=;RSsĜ̌v´ĊPG&ƾţ&M¹̆ɀ¯2°Ŗ´ŗ ;RSŒò»&G45!&Ŕ&=¯nĊPGGE-Ȧ}HF ñò¬1wɖĬ&µ¬lsƿǀñòŖ´ŗ ©C© gg S B%TU% .`a å| ¹-&޳šď´¬}°"ǭ̍%̎̏ñò2°Ŗ´ŗ !òŔººľ»Ŵnå| 2cd¯°}°"ñŖǾŖv=ȍs¸ǰ¯Ŗ´ŗ C;<º»KMÂǫí&ȟȠúûɣ¯°n ƲĮ£tuvODðGp³tu¯°n ×ØÙØķucd¯°ɰ&=ȍ%´ŗ ;RScd´¬̐Ö&Kƿǀ¯Ŗ´ŗ Kâ,@OáMŖweb.xml%&Kâ,@cd«¬cd}n components.xml «¬cd%´ŗ S &Mà3G`a¨©B%TU% .`a ;RSnDF;,Ã-âHÂNnµ¬°GH-â-& }ÒÝŨ»òKâ,@OáM&°Ŵòº«2ncdKâ,@ ¸ǰ´¬seam.propertiesƿǀ´¬Œ}stu%´ŗ cdtu;RSncdƙĬ¯2C-NM&Kâ,@£EFN ÚF<ǿô¯vŨòũvûŖĿŻŗ com.jboss.myapp.settings}°"Ò&;RSsnsetLocale () OáMµ¬°DF; com.jboss .myapp.se ttings.lo }° "Ò & K â, @ ƿǀ ´¬ Œ} st u} vû n ! &; R S ² ³´ ¬} Þ loc ©C© gh ;RS&cd ƙĬ&Ɯcd¯Ŗ´ŗ ÍÂLŎƛ¼ȧ&cdŔľòŖ´ŗ}ýũn&NMœcd´¬ n web.xmlŖ seam.propertiesë°2n org.jboss.seam.core.manager.conversationTimeout&Ɯƿǀ¯Ŗ´ŗ Æorg.jboss.seam.core.manager}°"Ò&×ØÙØ;RSs¸ǰ¯n !òsetConversationTimeout () }°"EFNÂÚF<sµûŖ´ŗÇ S1 components.xml¨©B%TU% .`a components.xmlOáMnŧz´«"Kâ,@cd«ûŔǙ¯ũºûLjū%´ŗ ş ¼/M-sŸą˱Ø}v2°¬;RScd%ÞŖ´ŗ Œò×ØÙØ;RS}nKMÂ-Ãĭê«2¥Ɨñò @Nameï,45ÝÞ&345;RSn &ƝēsġŖòŖ´ŗ ş @Nameï,45&ȳ°GH-;RS}¯2M-tu%´ŗ Œòɂv¬Ò%ÔʗM-ñò¬«"vµ¬ȑ&MOH-HGĭ;RS }2šŔí£%´ Æ}ýũn=ʎij;,Ã-Ç ŗ ş @ I n s t a l ©C© gk ;RS&cd &1O¶%M-¯v°;RSM-tu%´ŗ ş ;RS&-;$ɆÞ ÆCÇ %ÞŖ´ŗ components.xmlOáMŧ&+Ö&ɂv¬ŷǧǞţŒ}s%ÞŖ´ŗ ş war&WEB-INF@DG ş jar&META-INF@DG ş @Nameï,45ÝÞ&GH-ġĢ˟Ƭ&jar Ļļn;RSKMÂ-Ãĭêsseam.properties OáMĝMETAINF/components.xmlÕÖLMq% @Nameï,45&Ý°GH-Ƕƃ¯}ÞM-ñòŖ´ ÆŦ¯n@Install ï,45sO¶%M-¯v°} Ɠd¯2°v°ȃûÇ ŗ components.xmlOáMýũn ï,45$ɆÞ´¬Ųsµ¬«"vĞƐvŷĆд¬Œ}s%ÞŖ´ŗ }ýũnŧ&components.xmlOáM B~| M-¯Ŗ´ŗ <components xmlns="http://jboss.com/products/seam/components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpm="http://jboss.com/products/seam/bpm"> <bpm:jbpm/> </components> ŒòśŜ}ÍŒ}¯Ŗ´ŗ <components> <component class="org.jboss.seam.bpm.Jbpm"/> </components> Œò)ȑˏ&ɂv¬=ʎij;,Ã-}M-}cd(°Ŗ´ŗ <components xmlns="http://jboss.com/products/seam/components" xmlns:persistence="http://jboss.com/products/seam/persistence" <persistence:managed-persistence-context name="customerDatabase" persistence-unit-jndi-name="java:/customerEntityManagerFactory"/> <persistence:managed-persistence-context name="accountingDatabase" persistence-unit-jndi-name="java:/accountingEntityManagerFactory"/> </components> ŒòśŜ}Í%´ŗ <components> <component name="customerDatabase" class="org.jboss.seam.persistence.ManagedPersistenceContext"> <property name="persistenceUnitJndiName">java:/customerEntityManagerFactory</property> </component> <component name="accountingDatabase" class="org.jboss.seam.persistence.ManagedPersistenceContext"> <property name="persistenceUnitJndiName">java:/accountingEntityManagerFactory</property> </component> </components> ©C© ho ;RS&cd Œ&èEF45-;&=ʎij;,Ã-²³¯Ŗ´ Æ'ęʰʱñò¬Ŕ&%µûŖĿŻÇ ŗ <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" <core:managed-persistence-context name="productDatabase" scope="session" persistence-unit-jndi-name="java:/productEntityManagerFactory"/> </components> <components> <component name="productDatabase" scope="session" class="org.jboss.seam.core.ManagedPersistenceContext"> <property name="persistenceUnitJndiName">java:/productEntityManagerFactory</property> </component> </components> ij;,Ã-&«"vĜō}v¬ĊPG¯2auto-create Ċ45£´¬&wʕvŒ}%´ŗ!"´¬Œ}%n@In ï,45"}Þǂzcreate=trueƓd´¬Œ}̑ʲ Œ}s%ÞŖ´ŗ <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" <core:managed-persistence-context name="productDatabase" auto-create="true" persistence-unit-jndi-name="java:/productEntityManagerFactory"/> </components> <components> <component name="productDatabase" auto-create="true" class="org.jboss.seam.persistence.ManagedPersistenceContext"> <property name="persistenceUnitJndiName">java:/productEntityManagerFactory</property> </component> </components> <factory>ƎƏnƜŔ¯ţÂÚF<§Ć¿Ɠd¯2n !òsš0ȺȻñò}Þ;,Ã-ÈƜ0Ĉä´¬«"%ÞŖ´ŗ <components> <factory name="contact" method="#{contactManager.loadContact}" scope="CONVERSATION"/> </components> ;RS&Đ?M-đ ÆƐÒÇ s²³tu%´ŗ <components> <factory name="user" value="#{actor}" scope="STATELESS"/> </components> ©C© h ;RS&cd «ţ£ñò¬¿¯2ŔĐ?M-đ²³´¬Œ}´»tu%´ŗ <components> <factory name="contact" value="#{contactManager.contact}" scope="STATELESS"/> </components> <factory>ƎƏ%auto-create="true""Œ} ĵļ«ţƉ´¬Œ}%´ŗ <components> <factory name="session" value="#{entityManager.delegate}" scope="STATELESS" auto-create="true"/> </components> KM},-&Ɲēë°2components.xmlOáMźŻ&Ǚ¯˃Ţ ´¬ŦŨ%ÍOáMƲĮ£¯°}°"Œ}sµûŖ´ŗ components.xmlOáMq@wildcard@¾¿ &ðM<L<TǞ´¬Œ}stu%n#l<-G ÆKMÎÇ ĝGH-â- components.properties}°"OáMʫý¬Œ} ÆôǶÎÇ «2 ƜǞÞʺý¬Œ}s%ÞŖ´ŗŒ&KKH%ƃ¬Œ}s%ÞŖ´ ŗ S2 á¾â¬`aQßO# Ŕ¯Ŕå| %cdsŲvǕɎ&;RSsµ¬v»ncomponents.xml ġŖò¬ȟȠƾţ&ãºvOáMÁĉ´¬Œ}ƬȘsµ¬%¯Ƌ"ŗ µ¬GHcom.helloworld.Hello&cd com/helloworld/Hello.component.xml}°"Ò&Ú-q ǞţŒ}s%ÞŖ´ŗ ÆŔ¯º¯»Œ&âNƃ̒ýsµ¬ºŔ¯òŖĿŻŗvȖv»n `%ŔÍƟ&ĝûē¯2°¬º»%´ŗÇ !&OáM&Ȁ<components> Ŗ <component>Ȁ&°Ŵòºstu%´ŗ š0&Ċ45OáMqÔ;RS&dÓstu%´ŗ <components> <component class="com.helloworld.Hello" name="hello"> <property name="name">#{user.name}</property> </component> <factory name="message" value="#{hello.message}"/> </components> ̐ŽƉ&Ċ45ſw;RS¯ºdÓŖcd%ÞŖĿŻsn ̓ƴñµûŖĿŻŗ <component name="hello"> <property name="name">#{user.name}</property> </component> ̐ŽƉ&Ċ45%nGH-Ò;RSdÓs9ŷ´¬OáMÒ«2ˇƓd ñòŖ´ŗ µ¬°ncom/helloworld/components.xml% ©C© h) ;RS&cd âF3q&´ƚ2&GH-&cd´¬Œ}Ŕtu%´ŗ SS `aopq&Mà3G. ĠdznĴ,@nĴ,@HFâ¡nµvsə´¬Ļûcd%ÞŖ´ŗ org.jboss.seam.core.manager.conversationTimeout 60000 <core:manager conversation-timeout="60000"/> <component name="org.jboss.seam.core.manager"> <property name="conversationTimeout">60000</property> </component> ĠdzŖĴ,@º»Ş³ñò¬TdznEFn-ŔRñòŖ´ŗ org.jboss.seam.bpm.jbpm.processDefinitions order.jpdl.xml, return.jpdl.xml, inventory.jpdl.xml <bpm:jbpm> <bpm:process-definitions> <value>order.jpdl.xml</value> <value>return.jpdl.xml</value> <value>inventory.jpdl.xml</value> </bpm:process-definitions> </bpm:jbpm> <component name="org.jboss.seam.bpm.jbpm"> <property name="processDefinitions"> <value>order.jpdl.xml</value> <value>return.jpdl.xml</value> <value>inventory.jpdl.xml</value> </property> </component> ĠdzƜ&Ã}nĠdzŖĴ,@&Ɯº»³¬¤F%ñýŔRñòŖ´ŗ <component name="issueEditor"> <property name="issueStatuses"> <key>open</key> <value>open issue</value> <key>resolved</key> <value>issue resolved by developer</value> <key>closed</key> <value>resolution accepted by user</value> </property> </component> šŶnƜ§Ć¿ ÆC[f`J ZYÇ 2;RSŌɺñĿ¬Œ}s%ÞŖ´ŗ Œò@InÖºơŪ}Ŗţɂv¬&%ơƬ¯2ţŦñ°ŗ vȖv»n!òƭìƗ¯Î%vţn;RS²³Î.Œ¬º»%´ŗ ¯s2nbĝYJ&«"v·¸&¢;,ê«2ƿǀñò¬Ä¸ĬơŪ«û̔°% ´ŗ <drools:managed-working-memory name="policyPricingWorkingMemory" rule-base="#{policyPricingRules}"/> <component name="policyPricingWorkingMemory" class="org.jboss.seam.drools.ManagedWorkingMemory"> <property name="ruleBase">#{policyPricingRules}</property> </component> ©C© h+ ;RS&cd S[ ãzѪäå.¡ KHĻ¯2n)ȑˏ&̕ɂv¬;RSƎƏ&ēĔsµûŖ´ŗ å| Òæ磴¬ēĔ}£¯v°ēĔ%´ŗŧnÒæ磯v°ʟ¡v components.xmlOáMz¯Ŗ´ŗ <?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/se <component class="org.jboss.seam.core.init"> <property name="debug">true</property> <property name="jndiPattern">@jndiPattern@</property> </component> </components> Ȧx&ĻûnŒò̖Á̓ƴ%´ŗ ñ»̗°Œ}n;RS}ƙĬ&ÒnKMÎ&ƌ Ĭ¥ƍ&ʎ}vûŖĿ Żŗ Òæç5Œ&«"vûŖ´ŗ <?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2 <core:init debug="true" jndi-pattern="@jndiPattern@"/> </components> -äƎƏɏɐ%µûŖ´sn'ę&å| &qrž̘ºÖ=>¯ĝ´°Ŕ&%´ŗ Œ&-äĮ£tuvŚ;RS}ƙĬŋ´¬ȨãȟȠƿǀ´¬Ŕ&%n å| ?@N%M,Pv¼/ǴŸŪūtu¯Ŗ´ŗ OáM&²³}ƀ̙«ûžſ¯2ţòŖ ÒæçÝÞ&Ȁ&£nŢ¯°components.xml´ŗ ñ2nŒò×ØÙØ;RS¯2Ʒţķu´¬«"%´sn¯278; RS¯2Š"%¯Ƌ"ºʙ š0n)Ö&̚ǰ¯ÅR¯Ŗ´ŗ Ö78;RS´¬wʕv<component> ƎƏŗ Ŕ"Ö×ØÙØ;RS´¬ÒæçÝÞ&ƎƏ%´ŗ 78;RS¯2ŔžſÒæçƎƏ%Þ¬«"¯2ţò2°Ŗ´ŗ ï,45âF3ÝǤ´¬Œ}«2nå| ˟Ƭ&CâF3n@NamespaceÒæçŋŌÝŨ¬Œ}s%ÞŖ´ŗ }°"Ò &OáM %ƎƏñò ÆâF3D¹&ï,45nâF3@DGq&package-info.javaŖ´ŗÇ ŒòYàź»&è%´ŗ ©C© hQ ;RS&cd @Namespace(value="http://jboss.com/products/seam/examples/seampay") package org.jboss.seam.example.seampay; import org.jboss.seam.annotations.Namespace; ĝ»vŨòũv»v°Œ}ncomponents.xml%Òæç-NM"Œ}ŦŨ%´̛ Œ"¯2ŧ&«"ɆţŒ}stuvûŖ´ŗ <components xmlns="http://jboss.com/products/seam/components" xmlns:pay="http://jboss.com/products/seam/examples/seampay" ... > <pay:payment-home new-instance="#{newPayment}" created-message="Created a new payment to #{newPayment.payee}" /> <pay:payment name="newPayment" payee="Somebody" account="#{selectedAccount}" payment-date="#{currentDatetime}" created-date="#{currentDatetime}" /> ... </components> Ŗn <components xmlns="http://jboss.com/products/seam/components" xmlns:pay="http://jboss.com/products/seam/examples/seampay" ... > <pay:payment-home> <pay:new-instance>"#{newPayment}"</pay:new-instance> <pay:created-message>Created a new payment to #{newPayment.payee}</pay:created-message> </pay:payment-home> <pay:payment name="newPayment"> <pay:payee>Somebody"</pay:payee> <pay:account>#{selectedAccount}</pay:account> <pay:payment-date>#{currentDatetime}</pay:payment-date> <pay:created-date>#{currentDatetime}</pay:created-date> </pay:payment> ... </components> Œò»&ÒæçÝÞȀ&)Ö&Į£Åɾǂ¯Ŗ´ŗ š0&ƎƏ%<pay:payment-home> paymentHome;RSȺȻ¯2°Ŗ´ŗ package org.jboss.seam.example.seampay; ... @Name("paymentHome") public class PaymentController extends EntityHome<Payment> { ... } !&ȀÒ;RSÒ̜MO%Ō§¯¾¿v2°Ŗ´ŗ !&Ȁ&ƙĬÒKâ,@Ò̜MO%Ō§¯¾¿v2°Ŗ´ŗ G H ©C© h\ ;RS&cd ȺȻ¯Ŗ´ŗ Payment &3-%nµ¬?,@,@s;RS}¯2ƎƏñò«"}¯2°Ŗ´ŗ package org.jboss.seam.example.seampay; ... @Entity public class Payment implements Serializable { ... } 78dÓ;RS¯2ƌ Ĭ¥ƍ}¼/ǴŸŪūsķu´¬«"¯°v»n -äsŲvûŖ´ŗ;RS&ȡŖûº»-ä¼/²³´¬«"vķ u ŖŦƿǀ¯2°ŖĿŻ&%nɻ/%²³´¬ŲsµûŖ´ŗƑƒvâF3&-à ¤dÓ˲M<}¯2Į£%ÞŖ´ŗ ŧ«2£˱Ø&Òæç%´ŗ ş Y ő http://jboss.com/products/seam/components ş ő http://jboss.com/products/seam/core ş [ ő http://jboss.com/products/seam/drools ş e_ö ő http://jboss.com/products/seam/framework ş B ő http://jboss.com/products/seam/jms ş J ő http://jboss.com/products/seam/remoting ş m ő http://jboss.com/products/seam/theme ş à ő http://jboss.com/products/seam/security ş [ ő http://jboss.com/products/seam/mail ş _` ő http://jboss.com/products/seam/web ş Ye ő http://jboss.com/products/seam/pdf ş YJ ő http://jboss.com/products/seam/spring ©C© ha [ O¶% hO%PI&PhæçÏD ;,Ã-ĸ;RSÅǴŸ´¬Ŕ&}¯2n 345&ĞȬ}v2°¬ˌƂ&̝§ĆʳŕñĿ¬ ) Ö&Ĝʝs¸ǰ¯Ŗ´ŗ š0&Ŕ&n M¹s b HMGvÂÚF<§Ć¿ Æm `J ZYÇ ˴¯2M¹-ê¤F%Þ¬«"vLjūvM¹Å%´ŗ ) ŽƉ&Ŕ&n lS-KFG'Ɗ´¬;RS¯2̞įŋȌɁ Æ f J Ç ǃ£´¬1ï,45ĝMNEN˘̟̠£¯2°¬}°"Œ}%´ŗ [ O¶% ;RSÅM¹Ñ/345 %"1ôǶñòŖ¯ŗ Ğn ĎłŃs(ľòM¹Å%ĎłŃŲ}´¬̝§Ć;RS&ôǶtu¯Ŗ ´ŗ %&M¹n ´%Ȧ¸ǘ&«"°ţÖº&NMsµûŖ´ŗ ş b M¹ ş B~| ƪƫĀāM¹ ş G45 ş ;RSÑ/M¹ ş ;,Ã-ĸM¹ Œò»&ƾƟvM¹´ƚ2 ;RS¤FñòŖ´ŗ ,D%dÓñòŖ´ŗ b b ^ ÂÚF<§Ć¿˴¯2 M¹&ŷĆn ŧ& b <h:commandButton value="Click me!" action="#{helloWorld.sayHello}"/> B~| ĀāM¹&ŷĆn B~| KE-dÓŖOKdÓ%±dñòŖ´ŗ <start-page name="hello" view-id="/hello.jsp"> <transition to="hello"> <action expression="#{helloWorld.sayHello}"/> </transition> </start-page> b M¹ĝ B~| M¹&ȨãÖ°2˲M<śé%ŔƃÖŨ¬Œ}s%Þ¬&%n ŒŒ% «2dÓñò¬Ɛ& ) ȑˏ&M¹Ö°2ƃ2°ÞŖ´ŗ [ ~"K;<% G45&DĕƣǶ²´¬M¹%´ŗ G45 WEB-INF/pages.xml %ƎƏ¯Ŗ´ŗ Ğd& b l ¯2G45dÓ´¬Œ}s%ÞŖ´ŗ <pages> ©C© hg M¹nMNENnèéÐ= <page view-id="/hello.jsp" action="#{helloWorld.sayHello}"/> </pages> µ¬°n * ðM<L<2âNwʄ´¬´ƚ2&l Ɠd´¬Œ}Ŕ%ÞŖ´ŗ <pages> <page view-id="/hello/*" action="#{helloWorld.sayHello}"/> </pages> e [Y[ _[ YJ m m C_fņ _[[ [[ [[ m f ņ e [fY e fY e *m YJ m b e m f[[ņ _[[ m e CJ [ CJ C_ bmņ m C_ m <page> [ Y [ ~ b [ YJŅ ņ _ Y m e [à e [ f e_ö [ö ]`]ö J YJ b ZY[6 TODO: translate struts action into page action fe G?- Æ}ýũn **~ ó ´¬D-R-%ÔƴvÐ=¯°ŷĆvŠīļưĮ%´ŗ G?-Ç |[Y[ [ YJ à ` Y e J m <action> J6 <pages> <page view-id="/hello.jsp"> <action execute="#{helloWorld.sayHello}" if="#{not validation.failed}"/> <action execute="#{hitCount.increment}"/> </page> </pages> ~àL¿P b e G?- ÆO¶ɍħÇ ĐG45đ ÆÂÚF<§ĆÇ }ĐâHÂNđ ÆŪūƜ§ĆÇ &ƝēLEä¯Ŗ´ŗ G45ŔâHÂNsŲºŔ¯òŖĿŻŗ ó^* G?-FG¤Gtuv&%n âHÂNʥçsı1¬G?-âHÂN}¯2ȽÞțñòŖ´ Æb O¶Ūū}ɂv¬Ŕ&Çŗ Ő YJ Y _m _m m z è [ YC C[ `J m Y Ė Y ` e [ `B <pages> <page view-id="/hello.jsp" action="#{helloWorld.sayHello}"> <param name="firstName" value="#{person.firstName}"/> <param name="lastName" value="#{person.lastName}"/> ©C© hh M¹nMNENnèéÐ= </page> </pages> *m <param> [ ` [ņ B [ö C[ `J e b Y6 ş ]m fe Æó^*Ç Ė e m C_ ņ m C[ e m Ė Y m [ `B ņ e YeJ YYY àY f C ş #à <s:link> <s:button> Y[à [ m Ė Y *m C[ e m Y `à C[J m C[ `J J m Ym Æ_m m <s:link> Ç ş #à CJ [ _m <redirect/> m C_ Y[à [ m f Ė Y *m C[ e m Y `à C[J m C[ `J m e m Cö YY[ Ym ş *m C[ Y[à YYJ _m à b e ` e m YJ _m m JC C_ *m m C_ Y `mC [ö PAGEf Y Z C`[ e e Ė *m [ `m [[ m m m_C _ J e à m YJ / hello.jsp Æ e /hello.jsp ` ö /hello.jspÇņ m C[ e m [ ` f e m C[ `J `ņ _m m e C Æ m Cf Ç y è e B m name ` Y e m m Ė Y YYJ J m PAGE Z Æ ė YY [ YYàÇ <pages> <page view-id="/hello.jsp" action="#{helloWorld.sayHello}"> <param name="firstName" /> <param name="lastName" /> </page> </pages> ~YJ e YJ Y Y [[à e[ e à _ `[ [f[à f f[ ¢IA YJ Ő ` _m m C_ à _ YC[à ÆJ _m YJ m C `Çņ _m m à à _ J ş #à <s:link> <s:button> Y[à YYJ m Ė Y e m Yf [ YJ Y e m C_ ş *m C[ Y[à YYJ _m à b e ` e m YJ _m m JC C_ Æ*m m C_ Y `mC [ö PAGEf Y Z C`[ e e Ė *m [[ Yà Y[Zņ àė Y``[à _J e m Z [[à _m m ee # [[àņ m Cà [ à J e[à _m öJ m m ee ~J Y m ©C© hk M¹nMNENnèéÐ= [J _à YYJ fe Ė *mà Y [[à [ e Y`[ [ö m _m `öö`[ [ YJņ _m _ _[ [ö ` `[ _ YY[ m[ `m ~* ó^* Ė _m m ~J Y [ YC [J e Ė Y m C_ e ö m Æ Ő Y eà b C e Y[Z [ YY6 <pages> <page view-id="/calculator.jsp" action="#{calculator.calculate}"> <param name="x" value="#{calculator.lhs}"/> <param name="y" value="#{calculator.rhs}"/> <param name="op" converterId="com.my.calculator.OperatorConverter" value="#{calculator.op}"/> </page> </pages> #[C[à6 <pages> <page view-id="/calculator.jsp" action="#{calculator.calculate}"> <param name="x" value="#{calculator.lhs}"/> <param name="y" value="#{calculator.rhs}"/> <param name="op" converter="#{operatorConverter}" value="#{calculator.op}"/> </page> </pages> b C[ņ required="true" à [ ` 6 <pages> <page view-id="/blog.xhtml"> <param name="date" value="#{blog.date}" validatorId="com.my.blog.PastDate" required="true"/> </page> </pages> #[C[à6 <pages> <page view-id="/blog.xhtml"> <param name="date" value="#{blog.date}" validator="#{pastDateValidator}" required="true"/> </page> </pages> ^C `ņ [f` ` C[ [[à Jč C[ ]m àY C C[ e[ņ J[`[ FacesMessage m FacesContext ég;<% 345% ©C© faces-config.xml %dÓñò¬Ƒƒ& b ko M¹nMNENnèéÐ= êl45±Ƴ£%ÞŖ´ŗ êl45±Ƴ̡˴vĂȃsµûŖ´ŗ ¯º¯n ş ĕMDG´¬ŷĆG?-âHÂNƓd%ÞŖĿŻŗ ş ±Ƴº»&ôªĝĄą%ÞŖĿŻŗ ş ±ƳG45ÂÚF<&þûƜ&Ȣȣ«2/p¯Ŗ´ŗ ¿Ȣȣ´¬Œ}%ÞŖĿŻŗ b ÖŖûn ˟Ƭ& ^ ñ»ƺƻv&×ĆĿ Æ mÇ &KFGs pages.xml } faces-config.xml &çÁ̢¯2¯Ŗ"Œ}%´ŗ Œ&KFG pages.xml ˬńĆ¯ēs«°%¯Ƌ"ŗ Œ& b êl45±Ƴn <navigation-rule> <from-view-id>/editDocument.xhtml</from-view-id> <navigation-case> <from-action>#{documentEditor.update}</from-action> <from-outcome>success</from-outcome> <to-view-id>/viewDocument.xhtml</to-view-id> <redirect/> </navigation-case> </navigation-rule> ŧ&«"ɆÞƣ´Œ}s%ÞŖ´ŗ <page view-id="/editDocument.xhtml"> <navigation from-action="#{documentEditor.update}"> <rule if-outcome="success"> <redirect view-id="/viewDocument.xhtml"/> </rule> </navigation> </page> _[ ` C e _ ė mC Y[[ DocumentEditor Y _m JfC[ C[ Æm b Ç [ _6 <page view-id="/editDocument.xhtml"> <navigation from-action="#{documentEditor.update}" evaluate="#{documentEditor.errors.size}"> <rule if-outcome="0"> <redirect view-id="/viewDocument.xhtml"/> </rule> </navigation> </page> Ŗnŧ&«"´»ɆţŒ}s%ÞŖ´ŗ <page view-id="/editDocument.xhtml"> <navigation from-action="#{documentEditor.update}"> <rule if="#{documentEditor.errors.empty}"> <redirect view-id="/viewDocument.xhtml"/> </rule> </navigation> ©C© k M¹nMNENnèéÐ= </page> š0&¾¿Ŷj&±Ƴ«2£ñò¬«" &ƜƔd´¬Ɯ§ĆȢȣ¯Ŗ´ŗ ̐ŽƉ&K ȳɀ¯n !òɇòtuĬ&µ¬±Ƴ¯2Ɯ§ĆȢȣ¯Ŗ´ŗ ĸ®s³ø¯» Ǐn Œònŧ&«"¯Ŗ´ŗ ǹǰ&ĄąñĿ°ŷĆsź}ŻŠ%¯Ƌ"ŗ <page view-id="/editDocument.xhtml"> <navigation from-action="#{documentEditor.update}"> <rule if="#{documentEditor.errors.empty}"> <end-conversation/> <redirect view-id="/viewDocument.xhtml"/> </rule> </navigation> </page> # _ėC C à `Ė Ė _ė ö_ _m m _ f ] Y m Ė Y _m m [ ö m C_ `öö`[6 <page view-id="/editDocument.xhtml"> <navigation from-action="#{documentEditor.update}"> <rule if="#{documentEditor.errors.empty}"> <end-conversation/> <redirect view-id="/viewDocument.xhtml"> <param name="documentId" value="#{documentEditor.documentId}"/> </redirect> </rule> </navigation> </page> ù[[ Y [ b *m [[ Y f Y[à m YJ *m e[[_J CJ [ m à f[[ ņ ` m [[ 6 <page view-id="/editDocument.xhtml"> <navigation from-action="#{documentEditor.update}"> <rule> <render view-id="/viewDocument.xhtml"/> </rule> </navigation> </page> e à _ Ye CJ _m [[ ņ m e[[_J e f 6 <page view-id="/editDocument.xhtml"> <navigation from-action="#{documentEditor.update}"> <render view-id="/viewDocument.xhtml"/> </navigation> ©C© k) M¹nMNENnèéÐ= </page> *m C_f à ` JC b ^ ZY6 <page view-id="/editDocument.xhtml"> <navigation> <rule if-outcome="success"> <redirect view-id="/#{userAgent}/displayDocument.xhtml"/> </rule> </navigation> </page> ég;<%h~"K;<%hàL¿P.aÒ¡á¾â¬QßO# G45ĝâHÂNsǕɎµ¬n Ŗſêl45±ƳƾɎÕ2°¬ŷĆn ƎƏÔ&OáMÁĉ¯°Œ}%¯Ƌ"ŗ l /calc/calculator.jsp ÕÖ&G45ĝâHÂN calc/calculator.page.xml }°"Ò&Ú-dÓ´¬Œ}s%ÞŖ´ŗ Œ&ŷĆ&Ȁ <page> Ȁ%n l ˇƓdñòŖ´ŗ <page action="#{calculator.calculate}"> <param name="x" value="#{calculator.lhs}"/> <param name="y" value="#{calculator.rhs}"/> <param name="op" converter="#{operatorConverter}" value="#{calculator.op}"/> </page> [1 |Æ Æ ;RSÍĽʹ°&ÂÚF<ƭʻŦŨ%ĝû}ûs%ÞŖ´ŗ -,O;RS `C½`C`[ âN'Ɗ´¬Œ}´»%ÞŖ´ŗ ¯º¯n ;RSsʹ°ÂÚF<ƣƤƭʻ}Þ«û̝§ĆvēĔ%ĝû}û%Þ¬«"´¬ 1n ;RSÑ/M¹ƿǀ¯Ŗ´ŗ M¹-ê Æ`CÇ components.xml %Ɠd¯Ŗ´ŗ <components> <event type="hello"> <action execute="#{helloListener.sayHelloBack}"/> <action execute="#{logger.logHello}"/> </event> </components> ŒŒ% C àY ſv¬˟Ƭ&Ġdz%´ŗ M¹sǶ²´¬}n !&M¹£9:ñòG45 Ɨǹ¯ËŽ%ƭìƗñòŖ´ŗ ;RSŠ&«"M¹Ƕ(´¬&%¯Ƌ"ºʙ Œ&1×ØÙØ;RSƿǀ¯Ŗ´ŗ components.xml @Name("helloWorld") public class HelloWorld { public void sayHello() { ©C© k+ M¹nMNENnèéÐ= FacesMessages.instance().add("Hello World!"); Events.instance().raiseEvent("hello"); } } µ¬°n ï,45"Œ}Ŕtu%´ŗ @Name("helloWorld") public class HelloWorld { @RaiseEvent("hello") public void sayHello() { FacesMessages.instance().add("Hello World!"); } } Œ&M¹ǀ̣ˬM¹Ȋ̤ˬvŻ»Ä¸¯2°v°Œ}ơƬ¯2ţŦñ°ŗ Œò%Ŗţǀ̣ˬ}ĸŋʂsv°«"M¹-ê'Ɗ´¬Œ}stuvûŖ´ ŗ @Name("helloListener") public class HelloListener { public void sayHelloBack() { FacesMessages.instance().add("Hello to you too!"); } } $W& components.xml dÓñò¬ÂÚF<M@Ȋ̤ĨˬM¹&¤FČ(°Ŗ´ŗ components.xml OáMq°ţûʗ¯ţv°ŷĆn Ĥľûï,45"Œ}s%ÞŖ´ŗ @Name("helloListener") public class HelloListener { @Observer("hello") public void sayHelloBack() { FacesMessages.instance().add("Hello to you too!"); } } ŒŒ%M¹ĊPGŋ¯2ŖţƏ̥¯2°v°Œ}̦ƺ̧ţēŔ°»¯Ɔ¬ Œ}%¯Ƌ"ŗ %n M¹ǀ̣ˬ}-êç%ƪƫʋʌ´¬M¹ĊPGŲµûŖĿŻŗ ƪƫ ;,Ã-$ƀÕñòn ;RSç%ƹíñòŖ´ŗ ¯º¯vs»n Š"¯2ŔM¹ĊPGț¯°ŷĆn ŧ&«"("Œ}s%ÞŖ´ŗ @Name("helloWorld") public class HelloWorld { private String name; public void sayHello() { FacesMessages.instance().add("Hello World, my name is #0.", name); Events.instance().raiseEvent("hello", name); } } @Name("helloListener") public class HelloListener { @Observer("hello") public void sayHelloBack(String name) { FacesMessages.instance().add("Hello #0!", name); } } ©C© kQ M¹nMNENnèéÐ= [2 B%3À4 ÁµO¶% Ğğvȑˏ&ODðGńĆ'ǹ´¬1345sĮ£%Þ¬×ØÙØM¹ dÓ¯Ŗ´ŗ !&M¹}ŧ&«"vŔ&%´ŗ ş org.jboss.seam.validationFailed ő [[ _m b C[ e[ ş org.jboss.seam.noConversation ş org.jboss.seam.preSetVariable.<name> ş org.jboss.seam.postSetVariable.<name> ş org.jboss.seam.preRemoveVariable.<name> ő [[ _m m [J J C [J J C Ė ő [[ _m m Z C`[ õ÷ ő [[ _m m Z C`[ õ÷ ő [[ _m m Z C`[ õ÷ f ş org.jboss.seam.postRemoveVariable.<name> ő [[ _m m Z C`[ õ÷ ş org.jboss.seam.preDestroyContext.<SCOPE> ő [[ `e m õ¢~^÷ Z f à ş org.jboss.seam.postDestroyContext.<SCOPE> ő [[ e m õ¢~^÷ Z f à ş org.jboss.seam.beginConversation ő [[ _mC [JfJ C `J ş org.jboss.seam.endConversation ş org.jboss.seam.conversationTimeoutő ş org.jboss.seam.beginPageflow.<name> ş org.jboss.seam.endPageflow.<name> ş org.jboss.seam.createProcess.<name> ş org.jboss.seam.endProcess.<name> ş org.jboss.seam.initProcess.<name> ő [[ _mC [JfJ C [[ _m C *m f C Y Y ő [[ _m m YJe[_ õ÷ `J ő [[ _m m YJe[_ õ÷ ő [[ _m m Y õ÷ ő [[ _m m Y õ÷ ő [[ _m m Y õ÷ _m m C ş org.jboss.seam.initTask.<name> ő [[ _m m ö õ÷ _m m C ş org.jboss.seam.startTask.<name> ş org.jboss.seam.endTask.<name> ş org.jboss.seam.postCreate.<name> ©C© ő [[ _m m ö õ÷ ő [[ _m m ö õ÷ ő [[ _m m Y õ÷ k\ M¹nMNENnèéÐ= ş org.jboss.seam.preDestroy.<name> ő [[ _m m Y õ÷ à ş org.jboss.seam.beforePhase ş org.jboss.seam.afterPhase ş org.jboss.seam.postInitialization ő [[ `e m e b Ym ő [[ e m e b Ym ő [[ _m m [č Y [[ Y ş org.jboss.seam.postAuthenticate.<name> ş org.jboss.seam.preAuthenticate.<name> ş org.jboss.seam.notLoggedIn ő [[ e m ő [[ `e YJ m ő [[ m m m Ė ş org.jboss.seam.rememberMe ő _m à m ö ş org.jboss.seam.exceptionHandled.<type> ő [[ _m Jm Z Y m[ `à ş org.jboss.seam.exceptionHandled ő [[ _m Jm Z Y m[ `à ş org.jboss.seam.exceptionNotHandled ő [[ _m m _ m[ e Jm Z Y ş org.jboss.seam.afterTransactionSuccess ő [[ _m m #YY[ b_ö ş ő [[ _m m #YY[ b_ö _m m J à [[ <name> org.jboss.seam.afterTransactionSuccess.<name> Y à `C à e m C B m _à mà `C à m YfC C [1 O%PI&P ^ +o EF45 ;RS¯2ƑƒvMNENÅɒŪ¯Ŗ¯ŗ MNENǣǤ´¬n }°"ï,45sÝǤñòÂÚF<&Ý°GH-VW¯2n ¯2MNEN&GH-ÒƓd´¬ &ï,45ÝŨ¬ŲsµûŖ´ŗ @AroundInvoke !& @Interceptors public class LoggedInInterceptor { @AroundInvoke public Object checkLoggedIn(InvocationContext invocation) throws Exception { boolean isLoggedIn = Contexts.getSessionContext().get("loggedIn")!=null; if (isLoggedIn) { //the user is already logged in return invocation.proceed(); } else { ©C© ka M¹nMNENnèéÐ= //the user is not logged in, fwd to login page return "login"; } } } * YY[à m Y ` _m m [ņ _ f m ` @Interceptors(LoggedInInterceptor.class) *m _m J[à `[ Y m Y e_ö ^+ `à [[_J à @Interceptors f e [ [C[ Y Æm @Target(TYPE)Ç ZY[ņ _ _[ @LoggedIn ņ e[[_6 @Target(TYPE) @Retention(RUNTIME) @Interceptors(LoggedInInterceptor.class) public @interface LoggedIn {} Œ"¯2n Œ&MNENǃ£´¬&G45-ê ï,45ŦŨÝǤ´òũ«ţvûŖ¯ŗ @LoggedIn @Stateless @Name("changePasswordAction") @LoggedIn @Interceptors(SeamInterceptor.class) public class ChangePasswordAction implements ChangePassword { ... public String changePassword() { ... } } e Y J Y Æ [[à Çņ à @Interceptor à Y [ Y eà Y[ e Y @Interceptor(around={BijectionInterceptor.class, ValidationInterceptor.class, ConversationInterceptor.class}, within=RemoveInterceptor.class) public class LoggedInInterceptor { ... } ĐGHMˬđMNENÕÖŒ}Ŕ%ÞŖ´ŗ &°Ŵò&×ØÙØķu}%ŔŊ£´¬Œ}s%ÞŖ´ŗ ^+ @Interceptor(type=CLIENT) public class LoggedInInterceptor { ... } ^ MNEN-,O%n MNE´¬ʎ}v¬;RS}ÍHMOMGű°Ŗ´ŗ ƪƫɗÕ´¬Ųsv°MNEN&ŷĆn % @Interceptor(stateless=true) Ɠd´¬Œ}%âO¶¤-šǃäs%Þ¬«"vûŖ´ŗ ©C© kg M¹nMNENnèéÐ= &ķu&Ų̈̄×ØÙØ MNEN&ȡĆ}¯2'Ɗñò2°2n &è&«"vMNENŔġŖòŖ´ŗ ;RSï,45ÝǤ¯2Œò»&MNENǂzƓd´¬Ųµ ûŖĿŻŗ MNEtuvŹ ;RS£š0º»×ØÙŖò2°Ŗ´ŗ MNEN ^+ ;RSŔ"Œ}s%ÞŖ´ŗ ŦŨ%vţ C ^ n MNE45 Æ@AroundInvoke Ç lS-ÂÚF<ŦŨ%vţn HMOMGÂÚF< @PostConstructn @PreDestroyn @PrePassivate !¯2 @PostActive ¯2ŔdÓ¯Ŗ´ŗ n ;RS}MNEN´¬Œò»´ƚ2&HMOMGÂÚF< ^+ ŦŨ%vţ C ;RS¯2ŔR¯Ŗ´ ÆC ;RS}2ƬȘ&v° @PreDestroy ƸÞŖ´Çŗ [2 æç'D±© b èéÐ=ŋ¯2ˀţźŠĂȃsµûŖ´ŗ Œ&ƺƻ&ĥÁvʗʘ̩}¯2n èéGH-ï,45ÝŨ¬º å| OáMèéGH-ƎƏ´¬Œ}%èé}v¬ĞdGH-Ð=´¬ēĔdÓ´¬Œ}s% ÞŖ´ŗ Œ&ķun ƓdñòèésH8G45KFG&˔˕v¬ƚÞºǻºƓd´¬& ^ +o Ƒƒ& @ApplicationException ï,45}w̪ľò¬Œ}sƬ̫ñò2°2°Ŗ´ŗ [2 æçê¨ë L%?K;<% &lS-ÂÚF<«2èés-Kñò¬}n !&èéǹǰ&H8G45ƣnjKFGsŲ}¯2̬ÝŨ¬ºŠ"ºĂă %Þ¬«"ǂŤv±Ƴ ^ dÓ¯2°Ŗ´ŗ 4-,èé ļH8G45KFG}vûn 345èé O¶%KFG}vûŖĿŻs @ApplicationException(rollback=true) sƓdñò¬}KFG}vûŖ´ŗ Æ345èé}n PFG&Ý°èén Ŗ @ApplicationException ï,45sÝ°PFG&v°èé%´ŗ 4-,èé}n @ApplicationException ï,45sÝ°2°ŴPFGŔÝ°2°v°èé%´ŗÇ KFG£H8G45̬ÝŨ¬&}n 'ęKFG("&}ɂvûŖ´ŗ èé±ƳH8G45KFGsŲ%µ¬}̬sÝŨ»ò¬Œ}ŦŨ¯ºƏ̥¯ 2°ŖĿŻsn èés-KñòŶ%Ŕ!òG,@&ŖŖ%µ¬tuĬsµ¬}°"Œ}ơƬ¯2ţŦ ñ°ŗ ^ +o ;RS¯2Ŕǃ£¯Ŗ´ŗ èé&KFG±Ƴ ¯º¯n Œò»&±Ƴ èésÃĭFñò¬Œ}vţ ;RSDž%&Øǃ£ñò¬Ŗ´ŗ %n ;RSDž&éĥʋʌ¯n ñ» b ©C© C kh M¹nMNENnèéÐ= Dž&éʋʌ¯»Š"v¬%¯Ƌ"ºŗ ̭ʻ»ûŻ&H8G45Ċ¯ŖŖ%ʇǞ´¬&çDZ°v&%n ;RSDž%ÃĭFñòv°} G,@H8G45ŲŴKFG¯Ŗ´ŗ èésǶ²¯ [21 æçÏD'ìí±© &èéÐ=íî´¬n web.xml ¤-N}v¬DFO@NsƎƏñò2°¬Œ}Ťť´¬ŲsµûŖ´ŗ <filter> <filter-name>Seam Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Filter</filter-name> <url-pattern>*.seam</url-pattern> </filter-mapping> Ȧ£&èé̜<HķuñĿ¬ŷĆn web.xml & b [ ents.xml & FÅ<Ŕȳî´¬ŲsµûŖ´ŗ ôǶÅ<ë«ì compon- [22 æçÏD¬9"î3;<%'¡±© ŧ&èé ;RSDž&éĥʋʌ´¬}ŲŴ **~ QoQ ?HvûŖ´ŗ -Kñò2Ŕ´ʲǹǰ&H8G45KFG¯ŖĿŻsn Ɛ& ;RS«2èésÃĭFñòv°}Œ&H8G45KFGñòŖ´ ŗ @HttpError(errorCode=404) public class ApplicationException extends Exception { ... } Œ&èé ;RSDž&éĥʋʌ´¬}ŲŴHœ8ĕMDGvûŖ´ŗ Ŗn ǹǰ&ŔĄąñĿŖ´ŗ Œò«ûǹǰ&H8G45ʽÎKFGñĿ¬Œ}vûŖ´ŗ @Redirect(viewId="/failure.xhtml", end=true) @ApplicationException(rollback=true) public class UnrecoverableApplicationException extends RuntimeException { ... } b HMOMG&DĕOPƛŀǶ²¯èé¯2/p¯v°&%ơƬ¯2ţŦ ñ°ŗ @Redirect Ő [ ^ Y eà m viewId Œ&èé ;RSDž&éĥʋʌ´¬}ŲŴ78ǵ&ÂFEÝŨ2ĕMDGñòŖ´ŗ Ŗn ǹǰ&H8G45ŔʽÎKFGñĿŖ´ŗ @Redirect(viewId="/error.xhtml", message="Unexpected error") public class SystemException extends RuntimeException { ... } ©C© kk M¹nMNENnèéÐ= [2S æçÏD ãz '¡±© ȗȘÕ2°¬èéGH-´ƚ2¯2ï,45ÝǤ´¬Œ}%Þv°&%n pages.xml %Œ&ķuƓd%Þ¬«"¯2°Ŗ´ŗ <pages> <exception class="javax.persistence.EntityNotFoundException"> <http-error error-code="404"/> </exception> <exception class="javax.persistence.PersistenceException"> <end-conversation/> <redirect view-id="/error.xhtml"> <message>Database access failed</message> </redirect> </exception> <exception> <end-conversation/> <redirect view-id="/error.xhtml"> <message>Unexpected failure</message> </redirect> </exception> </pages> šŶ& <exception> ƎƏGH-Ɠd¯2°v°&%n %Ɠdñò2°¬Ŕ&śé´ƚ2&èéÃĭF¯Ŗ´ŗ ï,45Ŗ pages.xml Ő [ ^ Y eà m view-id ^ «2ÃĭF¯èéM-N-GE-´¬Œ}s%ÞŖ´ŗ !ò;,Ã-ǞÞŖ´ŗèé&ÂFEGE-´¬èŧ&Ļûŗ ... throw new AuthorizationException("You are not allowed to do this!"); <pages> <exception class="org.jboss.seam.security.AuthorizationException"> <end-conversation/> <redirect view-id="/error.xhtml"> <message severity="WARN">#{handledException.message}</message> </redirect> </exception> </pages> m[ m Z Y m _ [[à m[ `à Æ_YYÇ Z Y [ C[`[ņ org.jboss.seam.handledException Z Y m[ *m org.jboss.seam.exception [2[ Ä e à J ~#6 <exception class="javax.persistence.EntityNotFoundException"> <redirect view-id="/error.xhtml"> <message>Not found</message> </redirect> ©C© oo M¹nMNENnèéÐ= </exception> <exception class="javax.persistence.OptimisticLockException"> <end-conversation/> <redirect view-id="/error.xhtml"> <message>Another user changed the same data, please try again</message> </redirect> </exception> e à J m #YY[ b_ö6 <exception class="org.jboss.seam.framework.EntityNotFoundException"> <redirect view-id="/error.xhtml"> <message>Not found</message> </redirect> </exception> e à J à6 <exception class="org.jboss.seam.security.AuthorizationException"> <redirect> <message>You don't have permission to do this</message> </redirect> </exception> <exception class="org.jboss.seam.security.NotLoggedInException"> <redirect view-id="/login.xhtml"> <message>Please log in first</message> </redirect> </exception> #ņ e b6 <exception class="javax.faces.application.ViewExpiredException"> <redirect view-id="/error.xhtml"> <message>Your session has timed out, please try again</message> </redirect> </exception> # ViewExpiredException e m Y ` ö YJ m m Zf Y no-conversation-view-id conversation-required JC à e J [ C ZY e à C ©C© o ^ wïK4~4.D ɽ%n !ȅ!ȅ &ÅÖ°2Ȩã=>¯2°ţŒ}¯Ŗ´ŗ Ɂ&Ŗûn + Ö&ȶ°ÖÞs̮Ć¯§¨n Đđ&ʝ}vŒ}%´ŗ ş ðG-- }°"Ɖn Œò )oo) ɪlG̯̰̱ &KPG%ȶ°ÖÞŖ¯ŗ Œ&KPG%nɟ &$ðG--='ƊĿǾ¬ǁvţvûŖ¯ŗ) Ƃ}Njûĺ¯°}ȶľv°«"vǐǑ%¯ŗ ÆĊ-HÇ ş ̲ˋE¤,@G-%/p´¬345H8G45}°"ȶ°ÖÞǤýn -,D-vÃ,Gĭ¹-}´¬·¸&ODðG%ȁȂñòij;, Ã-&îɓv='ǹ%Þv°Œ}'ʞ¯Ɂ'%¯ŗ Æ` LazyInitializationException ´¬īǖ̳Þ̄Þ2°Ŗ¯¯n 'ęŒò ` ƺƻsµ¬&%vţn Ģ¯ȅ YJ ODðGĝ )^^ ëŨ¬űƦ& [ e ÆÇ âNvŠ-,D-Ã,Gĭ%Rñò¬ˌ˫ȃdvij;,Ã-Å ƺƻsµ&%´ŗÇ ş ðGOKN-G}°"ȶ°ÖÞ Œ"¯ȶ°ÖÞńw¯ODðG%LjūvRƿǀ´¬Œ}%n ś«û´Þû¯;<%«û̴º%îɓv345l<%Þ¬âðOvŞ ³ʝǁŖ¯ŗ ^ .Â# ŒòŖ%ƃènśŜ&±Ƴű"īļſȩvÅĮ£¯Ŗ´ŗ ş b G?-HMOMG%µ¬n G?-Ɯ&ǃ£n KE-&ƌ Ĭ¥ƍn ÅƜ&ĸ®n 345&ƭìƗ¯n D-R-&Dĕ&ŚOPƛ&Ĉçn ļG,@v;,Ã-sµûŖ´ŗ ş b G?-HMOMG%µ¬l&̵˵OPƛ&Ąľû%n !òŖ%&ɐĈ;,Ã-&̵˵ ØŖ´ŗ ¸ǰ¯vŨòũn ®¯°,RH&;,Ã-²³¯Ŗ´ŗ ş @Begin ş @End ş b G?-HMOMG%µ¬D-R-&Dĕ&OPƛ&Ąľû%n ɐĈ;,Ã-&qrV̶´¬ºn ,RH;,Ã-&qrȒȓ¯Ŗ´ŗ ÂÚF<sƗ2ţ¬}n ,RH&;,Ã-ɐĈ̀¯Ŗ´ŗ ÂÚF<sƗ2ţ¬}n Š&«"vɐĈ;,Ã-%Ŕ,RH&ʶñòŖ´ŗ ©C© o) }ðG--&= ş Š&«"v e G?- Æb R-FGÇ %Ŕ;,Ã-ʋʌ¯Ŗ´ŗ O¶%n fe G?- Æèýũn ó^* G?-Ç ;,Ã-ʋʌ¯ŖĿŻsn ŒòÖ°2&ȨãŜVȺȻ¯2ţŦñ°ŗ ş b G?-HMOMGsĕMDG«2̷̸ñò¬ŷĆn ̹˼ǹǰ&;,Ã-ƀ¸̥ì̵˵¯Ŗ´ŗ ő !&s (beforeRedirect=true) %·Ąąñò2°v°ȃûŗ Y[à YYJ m C Z ZÇ b Y` ö e fe Ė Æ ó^* Ė e ZY[Ç _[[ _[[ ` Y _ Yà C m `mC @End Æ [J m Yà Cf à ė àmJ Y [ņ YYJ m C Z *m [[à f ` [_à f fe G?-ŹȔ ʋʌñĿ°ŷĆn G?-âHÂN}¯2 ǂz;<ä´¬ŲsµûŖ´ŗ <a href="main.jsf?conversationId=#{conversation.id}">Continue</a> b &«"´¬ŷĆśŜ&«"¯Ŗ´ŗ <h:outputLink value="main.jsf"> <f:param name="conversationId" value="#{conversation.id}"/> <h:outputText value="Continue"/> </h:outputLink> NHMH£´¬ŷĆn śŜɰȣ%´ŗ <h:outputLink value="main.jsf"> <s:conversationId/> <h:outputText value="Continue"/> </h:outputLink> R-FG£&;,Ã-&ʋʌȳŷĆn ÍƟ&,GŎFGsýŖ´ŗ <h:commandLink action="main" value="Exit"> <f:param name="conversationPropagation" value="none"/> </h:commandLink> NHMH£´¬ŷĆn śŜɰȣ%´ŗ <h:commandLink action="main" value="Exit"> <s:conversationPropagation type="none"/> </h:commandLink> ;,Ã-&ʋʌȳî´¬Œ}}n Ąą´¬Œ}}Źţɂv¬Œ}%´&%ơƬ¯2ţŦñ°ŗ G?-âHÂN Ŗ <s:conversationPropagation> Nn &ôª}Ąąnµ¬°S-ñò&ôªŔ£´¬Œ}s%ÞŖ´ŗ conversationPropagation <h:commandLink action="main" value="Exit"> <s:conversationPropagation type="end"/> </h:commandLink> <h:commandLink action="main" value="Select Child"> ©C© o+ }ðG--&= <s:conversationPropagation type="nested"/> </h:commandLink> <h:commandLink action="main" value="Select Hotel"> <s:conversationPropagation type="begin"/> </h:commandLink> <h:commandLink action="main" value="Select Hotel"> <s:conversationPropagation type="join"/> </h:commandLink> Œ&Ån ¤œ@<œɕpŋ¯2Ţļ/p´¬345&ŞȷrƱ¯2ţòŖ´ŗ ƾţ&345}2ŲvŔ&ŒòŦŨ%´ŗ Ôƴv345&vºśŜ&ǣǤÜ&Ɲēµ¬°Šnj»ºŲ}´¬Ŕ&sµ ûŖ´ŗ ş n Ōj'(¯ûÍÎ'(´¬Œ}Ŕµ¬ƾţ&ďñvſÌ&78MNHG45Ŕ ġŖòŖ´ŗ «ûďñ°S-ñòſǯ&ƪƫEFsµûn Ŗéˬ&ƪƫǵ&GE-ŔµûŖ´ŗ ş 78ÍHœ8&œ@<œq%°ţÖŔ&úûʺý¬Œ}s%ÞŖ´ŗ Œ&ķusðG--=}ƭũò¬Ŕ&%´ŗ ^1 U4 ðñ S-ñò·¸&&-;q% @@Begin(nested=true) }¤GñòÂÚF<ƭìƗ´Œ}«2p³ñòŖ´ŗ S-ñò!ò¼ȧ&;,Ã-Õ2°2n Ŗn éˬ&&;,Ã-ǵ&ıIJûdž£GE-ŔÕ2°Ŗ´ Æéˬ&&;,Ã-ÈıĢŒ}%Þ¬snɆÞÙØ%Þv°Ç ŗ ŧ @End sƗ2ţ¬}n S-ñòȒȓñò2éˬ&s-NFGĐ~~đ´¬Œ}«2Ʋô¯Ŗ´ŗ ˟Ƭ&șñS-´¬Œ}s%ÞŖ´ŗ Ğd&78G,@l,@ ÆðG--=ĝþ¬ÿNÇ qˬ&sĄą´¬éˬ&sôªñĿ¬Œ}s%ÞŖ´ŗ Íéˬ&ƙ´¬Ô&ÏdzS-ÕÖŒ}s%ÞŖ´ŗ S-ñòsĄą´¬éˬ&sĄą´¬}n S-ñò;,Ã-éˬ&;,Ã-}ƹ´ƚ2Ȓȓ¯Ŗ´ŗ «ûn Œ&ŷĆn ɨjtuvƪƫ}ƃv´Œ}Ŕ%ÞŖ´ŗ S-ñò«ûn 78MNHG45ëŨ¬ƟǔvRMë°2345wɖ¯ɨjtu vƪƫʦ»ý¬Œ}s%Þ¬«"vûŖ´ŗ ű2n þ¬ÿNʈ´Œ}ĝðG--=¯2Ţ¯°/pƀƍ¯Ŗ´ŗ *6 þ¬ÿNʈ¯ŷĆn Š&«"¯2S-ñòsƄŢsǶ²¯v°«"̑Ł´¬ºz´èŗ ©C© oQ }ðG--&= Ļļn ǹǰS-ñò2°¬&˺}v¬;RSs¸ǰ´¬ŷĆn Œ&S-ñò2°¬ÍM-N-£¯Ŗ´ŗ}Þn ˺}v¬q¸ǰ´¬;RSM-N-s!&X}v¬º»ƃývţv¬« "n S-ñò¬!òɇò&qƐǔ&M-N-ÕĿ¬}ưĮvŒ}sµûŖ´ŗ ;RS @PerNestedConversation ï,45ÝŨ¬}Œò("Œ}s%ÞŖ´ŗ ^2 ò] !KF4 '9'󧱩 s fe G?- Æèn **~ ó^* G?-Ç ǐȍ%GE-ñò¬ŷĆn b ./ñò¬G45-êŹţdÓ¯ŖĿŻŗ 78s!&FG¤G´¬nµ¬° <h:outputLink> º»!&(ÞȥţŷĆvŠǶ²¯Ŗ´ŗ sGE-ñò»ƣnjôª¯°ŷĆsµûŖ´ŗ G45ÂÚF<sv°1n G45 ï,45ÝŨ¬}°"ƯĻ&ēĔ%ƺƻ>Ɣ´¬Œ}s%ÞŖĿŻŗ b @Begin Œ&sƪƫ;,Ã-ÈOPF´¬Ųsµ¬ŷĆn ñ»v¬ƺƻsǶ²¯Ŗ´ŗ ´%n) Ö&ƺƻ>ƔēĔƃ2ÞŖ¯ŗ ;RS!&ƪƫsƀÕñò¬ŷĆn @Create ÂÚF<%!&ƪƫOPF%ÞŖ´ŗ ƀÕñò2°vŨòũn ;,Ã-ȯ2 @Factory ÂÚF<dÓ´¬Œ}s%ÞŖ´ŗ Œò»&Ċ45s"Ŗţ°ºv°ŷĆn % pages.xml OáM G45 dÓ´¬Œ}s%ÞŖ´ŗ <pages> <page view-id="/messageList.jsp" action="#{messageManager.list}"/> ... </pages> sDĕñò¬«"}´¬}Þļn D-R-&DĕOPƛ&Ɉɉ%Œ&G45ÂÚF<sƭìƗñòŖ´ŗ G45s [[ śé&§¨ĺ´ŷĆn ǃúv b ̥ì êl45&±ƳÐ=´¬&%n Ŗţɂv¬sDĕñ¬Œ}v¬ºŔ¯òŖĿŻŗ &Dĕ(°°Œ}s&ôªŦŨv»n lMG45ÂÚF<ŧ&«"£%ÞŖ´ŗ <pages> <page view-id="/messageList.jsp" action="#{conversation.begin}"/> ... </pages> Ŗn Œ&lMG45 b ;Kº»ŔƭìƗ´Œ}s%Þn 2Ąą´¬Œ}s%ÞŖ´ŗ ÍƟ #{conversation.end} ·¸&5M´¬µ¬°S-ñò¬ôª´¬n OKŖĴFGôª´¬1ñ»ĂăsŲvŷĆn <begin-conversation> ?D£¯2ţŦñ°ŗ ©C© o\ }ðG--&= <pages> <page view-id="/messageList.jsp"> <begin-conversation nested="true" pageflow="AddItem"/> <page> ... </pages> Ŗn <end-conversation> ?DÂŔµûŖ´ŗ <pages> <page view-id="/home.jsp"> <end-conversation/> <page> ... </pages> ŽƉ&ƺƻ>Ɣ´¬n ǹǰ \ Ö&Ċ45º»ǚǛ%ÞŖ´ŗ ş @Create ş @Factory ş G45ÂÚF< @Begin ï,45ǣǤ´¬ ş pages.xml ş #{conversation.begin} ^S ÂÚF< @Begin ï,45ǣǤ´¬ ÂÚF< @Begin ï,45ǣǤ´¬ % <begin-conversation> £´¬ <s:link> w G45ÂÚF<}¯2£´¬ <s:button> .· b ;¤<Gļ C Y %O¶ĴF(°Ŗ´ŗ Œò«ûœPHœ8&Đ®¯°œ@<œ%ôţđŖĐ®¯°N%ôţđķu/p ñĿvţ¯2¯Ŗ°Ŗ´ŗ D& b %Œ&ķusŲvŷĆn <h:outputLink> £´¬ŲsµûŖ´ŗ Ŧ¯n <h:outputLink> ƢvĂȃs ) ÖµûŖ´ŗ ş b G45-ê <h:outputLink> ÖvɅ¬ēĔƿǀ¯2°ŖĿŻŗ ş 'ęO¶ĴFsv°1n b ǚǛñò DataModel &dzʋʌ¯ŖĿŻŗ ŽƉ&ƺƻ>Ɣ¯2 G45}°"ʝƿǀ¯2°Ŗ´sn Œò ) ŽƉ&ƺƻÖ°2ŖţǍǎnjŖĿŻŗ ŒòÖ°2G?-âHÂNț´}°" I^*e[ ēĔ2ˬµ¬ǚǛĊPGƲƺ°ĆľĿ("Œ}%ʗʘ%ÞŖ¯ŗ K345vŠ&ŷĆn 'ęŒòsšǃ&ɻʮ}vûŖ´ŗ I^*e[ -NMˬ&ƪƫŲ}¯v°1FG¤GķuR¯Ŗ´ŗ FG¤GµŖûŲv°vŠŒòśé&ŷĆn @DataModel ë«ì @DataModelSelection £´¬}īļưĮ%̹˼vûŖ´ŗ Œ&ķuǴ2ñ»ʋʌ&=«ûžȈä´¬1n Nƿǀ¯2°Ŗ´ŗ <s:link> b Œ&G b l ŦŨƓd´¬Œ}s%ÞŖ´ŗ ©C© oa }ðG--&= <s:link view="/login.xhtml" value="Login"/> µ¬°n G45ÂÚF<Ɠd´¬Œ}s%ÞŖ´ G45&§¨šĄvŤd´¬Çŗ ÆŒ&ŷĆn <s:link action="#{login.logout}" value="Logout"/> b l }G45ÂÚF<&ƝēƓd´¬}n śé&§¨ĺñv°ȃûĐlđs£ñòŖ´ŗ <s:link view="/loggedOut.xhtml" G45ÂÚF<s [[ action="#{login.logout}" value="Logout"/> G <h:dataTable> q%£´¬ DataModel &ǚǛdz¼/ʋʌ¯Ŗ´ŗ <s:link view="/hotel.xhtml" action="#{hotelSearch.selectHotel}" value="#{hotel.name}"/> ·¸&&-;Ȥ¯2ëţŒ}s%ÞŖ´ŗ <s:link view="/main.xhtml" propagation="none"/> ôªn Ąąn ŖS-´¬Œ}s%ÞŖ´ŗ <s:link action="#{issueEditor.viewComment}" propagation="nest"/> Gsôª´¬}n £ñò¬KƓd´¬Œ}Ŕ%ÞŖ´ŗ <s:link action="#{documentEditor.getDocument}" propagation="begin" pageflow="EditDocument"/> B~| N-G-£´¬ŷĆ& taskInstance ƙĬ%´ŗ <s:link action="#{documentApproval.approveOrReject}" taskInstance="#{task}"/> Æ$V&è -Å345ȺȻ¯2ţŦñ°ŗÇ šŶn ÿN}¯2Dĕñò¬ĐGđsŲvŷĆ <s:button> £¯Ŗ´ŗ <s:button action="#{login.logout}" value="Logout"/> ^[ °ô.¿JI /p¯2³ø¯º̺̻¯º78z´ÂFEĚz´¬&īļwʕ%´ ŗ Œòn b FacesMessage "}ưĮ%´ŗ Ȥʝvs»n ³ø&G45Hœ8ĕMDG´¬Œ}sƾţn b ĕMDGŹȔ e &ÂFEʋʌ¯ŖĿŻŗ Œ&1D b %³ø&ÂFEĚz´¬&ºvûȞǖvûŖ´ŗ lM&-; ;RS%µ¬ sŒ&ƺƻ>Ɣ¯2ţòŖ´ŗ ĕMDGO@NM-¯2ëţŲsµûŖ´ŗÇ facesMessages Æ @Name("editDocumentAction") ©C© og }ðG--&= @Stateless public class EditDocumentBean implements EditDocument { @In EntityManager em; @In Document document; @In FacesMessages facesMessages; public String update() { em.merge(document); facesMessages.add("Document updated"); } } facesMessages ǣǤñò¬ÂFE´ƚ2´ʲŧ&OP-%µ¬D-R-DĕOPƛ%ǹǰ &¯2£ñòŖ´ŗ Œò sĕMDGŹȔwÎv;,Ã-ɗÕ´¬&%ɐĈ'(&sv°ŷĆ%Ŕķ u¯Ŗ´ŗ b ^ ¿ e ÂFE¤ġŖĿ¬Œ}Ŕ%ÞŖ´ŗ facesMessages.add("Document #{document.title} was updated"); }ýũn Ļļ&ēĔ%ÂFEĚz´¬Œ}s%ÞŖ´ŗ <h:messages globalOnly="true"/> ^^ õ Æ ]m _öJ _m C m [ _m Y `B ņ à ` `[ m [ ` öà e m `B e m ņ J Cf 6 ş ^à ZJ C ` e[ ZJ C e m Ė m Y _ *ö m ZY[6 ů Ő `àņ m[e _à mJm YàJ e à B _ ¢m Y e à Y à àė J Jm m f à à Yà [ ` à ė ` m Ő [[à m `_ __ eJ m ù_ à m Yà e m Ű ]m [ C [[à à mC m B m ZJ f Cņ Y ö Y _m mà [e ee f B mC m B m Yàb C _m m m C ş A e[à AI b m e CJ`[ m mà Æ CJ `à J m [Ç Je[ AI Æ[ö m ]ö f ė eà mJ `à Ç b YY[ e[à AI [ Yņ e ©C© oh }ðG--&= ]m [ Cņ _m à `[J à m[ `öJ à Æņ e ņ _mC à YY Ç à J AI [ö http://seam-hotels/book.seam?hotel=BestWesternAntwerpen Æe ņ _mC Y hotel Y à [ ` ĖÇ _m AI I_ [à f e m mY6½½fm[½`ö½]#_Y | m `Ņ ^^ Æ ù[ C e pages.xml6 <conversation name="PlaceBid" parameter-name="auctionId" parameter-value="#{auction.auctionId}"/> *m e mJ e m `C e m m C m ņ m PlaceBid *m Ė[à e m Y [ Cņ `à m page e eà C Y Y *m Z `ņ parameter-name e m Ė Y m _[[ m [ C ņ Y[ e m e[ C Y m Zf Y[ņ m parameter-name auctionId *m m e C Yf [ö cid=123 YYJ m AI e à YJņ _[[ auctionId=765432 f *m [ ` m `C eJņ parameter-valueņ e ^ ZY C[ m C[ e m [ ` öà m C m ZY[ņ m C _[[ ` m Yà öà C[ e m auction [à Y ùZņ _ e _m m YJ _[[ Y Y m C *m `à Y eàJ m conversation ` e page e6 <page view-id="/bid.xhtml" conversation="PlaceBid" login-required="true"> <navigation from-action="#{bidAction.confirmBid}"> <rule if-outcome="success"> <redirect view-id="/auction.xhtml"> <param name="id" value="#{bidAction.bid.auction.auctionId}"/> </redirect> </rule> </navigation> </page> ^^1 j Æ ]m Jņ J ņ [ C m ` e Y e Y eàJ m [ C ė `à [öJ m e[[_J YJ e6 <page view-id="/auction.xhtml"> <param name="id" value="#{auctionDetail.selectedAuctionId}"/> ©C© ok }ðG--&= <navigation from-action="#{bidAction.placeBid}"> <redirect view-id="/bid.xhtml"/> </navigation> </page> b mņ _ m CöJ m #{bidAction.placeBid} e C_ Æ`à m _àņ [[ m ZY[ ö e m à ZY[ Çņ m _ _[[ ` /bid.xhtmlņ _m mņ _ _ YC[àņ eJ _m m [ C PlaceBid *m [ e m [ö [ö m6 @Begin(join = true) public void placeBid() ]m C Y e m <page/> [ņ m C Y e CJ [ņ e m m m [à ` Cö *m Y`[ _m J ZJ Cņ ` `e m m Cö *me à Yf eà m C _m m Cö _à e J m `à J m s:conversationName J6 <h:commandButton id="placeBidWithAmount" styleClass="placeBid" action="#{bidAction.placeBid}"> <s:conversationName value="PlaceBid"/> </h:commandButton> #m [C Y eà m conversationName ` _m J m s:link s:button6 <s:link value="Place Bid" action="#{bidAction.placeBid}" conversationName="PlaceBid"/> ^b ïK4~4.D ðG--=n Ö&œ@<œ&ŀ%Đúûʺý¬đuū%´ŗ ðG--= C ;<&D¹%ŸŹ̹˼¯Ŗ´ŗ ðG--=tu´¬1nŲv´ƚ2śŜ&Ļû%´ŗ ş !òɇò&l Æb Ŗ êl45£´¬ŷĆÇ Ŗï< ÆB~ OKÇ Ȩã&,Ã-Ūū¯Ŗ´ŗ Œ&Ȩã,Ã-ðG--úûüý«278ĚzñòŖ´ŗ ş &ŀ Öś$&ƑƒðG--úûüý ~ Ŗ e [ &įİġŖĿŖ´ŗ Ƒƒ&įİ<KFĕœÂŎn &-n DF<GH Æ` `Ç ˴¯2ðG--=R¯Ŗ´ŗ ^b ïK4~4Dw _ ég;<% b Ŗ êl45£´¬ŷĆn &ǹǰ& view-id ̵˵¯2!&úûüýŖ´ŗ ðG--&VWv,Ã- pages.xml }ƭũò¬OáM%dÓñòn Œ&OáMs WEB-INF @DGq& faces-config.xml &´ʲŧTǞñò2°¬Œ}Ĉȏ¯Ŗ´ŗ ©C© o }ðG--&= <pages> <page view-id="/main.xhtml"> <description>Search hotels: #{hotelBooking.searchString}</description> </page> <page view-id="/hotel.xhtml"> <description>View hotel: #{hotel.name}</description> </page> <page view-id="/book.xhtml"> <description>Book hotel: #{hotel.name}</description> </page> <page view-id="/confirm.xhtml"> <description>Confirm: #{booking.description}</description> </page> </pages> Œ&OáMsĈȏ´¬ŷǧvţ2Ŕ 345Ţļ/pj(¯Ŗ´ŗ /p¯v°ķuðG--&úûüýķu&Ø%´ŗ ^b1 ïK4~4Dw xy} ~QM B~ OKdÓ"ŷĆn ǹǰ& &KE-ƪƫ̵˵´¬Œ}«2úûüýŖ´ŗ Í view-id ǹǰ& ż2ɂv¬ȨãÕĿ¬Œ}s%Þ¬1Œò«ûǜǝvÅvûŖ´ŗ Ȩã,Ã- <page> ï<%dÓñòŖ´ŗ B~| <page> <pageflow-definition name="shopping"> <start-state name="start"> <transition to="browse"/> </start-state> <page name="browse" view-id="/browse.xhtml"> <description>DVD Search: #{search.searchPattern}</description> <transition to="browse"/> <transition name="checkout" to="checkout"/> </page> <page name="checkout" view-id="/checkout.xhtml"> <description>Purchase: $#{cart.total}</description> <transition to="checkout"/> <transition name="complete" to="complete"/> </page> <page name="complete" view-id="/complete.xhtml"> <end-conversation /> </page> </pageflow-definition> ^b2 ö÷øù ŧ&įİ ~ Ŗ e [ &ġŖĿ2n ǹǰ&Ŗ!&ĩ°Ŵò&345&Ŕúûüý»ò¬<KFĕœÂ ŎIJǁ¯Ŗ´ŗ <h:selectOneMenu value="#{switcher.conversationIdOrOutcome}"> <f:selectItem itemLabel="Find Issues" itemValue="findIssue"/> <f:selectItem itemLabel="Create Issue" itemValue="editIssue"/> <f:selectItems value="#{switcher.selectItems}"/> </h:selectOneMenu> <h:commandButton action="#{switcher.select}" value="Switch"/> ©C© }ðG--&= Œ&è%n 78®¯°ôªñĿ¬ Ś&1&M,ġĢÂŎsµûŖ´ŗ ) Ö&ǣǤM,Ǥý2n [à C _m Y ÆY e pages.xmlÇ _[[ ` [ m Yf_ ^bS rs wxúûüýīļ«ţʛ2°Ŗ´sn Ě¾¿%Ězñò¬NJsɂvûŖ´ŗ <h:dataTable value="#{conversationList}" var="entry" rendered="#{not empty conversationList}"> <h:column> <f:facet name="header">Workspace</f:facet> <h:commandLink action="#{entry.select}" value="#{entry.description}"/> <h:outputText value="[current]" rendered="#{entry.current}"/> </h:column> <h:column> <f:facet name="header">Activity</f:facet> <h:outputText value="#{entry.startDatetime}"> <f:convertDateTime type="time" pattern="hh:mm a"/> </h:outputText> <h:outputText value=" - "/> <h:outputText value="#{entry.lastDatetime}"> <f:convertDateTime type="time" pattern="hh:mm a"/> </h:outputText> </h:column> <h:column> <f:facet name="header">Action</f:facet> <h:commandButton action="#{entry.select}" value="#{msg.Switch}"/> <h:commandButton action="#{entry.destroy}" value="#{msg.Destroy}"/> </h:column> </h:dataTable> ̃»ţn ƾţ&ēsǯ¼&345Ć"«"L-N¤Mƛʜ˂´¬Ŧȅ"}ȶ°Ŗ´ŗ [à C _m Y _[[ ` [ m [ ©C© ) }ðG--&= wx«û78sðG--Ȓ̼´¬Œ}s%Þ¬&%ƮƬ¯2ţŦñ°ŗ ^b[ HJCKL ÃÅ DF<GHn S-ñòÅ"345%ǍǎnjŖ´ŗ DF<GHn ǹǰ&-NFGq&ǵ&G&wxvûŖ´ŗ <ui:repeat value="#{conversationStack}" var="entry"> <h:outputText value=" | "/> <h:commandLink value="#{entry.description}" action="#{entry.select}"/> </ui:repeat ^c B%TU% B%TU% .O%G% w _ Ƣ%µûŖĿŻsn b ;RSǵ&M@&ƀÕ£%Þv°}°"Ăȃs¡;RS µûŖ´ŗ Æwʕn 345Ȏ=º»l´¬Lj°Ä¸ŋʂp2¯Ŗ"1n ɶŲ%v°ȃûwʕŒ& b &ķu£¯v°«"¯ēs«°%¯Ƌ"ŗÇ Y` ö G?-%n ;,Ã-s̵˵ñò¬n l&̵˵OPƛŀ;RS&M@ĸ®ñòŖ´ŗ Œòʗʘ´¬n M¹-;;RS2;RSM@Ț¯n !òŲ}´¬-;;RSMPG¯Ŗ´ŗ @Name("grid") @Scope(ScopeType.EVENT) public class Grid { private HtmlPanelGrid htmlPanelGrid; // getters and setters ... } @Name("gridEditor") @Scope(ScopeType.CONVERSATION) public class GridEditor { @In(required=false) private Grid grid; ... } #[C[àņ à m b Y mJm m Y[ uiComponent m[ *m e[[_J ZY[ getRowIndex()e m UIData Y _m m ` ö m `[ J ņ Y m _ `6 ©C© + }ðG--&= <h:dataTable id="lineItemTable" var="lineItem" value="#{orderHome.lineItems}"> <h:column> Row: #{uiComponent['lineItemTable'].rowIndex} </h:column> ... </h:dataTable> b A Y C[`[ _m m [ e m Y ^f Æ # J[ e [[ Y ` e ććć _ _[[ m _m m à _[[ à ő f J C[ Y e ##å Ė ]ė JJ m Y m #BZ [ [`à m[ YC [ C JJ m [ ő _ė[[ [ö m Y I mb JC à ¢C[ Y ė [[_ [ me Ė m Ė Y m [[à *m [[_ m Ė ` Z f em _Cņ Y[ Ė ė m J ő e[àņ e m ņ e ņ öJ Cà [J Y[ņ J C C J _mC m [ J Ė ` ÆY[ e [ e C öÇņ ņ [àņ ##å e YC Ė ö Y m ņ J m e [J ė e[ *me Ė m C e Y e Æm Ė Ç̽ e ė Y m C ņ Yà C Y J m [ m ö_ _mė JJ ė me Cà Y e[ m C _m ##å CŅ ] `[ e[ e m Ė Æ Ç Yf Z[6 <core:manager concurrent-request-timeout="500" /> e _ėC à m ##å Ė f m [ [[ m C m C m ņ m Y e m YJ ` m [ *m YY m J _m m ##å Ė [Jm_Jm Æm m [[ Y[ J [ f [J m e [ e `Ç _m e _ Y[Z Yć b mCà Y _ m[ [à à m ÆY[[ `Ç YY m ő m [f ##å Ė m Cņ _m m ` Z à mf [à m C Æ m m Y m [ Ç̽ m [ m Y[[ m C e Y *m e[ _m à mC [JfJ e _m m Y m Cà Z Æà ė _ ` YY Y[ ņ Ç _ m[ _ J C[ ##å YY[ ć ][[ eņ à _mm à _ m Y[ à m Ė ©C© Q }ðG--&= _mm à _ J Y[[fà[ YY m e à J e à m YY mņ m à ö e m_ [J à ##å Ė _[[ ö Y[ f m m m m Ė ć e ņ à Y``[à _ [ m Ė e m mf Æ `CÇ ùZ à Y``[à _ Ė m [ YC e[J m C _m Ė e m C e ÆJ öàYņ `[ e Y e[Ç Y e m [ Yà à m[ f Ė [à m [ ]m _öJ à Ė [àņ e m m C à [ ` Ė m C b[[àņ m [ [`à à YC Y ` em Y[ Ė eC e m Ő ` e[ _m m Y [ e[J e m C _m Ė e m C `[ ` m em Ė AJ Y[[fà[ J Ė [ efJ Ő B ö à m @Asynchronous Y[[J C[6 int total; // This method is called when an event occurs on the client // It takes a really long time to execute @Asynchronous public void calculateTotal() { total = someReallyComplicatedCalculation(); } // This method is called as the result of the poll // It's very quick to execute public int getTotal() { return total; } ^f j_ +xÄ I mb #BZ m ##å [`à [à _m ņ YC [[ m [ `C6 ş eventsQueue ő YC Ė _m m C Y[ #[[ C Ė f Ė m C [[à *m e[ e m Ė m Cf ö Z ÆJ mCà Yņ CJ e e [_ Ç m C ė e[ ş ignoreDupResponses ő J m Y Y `à m Ė e ėf [ė Ė [à m Ė JYIY̾ [ m m Y J e m Ė m C ő B YC à Y m [ *m Y m[ ` _m _m ė C [[_ [Y[ Ė ` ş requestDelay ő e m Æ Ç m m Ė _[[ ` m Ė ©C© \ }ðG--&= e m Ė m ` Y `à e m m Ė _[[ ` ÆJ[ e _mm Y m ` CÇ Æe m [ C m ĖÇ *m Y m[ ` _m _m ė C [[_ [Y[ Ė ` Ő ` m m [à à Æ `f _m m Ė Ç [J m m _[[ ö Zf ş <a:poll reRender="total" interval="1000" /> ő ~[[ m Cņ ©C© a b ~QMwgU4&MI4 B~| nC ^ ĝ ^^ ʼnŇ&1&lS-KE-=?%´ŗ B~| nlS-KE-ĝn78MNHG45n ȏnjƪƫn 45nN-Gn]^vŠn ï<&̫¿}¯2Ěǹtu¯Ŗ´ŗ ̫¿nžſ%}2ŔıØĝ´° B~ }ƭũò¬ å| Ěǹ£¯2dÓñò2ëûn ^ [Y HMĮ£¯2nʼȡnHO@FG«¬ɀ̒ästu%´ŗ B~ ȁȂtuvƏ˛%µûn ]^ 345&OKdÓ´¬Œ}º»nʟ¡vðGOK&=n# ʼnŇëŨ¬l-&Ċ3-D45Ŗ%ǃż¯Ŗ´ŗ 345 B~| ) Ö&ɂv¬ƺƻ£¯Ŗ´ŗ ş Ôƴv78MNHG45ġĢOKdÓ¯Ŗ´ŗ B~ KE-dÓn&1&OKdÓ¯Ŗ´ŗ ;E45n478}&̷̕Ĉv&MNHG45%µ¬} Ǫý»òŖ´ŗ ş lS-KE-̿̀dÓ¯Ŗ´ŗ lS-KE-nÔ78&Ô&&̟̠ġĢºŔ¯òŖĿŻŗ !&ƪƫ B~| N¹-&ŀ%ijv&%nɐĈ%µ¬}Ǫý»òŖ´ŗ Ô78&G,@l,@&łŃn 478}&MNHG45Ö°2/pVW´¬«ûŴ}Ôƴvƺƻ%´ŗ !Œ%nB~| Ô&Ï(v'(â-ij"«"vN-G=&1&̈̉ñòķuƿǀ¯Ŗ´ŗ Œò» ) Ö&Ŕ&́̚¯v°%ţŦñ°ŗ !ò»ºvûDZ"D¹µ¬°ˡƂ%/p¯Ŗ´ŗ OKnn !¯2nN-G ´ƚ2478}& Ö&MNHG45ȺȻ¯Ŗ´ŗ lS-KE-°ţÖŔ&N-GŖˢŖ´ŗ ñ»nB~| & ) Ö&345ƣ˄¯2°Ŗ´ Æʹ°ǯǎ¯2°¬Œ}Ç ŗ !ò»w̪"Œ}Ŕnǯǎ¯2"Œ}Ŕnľv°Œ}Ŕ%ÞŖ´ŗ "1nB~ ǘ¬ŲµûŖĿŻŗ b µ¬°n êl45±Ƴ2nOKdÓ´¬Œ}͂̓vŷĆn µ¬°n345sKE-Ñ/}°"«ûNÑ/&ŷĆn ë!»ţB~| Ƅ%¯Ƌ"ŗ ¯º¯nǂŤv̫¿Ěǹ%78MNHG45Ǫý¬Œ}sn «ûȱȲv345&ŞȷǍǎÖŒ}=>%ÞŖ´ŗ b -.~QM nOKdÓ´¬ ) Ö&ēĔsµûŖ´ŗ ş bµ¬° êl45±Ƴ&Į£ f -,D-vêl45Å ş B~ &Į£ f -,Ovêl45Å žſv345%n-,D-vêl45Å%ɧÁ%´ŗ ©C© g OK}lS-KE- }2ŔÔƴv345nŷǧż2Ɲē£¯Ŗ´ŗ !òɇò&Ån!òɇò&LjØŔˊØŔµûŖ´ŗ b 1 Õ.ég;<%Â# -,D-vÅn w×&Ò&Ý°Ȏ=vM¹&§¨ Æ Ç º» ƣƤn§¨}¯2²¬l&¤FČdÓ¯Ŗ´ŗ êl45±ƳnŠ&sM¹&Ú-%µº}°"Œ}śén 345«2ƀÕñòŠ&«"vƪƫŔŹţȾ¯ŖĿŻŗ ŒònG45-êÂÚF<sOKƔ1vŨòũv»v°Œ}sµ¬Œ}ƬȘ ¯2°Ŗ´ŗ vȖv»n!ò»ŦŨs345&ǹǰ&ƪƫGE-%Þ¬º»%´ŗ Œò b êl45±Ƴ£¯OK&è%´ŗ <navigation-rule> <from-view-id>/numberGuess.jsp</from-view-id> <navigation-case> <from-outcome>guess</from-outcome> <to-view-id>/numberGuess.jsp</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>win</from-outcome> <to-view-id>/win.jsp</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>lose</from-outcome> <to-view-id>/lose.jsp</to-view-id> <redirect/> </navigation-case> </navigation-rule> Œò êl45±Ƴ£¯OK&è%´ŗ <page view-id="/numberGuess.jsp"> <navigation> <rule if-outcome="guess"> <redirect view-id="/numberGuess.jsp"/> </rule> <rule if-outcome="win"> <redirect view-id="/win.jsp"/> </rule> <rule if-outcome="lose"> <redirect view-id="/lose.jsp"/> </rule> </navigation> </page> êl45±Ƴsɏɐ˼ˢ¬}Ǫý¬v»ũn G45-êÂÚF<º»ƣƤnlĺ´Œ}stu%´ŗ public String guess() { if (guess==randomNumber) return "/win.jsp"; if (++guessCount==maxGuesses) return "/lose.jsp"; return null; ©C© h OK}lS-KE- } ŒònĕMDG&§¨%µ¬Œ}ƮƬţŦñ°ŗ ĕMDGŀ£´¬âHÂNƓd´¬Œ}Ŕtu%´ŗ public String search() { return "/searchResults.jsp?searchPattern=#{searchAction.searchPattern}"; } -,OvÅn Ò&Ý°Ȏ=v345&ƪƫç%.Œ¬Āā&×ØĆľĿdÓ¯Ŗ´ŗ Œ&Å%nB~ OKdÓŀnŠ&«"v78MNHG45&OKĚǹŔtu%µûn MNHG45&OKŹţǘ»v°G45-êÂÚF<ɆţŒ}Ŕtu%´ŗ Œò B~ £¯OKdÓ&è%´ŗ <pageflow-definition name="numberGuess"> <start-page name="displayGuess" view-id="/numberGuess.jsp"> <redirect/> <transition name="guess" to="evaluateGuess"> <action expression="#{numberGuess.guess}" /> </transition> </start-page> <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}"> <transition name="true" to="win"/> <transition name="false" to="evaluateRemainingGuesses"/> </decision> <decision name="evaluateRemainingGuesses" expression="#{numberGuess.lastGuess}"> <transition name="true" to="lose"/> <transition name="false" to="displayGuess"/> </decision> <page name="win" view-id="/win.jsp"> <redirect/> <end-conversation /> </page> <page name="lose" view-id="/lose.jsp"> <redirect/> <end-conversation /> </page> </pageflow-definition> ©C© k OK}lS-KE- ŒŒ%n´ʲȾʔţ ) Ö&Œ}sµûŖ´ŗ ş b½ êl45±Ƴn«û žſ%´ŗ Ưº¯nŒòn̈́̏}v¬ ;<s«ûÔƴä%µ¬}°"Ɂ'µ°Ŗ°¯2°Ŗ´ŗÇ ş B~ n~ ĝ C ʽʾn78MNHG45&=>s%ÞŖ´ŗ C ;<ƃ¬Ųsvţn !òǤý2n-,OÅnŔ} Ă %´ŗ ŚȎ=vƪƫ ÆOK&Ś-,FÇ ¯2ĩ&ƪƫĀātuvĂñò×ØĆľĿsµûŖ´ŗ -,D-Ån<FGv Å%´ŗ !òn345%vţn ǢȜĂ&v°n78sŧ(Þ°}ŒȅƔ1¬OO¶êl45ǃ¯2 °Ŗ´ŗ -,O ½ -,D-êl45&ɔįn ʟ¡vÅĕ ½ ÅĕD-MNHG45&Ǫýē}}2Ŕ«ţʛ2°Ŗ´ŗ ñ2n345Åĕvɸ¬ɹ°º»ʗʘ´¬Œ}n ÕÖ Ö&Ơv=ȍ%´sn 345n ĻļnſȩvƬȘ%&Åĕ%µûŖĿŻŗ ¯º¯n 345n ĞdvD¹%nÅĕtu%µûn¯ũ¯ũ!"%´ŗ Åĕvɸ¬ɹ°n tuvȃûʗʘ¯Ŕ&}¯2ǘ»ò2°Ŗ´ŗ 78s¯°Œ}&ËŽͅ´¬Œ}n}2ŔȞǖ%´ŗ ¯º¯n-,OÅ&¸ǰƬÓsµ¬&̦"͇͆µûŖĿŻŗ ) Ö&Å&šǕ&DZ°n þ¬ÿN&ɸ¬ɹ°%´ŗ b1 w ú©ûP% ©C© )o OK}lS-KE- b µ¬° êl45±Ƴs£ñò2°¬ŷĆn n78þ¬nŕĢnĸ®ÿN&¼ȍvêl45tu¯Ŗ´ŗ ŒòsǶ²¯}Þn qĥvƪƫ&wɖĬƀÕ´¬Œ}n 345&˯˟%´ŗ ĝ ]`]ö &«"vÅR¯v° ]^ 345ODðGn !¯2n^ -,D-EF45 ĝ YJ ef _ö &«"v-,D-;RSÅ&×ØĆľĿ&ǐǑn ƾţ&ôǶĨŒò´¬Œ}nź}ŻŠƄtu%µ¬Œ}͈ý2°Ŗ¯ŗ ¯º¯n &;,Ã-%&ǐǑº»n -,OEF45 ͉ÝŨ»òǂŤvÅsµ¬}Œȅ%n !ò'ę}2Ŕžſ%´ŗ Ļļn!ònG45-êÂÚF<&š0n no-conversation-view-id ï,45} [[ PFG&£×ĆľĿ¬ȰƂžſ%´ŗ ɟnjnOO¶êl45&Rn źȉ°ÖŔƕñò¬Ŕ&}Ǫý2°Ŗ´ŗ Œ&ŷĆnno-conversation-view-id&ƎƏ ŀ&Dĕñòº»&G?-&ŷĆn ɂv¬ĕMDG¯2n!&¸ǰ¯2°v°Œ} ʋý¬Œ}vûŖ´ŗ pages.xml%(°Ŗ´ŗ <page view-id="/checkout.xhtml" no-conversation-view-id="/main.xhtml"/> wēn-,OÅ%n þ¬ÿNʈ´Œ}n&ƪƫǵ&ƖdÓvĀā}¯2ŀįñòŖ´ŗ vȖv»n-,OÅn ǹǰ&ƪƫº»&Āā&×ØĆľĿLjĂ¯Ŗ´ŗ -,OÅ%nþ¬ÿNnO¶%ȳî%´ŗ ̹˼þ¬ÿN&£¥ǘ¯n & ɩ° º»&G45s'(ñò¬&KFG¯n !¯2nſȩnǹǰ& ĕMDG¯Ŗ´ŗ Æ!¯2ne ÂFEĚz¯Ŗ´ŗÇ ŒòĞȬ}Ǫý¬ºnµ¬°n-,OÅ&Ă}Ǫý¬ºn 345ôǶĨ}¯2&ɀNJŧ͊%´ŗ 78}¯2nŒ&ĞȬMHMHñĿ»ò¬ºŔ¯òŖĿŻŗ Ğd&º»& back="enabled" cd«ûn þ¬ÿNêl45tu}´¬Œ}Ŕ%ÞŖ´ŗ <page name="checkout" view-id="/checkout.xhtml" back="enabled"> <redirect/> <transition to="checkout"/> <transition name="complete" to="complete"/> </page> Œòncheckout ƪƫ º»ś&Š&ƪƫ %Ŕþ¬ÿN%&Āāstu%´ŗ ŔnjȅŻnOK&Dĕñòº»&G?-&ŷĆŔn ɂv¬ĕMDG¯2n!&OK%&¸ǰ¯2°v°Œ} dÓ¯vŨòũvûŖĿŻŗŒ&ŷĆnno-conversation-view-id &ƎƏnOKdÓ%(°Ŗ´6 <page name="checkout" view-id="/checkout.xhtml" back="enabled" no-conversation-view-id="/main.xhtml"> ©C© ) OK}lS-KE- <redirect/> <transition to="checkout"/> <transition name="complete" to="complete"/> </page> 'ęnŠnj»&êl45ÅŔn!ò͋ñľ¯°ŷǧsµûŖ´ŗ °ÖnŠnj»&Ås͋ñľ¯°ºn´ʲ=>%Þ¬«"vûŖ´ŗ b1 xy} ~QM.¡ b1 ~QM.`a & B~| OKdÓ&ŷǧƓz´¬ŲsµûŖ´ŗ cdƓd´¬Œ}s%ÞŖ´ŗ ŋŌ&;RSM-¯n Œ& components.xml <bpm:jbpm> <bpm:pageflow-definitions> <value>pageflow.jpdl.xml</value> </bpm:pageflow-definitions> </bpm:jbpm> š0&(% B~| cd¯2nŧ B~ ¹-&OKƓd¯2°Ŗ´ŗ b11 ~QM.ó§ @Beginn µ¬° ï,45£¯2KE-dÓ&ÒƓd´¬Œ}«2 ¹-&OK ôª ¯Ŗ´ŗ @BeginTask @StartTask B~ @Begin(pageflow="numberguess") public void begin() { ... } Ŕ¯ţnYJZ[£¯2OKôª%ÞŖ´ŗ <page> <begin-conversation pageflow="numberguess"/> </page> OPƛ&çOKôª´¬ŷĆn ő èýũ @Factory Ŗ @Create ÂÚF<&Ĉç ő ɟǸ·Dĕñò2°¬°¬}ǪýŖ´ŗ !¯2n $V&&«"n OK&š0&ï<}¯2 <start-page> ï<£¯Ŗ´ŗ RENDER_RESPONSE ¯º¯nOKsG45-êƭìƗ¯&§¨}¯2ôªñò¬ŷĆn G45-ê&§¨ Æ Ç nDĕñò¬š0&Ɣd¯Ŗ´ŗ Œ&ŷĆnOK&š0&ï<}¯2 <start-state> £¯n !òɇò&tuv§¨ Æ Ç &1ĀāƎƏ¯Ŗ´ŗ <pageflow-definition name="viewEditDocument"> <start-state name="start"> <transition name="documentFound" to="displayDocument"/> ©C© )) OK}lS-KE- <transition name="documentNotFound" to="notFound"/> </start-state> <page name="displayDocument" view-id="/document.jsp"> <transition name="edit" to="editDocument"/> <transition name="done" to="main"/> </page> ... <page name="notFound" view-id="/404.jsp"> <end-conversation/> </page> </pageflow-definition> b12 ~îCwüý Ś <page> ï<n4-,s78Ūūȏ2°¬ƪƫĚ¯Ŗ´ŗ <page name="displayGuess" view-id="/numberGuess.jsp"> <redirect/> <transition name="guess" to="evaluateGuess"> <action expression="#{numberGuess.guess}" /> </transition> </page> b l%´ŗ <redirect/> Ȁn b êl45±Ƴ& <redirect/> }Íp£n ÖŖûnHœ8&ĸ®ÿN&ƺƻ>Ɣ´¬1n Yfmf (°Ŗ´ŗ Æ n Hœ8&ĕMDG͌ý2;,Ã-ʋʌ¯Ŗ´ŗ ű2n%nI`à I[ -NM& e[m &ʝƄ%´ŗÇ view-id ĀāÒnnumberGuess.jsp ë°2n ÿN µ¬°nGGFG´¬Œ}«2./ñò b §¨ Æ Ç &Ò%´ŗ <h:commandButton type="submit" value="Guess" action="guess"/> ĀāsnŒ&ÿNGFG´¬Œ}«2./ñò¬}Þn numberGuess ;RS& guess () ÂÚF<}ƭìƗ´Œ}«2n B~| nĀā&G45./¯Ŗ´ŗ B~ ë°2G45Ɠd´¬1ľ¬4NFG-n b ^ ¿}«ţʛ2°¬Œ}n !¯2nĀā&G45̜<Hn njƋ"Šǹǰ& ;,Ã-ëŨ¬ ;RS&ÂÚF<%µ¬Œ}ơƬ¯2ţŦñ°ŗ ű2nb M¹&1·Õ2°¬Ŕ&}nnjƋ"ŠÍ B~| M¹&ÅÕnjŖ´ŗ Æwɖ¯˔Ƴ Æ*m ʭ e ee Y Y[ÇÇ [[%& &ŷĆ Æèýũnaction sdÓñò2°v°;¤<ÿNÇn Ŕ¯nÒ&v°Āāsµ¬v»ũn Āā´¬1&4êɍûŖ´ŗ µ¬°nŔ¯n´ƚ2&ĀāsÒÕÖv»ũnſȩƲĚz¯Ŗ´ŗ ű2nOKǙ¯ſȩä%ÞnŒ&ÿN <h:commandButton type="submit" value="Guess"/> śŜ&Ò&v°Āā%&G45'(¯Ŗ´ŗ <page name="displayGuess" view-id="/numberGuess.jsp"> ©C© )+ OK}lS-KE- <redirect/> <transition to="evaluateGuess"> <action expression="#{numberGuess.guess}" /> </transition> </page> ÿNG45ÂÚF<ƭũĿ¬Œ}Ŕtu%´ŗ sĀāƔd¯Ŗ´ŗ Œ&ŷĆnG45§¨ Æ Ç <h:commandButton type="submit" value="Guess" action="#{numberGuess.guess}"/> <page name="displayGuess" view-id="/numberGuess.jsp"> <transition name="correctGuess" to="win"/> <transition name="incorrectGuess" to="evaluateGuess"/> </page> ¯º¯nŒò˽&̗°-NMŦ}ǪýŖ´ŗ vȖv»nOKĂă&˯˟OKdÓ&éˬ&ĩ&;RSā/¯2°¬º» %´ŗ OKŋŌ´¬Œ}!ò¼ȧȡŀ´¬Œ}n«ûƷ°Œ}%´ŗ b1S QM.þÿ ĻļnOKdÓ´¬}ÞnB~ ï<sŲ%´ŗ «ûLjūvķu°ûŖĿŻsn <decision> <decision name="evaluateGuess" expression="#{numberGuess.correctGuess}"> <transition name="true" to="win"/> <transition name="false" to="evaluateRemainingGuesses"/> </decision> 45 ;,Ã-ŀ% b ^ ¿«2ȢȣñòŖ´ŗ b1[ QM.Āā <end-conversation>nŖn@End £¯2Ąą¯Ŗ´ŗ Æ'ęntıĬ&1nƝē &£ȿ1Ŗ´ŗÇ <page name="win" view-id="/win.jsp"> <redirect/> <end-conversation/> </page> Ċ45}¯2ntransition ÒƓd¯2nN-GĄą´¬Œ}s%ÞŖ´ŗ Œ&ŷĆn lS-KE-ë°2ǹǰ&N-GĄą&ħ˾ɍ¬%¯Ƌ"ŗ <page name="win" view-id="/win.jsp"> <redirect/> <end-task transition="success"/> </page> b1^ ~QM.Ă° ăăă Ô&OK&Ć³ĝn Ö&OKs'(ŀŔ" Ö&OKwÎȐŁñĿ¬Œ}stu%´ŗ ©C© )Q OK}lS-KEï<éˬ&OKwÎȐŁñĿn ÒÝÞ&OK&'(ôªñĿŖ´ŗ <process-state name="cheat"> <sub-process name="cheat"/> <transition to="displayGuess"/> </process-state> qˬ&OK <start-state> ï<«û'(ôª¯Ŗ´ŗ ï<ǷǸ¯}Þn qˬ&OK&'(Ąą¯Ŗ´ŗ Ȁ«2dÓñò¬Āā%éˬ&OK&'(sƲôñòŖ´ŗ !òs <end-state> <process-state> b2 -.gU4&MI4D lS-KE-nŦò Æ_mÇ sN-G'(´¬Œ}s%Þ¬ºn °Ö Æ_mÇ N-G'(´ƚÞº}°"ǂŤvű2n 78nµ¬°nÚOœP&4-,«2'(ñòvŨòũv»v°ǂŤvN-G&ȡ Ć%´ŗ B~|M,GD45n78N-G-Ěz¯n!ò»&N-G=´¬Œ} rƱ¯Ŗ´ŗ Ŗ BUSINESS_PROCESS ;,Ã-ŀ&lS-KE-ŋŌ´¬n ƪƫ345ƀñĿn B~| Èǐȍ%!&ƪƫijäñĿŖ´ŗ &Ĥľûn<task-node> ï<ÕÖśén žſvlS-KE-dÓOKdÓ}źȉÍ%µ¬«"ƃýŖ´ŗ Æwɖ¯˔Ƴ Æ*m ʭ e ee Y Y[ÇÇ ɐĈç&lS-KE-ë°2n ȏnjƪƫn4-,sn78sKM¯nN-G'(´¬&ȏ2°¬}Œȅ%´ŗ <page> <process-definition name="todo"> <start-state name="start"> <transition to="todo"/> </start-state> <task-node name="todo"> <task name="todo" description="#{todoList.description}"> <assignment actor-id="#{actor.id}"/> </task> <transition to="done"/> </task-node> <end-state name="done"/> </process-definition> ©C© )\ OK}lS-KE- ÍKPG&ŀnB~ lS-KE-dÓ}n B~ OKdÓÕÖŒ}tu%´ŗ !"%µòũn) Ö&ŋʂ lS-KE-ŀ& <task> OK <process-definition>ŹȔ}wʄ¯Ŗ´ŗ bS xy} gU4&MI4aÒ.¡ bS &MI4aÒ.`a B~| cd¯n!&B~|lS-KE-dÓ&ŷǧƓz´¬ŲsµûŖ´ŗ <bpm:jbpm> <bpm:process-definitions> <value>todo.jpdl.xml</value> </bpm:process-definitions> </bpm:jbpm> B~| KE-345sƲ./¯2Ŕij%´ŗ ͍£ʼnŇ% £´¬ŷĆ345./´¬ìKE-dÓcd¯ţv°%¯Ƌ"ŗ !&1n͍£ʼnŇ% &éˬ B~| &1&KMÐ=Ƅ%´ŗ ÖŖûn345&KMÎ components.xml º»KE-dÓM-´¬ŦŨ%´ŗ bS1 "KP}.7Ąâ °Ö%ŔǹǰKM¯2°¬78ǘ2°¬ŲsµûŖ´ŗ B~| n } JY «2n78ɼƐ¯Ŗ´ŗ actor }ƭũò¬×ØÙØ ;RS£´¬Œ}«ûn ǹǰ& Ɠd¯Ŗ´ŗ @In Actor actor; public String login() { ... ©C© )a OK}lS-KE- actor.setId( user.getUserName() ); actor.getGroupActorIds().addAll( user.getGroupNames() ); ... } bS2 gU4&MI4.7Ąâ lS-KE-M-N-0Ĉä´¬1n ï,45£¯Ŗ´ŗ @CreateProcess @CreateProcess(definition="todo") public void createTodo() { ... } Ŗn YJZ[£¯2lS-KE-&0ĈäŔ(ýŖ´6 <page> <create-process definition="todo" /> </page> bSS P4Ką÷9 KE-sN-Gï<ǷǸ¯}ÞN-GM-N-s²³ñòŖ´ŗ Œò»78Ŗ78ĉû 2vŨòũvûŖĿŻŗ n̜<;@´¬Œ}Ŕn ;RS͎͏´¬Œ}Ŕ%ÞŖ´ŗ <task name="todo" description="#{todoList.description}"> <assignment actor-id="#{actor.id}"/> </task> Œ&ŷĆn N-Gĉû 2¬Œ}Ŕ%ÞŖ´ŗ ſȩǹǰ&78N-Gĉû 2Ŗ´ŗ <task name="todo" description="#{todoList.description}"> <assignment pooled-actors="employees"/> </task> bS[ P4K!4 °ţÖº&×ØÙØ ;RS«ûN-G-&ĚzsrƱv2°Ŗ´ŗ pooledTaskInstanceList n 78s¼Á¼ȧĉû 2¬Œ}s%Þ¬ñòN-G&-%´ŗ <h:dataTable value="#{pooledTaskInstanceList}" var="task"> <h:column> <f:facet name="header">Description</f:facet> <h:outputText value="#{task.description}"/> </h:column> <h:column> <s:link action="#{pooledTask.assignToCurrentActor}" value="Assign" taskInstance="#{task}"/> </h:column> </h:dataTable> <s:link> &ĤľûƯĻ& b <h:commandLink> Ŕ£tu%µ¬Œ}ƮƬ¯2ţŦñ°ŗ <h:commandLink action="#{pooledTask.assignToCurrentActor}"> ©C© )g OK}lS-KE- <f:param name="taskId" value="#{task.id}"/> </h:commandLink> ;RSn pooledTask ſȩN-Gǹǰ&78ĉû 2¬×ØÙØ;RS%´ŗ ;RSn taskInstanceListForType ǹǰ&78ĉû 2»òĞdNM&N-GġŻ%°Ŗ´ŗ <h:dataTable value="#{taskInstanceListForType['todo']}" var="task"> <h:column> <f:facet name="header">Description</f:facet> <h:outputText value="#{task.description}"/> </h:column> <h:column> <s:link action="#{todoList.start}" value="Start Work" taskInstance="#{task}"/> </h:column> </h:dataTable> bS^ P4K./0 N-G&pŘôªñĿ¬1n-êÂÚF<n @BeginTask£¯Ŗ´ŗ @StartTask µ¬° @StartTask public String start() { ... } Ŗn N-G&'( YJZ[ £¯2ª1¬Œ}Ŕ%ÞŖ´6 <page> <start-task /> </page> Œò»&ï,45n lS-KE-ŹȔŋ¯2ƬȘÕÖn Ğğvȑˏ&ôª¯Ŗ´ŗ Œ&«¬Ð=lS-KE-;,Ã-&ŀ%ƀÕ´¬ƪƫGE-%ÞŖ´ŗ @EndTask £¯2Ąą´¬ŷĆn N-G&ŸąMɍħ¯Ŗ´ŗ @EndTask(transition="completed") public String completed() { ... } Ŗn YJZ[Ŕ£%ÞŖ´6 <page> <end-task transition="completed" /> </page> YJZ[ ^ ¿ £¯2ĀāƓd´¬Œ}Ŕtu%´ŗ Œ&ÎNJ%n B~| lS-KE-dÓȽɨˢn'(j(¯Ŗ´ŗ Æ«ûÔƴvKE-ë°2n KE-'(sƲô´¬Ÿą´¬Ųsµ¬N-Gsµ¬ºŔ¯òŖĿŻŗÇ ÔƴvlS-KE-&='ǹ´¬Śȑ&ƁƂvķu&ŹȔvÖ°2 ©C© B~| )h OK}lS-KE- <ÃÂȺȻ¯2ţŦñ°ŗ ©C© )k c wĆRK ć!H;<é#¢JĈ% ^ +o %ɒŪñò¬ C ~ #~ ë«ì `+ & ) Ö&šŔwʕv C £ijÃ,Gĭ¯2˘̟vRƿǀ¯Ŗ´ŗ ǫí&ƪƫ=Ã,Gĭ«ûn °ºv¬œP345ODðGº»ŔƁƂv I| ńĆ'ǹ¯Ŗ´ŗ c 8 n Ǯ͐Ĥ& C 345Ã,Gĭ&ʟ¡%µ¬-,D-Ĭ͑Ģ ` &OH-D45º»²ŖòŖ¯ŗ &ƪƫ=Ã,Gĭ˵ǔn ijĬŋ´¬ƺƻ&>ƔƉ}¯2cȸñòŖ¯ ő Ğ̲ˋvH8G45&Ð=ŋŌ´¬ƺƻŗ -3HvĊHM345ļ̲ˋvH8G45£¯Ŗ´ŗ ĎďD¹ ÆN¹-ċ*#Ç &H8G45n 345sÏdz¯2°¬ˌǙ&GHMʸ&ØR´¬«"cȸñò2°v °ȃûn 78&M,HG45-â¯ŖĿŻŗ ¯º¯n Ɖ}´¬źȉ´ƚ2&pŘŖŴ78´¬N&ĚzŋŌ¯n ŧǙ¯ʒò2ÍN&ĸ®ŋŌ¯2ÞŖ´ŗ Œ&1n ` ̲ˋvH8G45-â¯ij;,Ã-}°"Ɖż´¬«"cȸñòŖ ¯ŗ Ȥʝvs»n ĝ ^ +o «ûś&Đ-,D-đ}ƭũò¬Ã,Gĭ̲ˋvH8G45Ěz´¬ 1&޳ʝsµûŖĿŻ%¯ŗ Œ&1n ĤľûĎďvH8G45¯2-;ñò¬ij;,Ã-ƿǀ¯2°Ŗ¯ŗ Ǐn 78}2ƺƻsƾţvûn ̃͒& LazyInitializationException }¯2 f ` ŋ´¬78º»&͓ȟšƾ}vûŖ¯ŗ ŒŒ%Ųv&345Dž%̲ˋH8G45Ěz´¬Ş³ʝv&%´ŗ ^ +o Œ&ƺƻťɼ¯n %-,Ov;RS ;RS&͔Ƶ¯2-;ñò¬ȁȂij;,Ã- Æ-,OEF45 `Ç }°"ƉɒŪ¯Ŗ´ŗ Œòƺƻŋ¯2ŸŹvÚ45%µûŖĿŻs Æ!ò¼ȔưĮv޳}v¬Ç n ) Ö&ƺƻsµûŖ´ŗ ş -,OEF45 &͔ƵœPDž%;<ǐȍ«ûɻpŘ%=ñòvŨòũvûŖĿŻ ÆŒòĎǠvƺƻ%µû'ęºvûȞǖ%µ¬Œ}sľºûŖ´Çŗ ` ş Í̲ˋH8G45q&-,O;RSç%&ij;,Ã-&ʋʌ tu%´sžſ%µûŖĿŻŗ n ̥ì¯2-;ñò¬-,OEF45 ` ;RSƿǀ´¬Œ}«û ŽƉ&ƺƻ>Ɣ¯Ŗ´ŗ ©C© +o }ĊPGċD45ê¤FČ Æź}ŻŠ&'ęNDž%̲ˋH8G45Ěz¯Ŗ´ŗÇ ij;,Ã-&ʋʌŲ}¯v°«"vƾţ&4v345 Æ FÃÅvŠÇ Œò%ɧÁ%´ŗ Śq%͕ţp£¯µ2°¬;RSƾţÕ2°¬«"vŔ"Ǚ¯Ôƴv3 45&ŷĆn ;RSʸŹȔǵ&ij;,Ã-&ʋʌƢvƺƻ}vûŖ´ŗ Œ&1n ^ +o &ij;,Ã-=ÅȁȂ¯2-;&ȁȂij;,Ã-ƿǀ¯2°Ŗ´ ŗ c1 D L%?K;<% ^ EF45 ` ƎƏ¡H8G45=Ğɐ}¯2°Ŗ´ŗ ^ ;,ê ` sƭìƗñò¬}̹˼H8G45./¯n ƭƗ¯sĄą´¬}H8G45ŔĄąñĿ¬Œ}stu%´ŗ b G45-ê}¯2/p´¬EF45 ` ÂÚF<VW´¬ŷĆn !&G45ŋŌ´¬´ƚ2&pŘ Ö&H8G45%("Œ}s%Þn G45&Ð=sŸą¯»ŲŴ;ĴFŖKFGñò¬«"´¬Œ}s%ÞŖ´ ŗ ŒòȀ͖»¯°ķu%µûn °ţÖº& 345Ų}ñò¬Ŕ&ŒòŦŨ%´ŗ Ŧ¯n Œ&ēĔƺƻs ÖµûŖ´ŗ 345ſw&ÂÚF<;º»EF45 ǵ&G?-¯2ŹNGE-(ľv°tuĬsµûŖ´ŗ ` ş Œ&G?-°ţÖº&̝§Ć;RS«¬Ð=Ų}´¬ŷĆsµûŖ´ŗ !òɇò&;RSs _` Džº»͗ƐƭìƗñòŖ´ŗ %G?-Ȧ} _` Džº» ^ ;RSǵ&;sÔµ¬&«ţƃ»ò¬Œ}%´ŗ ş l&DĕŋŌ&ʒʓOPFsŲvŷĆsµûŖ´ŗ G?-Ȧ}&H8G45sƾţv¬}n £¯2°¬345sƾţ&ÏdzG?-Ð=¯2°¬ę!òŦŨƾţ&Ďď% ͗Ɛ&ƺƻɡɢ´¬tuĬsƁţvûŖ´ŗ ɆÞÙØ/p´ƚ2n ŲŴn ÍH8G45q%.Œ»vŨòũv»v°º»%´ŗ ` 78Œ&ƺƻʗʘ´¬1 Œ&âNĻļn G?-ŹȔ-â´¬ſwH8G45}¯2'ƊñòŖ´ŗ Œ&'Ɗ%°ţÖº&ƺƻsµûŖ´ŗ Ŕ}ŔșĶ}v¬ƺƻn H8G45;ĴF´¬Ŗ%!òs³øv&ºŠ"ºŹţŤť%Þv°Œ}%´ ő Ŧ¯n Đlq&ĊEF45đH8G45s;ĴFñò¬«"v¬}n lŸŹDĕñò¬&%n Dĕñò¬D-R-´%GHMOHF4ñò2°¬ŷĆsµûŖ´ŗ 78&H8G45s³ø¯vºŒ}78ǘ»Ŀ¬Š"¯»«°%¯ Ƌ"ºŗ H8G45͗Ɛ&ƺƻ}ŋŌOPF&ƺƻ&Ɲē>Ɣ¯vs»n Đlq&ĊEF45đ%ƺƻʗʘ¯Ŗ´ŗ >ƔĔ ) ÖÁŨ»òŖ´ŗ ©C© + }ĊPGċD45ê¤FČ ş H8G45¯2-;ñò¬&%vţn ¯2-;ñò¬ȁȂij;,Ã-£´¬ ş G?-¯2 ) Ö&H8G45£´¬n ŽƉÅƜ&ĸ®OPƛ&ôªº»345ƭìƗ¯OPƛ&ĄľûŖ%-â ¯n ) ŽƉD-R-&DĕOPƛ-â´¬ ŧ&EG45%n -;&ij;,Ã-&cdēĔÖ°2ɾǂ¯2°ÞŖ´sn ŖŴš0 H8G45=íî´¬ēĔɾǂ¯2ëţŲsµûŖ´ŗ H8G45=v¯%-;&ij;,Ã-£´¬Œ}s%Þn Ŗ =ij;,Ã-£¯2°v°ŷĆ%Ŕ H8G45=Į£´¬}ưĮvŒ}sµ¬&%ƮƬ¯2ë°2ţŦñ°ŗ Ŧ¯n Œ& ) Ö&ķuŌɺ¯2/p´¬«"cȸñò2°¬1n Ŋ£´¬ēsšǃ%´ŗ J e[ C e àė J ^ +o fJ Yf Z Y [[à e[ e à C ^^ \ Cf ņ à m _m à _[ fJ Y Z c1 } | J `[ `à e[ e [[ b Ė e à _ `[ m eņ à components.xml6 <core:init transaction-management-enabled="false"/> <transaction:no-transaction /> c11 YC J ` e `JJņ Jņ [[J ` öņ à mčJ _m à e[ *# f Y m J _m ¢ |J YJ ^ e à _öJ C ^^ \ Cņ à m[ [[ m ^ à mč f Y components.xml6 <transaction:ejb-transaction /> _Cņ e à _öJ ^^ \ ņ _[[ à m f à mč m _Cņ e `[ m à mč ņ à à e à eJ e m e[[_J6 ş ~# I^AI¢^͘ ¢# _m m javax.persistence.EntityTransaction e ş ` J _m m org.hibernate.Transaction e ş YJ ş ^ZY[ [à `[ J _m org.springframework.transaction.PlatformTransactionManager e ©C© J m +) }ĊPGċD45ê¤FČ ¢eJ ~# I^AI¢^͘ ¢# J `à J m e[[_J à f YZ[ _m #{em} m e m persistence:managed-persistence-context Yf e à J Y Z entityManagerņ à Y [C m entity-manager ` Æ fJ Y Z Ç <transaction:entity-transaction entity-manager="#{em}"/> * eJ ` J [ m e[[_J à YZ[ _m #{hibernateSession} m e m YB ė persistence:managed-hibernate-session Y e à J m` sessionņ à Y [C m session ` Æ fJ Y f Z Ç <transaction:hibernate-transaction session="#{hibernateSession}"/> * ZY[ [à `[ J [ m e[[_J à Yf Z[6 <transaction:no-transaction /> b eJJ YJ J J YJ ~[e* |Jf c12 ĉĊ * à mč YC [[` ö e [ C m beforeCompletion() afterCompletion() à e[ņ ė _ àf mč Y _m m Ė ZY[ e m Y _m J à mč [[` ö [à Z e C ^^ \ C m <transaction:ejb-transaction/> Y m[ ` ` f [ components.xml m à mč [[` ö [à [[ e m e ė ö_[J c2 D.deB%3À4 C ^^ \ ʼnŇ&é%£¯2°¬ŷĆn ;,ꫬij;,Ã-&HMOMG&=Ĉȏ%ÞŖĿŻŗ ^^ \ ʼnŇ%µ2Ŕn ſw&&̟̠q%Ōɺ´¬ƾţ&̝§Ć;RSÕÖÔƴv345sµ¬ ºŔ¯òŴn Œ&ŷĆ;RSç%&ij;,Ã-&ʋʌsžſ%vţ?HsǶ²¯ĝ´° ŷĆsµûŖ´ŗ °Ŵò&ŷĆ%n ;RS% J Y Z Æ~# £Ç Ŗ J Æ` £Ç &°Ŵòº£´¬ŲsµûŖ´ŗ =ij;,Ã-ſȩlM& ;RS%;,Ã-% EntityManager Ŗ Session &M-N-=¯Ŗ´ŗ @In %MPG´¬Œ}s%ÞŖ´ŗ =&ij;,Ã-GH-NäñòʼnŇ%īļîɓ%´ŗ ©C© ^ +o ++ }ĊPGċD45ê¤FČ &ƞƟ;,ꫬ;,ê=ȁȂij;,Ã-&£ɋt¯v°šǃä '(´¬Œ}s%ÞŖ´ŗ ï<ç&ij;,Ã-&ƪƫÔɮ´¬Œ}vţȁȂij;,Ã-&̹˼vOP ĊR¯Ŗ´ŗ ÆŒ&ƃ˼Ȧñò2¯ŖNJÖ°2n ŧʗ& ^ ƞƟ&l5%˃Ţ¯°}Ǫý2°Ŗ´ŗÇ c2 y+ - D.deB%3À4 '¡±© =ij;,Ã-&cdžſ%´ŗ components.xml qŧ&«"VW¯Ŗ´ŗ <persistence:managed-persistence-context name="bookingDatabase" auto-create="true" persistence-unit-jndi-name="java:/EntityManagerFactories/bookingData"/> Œ&cd«û-;& bookingDatabase }°"Ò& ;RSsp³ñòn ù Ò java:/EntityManagerFactories/bookingData ÕÖij7ŎF ÆEntityManagerFactory M-N-Ç & EntityManager M-N-&͔Ƶ=¯Ŗ´ŗ Ǐn EntityManagerFactory s ù œ<ñòŒ}Ťť´¬ŲsµûŖ´ŗ %n ŧ&Kâ,@cd persistence.xml ǣǤ´¬}Ťť("Œ}s%ÞŖ´ŗ <property name="jboss.entity.manager.factory.jndi.name" value="java:/EntityManagerFactories/bookingData"/> Œò%ŧ£¯2MPGñò¬ EntityManager s%ÞŖ´ŗ @In EntityManager bookingDatabase; e à J ^+ ö à [ m @TransactionAttribute(REQUIRES_NEW) m m Y Z m[ė ` YYJ m [[ m `B _C m fJ Y Z YYJ à Yf _m m Cņ _[[ ` YYJ m ö REQUIRES_NEW *mf eņ e à ö m REQUIRES_NEW m à m[ m à J J ©~ ¢Z c21 D. IJ;<%'¡±© = ` EF45ŔÍƟcomponents.xml %ŧ&«"VW´¬Œ}s%ÞŖ´ŗ <persistence:hibernate-session-factory name="hibernateSessionFactory"/> <persistence:managed-hibernate-session name="bookingDatabase" auto-create="true" session-factory-jndi-name="java:/bookingSessionFactory"/> java:/bookingSessionFactory hibernate.cfg.xml %Ɠdñò¬EF45OáGÒ¯Ŗ´ŗ <session-factory name="java:/bookingSessionFactory"> <property name="transaction.flush_before_completion">true</property> <property name="connection.release_mode">after_statement</property> <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManage <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</proper <property name="connection.datasource">java:/bookingDatasource</property> ©C© +Q }ĊPGċD45ê¤FČ ... </session-factory> EF45OHF4¯v°&%n hibernate.transaction.flush_before_completion ļíî¯2EF45s *# H8G45&;ĴF«ûʼ/OHF4ñò¬«"¯vŨòũv»v°&%ơ Ƭ¯2ţŦñ°ŗ Œò%n ŧ&;<2 Session s%ÞŖ´ŗ C ;RSMPGñò¬= ` @In Session bookingDatabase; c22 D.deB%3À4 wċČq Ǻ͙£¯ûn ŚG?-&Ɉɉ%NƲK<¯ûn LazyInitializaĝ NonUniqueObjectException }͚¯vţ}Ŕn -;ñò¬ij;,Ã-«û¯2Ô&G?--â´¬̲ ˋvH8G45KH´¬Œ}s%Þ¬«"vûŖ´ŗ merge() tionException ̲ˋH8G45=%̲ˋKFG%H8G45&͛ɣ}wɖĬ'ǹ%Þ¬& %n ` } ^ +o °ŴòŔ @Version ï,45ƿǀ´¬Œ}%̲ˋKFG&£rƱ¯2°Ŗ´ŗ O¶%n ij;,Ã-ŚH8G45&Ąľû%OHF4ñòŖ´ ÆN¹-}ÍĈñò¬Çŗ ŒòsƉ&/p%µ¬ŷĆŔµûŖ´sn ´ƚ2&ÈĸÂÅƀÕñòsŢļĄą¯}Þ&ØN¹-ɆÞÙŖò¬/ pĈȏ´¬Œ}&ēsƾ°%¯Ƌ"ŗ Œò«ûɬĎďvtu¯Ŗ´ŗ ^ +o ?Ã-â&ŀ& n n à` śé&Ğd&«2ɐĈvƃĻ¯Ǫ͜ŪòŴ̷͝vƔdsvñò2¯Ŗ 1n ^ +o ij£¯Ďďv&'Ɗ("4%£ǃ¯RNvēĔsǹǰµûŖĿ Żŗ Ŧ¯n ` %ƞƟ«ûdÓñò¬ FlushModeType ´¬¹ĕȁȂ}¯2Œ&ķuƿǀ¯2°Ŗ´ŗ Ŗn ĩ&¹ĕŔÞÍƟ&ȁȂƿǀ´¬Ŧȅ"Œ}Ĉȏ¯2°Ŗ´ŗ %&ôªÎ FlushModeType.MANUAL Ɠd´¬Œ}s%ÞŖ´ŗ ǹǰ ` sij'ǹ´¬Ş³Ȁ%µ¬ŷĆ&Øķu¯Ŗ´sn ĩ&Íɰ¹ĕ«¬ȁȂŔR´¬d%´ŗ @In EntityManager em; //a Seam-managed persistence context @Begin(flushMode=MANUAL) public void beginClaimWizard() { claim = em.find(Claim.class, claimId); } ù_ņ m claim `B J `à m Y Z e m m f C ] ö mJ m [6 public void addPartyToClaim() { Party party = ....; claim.addParty(party); ©C© +\ }ĊPGċD45ê¤FČ } Ŧ¯n Œò»&ÈĸǂzOHF4sǶ²´¬«"LjĂ´¬Ŗ%N¹-¯2OHF4 ñòŖĿŻŗ @End public void commitClaim() { em.flush(); } e ņ à [ m flushMode MANUAL e YJZ[ņ e ZY[ CJf [6 <begin-conversation flush-mode="MANUAL" /> cS y+ č! Ď'¡±© MNOP-«û getDelegate() ÂÚF<˴¯2¹ĕǫí& #~ GE-´¬Œ}s%ÞŖ´ŗ ŲǏn ` sšŔŋȌ&Ɓ°¹ĕ}vûn org.hibernate.Session sšŔLjū}v¬MNOP-vûŖ´ŗ Œòśé£´¬&sũºũº¯ţv¬źŠ%´ŗ ͞ƃȳ¯«°&% ¯2Ø2ţŦñ°ŗ EntityManager Ŧ¯n ` Ŗ!òśé&Ŕ&°Ŵò£´¬ºȃ»Ŵn °Ŵò ;RS%£¯ţv¬ŷĆsţ¬%¯Ƌ"ŗ śŜ!&wèz¯Ŗ´ŗ @In EntityManager entityManager; @Create public void init() { ( (Session) entityManager.getDelegate() ).enableFilter("currentVersions"); } àY C Ə˛&ŀ%ŔçDZ°vţ͟ƴvŞĠv¬1n %Þ¬ȃûʘŨ¬&swʕ%´ŗ %IJǁ´¬Ɛ&ēĔŧz¯Ŗ´ŗ ŖŴn śŜ&( components.xml ǣǤ¯Ŗ´ŗ <factory name="session" scope="STATELESS" auto-create="true" value="#{entityManager.delegate}"/> Œò%EF45ƣƤMPG%Þ¬«"vûŖ´ŗ @In Session session; @Create public void init() { session.enableFilter("currentVersions"); } c[ ]|ďºď - ] '¡±©Đđ ©C© +a }ĊPGċD45ê¤FČ =&ij;,Ã-£´¬ŷĆĝ @PersistenceContext 2;,ê=&ij;,Ã-MPG´¬ŷĆn EntityManager Ŗ Session ĊPGKÃ4¯Ŗ´ŗ Œò«ûn ^ ¿G?Ġdzq%ɦŹ͠Ö´¬Œ}s%Þ¬«"vûŖ´ŗ }ýũn ŧƃ2ţŦñ°ŗ User user = em.createQuery("from User where username=#{user.username}") .getSingleResult(); $V&èn śŜ&è}ÍɰvûŖ´ŗ User user = em.createQuery("from User where username=:username") .setParameter("username", user.getUsername()) .getSingleResult(); Ǐn ŧ&«"ɶVW¯v°%ţŦñ°ŗ User user = em.createQuery("from User where username=" + user.getUsername()) //BAD! .getSingleResult(); Æîɓs̗ţn Ē MPG45ʧʨ¯2ˉˊ}vûŖ´ŗÇ c^ QG#P'¡±© ` ǫí&͡®vķus e[ vûŖ´ŗ O@N«ûN¹-q&NĚzĂȃʫý¬Œ}s%Þ¬«"vûŖ´ŗ O@NÖ°2 ` &<ÃÂ%Ȩãɾǂñò2°Ŗ´ŗ ŒŒ%n O@N 345ńĆ´¬žſvēĔVȆ¯2ëţ&s«°Ŧȅ"}ȶ°Ŗ´ŗ Ğ #YY[ b_ö %"Ŗţ/p´¬ēĔɾǂ¯Ŗ´ŗ =&ij;,Ã-n EntityManager ĝ ` Session s12p³ñò}Þíîñò¬«"dÓñòO@N&wxsµ¬ŷĆsµûŖ´ŗ Æ Ǐn ` sij'ǹ´¬Ş³Ȁ%µ¬ŷĆ&Ø£%ÞŖ´ŗÇ <persistence:filter name="regionFilter"> <persistence:name>region</persistence:name> <persistence:parameters> <key>regionCode</key> <value>#{region.code}</value> </persistence:parameters> </persistence:filter> <persistence:filter name="currentFilter"> <persistence:name>current</persistence:name> <persistence:parameters> <key>date</key> <value>#{currentDate}</value> </persistence:parameters> </persistence:filter> <persistence:managed-persistence-context name="personDatabase" persistence-unit-jndi-name="java:/EntityManagerFactories/personDatabase"> <core:filters> <value>#{regionFilter}</value> <value>#{currentFilter}</value> </core:filters> </persistence:managed-persistence-context> ©C© +g f -. _ Q³!;<% D& b ë°245 Æ¥ƍÇ l%dÓñòŖ´ŗ <h:form> <h:messages/> <div> Country: <h:inputText value="#{location.country}" required="true"> <my:validateCountry/> </h:inputText> </div> <div> Zip code: <h:inputText value="#{location.zip}" required="true"> <my:validateZip/> </h:inputText> </div> <h:commandButton/> </h:form> 'ęn NÅ&wĥ%µûn ŖN¹--ä&dÓŹȔľ2¸ǰ´¬Ăź}ŻŠ&Đ¥ƍđsLjĂ'(´ ¬1n Œ&ēĔĻļn IŐ DZDz¯2¯Ŗ°Ŗ´ŗ ` [ 2dÓñò¬Å¹-&Ă´¬Rƿǀ¯2°Ŗ´ŗ Location GH-%ĂdÓ´¬}Œȅº»ª12ØŖ´ŗ public class Location { private String country; private String zip; @NotNull @Length(max=30) public String getCountry() { return country; } public void setCountry(String c) { country = c; } @NotNull @Length(max=6) @Pattern("^\d*$") public String getZip() { return zip; } public void setZip(String z) { zip = z; } } ¯º$VsŢ %´sn 'ę ` lM&Ŕ&ľŴL-NvĂ"ēs-¤ºŔ¯òŖĿŻŗ [ public class Location { private String country; private String zip; @NotNull @Country public String getCountry() { return country; } public void setCountry(String c) { country = c; } @NotNull @ZipCode public String getZip() { return zip; } public void setZip(String z) { zip = z; } } ©C© +h %& b O¶45 °Ŵò&ēĔ}¬¯2Ŕn q%£ñò¬45&NMƓd´¬ŲsvţvûŖ´ŗ b Ĥľûn <s:validate> 2ÅĊPG%dÓñò¬Ă¯245("Œ}s%ÞŖ´ŗ <h:form> <h:messages/> <div> Country: <h:inputText value="#{location.country}" required="true"> <s:validate/> </h:inputText> </div> <div> Zip code: <h:inputText value="#{location.zip}" required="true"> <s:validate/> </h:inputText> </div> <h:commandButton/> </h:form> ơV6 Œ&Å% @NotNull Ɠd¯2Ŕ;KƗǹñĿ¬& sŲvţv¬}°"ľŨ%µûŖĿŻŗŒò ¥ƍÃ,Gĭ&ȃň«¬Ŕ&%´ŗ Œ&ēĔÅ$&ĂdÓ¯n 8MĬÉò2°¬ŗŗ l%ĂDZDz Ěz required="true" b ¯Ŗ´ ő ¯º¯n š0&è}Ǣƚ2!òźŠɏɐĬs͕ɑñò2°¬ľŨ%v°&%n <s:validateAll> 2ØŖ´ŗ <h:form> <h:messages/> <s:validateAll> <div> Country: <h:inputText value="#{location.country}" required="true"/> </div> <div> Zip code: <h:inputText value="#{location.zip}" required="true"/> </div> <h:commandButton/> </s:validateAll> </h:form> Œ&Nſȩ <s:validate> O¶q%&ŚŪūǣǤ¯Ŗ´ŗ O¶sǕÞţv¬ŷĆn Ūū&ɻçºvûȇţŒ}s%Þ¬Œ}vûŖ´ŗ ŒŒ%n ©C© +k %& b O¶45 ¥ƍs̺̻¯ŷĆ78¯2O@<FGĚzñĿ¬1Ǭ»ºɻ˪vŨò ũvûŖĿŻŗ ǹǰn ´ƚ2&ÂFEO¶&Ɉɉ%Ěz¯2°Ŗ´ŗ 'ę(°°&n ?HÝŨ2O@<&}vûÂFEĚz ÆD b %tuÇn O@<}H¹̜MHMñĿ2 ÆŒòƄtuÇn Ö°%O@<&}vûǬºMÂĚzñĿ¬ ÆŒòŔƄtuÇ Œ}%´ŗ Ŗn ŲųɁƈ&ŚO@<H¹&}vû͢&Ý°-N-GĚzñĿ°}¯Ŗ´ŗ O¶&ŚO@<¯2ºvûƾţ&ķuŲ}¯2°Ŗ´ŗ O¶µ¬´ƚ2&O@<!òɇò¯2MÂnÂFEnŪūO@<&D Mœĝ̜MHMƓd¯°}ȶľv°%¯Ƌ"º»n Ĥľû e [ ,D%wʕvDMœƓd¯Ŗ´ŗ <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib"> <div> <s:label styleClass="#{invalid?'error':''}"> <ui:insert name="label"/> <s:span styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="#{invalid?'error':''}"> <h:graphicImage value="/img/error.gif" rendered="#{invalid}"/> <s:validateAll> <ui:insert/> </s:validateAll> </span> <s:message styleClass="error"/> </div> </ui:composition> <s:decorate> 2ŚO¶O@<Œ&,DġŖĿ¬Œ}s%ÞŖ´ŗ <h:form> <h:messages globalOnly="true"/> <s:decorate template="edit.xhtml"> <ui:define name="label">Country:</ui:define> <h:inputText value="#{location.country}" required="true"/> </s:decorate> <s:decorate template="edit.xhtml"> <ui:define name="label">Zip code:</ui:define> <h:inputText value="#{location.zip}" required="true"/> </s:decorate> <h:commandButton/> </h:form> šŶn 78sO¶q(ûƦû´¬&ż2 2¥ƍÂFEĚzñĿ¬Œ}s%ÞŖ´ŗ I mb #BZ <h:form> ©C© Qo %& b O¶45 <h:messages globalOnly="true"/> <s:decorate id="countryDecoration" template="edit.xhtml"> <ui:define name="label">Country:</ui:define> <h:inputText value="#{location.country}" required="true"> <a:support event="onblur" reRender="countryDecoration" bypassUpdates="true"/> </h:inputText> </s:decorate> <s:decorate id="zipDecoration" template="edit.xhtml"> <ui:define name="label">Zip code:</ui:define> <h:inputText value="#{location.zip}" required="true"> <a:support event="onblur" reRender="zipDecoration" bypassUpdates="true"/> </h:inputText> </s:decorate> <h:commandButton/> </h:form> $&Ƣv;Kǂzv dÓ´¬Œ}ƩŖ¯°-NM%´ŗ Ğ A £&¼/,- [ vŠ&ŏÃF£¯2(°°v»ũ¯°v»ũvë&Œ}ŗ ǂzv ʫýv°ŷĆnb !ò»²³¯Ŗ´sn$&ǬºÈĸ¯v»ũ²³ñò¬ƜŔÈĸñòŖ´ŗ <h:form id="form"> <h:messages globalOnly="true"/> <s:decorate id="countryDecoration" template="edit.xhtml"> <ui:define name="label">Country:</ui:define> <h:inputText id="country" value="#{location.country}" required="true"> <a:support event="onblur" reRender="countryDecoration" bypassUpdates="true"/> </h:inputText> </s:decorate> <s:decorate id="zipDecoration" template="edit.xhtml"> <ui:define name="label">Zip code:</ui:define> <h:inputText id="zip" value="#{location.zip}" required="true"> <a:support event="onblur" reRender="zipDecoration" bypassUpdates="true"/> </h:inputText> </s:decorate> <h:commandButton/> </h:form> 45s̺̻¯}ÞɂvÂFEĚz¯°%´ºʙ ÂFE< Æ ÂFEŀ& ¿ĝlȦ}&ÂFE<&«"Éò2°¬ Ç [«2Į£tu%´ŗ ^ ` public class Location { private String name; private String zip; // Getters and setters for name @NotNull @Length(max=6) @ZipCode(message="#{messages['location.zipCode.invalid']}") public String getZip() { return zip; } public void setZip(String z) { zip = z; } } ©C© Q %& b O¶45 location.zipCode.invalid = The zip code is not valid for #{location.name} ©C© Q) i òÆĉ Y e I# ÆIY #YY[ C[YÇ Y`[à ]m[ àà _m I#ņ J [ m Y à [JJ A[ f [àņ mJ à [JJ _ Ė mJ Y[[à ee C[Yf Y[e Æ C[Y Y[e _m e #~ J m à _[ [J _ à [ [J à C Ŭ ŭ #~ àņ _m m _[ ` [ öà ` à _[ ` e m YYà #~ à_àÇ à [JJ `[ Y e m C [ | mņ óCà ŬmY6½½JCà mJŭ Yf [ `ö m YY m [ _ m à [JJ _[ _m m C ^^ _[ `à [[à f JJ `m à [JJ [ m YY[ C[Y m ` [ e m öņ _m Z _ mJ ]J à Yf Z [à [ö _J J[ Y Ő m ņ m #~ņ m CàmJ i òÆĉ óCà J[ à [JJ ` m C [JJ ` _m [ ef Y `à ~àmņ I`à [[[ö *m Jm e óCà _e[6 ş C àZ YY óCà6 C óCà ņ öJ m [J C Cà m ş óCà `B C `B ņ óCà [ C [6 óCà Jf m[à _m ZJ C [` e_ö *6 _ Ė ö CC_ e m óCà àZ f i1 \ òÆĉ *m m à ` óCà `B C `B ņ à Cf [[à _ à Yņ à [ e _m _mņ óCà Y[à Ő [ Z óCà [ C [ m YY[ i1 \ òÆĉ # à m[ mC `à _ņ mC[à óCà `C e YY ZY[ e JCà YY[ i1 ]ĉ @Entity @Name("hotel") class Hotel implements Serializable ©C© Q+ óCà J { @Id @GeneratedValue Long id @Length(max=50) @NotNull String name @Length(max=100) @NotNull String address @Length(max=40) @NotNull String city @Length(min=2, max=10) @NotNull String state @Length(min=4, max=6) @NotNull String zip @Length(min=2, max=40) @NotNull String country @Column(precision=6, scale=2) BigDecimal price @Override String toString() { return "Hotel(${name},${address},${city},${zip})" } } óCà C[à YY m e YY ÆJ½Çņ m ZY[ [à _ C` J 6 m YC ZY[ņ m m[ [ ` e C hotel.getCity()ņ m J `J J `à m óCà Y[ *m àY e à J ö m à Cà Yà J m6 óCà ÆàÇ YY J JC ee e m m à [mY mC `[f àY e f à m J^à ` e m YYY @*ToMany e Y[à J J àY e [ö Collection<Entity> b m ņ à _ė ` `[ `e e m Cà e[ ¢mY ņ 345ODðG à *m J _ m YY e J J e óCà ÆóCà ) m e _JÇ i11 ]J Y óCà _à ee m C6 ö m [ Y @Scope(ScopeType.SESSION) @Name("bookingList") class BookingListAction implements Serializable { @In EntityManager em @In User user @DataModel List<Booking> bookings @DataModelSelection Booking booking @Logger Log log @Factory public void getBookings() { bookings = em.createQuery(''' ©C© QQ óCà J select b from Booking b where b.user.username = :username order by b.checkinDate''') .setParameter("username", user.username) .getResultList() } public void cancel() { log.info("Cancel booking: #{bookingList.booking.id} for #{user.username}") Booking cancelled = em.find(Booking.class, booking.id) if (cancelled != null) em.remove( cancelled ) getBookings() FacesMessages.instance().add("Booking cancelled for confirmation number #{bookingList.booking. } } i11 | J m Y J _m óCà Ő _ óCà fJ ` ö YB _m à [ e Ė ]m _J óCà àņ Y[à Y[ à .groovy e[ src/model AYJ[àņ _m _J f ņ Y[à Y[ à .groovy e[ src/action i2 }ĉ Y[àJ óCà [ Cà m [ö Y[àJ C [ ÆYJ[àņ _ Y[à _m +f[ Y Y e YY [f[JJ Y e_öÇ à Y[àņ m m `[àņ C[Y ņ Y[à C Y [ _m mCJ m YY[ ņ CJ [ e m C[Y ½ à [ *m YY YC e óCà Y _m m .groovy e[ Y[à i2 }ĉ òÆĉ # óCà [ C [ņ _m `à Y B [ö C [ * Y[àņ óCà àņ óCà ` óCà Yņ Y[ Y à # YY m m groovyc ö Y[ņ óCà [ _à ee m C [ m YY[ C _[[ m Ė[[à ù m m [[_ [ Z e óCà C i21 õÆ Æĉ ĉ Æ C[à YY m Y[à e .groovy e[ Æ _m Y[Ç [ mY[à ÆC[Y [àÇ *m `[ Cà e ½ à [ * Y JCà Y[àņ e[[_ m eJ ććć Y[à à óCà Æ.groovy e[Ç m WEB-INF/dev à *m óCà Y _[[ ` Y ö Y [[à _m m YY[ Æ `C[à m ©C© Q\ óCà J YY[ C mÇ _ m m C JCà e[ Y[à ee m [ m Jf [ mY[à6 ş *m Y ` C óCà *mà ` ^+ ` ş ^ ` mY[à ş *m mfY[à`[ Y _[[ ` C`[ à [ Y[à e WEB-INF/dev ş `J ` `[ i22 | fJ Y[à YY óCà e[ Y[à Y[ *m [ m C .groovy e[ Y[à C[Y Æ Y[f[Ç e à fJ YB e àY ]#Iņ C óCà [ src/action _[[ [[à ` e m [ m Y[à e à Y ņ m óCà e[ _[[ Y[à ` Y[ `e Y[à Ő _[[ e [C ZY[ e m öJ _ Y[[à óCà Yf YJ [ m Y[à examples/groovybooking ©C© Qa "&!:;<%QHïK ĞƐ&MNOP-ĝ-âGH-ȁȂ´¬Œ}vţnȩȪvCGH-ï, 45ÝV´¬Œ}«ûžſ345p³´¬Œ}sƗƦŖ´ŗ ¯º¯ncomponents.xml&cd ÆžſvŷĆÇ ĝķu&ȁȂ«ûƲĮ£´¬ɁsƗƦ¬·³&;RSƿǀ´¬Œ}«ûnëƔŖû &KHÖ°2ĸžſp³%Þ¬«"´¬Œ}sƗƦŖ´ŗ ~#ĝ`N¹-ǵ&GE-ŋľ ¬ĜvKH&;<ɎǼɑ´¬Œ}sƗƦŖ´ 345ODðGŗ Œ&ODðG=>ŔrƱ%nȁȂ¯Ʊţžſv°ţÖº&GH-º»Ş³ñò2°Ŗ´ŗ ;<Ɏɑ»¯ûn;<&ƲĮ£tu´¬Đ¤FGđ!&Ŕ&µûŖ´ ő Œ&ODðGľvţ2Ŕ 345p³´¬}ÞÍƟ&¤FG£¯2°¬&%´ŗ O% MĒK;<% Œ&ODðG&ƿǀ´¬;RSn̐Ö&°ē&°Ŵòº%Į£´¬Œ}sƗƦ Ŗ´ŗ %M-N- cd¯2£´¬ wÖnĩ&&×ØÙØ;RS%(2°¬«"ncomponents.xmlēĔ%´ŗ Ŝ&components.xml&cd ÆĥÁÇ %Contact?,@,@´¬Ĝv¢IAɕpM-¯2°Ŗ´ŗ <framework:entity-home name="personHome" entity-class="eg.Person" entity-manager="#{personDatabase}"> <framework:id>#{param.personId}</framework:id> </framework:entity-home> Ŕ¯nŒòsĐå| KHĴđ͞Ƣ¯2°¬«"ȶý2nƩØĆľvŨòũnĤûķ uȁȂ¯2("Œ}ŔƗƦŖ´ŗ @Stateful @Name("personHome") public class PersonHome extends EntityHome<Person> implements LocalPersonHome { @RequestParameter String personId; @In EntityManager personDatabase; public Object getId() { return personId; } public EntityManager getEntityManager() { return personDatabase; } } ͊̐&ēĔ Æķu&ȁȂ"Ç ǕÞvÂF}¯2nžſȁȂ¯ûnqͣñòķuĊHM<´¬Œ}sƗƦŖ ´ŗ ÆŒ&ODðG&ƿǀ´¬GH-nȁȂĝnL-Näż%Þ¬«"nơƬșţp³ñ ò2°Ŗ´ŗÇ ©C© Qg 345ODðG Ŗn͊ͤ&ÂF}¯2nGH-^&-,OEF45l}´¬Œ}sƗƦŖ´ ŗ ÆŲŴ^´¬ŲvţnƩØ%nDvCl}´¬Œ}ŔƗƦŖ´ŗÇ # £ñò¬ŷĆnQ))ó#µ¬°!òśʶ&5sŲų%´ŗ ǹÎNJ%n345ODðGn¢IA }HibernateEntityHomen!òĒà&ͥ&EntityQuery HibernateEntityQuery&ͦÖ&;RSƿǀ¯2°Ŗ´ŗ £EntityHome } }ĒàEF45nM¹n!ò-;%ķu´¬«"p³ñò2°Ŗ´ŗ Š&-;£´¬ºn345&-,Åĸ¯Ŗ´ŗ 345ODðGs=¯2°¬ijĬ;,Ã-%&Ø/p¯Ŗ´ ŗ O¶%nentityManager}°"Ò&ijĬ;,Ã-ͧ¯Ŗ´ŗ 1 ĆRK GHÖ° 2Ǫý 2ØŖ ¯Ƌ" ĊPGnĞd&?,@,@GH-´¬ijĬɕpƿǀ¯Ŗ´ŗPersonŗ @Entity public class Person { @Id private Long id; private String firstName; private String lastName; private Country nationality; //getters and setters... } ;O@ßD45%nŜ&«"personHome;RSdÓ´¬Œ}sƗƦŖ´ŗ <framework:entity-home name="personHome" entity-class="eg.Person" /> ŖnķuȁȂ¯2Ŝ&«"nÍƟ&Œ}sƗƦŖ´ŗ @Name("personHome") public class PersonHome extends EntityHome<Person> {} ĊPGpersist()n Ö&ɕpƿǀ¯Ŗ´ŗ remove()n update() !ò getInstance() & Q bº»nŜ&«"ƣƤĮ£´¬Œ}sƗƦŖ´ŗ <h1>Create Person</h1> <h:form> <div>First name: <h:inputText value="#{personHome.instance.firstName}"/></div> <div>Last name: <h:inputText value="#{personHome.instance.lastName}"/></div> <div> <h:commandButton value="Create Person" action="#{personHome.persist}"/> </div> </h:form> ©C© Qh 345ODðG Ŝ&«"w(Ǥý2n! ĻļnPersonperson%ȺȻƗƦēsưĮ%´&%ncomponents.xml&«"¯Ŗ¯Ƌ"ŗ <factory name="person" value="#{personHome.instance}"/> <framework:entity-home name="personHome" entity-class="eg.Person" /> Æ;O@ßD45£¯2°¬ŷĆnÇ PersonHome @Factory ǣǤ¯Ŗ´ŗ @Name("personHome") public class PersonHome extends EntityHome<Person> { @Factory("person") public Person initPerson() { return getInstance(); } } ÆķuȁȂ¯2°¬ŷĆÇ Œò%nŜ&«" b &VWsžſvûŖ´ŗ <h1>Create Person</h1> <h:form> <div>First name: <h:inputText value="#{person.firstName}"/></div> <div>Last name: <h:inputText value="#{person.lastName}"/></div> <div> <h:commandButton value="Create Person" action="#{personHome.persist}"/> </div> </h:form> Œò%nPerson&®¯°?p³´¬Œ}sƗƦ¬«"vûŖ´ŗ °nŒò%Ź2%´ŗ ŧnĚznĸ®n!òǼƸķu·¸&Nͨ¹-& ʎ&?Ğd´¬ɼƐXʋý Person?ɕpǣǤ´¬1nPersonHome¬ŲsµûŖ´ŗ Ŝ&«"nâHÂN2nŒò(°Ŗ´ŗ <pages> <page view-id="/editPerson.jsp"> <param name="personId" value="#{personHome.id}"/> </page> </pages> ù_ _ m Z Y b YJ6 <h1> <h:outputText rendered="#{!personHome.managed}" value="Create Person"/> <h:outputText rendered="#{personHome.managed}" value="Edit Person"/> </h1> <h:form> <div>First name: <h:inputText value="#{person.firstName}"/></div> <div>Last name: <h:inputText value="#{person.lastName}"/></div> <div> <h:commandButton value="Create Person" action="#{personHome.persist}" rendered="#{!personHome. <h:commandButton value="Update Person" action="#{personHome.update}" rendered="#{personHome.ma <h:commandButton value="Delete Person" action="#{personHome.remove}" rendered="#{personHome.ma </div> </h:form> p e r ©C© Qk 345ODðG sonId G?-âHÂN}¯2ț¯ŷĆnĐ~ʼȡđ}¯2sĚzñòŖ´ŗ !&Ęͩ0Ĉä¯2p³¯vŨòũv»v°ŷĆǪý2ØŖ¯Ƌ"ŗŒòŔžſƗ PersonƦŖ´ŗ ;O@ßD45"ŷĆͪ <factory name="person" value="#{personHome.instance}"/> <framework:entity-home name="personHome" entity-class="eg.Person" new-instance="#{newPerson}"/> <component name="newPerson" class="eg.Person"> <property name="nationality">#{country}</property> </component> ŖnķuȁȂ¯2("ŷĆŜ&ƟvûŖ´ŗ @Name("personHome") public class PersonHome extends EntityHome<Person> { @In Country country; @Factory("person") public Person initPerson() { return getInstance(); } protected Person createInstance() { return new Person(country); } } }°"ĊPG&=Ŝ&ĊPG ͫȎnCountryĊPGnèýũCountryHome}´¬Œ}ŔƗƦŖ´ŗ Ú4?45&=vŠn «û̈̉ñòɕp'ǹ´¬&Ŕ ÂÚF<ǣǤ´¬ŦŨ%ƗƦ¬«"vûŖ´ŗ PersonHome @Name("personHome") public class PersonHome extends EntityHome<Person> { @In Country country; @Factory("person") public Person initPerson() { return getInstance(); } protected Person createInstance() { return new Person(country); } public void migrate() { getInstance().setCountry(country); update(); } } *m `B org.jboss.seam.afterTransactionSuccess C _m Æ [[ persist()ņ update() remove() Ç à `CJ m C _ em Ė _m m [àJ mJ e _ [à _ f ©C© \o 345ODðG em Ė _m Y [ à Yņ Y C _ `f C m org.jboss.seam.afterTransactionSuccess.<name> C Æ_m <name> m e m àÇ ĊPGɕps³ø¯}Þ¼/OP-ÂFEĚz¯Ŗ´ŗ ŒònL-N¤Mƛ´¬nŜ&«";O@ßD45cd¯Ŗ´ŗ <factory name="person" value="#{personHome.instance}"/> <framework:entity-home name="personHome" entity-class="eg.Person" new-instance="#{newPerson}"> <framework:created-message>New person #{person.firstName} #{person.lastName} created</framework:cr <framework:deleted-message>Person #{person.firstName} #{person.lastName} deleted</framework:delete <framework:updated-message>Person #{person.firstName} #{person.lastName} updated</framework:update </framework:entity-home> <component name="newPerson" class="eg.Person"> <property name="nationality">#{country}</property> </component> µ¬°nķuȁȂ¯2Ŝ&«"´¬Œ}ŔƗƦŖ´ŗ @Name("personHome") public class PersonHome extends EntityHome<Person> { @In Country country; @Factory("person") public Person initPerson() { return getInstance(); } protected Person createInstance() { return new Person(country); } protected String getCreatedMessage() { return "New person #{person.firstName} #{person.lastName} c protected String getUpdatedMessage() { return "Person #{person.firstName} #{person.lastName} updat protected String getDeletedMessage() { return "Person #{person.firstName} #{person.lastName} delet } ¯º¯nÂFEdÓëŨ¬šƷ&ēĔ ÆO¶% ¯2·ǘ&Ú-<dÓ´¬Œ}%¯Ƌ"ŗ messages }°"Ò&Ç Person_created=New person #{person.firstName} #{person.lastName} created Person_deleted=Person #{person.firstName} #{person.lastName} deleted Person_updated=Person #{person.firstName} #{person.lastName} updated Œ&ēĔýũnĘęäż´¬Œ}sƗƦŖ´¯n;<ĝ;O@ßD45OáM }Dǡ,45Dž}úûɣ´Œ}sƗƦŖ´ŗ šŶ&-,F<s:validateAll> 2n45ķuǣǤ´¬Œ}%´snŒòͬñŻǵ&ͭ }<s:decorate>ƻ}¯2ëÞŖ¯Ƌ"ŗ 2 ďĉĆRK &Ź2&M-N-&-sŲvŷĆnĒàĊPG2 ©C© \ 345ODðG nŜ&«"´¬Œ}sƗƦŖ´ŗ <framework:entity-query name="people" ejbql="select p from Person p"/> ŖnŒò ÆŒ&§¨Ç bº»"Œ}sƗƦŖ´ŗ <h1>List of people</h1> <h:dataTable value="#{people.resultList}" var="person"> <h:column> <s:link view="/editPerson.jsp" value="#{person.firstName} #{person.lastName}"> <f:param name="personId" value="#{person.id}"/> </s:link> </h:column> </h:dataTable> Ɏ&ƾ°Ð=´¬ͥŔŲ%¯Ƌ"ŗ <framework:entity-query name="people" ejbql="select p from Person p" order="lastName" max-results="20"/> Ěz´¬Ɣ1¬ͥâHÂN°Ŗ´ŗ <pages> <page view-id="/searchPerson.jsp"> <param name="firstResult" value="#{people.firstResult}"/> </page> </pages> =´¬b&;<ͮͯ͟ƴ%´snɋr̟̠q%´ŗ <h1>Search for people</h1> <h:dataTable value="#{people.resultList}" var="person"> <h:column> <s:link view="/editPerson.jsp" value="#{person.firstName} #{person.lastName}"> <f:param name="personId" value="#{person.id}"/> </s:link> </h:column> </h:dataTable> <s:link view="/search.xhtml" rendered="#{people.previousExists}" value="First Page"> <f:param name="firstResult" value="0"/> </s:link> <s:link view="/search.xhtml" rendered="#{people.previousExists}" value="Previous Page"> <f:param name="firstResult" value="#{people.previousFirstResult}"/> </s:link> <s:link view="/search.xhtml" rendered="#{people.nextExists}" value="Next Page"> <f:param name="firstResult" value="#{people.nextFirstResult}"/> </s:link> <s:link view="/search.xhtml" rendered="#{people.nextExists}" value="Last Page"> <f:param name="firstResult" value="#{people.lastFirstResult}"/> </s:link> '£v¥¦-G%nͰûŒŻŦ¥¦§¨ǁ¬1nƾţ&¥¦&GHM,7 8Ūū¯2Ŕ»"ŲsµûŖ´ŗ Œ&Ƣv7-3-R´¬ͥnĒàĊPGĊ45}¯2Ăcd´ ¬Œ}sƗƦŖ´ŗ <component name="examplePerson" class="Person"/> ©C© \) 345ODðG <framework:entity-query name="people" ejbql="select p from Person p" order="lastName" max-results="20"> <framework:restrictions> <value>lower(firstName) like lower( concat(#{examplePerson.firstName},'%') )</value> <value>lower(lastName) like lower( concat(#{examplePerson.lastName},'%') )</value> </framework:restrictions> </framework:entity-query> $V&è%ZY[ĊPG&£Ö°2ƮƬ¯2ţŦñ°ŗ <h1>Search for people</h1> <h:form> <div>First name: <h:inputText value="#{examplePerson.firstName}"/></div> <div>Last name: <h:inputText value="#{examplePerson.lastName}"/></div> <div><h:commandButton value="Search" action="/search.jsp"/></div> </h:form> <h:dataTable value="#{people.resultList}" var="person"> <h:column> <s:link view="/editPerson.jsp" value="#{person.firstName} #{person.lastName}"> <f:param name="personId" value="#{person.id}"/> </s:link> </h:column> </h:dataTable> * em m Ėà _m m [àJ org.jboss.seam.afterTransactionSuccess C6 mJ _ `C m <event type="org.jboss.seam.afterTransactionSuccess"> <action execute="#{people.refresh}" /> </event> ņ B em m Ėà _m m Y à Yņ Y C mJm PersonHome6 <event type="org.jboss.seam.afterTransactionSuccess.Person"> <action execute="#{people.refresh}" /> </event> Ae[à Ēà `B ė _ö _[[ _m B e m Ė f m e YJf _m m Ė ņ àė[[ mC Y[ à _ m e [ [J m [ ` e [ Æ`à CJ getCountEjbql() *m ZY[ m mC [[ m_ `à eJ _Cņ `à Zf Ė[[à Y`[ e Ēà `B S ĆRK }n!&GH 345ODðG&Ċ45êvGH-}¯2nController-}¯2n EntityControllern HibernateEntityController }BusinessProcessControllersµûŖ´ŗ Œò»&GH-nwʕĮ£ñò¬;RS&ÂÚF<´¬nǙ¯ưĮvGE-ē Ĕƿǀ¯2°Ŗ´ŗ Œò»n®¯°78s×ØÙŖò̴ͱvķuͧ¥´¬1&ƗǶNJƿǀ¯nŖ ©C© \+ 345ODðG ͮͯ&;<Ɏ&ǼɑͲͳ¯Ŗ´ŗ 345ODðG%ɆÞ è}¯2n&IJ&è&RegisterActionƣ´}śŜ&«"vûŖ´ŗ @Stateless @Name("register") public class RegisterAction extends EntityController implements Register { @In private User user; public String register() { List existing = createQuery("select u.username from User u where u.username=:username") .setParameter("username", user.getUsername()) .getResultList(); if ( existing.size()==0 ) { persist(user); info("Registered new user #{user.username}"); return "/registered.jspx"; } else { addFacesMessage("User #{user.username} already exists"); return null; } } } Ȧx&«"nìţû´¬«"vɱɲvûŖĿŻnnnŗ ©C© \Q 1 j ö à [[ I[ Æ[Ç [` e Y B~| Y e 1 ##.7Ąâ š0&-,Fn ;,Ã-È% org.drools.RuleBase M-N-íîä´¬Œ}%´ŗ ƾţ&Ñ/¡345%n n/KMtu%µ¬ŲsµûŖ´ŗ ű2n&KM} %&íîätu}´¬Ú45'Ɗ´¬Ųsµ¬%¯Ƌ"ŗ ÆʹƦȯ& [ nŒ&ƺƻ>Ɣ´¬ƿǀ´¬%¯Ƌ"ŗÇ ,-Ɖ%n GH-â-º»˜vw¿;âM´¬n×ØÙØ;RSƿǀ¯2°Ŗ´ ŗ Œ&;RSncomponents.xml «ûM-tu%´ŗ <drools:rule-base name="policyPricingRules"> <drools:rule-files> <value>policyPricingRules.drl</value> </drools:rule-files> </drools:rule-base> Œ&;RSn.drl OáMw¿º»;âM¯n ########;,Ã-ŀ org.drools.RuleBase ÃĭF4¯Ŗ´ŗ Ô&¹-Ñ/¡345M-´¬ŲŔµûǁ¬Œ}Ʈ Ƭ¯2ţŦñ°ŗ [ Į£´¬&%µòũn dÓƓd¯vŨòũvûŖĿŻ6 <drools:rule-base name="policyPricingRules" dsl-file="policyPricing.dsl"> <drools:rule-files> <value>policyPricingRules.drl</value> </drools:rule-files> </drools:rule-base> [fC YY[ ņ [ ` à [[à Y[à`[ņ Y f YY[ _[[ _ [ I[#J J m I[ *m I[#J [ [ C ÆI|Ç m Y[à [ Y öJ e [ [ e[ Yà *m I[#JfJ I[ [ eJ`[ components.xml6 <drools:rule-agent name="insuranceRules" configurationFile="/WEB-INF/deployedrules.properties" /> *m YY e[ YY Y e m I[#J ZY[ eJ e[ e m [ ZY[ ` newInstance=true url=http://localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/org.acme.insurance/fmeyer localCacheDir=/Users/fernandomeyer/projects/jbossrules/drools-examples/drools-examples-brms/cache poll=30 name=insuranceconfig [ Y`[ eJ m Y m Y [àņ `àYJ m ©C© \\ I[ eJ e[ <drools:rule-agent name="insuranceRules" url="http://localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/org.acme.insu local-cache-dir="/Users/fernandomeyer/projects/jbossrules/drools-examples/drools-ex poll="30" configuration-name="insuranceconfig" /> ùZņ _ ö e org.drools.WorkingMemory C[`[ m Cf Æ^ m WorkingMemory [ e [J m CÇ <drools:managed-working-memory name="policyPricingWorkingMemory" auto-create="true" rule-base="#{polic ù m _ JC m policyPricingWorkingMemory e ` ö [ ` C m ruleBase eJ YYà 11 ] _ B WorkingMemory à Yņ e ņ e [6 @In WorkingMemory policyPricingWorkingMemory; @In Policy policy; @In Customer customer; public void pricePolicy() throws FactException { policyPricingWorkingMemory.assertObject(policy); policyPricingWorkingMemory.assertObject(customer); policyPricingWorkingMemory.fireAllRules(); } 12 xyz &MI4aÒ·¸##¡ ¹-s B~| G45̜<H}¯2nµ¬°45̜<Hnĉû 2̜<HvŠ}¯2/p´¬ «"ñĿ¬Œ}Ŕtu%´ ő OKŖlS-KE-dÓ&Šnj»%Ŕtŗ <decision name="approval"> <handler class="org.jboss.seam.drools.DroolsDecisionHandler"> <workingMemoryName>orderApprovalRulesWorkingMemory</workingMemoryName> <assertObjects> <element>#{customer}</element> <element>#{order}</element> <element>#{order.lineItems}</element> </assertObjects> </handler> <transition name="approved" to="ship"> <action class="org.jboss.seam.drools.DroolsActionHandler"> <workingMemoryName>shippingRulesWorkingMemory</workingMemoryName> <assertObjects> <element>#{customer}</element> <element>#{order}</element> <element>#{order.lineItems}</element> </assertObjects> </action> </transition> ©C© \a I[ <transition name="rejected" to="cancelled"/> </decision> *m <assertObjects> [ Y e ^ ZY m `B [[ e `B ` e m WorkingMemory *m [ YY e J [ e B~| ö J6 <task-node name="review"> <task name="review" description="Review Order"> <assignment handler="org.jboss.seam.drools.DroolsAssignmentHandler"> <workingMemoryName>orderApprovalRulesWorkingMemory</workingMemoryName> <assertObjects> <element>#{actor}</element> <element>#{customer}</element> <element>#{order}</element> <element>#{order.lineItems}</element> </assertObjects> </assignment> </task> <transition name="rejected" to="cancelled"/> <transition name="approved" to="approved"/> </task-node> µ¬ĊPGn% [ K}¯2ijľòŖ´ŗ ´vľnjn B~| Assignable assignable }¯2 n !¯2 Decision ĊPG decision }¯2ijľòŖ´ŗ 45ij"n45&§¨Ɣd´¬1n decision.setOutcome("result") ƭʻŲsµûŖ´ŗ ĉû 2'(´¬n Assignable 2GNcd´¬ŲsµûŖ´ŗ package org.jboss.seam.examples.shop import org.jboss.seam.drools.Decision global Decision decision rule "Approve Order For Loyal Customer" when Customer( loyaltyStatus == "GOLD" ) Order( totalAmount <= 10000 ) then decision.setOutcome("approved"); end package org.jboss.seam.examples.shop import org.jbpm.taskmgmt.exe.Assignable global Assignable assignable rule "Assign Review For Small Order" when Order( totalAmount <= 100 ) then assignable.setPooledActors( new String[] {"reviewers"} ); end ©C© \g 2 ĉ *m à #~ Y[ e m YC m f mč e e J `m YJ _m à YB 2 {ÆÆē à YC _ ee e Y6 ş Y[e f m YY m C Y[ [f` f à m ö ş C f m YY [[ m e m Y[e ņ Y[ ee [f` à m ö J I[ 2 \ ĉ ă *m [[ Y m Ė e à YY[ e à mC [ à Ėņ e ZY[ e à [à _m YJ _m [JJ ņ _m `[J [ņ m m Y[e _[[ Y`f `[à ` ee *m CJ e m Y[e eJņ Je f [à [ [` [ņ [[ à eY e m m mņ à YY[ Ė à m ö ` Z[ Y[Z ` [ņ m à _[[ Ė m e YC `à m C 21 jè e J m C e e àņ m e[[_J B e[ f Ė ` eJ [ application.xml e à J à Y[e ņ m Ė6 ş [f Y[B ş [f B ş BB ş [fB ş C[QB b _`f` àņ jboss-seam-ui.jar [ ` [ m YY[ ė _ e[ ©C© \h à 22 } ĉ à ` à `[ àņ e ZY[ J *m ` `à [[J m m Identity.setSecurityEnabled(false) `[ à m ö J m YC à à m ö `J Ye e m e[[_J6 ş ^à à ş ` à Y ş à Y ş ~J 2S + *m m e YC `à à `[ Y ## ÆC #mf #mč C Çņ m YC ` mJm[à eJ`[ #~ e m[J m _Cņ e [ Y[Z m Ėf ee m Y[e m e m m m m Y[Zf à e ## 2S *m Y[e m m `[f ## [J [ņ SeamLoginModuleņ _m m [J m e à _ Y *m [J [ [à eJ Y e e[ YY[ Y[ à m Ė à [ eJ e[ [[_ à _ m m J m à [ m YC `à à _ YY[ ¢eJJ m Y[e e e m Ė m identity Y ` eJ components.xml6 <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:security="http://jboss.com/products/seam/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.x <security:identity authenticate-method="#{authenticator.authenticate}"/> </components> e à _m m C à e m [f` Y m öņ [[ à [ m [ Æ I[Ç B à [Ymņ [ eJņ ` [ *m ^ ZY #{authenticator.authenticate} m `J J m m authenticate m e m authenticator Y _[[ ` m m ©C© \k à 2S1 \ *m authenticate-method YYà Y e e identity components.xml Y e _m m m _[[ ` `à SeamLoginModule m *m m ö Yf ņ ZY `[ J _mm m f e[ *m ė Y_ ` ` e Identity.instance().getUsername() Identity.instance().getPassword()ņ Y C[à #à [ m m ` e m[ ` J J Identity.instance().addRole() ė Y[ ZY[ e m m C Y6 @Name("authenticator") public class Authenticator { @In EntityManager entityManager; public boolean authenticate() { try { User user = (User) entityManager.createQuery( "from User where username = :username and password = :password") .setParameter("username", Identity.instance().getUsername()) .setParameter("password", Identity.instance().getPassword()) .getSingleResult(); if (user.getRoles() != null) { for (UserRole mr : user.getRoles()) Identity.instance().addRole(mr.getName()); } return true; } catch (NoResultException ex) { return false; } } } m `C ZY[ņ `m User UserRole YY[ fY e à ` *m roles Y YY[ _m m [ m m ` eņ _m m m[ ` m Set [[ J C[ņ J ņ m ņ e m e NoResultException m_ņ m m m false m m e[ ĉjÃÅ *m Identity.addRole() m `mC ee[à YJ _mm m m e m m ņ m addRole() m[ [à ` [[ J m m Y ]m [[ mņ m [ Y[ Yà [ e Yfm [ m e[ņ m Yfm [ m ` [ [ņ [[J Identity.hasRole() e m [ _[[ m *m e[[_J Ė J Y m [ e Yf m [ e [ `B m_ [[à m_ e m m Y ©C© ao à ]m _J m mņ Y m öY [ e e à fee *m ` m J m_ à m f m m _[[ ` [[ `à m à #~ņ m à ` Cö [f Y[ J J[ Ė e mņ à Y [ m m[ Zf Y e[ e[ m m[ ` _ `à Y[J C `C m à ^C em _ m mY e e ` _m m C `à à * JC ZY[ņ [ė à m Y e[ [J m ` Y ] _[ m `à _J C `C e m org.jboss.seam.security.loginSuccessful Cņ [ö m6 @In UserStats userStats; @Observer("org.jboss.seam.security.loginSuccessful") public void updateUserStats() { userStats.setLastLoginDate(new Date()); userStats.incrementLoginCount(); } 2S2 \ *m Identity Y YC `m username password YYņ J e m m *m YY ` ` [à m f Y_ e[ [J e m YY ņ [[J m ©C© a à m _[[ m m J m YC [ ė ZY[ e Y[ [J e6 identity.login() <div> <h:outputLabel for="name" value="Username"/> <h:inputText id="name" value="#{identity.username}"/> </div> <div> <h:outputLabel for="password" value="Password"/> <h:inputSecret id="password" value="#{identity.password}"/> </div> <div> <h:commandButton value="Login" action="#{identity.login}"/> </div> [[àņ [JJJ m `à [[J #{identity.logout} ¢[[J m _[[ [ m à e m [à m 2SS | ĉ Yņ m m m à Y eJ m 6 ş ¢eJ m m components.xml ş ] m m ş ] [J e m m m 2S[ ĉ ]Ä * YC e CJ m e[ YJ Y à ņ ė m pages.xml eJ à Yà YJ *m _ àY e Z Y m_ `à m à #~ 6 ş NotLoggedInException f *m Z Y m_ e m Y f YJ _m mà [JJ ş AuthorizationException f *m Z Y [à m_ e m [à [JJ ņ mà mC Y YJ e _m m mà mC m à YC[J m e NotLoggedInExceptionņ m m m [J J YJ m mà [J b AuthorizationExceptionņ à ` e[ m YJ ė ZY[ e pages.xml e[ m `m e m à Z Y6 <pages> ... <exception class="org.jboss.seam.security.NotLoggedInException"> <redirect view-id="/login.xhtml"> <message>You must be logged in to perform this action</message> </redirect> ©C© a) à </exception> <exception class="org.jboss.seam.security.AuthorizationException"> <end-conversation/> <redirect view-id="/security_error.xhtml"> <message>You do not have the necessary security privileges to perform this action.</messag </redirect> </exception> </pages> | _` YY[ Ė C Ym m[J e [J ņ [ Y [ e [à e m[J m Y`[ 2S^ j Ő ö m [J _m m Y [ C_ Æ _[ C_ Ç e[[_6 <pages login-view-id="/login.xhtml"> <page view-id="/members/*" login-required="true"/> ... </pages> Æ*m [ e `[ m m Z Y m[ m_ `Cņ ` m[ Y``[à ` B _m Ç #e m [J ņ _ _ [[à m ` ö _m mà eņ mà à m m Ė [JJJ e à m e[[_J C [ components.xmlņ Y C_ _m[ [JJ _[[ ` `ņ m Y m e[[à [JJJ mà _[[ ` m J[[à Ė C_ņ _m à YJ Y m Z m J[ f Ė <event type="org.jboss.seam.security.notLoggedIn"> <action execute="#{redirect.captureCurrentView}"/> </event> <event type="org.jboss.seam.security.postAuthenticate"> <action execute="#{redirect.returnToCapturedView}"/> </event> ù m [J Y[ Cf Y mņ ė m C à authenticate() m 2Sb y + #[mJm e [ `[[à àņ YC e f m J J m **~ **~ J ÆIb¢ )agÇ m * m e e m ņ m authentication-filter Y ` `[ Yf Z[6 ©C© a+ à <web:authentication-filter url-pattern="*.seam" auth-type="basic"/> * `[ m e[ e ` m ņ auth-type basicņ e J f m ņ digest e J J m ņ m key realm [ ` 6 <web:authentication-filter url-pattern="*.seam" auth-type="digest" key="AA3JK34aSDlkj" realm="My App *m key ` à J C[ *m realm m e m m [ m Y m _m mà m \ } + e J J m ņ à m [ m[ Z m ` [ org.jboss.seam.security.digest.DigestAuthenticatorņ m validatePassword() m C[ m ė Y[ Z Y_ J m J Ė ZY[6 public boolean authenticate() { try { User user = (User) entityManager.createQuery( "from User where username = :username") .setParameter("username", identity.getUsername()) .getSingleResult(); return validatePassword(user.getPassword()); } catch (NoResultException ex) { return false; } } 2Sc +Æ + _ *m ZY[ e m C e YC `à m à #~ e f J Y[Z à Ė ĉ Ĕ ++ e à _[ m m Y[e ## eJ YC `à m à #~ņ à à [J m e[ à ## eJ `à jaasConfigName YYà components.xml b ZY[ņ e à J m other Y[ à Æ_m m m UsersRolesLoginModule [J [ #Çņ m m à components.xml _[ [ö [ö m6 f YCJ # _m YC `à <security:identity authenticate-method="#{authenticator.authenticate}" jaas-config-name="other"/> ©C© aQ à 2[ ] z *m à #~ Y ` e e[ e J e C àf[ C *m e[[_J `[ [ m J öà m ` C m J `à Y eàJ m message.properties e[ * YY m f Jņ B Y m öà _m Yà C[ m e[ *`[ + à |J ʭà |J ʭà Y org.jboss.seam.loginS *m J Y _m e[[à [J C m à #~ uccessful org.jboss.seam.loginF ailed org.jboss.seam.NotLog gedIn *m J Y _m m [J Y e[ņ m `f m YC Y_ņ `f m e[ m _à *m J Y _m Y Ye f YJ m Ė à m öņ m [à m 2^ +Ċ *m ` e mč e YC `à m à #~ e f J Yņ Y mņ YJ *m ` m e m # Y mJ m e à _m à e m C e Æ m [f` YÇ m à components.xml ` eJ YY m f m ¢eJ `C 2^ ^ m e m mč m YC `à m à #~ `[ Y m Y e `J J [ ½ Y # [ JYņ àYņ e m à mC ` J YC[J e YeJ Y e _m YY[ # Y m m m YC[J Æ feeÇ e YeJ J[ņ Y e [à Y`[ `[ YY[ J mJ ` Yņ m_C [ ee mJm [C[ e Cf _m JJ YC[J JY e I[ Y[ņ J e [à m ņ ņ ņ ~ e `m ņ Y _m m f m e name:actionņ e ZY[ customer:deleteņ customer:insert ©C© a\ à 2^1 ė `à ZJ m Y[ e e mčņ Y àņ J _m m @Restrict ĕj Y à ` m m m m [ [C[ņ J m @Restrict e `m m ė [J [ _m @Restrictņ m m _[[ ö Y Æ m [ _[[ YY[àÇ e m C e[ à m öņ m Z Y _[[ ` m_ Y m e Identity.checkRestriction() Æ [ I Ç # @Restrict B m Y [ [e ĖC[ J @Restrict m e mf # Yà @Restrict Y[ Y m ö e componentName:methodName *ö e Zf Y[ m e[[_J Y m6 @Name("account") public class AccountAction { @Restrict public void delete() { ... } } m ZY[ņ m Y[ Y Ė [[ m delete() m account:delete *m ĖC[ e m _[ ` _ @Restrict("#{s:hasPermission('account','delete',null)}") ù_ [ė [ö m Zf Y[6 @Restrict @Name("account") public class AccountAction { public void insert() { ... } @Restrict("#{s:hasRole('admin')}") public void delete() { ... } } *m ņ m Y [ [e _m @Restrict *m m à m _m CJ @Restrict Ė Y[ Y m ö m e m ZY[ņ m insert() m Ė Y e account:insertņ _m[ m delete() m Ė m m ` e m admin [ e _ J à emņ [ė m #{s:hasRole()} ZY m `C ZY[ m s:hasRole s:hasPermission ^ e ņ _m m [J m f YJ[à m e m Identity [ *m e ` _m à ^ ZY mJm m à e m à #~ J ^ ZYņ m C[ e m @Restrict à e à `B m Z _m Z *m Z[à e[ _m YeJ Y m ö e Y e `B ö m ZY[6 ©C© aa à @Name("account") public class AccountAction { @In Account selectedAccount; @Restrict("#{s:hasPermission('account','modify',selectedAccount)}") public void modify() { selectedAccount.modify(); } } *m J mJ e m ZY[ m e selectedAccount _m m hasPermission() e [[ *m C[ e m C`[ _[[ ` [ö Y e _m m Zņ Y m hasPermission() m Identityņ _m m m m e m m m Ė Y e eàJ m Y e Account `B Jm ` `[ Ye à m ö ņ _m J m @Restrict m ņ Y[à Identity.checkRestriction() C[ à ZYņ [ö m6 public void deleteCustomer() { Identity.instance().checkRestriction("#{s:hasPermission('customer','delete',selectedCustomer)}"); } e m ZY Y e ė C[ trueņ m ş e m [JJ ņ NotLoggedInException Z Y m_ ş e m [JJ ņ AuthorizationException Z Y m_ [ Y`[ [[ m hasRole() hasPermission() m [à e C 6 if (!Identity.instance().hasRole("admin")) throw new AuthorizationException("Must be admin to perform this action"); if (!Identity.instance().hasPermission("customer", "create", null)) throw new AuthorizationException("You may not create new customers"); 2^2 ĉ e _[[ J e m m Y _m Y e _m m mà ė mC m à YC[J à [[_ [ J e m Ç e YJ )Ç C[ [ņ ` Y m YC[J e m ņ J m Cà ^ ZY m e Y à ė ö [ö ZY[ e e à b e [[ņ [ė Y m _ mC [J e m m[ [à ` e m [à [JJ AJ m identity.isLoggedIn() YYàņ _ _ m6 <h:form class="loginForm" rendered="#{not identity.loggedIn}"> ©C© ag à e m ė [JJ ņ m m [J e _[[ ` f Cà Jm e_ e ù_ [ė Y m m YJ m _m m m[ [à ` `[ m manager [ ė _à m m [ ` _6 <h:outputLink action="#{reports.listManagerReports}" rendered="#{s:hasRole('manager')}"> Manager Reports </h:outputLink> *m [ Ė Jm e_ e m ` e m manager [ņ m m Y ö _[[ ` *m rendered ` J[[à ` m [ [eņ J <s:div> <s:span> [ ù_ e mJ Y[Z ė à à mC h:dataTable [ YJ [J e _m m à à à _m [ö YJ m ė YC[J *m s:hasPermission ^ e [[_ Y `B Y _m m ` _mm m m m Ė Y e m `B ė m_ *`[ _m [ö Jm [ö6 <h:dataTable value="#{clients}" var="cl"> <h:column> <f:facet name="header">Name</f:facet> #{cl.name} </h:column> <h:column> <f:facet name="header">City</f:facet> #{cl.city} </h:column> <h:column> <f:facet name="header">Action</f:facet> <s:link value="Modify Client" action="#{clientAction.modify}" rendered="#{s:hasPermission('client','modify',cl)"/> <s:link value="Delete Client" action="#{clientAction.delete}" rendered="#{s:hasPermission('client','delete',cl)"/> </h:column> </h:dataTable> 2^S ~J à Ė m m YY[ J pages.xml e[ņ m_C Zf [à Y[ eJ Y[à [ <restrict/> [ _m m page [ m à _m e ZY[ Y e `à m restrict [ņ Y[ Y e /viewId.xhtml:render _[[ ` m ö _m m YJ C fe Æó^*Ç Ėņ Y e /viewId.xhtml:restore _[[ ` Ė _m à b Y` ö Æe `Ç J e m YJ m_ņ m Yf e _[[ ` C[ à ZY ė Y[ e ZY[6 <page view-id="/settings.xhtml"> <restrict/> </page> *m YJ m Y[ Y e /settings.xhtml:render Ė e fe f Ė Y[ Y e /settings.xhtml:restore e e Ė <page view-id="/reports.xhtml"> ©C© ah à <restrict>#{s:hasRole('admin')}</restrict> </page> m e fe Ė m YJ Ė m m ` e m admin [ 2^[ ] à [ ö Y`[ YY[à à ņ ņ Yf [ e * [[ e à [ņ @Restrict m [ [e6 @Entity @Name("customer") @Restrict public class Customer { ... } e ZY Y e m @Restrict ņ m e[ à m ö m Ye Y m ö e entityName:actionņ _m entityName m f Y e m à Æ m e[[àfĖ[e [ e ©ù Y eÇņ m action m readņ insertņ update delete [ Y`[ [à ņ `à Y[ J @Restrict m [C à [e à [ m Æ e[[_Ç6 ş @PostLoad f ¢[[ e à [ e m ` A m mf eJ read Y ş @PrePersist ş @PreUpdate ş @PreRemove f ¢[[ `e _ e m à A m m eJ insert Y f ¢[[ `e à Y A m m eJ update Y f ¢[[ `e à [ A m m eJ delete Y ė ZY[ e m_ à _[ ` eJ Ye à m ö e à insert Y ~[ m m m Ė àmJņ m [à Y mJ J à m_ 6 @PrePersist @Restrict public void prePersist() {} # mė ZY[ e à Y [ m m ö e m m [[_ _ MemberBlog Æe m Y ZY[Ç *m à e _m m m à m ö `J [[à m _öJ à Æ m MemberBlogÇ6 ©C© ak à rule InsertMemberBlog no-loop activation-group "permissions" when check: PermissionCheck(name == "memberBlog", action == "insert", granted == false) Principal(principalName : name) MemberBlog(member : member -> (member.getUsername().equals(principalName))) then check.grant(); end; *m [ _[[ J m Y memberBlog:insert e m [à m Æ `à m Principal e Ç m m m ` e _m m m `[J à `J *m principalName : name m ` m Principal e Æ m Y[ Ç C`[ `J f ` m name YYà e m Principal C`[ [[ principalName `[ `J [[_ m C[ ` e m Y[ ņ m m e[[_J [ _m m Y m `ė m Principal b [ņ Y[ e m I[ b[[àņ _ [[ [ [ m J à _m à ~# YC ]ĉ ĉ ē y+ à m ö e ^+ à ` Ye _m EntityListener Ő f [[ m [ `à J m e[[_J META-INF/orm.xml e[6 <?xml version="1.0" encoding="UTF-8"?> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xm version="1.0"> <persistence-unit-metadata> <persistence-unit-defaults> <entity-listeners> <entity-listener class="org.jboss.seam.security.EntitySecurityListener"/> </entity-listeners> </persistence-unit-defaults> </persistence-unit-metadata> </entity-mappings> ]ĉ ĉ ē e à J ` SessionFactory eJ C ņ à ė àf mJ Y [ à à 2b \ ĉ j AY m Y m m ` [ e e Yņ ` e ` m_ Y [[à e J *m Y[ m Y ņ `à ZY[J m_ Y m ö Y ņ m_ Y[ Y m ö e YY[ ©C© go à 2b y {ÆÆē m_ m à #~ ö_ _mm m m customer:modify Y e Y e ć à YC Ė C[ m e J Yf ņ ` I[ # Y[ e m CJ e J [ J Ç [č [ e m ` [J m `m m Yņ )Ç Y f I[ Cà ee [Jm e C[J [J ` e f Y[Z [ C[CJ [Y[ 2b1 à ZY e RuleBase Y [[ securityRules _m m C[ Y m ö *m eJ components.xml e[[_6 <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:security="http://jboss.com/products/seam/security" xmlns:drools="http://jboss.com/products/seam/drools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2 http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd" http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.x <drools:rule-base name="securityRules"> <drools:rule-files> <value>/META-INF/security.drl</value> </drools:rule-files> </drools:rule-base> </components> m RuleBase Y eJņ ė _ m à [ 2b2 ĉ b m Y à e[ [[ security.drl m /META-INF à e à YY[ ė B e[ [ e m e[ ` [[ àmJ à _ņ Z à [ [J eJ YYY[à components.xml _m m[ m à [ e[ ć # m J Jm ` J [ ö mJm m I[ ņ m_C J mė Zf [à Y[ ZY[6 package MyApplicationPermissions; import org.jboss.seam.security.PermissionCheck; import org.jboss.seam.security.Role; rule CanUserDeleteCustomers when c: PermissionCheck(name == "customer", action == "delete") Role(name == "admin") then c.grant(); end; ©C© g à ė `ö m _ *m e mJ _ m Y öJ [ # Y öJ I[ [[à [[ e [ *m Y öJ ` àmJ à _ f ė [ àmJ [ m Y e m [ ` *m Z mJ _ Y[ e Y e m PermissionCheck Role [ *m Y e m [ J m _ė[[ ` e J m [ _m [ b[[à _ mC m e m [ ^ m [ _m Y öJ m[ ` JC Ė Æ[[à `J m YY e m [Ç m [ [[ CanUserDeleteCustomers _[[ ` m ö _mm [[_ [ öJ m `à e m [ e _ _ I[ mC _m ö_ [e m Æ Ç Jm m ÆIÇ *m f e m [ Y e m [ņ [ e _m m ` f e e m [ e *m Y `à m when *m I m Ė ņ e m [ m _[[ [à ` e e [[ e m f m *m I Y `à m then *m e m [ `à m end; [ e _ [ö m e m [ņ _ _ [ m ė Z m e 6 c: PermissionCheck(name == "customer", action == "delete") Y[ J[mņ m J m m Z PermissionCheck `B _m name YYà Ė[ ņ action YYà Ė[ [ _m m _öJ à ]m m _öJ àć f Y `B m f m Z[ e m Ė `à m [ J ö ` Y m ö ^ m m hasPermission() m [[ņ Yà PermissionCheck `B ņ b ņ m _öJ à *m PermissionCheck Y Z [à m Y m `J m öņ e ZY[ e à [[ hasPermission("account", "create", null) m PermissionCheck `B _m name Ė[ action Ė[ _[[ ` m _öJ à e m e m Y m ö _m [ m _öJ àć m mf[C Yà e J Y m öņ m [Jf[C `B m _öJ à m à m e m e `J m *m [ à java.security.Principal `B m Y e m m Y ņ Y[ org.jboss.seam.security.Role `B e m e m [ m m ` e [ Y`[ [ [Jf[C e m _öJ à `à [[J ((RuleBasedIdentity) RuleBasedIdentity.instance()).getSecurityContext().insert()ņ YJ m `B Y óJ ` ö Y[ ZY[ņ _ [ m m e [ e YeZ _m c: *m C`[ `Jņ e ` ö m `B m m `à m |CJ m [ e ņ _ m6 Role(name == "admin") ©C© g) à *m Y[à m m ` Role `B _m name e _m m _öJ à # ņ [ m _öJ à [Jf[C e ņ YJ `m Jmņ m [ [[à àf J _[[ e e à m öJ e m customer:delete Y m ` e m admin [ _m m Ė e m [ eJć ė ö [ö m I e m [6 c.grant() *m I e C ņ m CöJ m grant() m e m c `B ņ _m m [à C`[ `J e m PermissionCheck `B m name action YY e m PermissionCheck `B ņ m [ granted YYà _m m [[à false ¢[[J grant() PermissionCheck m granted YYà trueņ _m m m m Y m ö _ e[ņ [[_f J m à _mC m Y m ö _ e \ Ė Y`[ Y[ _[ Y m ö Æ_m m [[_ [[ e JC Y Çņ `à J m action e m PermissionCheck à [ņ [ö m6 rule CanDoAnythingToCustomersIfYouAreAnAdmin when c: PermissionCheck(name == "customer") Role(name == "admin") then c.grant(); end; *m [ [[_ _m m admin [ Ye à e à customer Yf m ö 2c ĉ [ ` YY e CJ C YJ C m **~ Y [ *m [à eJ `à Y eàJ scheme e m YJ pages.xml *m e[[_J ZY[ m_ m_ m C_ /login.xhtml eJ **~6 <page view-id="/login.xhtml" scheme="https"/> *m eJ [[à Z `m s:link s:button b [ņ _m m Æ_m Y eàJ m viewÇ _[[ [ m [ö J m Y [ m YC ZY[ņ m e[[_J [ö _[[ m **~ Y [ ` / login.xhtml eJ 6 <s:link view="/login.xhtml" value="Login"/> _J [à C_ _m J m Y [ _[[ ©C© g+ à m C_ J m Y [ b ZY[ņ `_J YJ m m scheme="https" J **~ _[[ m YJ J **~ [ Y`[ eJ e[ m e [[ YJ *m e[ e à _m **~ e [à e_ YJ e e[ m Y e m m [ `mC m m m YJ m f Ė **~ņ m **~ _[ ` e m CJ _à m f**~ YJ Æ]m[ m J e àņ J e Ye ŅÇ * e **~ m e[ schemeņ m [ pages.xml6 <page view-id="*" scheme="http" /> e ņ e e m YJ à YY[ **~ m Ė Y eà e[ m Ő à eJ [[à C[ m **~ m m m mJ m [ components.xml6 <core:servlet-session invalidate-on-scheme-change="true"/> *m Y m[Y ö à à [ C[`[ eeJ e m [öf J e C e YJ J **~ m YJ J **~ 2f +y + *mJm [à Y e m à #~ņ YC `[f ¢#~*¢# Æ¢f Y[[à # ~`[ *J [[ ¢Y #YÇ [Jm YC Y e J _m à YY[ 2f +y + Æ * J Y Jņ à eJ m I C[ņ _m m _[[ YC m ¢Y m m[[J J à YJ *m Ė m e[[_J à web.xml6 <servlet> <servlet-name>Seam Resource Servlet</servlet-name> <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Seam Resource Servlet</servlet-name> <url-pattern>/seam/resource/*</url-pattern> </servlet-mapping> 2f1 + +y + #J ¢#~*¢# m[[J e Z[à à ė ZY[6 <h:graphicImage value="/seam/resource/captcha"/> <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true"> <s:validate /> </h:inputText> ©C© gQ à <h:message for="verifyCaptcha"/> *mė [[ m *m graphicImage [ Y[à m ¢#~*¢# m[[Jņ m inputText C m ė Y *m Y [[à C[ J m ¢#~*¢# _m m e ` 2f2 +y + Ő à č m ¢#~*¢# [Jm `à CJ m `[f Y6 @Name("org.jboss.seam.captcha") @Scope(SESSION) public class HitchhikersCaptcha extends Captcha { @Override @Create public void init() { setChallenge("What is the answer to life, the universe and everything?"); setCorrectResponse("42"); } @Override public BufferedImage renderChallenge() { BufferedImage img = super.renderChallenge(); img.getGraphics().drawOval(5, 3, 60, 14); //add an obscuring decoration return img; } } 2i ĉ ]Æ *m e[[_J `[ ` ` e C M¹nMNENnèéÐ=Ç `à à Æ ¢mY \ņ *`[ +) à ^C ^C ʭà org.jboss.seam.securi Y I _m [J Y e[ ty.loginSuccessful org.jboss.seam.securi I _m [J Y e[ ty.loginFailed org.jboss.seam.securi ty.notLoggedIn org.jboss.seam.securi ty.notAuthorized ©C© I _m à m ö e[ _m m [JJ I _m à m ö e[ _m m [JJ m_C ė mC ee YC[J g\ à ^C ʭà org.jboss.seam.securi Y I B Y m ty.preAuthenticate org.jboss.seam.securi I B e m ty.postAuthenticate org.jboss.seam.securi I e m m [JJ ty.loggedOut org.jboss.seam.securi I _m m ė [ mC ` mJ ty.credentialsUpdated org.jboss.seam.securi I _m m àė `| YYà mJ ty.rememberMe 2 ]Ä ĉ Jm ` à Z m à Y e à YY[ m Y [ à Ė b ZY[ņ Jm ` Ė m J ¢Yà Y ņ [J _m m [ Y_ e Yf ` à Ė m I[à m[ ` Zņ m_ à m[ ` Z *m e[[_J ZY[ m_ Z à Y _m [ companyCode e[ *m [[ Y e APPLICATION m m Z à J f [[ Ye m `[f à @Name("org.jboss.seam.security.identity") @Scope(SESSION) @Install(precedence = APPLICATION) @BypassInterceptors @Startup public class CustomIdentity extends Identity { private static final LogProvider log = Logging.getLogProvider(CustomIdentity.class); private String companyCode; public String getCompanyCode() { return companyCode; } public void setCompanyCode(String companyCode) { this.companyCode = companyCode; } @Override public String login() { ©C© ga à log.info("###### CUSTOM LOGIN CALLED ######"); return super.login(); } } ©C© gg S ėĘâw3¢ ÃĊ Å ƾƏ˛ A ÂFEij"×ØÙØ;RS&ƿǀ«ûn %rƱĘęäñò345p³%ÞŖ´ŗ S M:# Ś78KM&EF45n java.util.Locale M-N-}ŋŌ¯2°Ŗ´ŗ Æ345%n locale }°"Ò& EF45-;&;RS}¯2ijýŖ´ Ç Ļļ&ʼnŇ%n K3&1&ĞƐvcdƄ%´ŗ %G,@K3&Ɣdſȩ b ͎͏¯2°Ŗ´ŗ ş **~ G?-%Ɠdñò¬K3 ÆHœ8&K3Ç sµûn !¯2nfaces-config.xml «ûżtuvK3&×ØĆľĿ&ŀ!&K3sµ¬ŷĆn !&Ŷ&EF45&Ĉçn!&K3£¯Ŗ´ŗ ş !òśé%nO¶K3s faces-config.xml !&Ŷ&EF45&Ĉçn!&K3£¯Ŗ´ŗ ş !òśé%n&O¶K3£¯Ŗ´ŗ ŧ& cdKâ,@«¬¤Ŏ%K3&cds org.jboss.seam.international.localeSelector.languagen ŀƓdñò2°òũn tu org.jboss.seam.international.localeSelector.country org.jboss.seam.international.localeSelector.variant %´ŗ Æ !¯2 Ç %ŔnŒò("ƌ v=ȍǪýÝÞŖĿŻŗ ¯º¯n34578MNOP-˴¯2n 78¤Ŏ%K3cdtu}ñĿ¬Œ}í£%´ŗ $V&̇ƛ«2Ɣdñò¬K3ĊHM<´¬×ØÙØķuŔƿǀ¯2° Ŗ´ŗ ´ƚÞŒ}n~ Ŗnb [ &O¶śŜ&įİǣǤ´¬ŦŨ%´ŗ <h:selectOneMenu value="#{localeSelector.language}"> <f:selectItem itemLabel="English" itemValue="en"/> <f:selectItem itemLabel="Deutsch" itemValue="de"/> <f:selectItem itemLabel="Francais" itemValue="fr"/> </h:selectOneMenu> <h:commandButton action="#{localeSelector.select}" value="#{messages['ChangeLanguage']}"/> µ¬°nfaces-config.xml śŜ2ţŦñ°ŗ żñò´ƚ2&K3&×ØĆľĿsʠ¯Ũòũn <h:selectOneMenu value="#{localeSelector.localeString}"> <f:selectItems value="#{localeSelector.supportedLocales}"/> </h:selectOneMenu> <h:commandButton action="#{localeSelector.select}" value="#{messages['ChangeLanguage']}"/> Œò£¯2<KFĕœº»M,ǚǛ¯nÿNGFG´òũn ©C© gh Ęęä},¤ Æ[č mÇ !&Ŷ&EF45&Ĉçn } b &K3ĊHM<ñòŖ´ŗ S1 L¶# b n78MNOP-&H¹ĝɾǂ£,Ã-&Ęęän <f:loadBundle /> £«2ż¯2°Ŗ´ŗ 345%ŔŒ&Ks£tu%´ŗ Ɛɝn×ØÙØ& ^ ¿Į£¯,DäñòH¹Ěz´¬1n ##### ;RSĮ£´¬Œ}Ŕtu%´ŗ S1 L¶#'aÒ±© java.util.ResourceBundle ƿǀ¯2°Ŗ´ Æ 345%org.jboss.seam.core.resourceBundle}¯2íî Çŗ Ɠd¯Ú-<Ļ2ĘęäñòH¹íî´¬ŲsµûŖ´ŗ O¶%nÚ-< messages &Ò͵v&% messages.propertiesn messages_en.propertiesn messages_en_AU.properties vŠ&Ò͵&OáMH¹dÓ´¬ŲsµûŖ´ŗ Œò»&OáMĻļ WEBINF/classes @DGTǞñòŖ´ŗ ű2nmessages_en.properties %n Hello=Hello !¯2nmessages_en_AU.properties %n Hello=G'day }ƭũò¬ cdKâ,@«2n Ú-<}¯2ɂv¬ÒǚǛ´¬Œ}stu%´ŗ Ú-<Ò&-Ɠd¯2ÂFE&¥¦ñĿ¬ ÆșñÉÊÇ Œ}Ŕ%ÞŖ´ŗ org.jboss.seam.core.resourceBundle.bundleNames <core:resource-bundle> <core:bundle-names> <value>mycompany_messages</value> <value>standard_messages</value> </core:bundle-names> </core:resource-bundle> Ğd&ŦŨÂFEdÓ¯°&%µòũn !&bl}ÍÒ%Ú-<Ɠd¯Ŗ´ŗ }šŶ&ȁȂXƸȋ¯Ŗ´ŗ ÖŖû ÂFEĚz¯°ŦŨ%µòũn !&ÂFE ɆÞŖ´ŗ pages.xml Œ&}Þ&š0& / /welcome/hello.jsp welcome/hello_en.properties ǂŤv<ÒƓd´¬Œ}Ŕ%ÞŖ´6 <page view-id="/welcome/hello.jsp" bundle="HelloMessages"/> Œò% HelloMessages.properties %"Œ}s%ÞŖ´ŗ ©C© dÓñòÂFE /welcome/hello.jsp gk Ęęä},¤ Æ[č mÇ S11 L¶#'ęu±© Ŕ¯n&Ú-<H¹dÓ¯v»ũn ´ƚ2& <f:loadBundle ... /> NM´¬Œ}vţn Œò»s£tu%´ŗ !&ĤľûnśŜ&«"ſȩNM¯Ŗ´6 <h:outputText value="#{messages['Hello']}"/> µ¬°n <h:outputText value="#{messages.Hello}"/> ñ»Ʒ°Œ}nÂFE!&Ŕ& ^ ¿ġĢŒ}Ŕtu%´ŗ Hello=Hello, #{user.firstName} #{user.lastName} Hello=G'day, #{user.firstName} ;<&ŀÂFE£´¬Œ}Ŕtu%´ŗ @In private Map<String, String> messages; @In("#{messages['Hello']}") private String helloMessage; S12 _ ¿JI ;RS78³øº̺̻ºĚz´¬}2ŔưĮvēĔ%´ŗ $W¯ķune J Ŕíî%´ŗ facesMessages @Name("hello") @Stateless public class HelloBean implements Hello { @In FacesMessages facesMessages; public String sayIt() { facesMessages.addFromResourceBundle("Hello"); } } Œòn78&K3ż2nHello, }ĚzñòŖ´ŗ Gavin King µ¬°n G'day, Gavin S2 POĚ% &EF45-;&M-N-n Ò͵org.jboss.seam.international.timezone }NMěÈĸ´¬ ;RSn Ò͵org.jboss.seam.international.timezoneSelector ŔµûŖ´ŗ O¶%nNMě&NMě%´ŗ Ŕ¯NMěs <f:convertDateTime> £¯2ǂzƓdñòvŨòũ ƄͶŔ b ƞƟ%´ƚ2&ĵÝ}Îç A*¢ ƿ}¯2ëûnA*¢ }¯2ĚzñòŖ´ŗ Œòˌ˫ƄưvO¶&ɸ¬ɹ°%´ŗ java.util.Timezone ©C© ho Ęęä},¤ Æ[č mÇ Œ&/pĊHM<¯nŹ2&ĵÝ}ÎĶO¶%NMě¯Ŗ´ ŗ ñ»nNMěëŨ¬Èʺ°Ö%Ŕ(ý¬«"n <s:convertDateTime> Nƿǀ¯Ŗ´ŗ SS 3¢ 345Ŗn}2Ŕžſ-ÃÈĸs%ÞŖ´ŗ ,¤#~KLHMǡ45#~}2Ŕʛ2°Ŗ´sn ŔnjȅŻŒò»ͤÖ&ŋȌɁƣ˄¯2ëûn KLHMǡ45},¤&ƝēR´¬345ŔµûŖ´ŗ ŖŴnRñò¬,¤&EFcd¯Ŗ´6 <theme:theme-selector cookie-enabled="true"> <theme:available-themes> <value>default</value> <value>accessible</value> <value>printable</value> </theme:available-themes> </theme:theme-selector> š0-ñò,¤sO¶,¤%µ¬Œ}ơƬ¯2ţŦñ°ŗ ,¤n,¤}ÍÒ%Kâ,@OáMdÓñòŖ´ŗ èýũn default ,¤ default.properties wŌ&?}¯2dÓñòŖ´ŗ èýũndefault.properties śŜ&«"dÓ¯Ŗ´6 css ../screen.css template /template.xhtml Ļļn ,¤Ú-<&? ¢ -NMĝǽɚǵ&â-ĝ ,D&Òv¬%¯Ƌ" ÆĻļ,Ã-%µ¬KLHMǡ45Ú-<}DZ2Çŗ e [ Œò%~ĝe [ë°2Œò»&?ýŖ´ŗ èýũne [%-NM4ǃ£´¬6 <link href="#{theme.css}" rel="stylesheet" type="text/css" /> µ¬°n@DGdÓs¸ǰ¯2°¬}Þ6 <link href="#{facesContext.externalContext.requestContextPath}#{theme.css}" rel="stylesheet" type="text/css" /> šŔLjūv°ē}¯2n e [% <ui:composition> «2,Dǃ£%ÞŖ´ŗ <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" template="#{theme.template}"> njƋ"ŠK3EDGN&«"n 78s¼ȍ,¤Èĸ%Þ¬«"n×ØÙØ&,¤EDGNsµûŖ´ŗ ©C© h Ęęä},¤ Æ[č mÇ <h:selectOneMenu value="#{themeSelector.theme}"> <f:selectItems value="#{themeSelector.themes}"/> </h:selectOneMenu> <h:commandButton action="#{themeSelector.select}" value="Select Theme"/> S[ M:#w3¢`a.KJÀ¨©deâ K3EDGNn,¤EDGNnNMěEDGNŹ2n K3},¤cdGFÃijä´¬Œ}R¯2°Ŗ´ŗ Kâ,@cd¯2ţŦñ°ŗ ſ cookie-enabled <theme:theme-selector cookie-enabled="true"> <theme:available-themes> <value>default</value> <value>accessible</value> <value>printable</value> </theme:available-themes> </theme:theme-selector> <international:locale-selector cookie-enabled="true"/> ©C© h) [ Ä ;HÿD45ͷȫ&œPM%n O¶Hǵ&ƥn_ön`[Jn;ÂvŠĮ£´¬1&n ʥç&1&¤GFƏ˛sŲvûŖ´ŗ *Z}ƭũò¬Ə˛űO¶¤F˱Ø,Ã-Ěz´¬1& <s:formattedText/> ;KsµûŖ´ŗ *Z#ù* I¹-&âĮ£¯2'Ɗñò2°Ŗ´sn *ZĮ£´¬µ2#ù* IÖ°2&ǘɼƄv&%ɦȌ¯2ţŦñ°ŗ [ Q³¢J .ě 4vè6 It's easy to make *emphasis*, |monospace|, ~deleted text~, super^scripts^ or _underlines_. Œò <s:formattedText/> %ĚzñĿ¬}n śŜ&*| s²³ñòŖ´6 <p> It's easy to make <i>emphasis</i>, <tt>monospace</tt> <del>deleted text</del>, super<sup>scripts</sup> or <u>underlines</u>. </p> æ(®¯°âHHOp³´¬}Þ£¯Ŗ´ŗ Ŗn+ ƃƗ¯£¯Ŗ´6 +This is a big heading You /must/ have some text following a heading! ++This is a smaller heading This is the first paragraph. We can split it across multiple lines, but we must end it with a blank line. This is the second paragraph. Æʮq&ɱ(ſȳɀñòŖ´ŗ ®¯°ʮ}¯2,Ã-VW¯°ŷĆæ(sŲvŒ}ʅòv°%ţŦñ°ŗÇ Œòs§¨& *| %´6 <h1>This is a big heading</h1> <p> You <i>must</i> have some text following a heading! </p> <h2>This is a smaller heading</h2> <p> This is the first paragraph. We can split it across multiple lines, but we must end it with a blank line. </p> <p> This is the second paragraph. </p> Ë˞ÝÞ- # Ġ%p³%ÞŖ´ŗË˞v¯- = Ġ°Ŗ´6 An ordered list: ©C© h+ *Z #first item #second item #and even the /third/ item An unordered list: =an item =another item <p> An ordered list: </p> <ol> <li>first item</li> <li>second item</li> <li>and even the <i>third</i> item</li> </ol> <p> An unordered list: </p> <ul> <li>an item</li> <li>another item</li> </ul> Ƚ£KFGĕGĊ%̠ĢŲsµûŖ´6 The other guy said: "Nyeah nyeah-nee /nyeah/ nyeah!" But what do you think he means by "nyeah-nee"? <p> The other guy said: </p> <q>Nyeah nyeah-nee <i>nyeah</i> nyeah!</q> <p> But what do you think he means by <q>nyeah-nee</q>? </p> [1 &MLBCĜĝĞğ'Ġġ3À4 *ņ |ņ # .XY vŠ&ĞğĠĝn<ņ >ņ & vŠ&*| %Į£ñò¬Ġ \ %?-3¯Ŗ´6 You can write down equations like 2\*3\=6 and HTML tags like \<body\> using the escape character: \\. <p> You can write down equations like 2*3=6 and HTML tags like <body> using the escape character: \. </p> Ŗn FG,@FG ÆͺÇ 2;<&KFG̠ĢŒ}s%ÞŖ´ŗ ©C© hQ *Z My code doesn't work: `for (int i=0; i<100; i--) { doSomething(); }` Any ideas? <p> My code doesn't work: </p> <pre>for (int i=0; i<100; i--) { doSomething(); }</pre> <p> Any ideas? </p> MHMǫd--&O¶¤F°ÖŔ?-3Ð=ñòŖ´ Æ ź}ŻŠ&ǫd--O¶¤Fñò,Ã-'ę;<ĝĞƐvÃĭHGN«¬ NvûŖ´ Ç ŗ ¯s2nèýũśŜ&«"VWtu%´ŗ This is a |<tag attribute="value"/>| example. ?-3¯vŨòũǫd--ŀ&Š&«"vÃĭHGNŔƸéñòŖ´ŗ !òśʶnŠ&«"vēĔ ÆMNFGnĕ-;vŠ Ç &MHMǫd--&O¶¤F%ÞŖĿŻŗ _m YJ à e m m f m Y ` *m _ m à ė e [ Y Z à m _à Æ[ ņ ņ Ç [2 !%K Gp¬śŜ&ŞĠĮ£¯Ŗ´6 Go to the Seam website at [=>http://jboss.com/products/seam]. ŖnG,Ã-Ɠd¯°ŷĆ6 Go to [the Seam website=>http://jboss.com/products/seam]. $̋ĨȫŨ%´snŒ&ŞĠĮ£¯_öð<&G>ͻ%Þ¬«" *ZâL-N¤Mƛ´¬Œ}Ŕtu%´ŗ [S z.XY ,Ã-ȃdñò*| &EFġ1¬Œ}sƗƦŖ´ ÆȌT¯v°%ţŦñ°n GK-M-G,@ʧʨĮ£%Þv°«"vEFǚŻ%°Ŗ´Çŗ ŒòGp³´¬ęvŠưĮ%´ŗ You might want to link to <a href="http://jboss.com/products/seam">something ©C© h\ *Z cool</a>, or even include an image: <img src="/logo.jpg"/> ,ŔpòŖ´6 <table> <tr><td>First name:</td><td>Gavin</td></tr> <tr><td>Last name:</td><td>King</td></tr> </table> µvsĝȅ"}ȶýũĩŔ°ȅ°ȅ%Þ¬%¯Ƌ"Ņ ©C© ha ^ Ä y}_ _ [ Y e JJ J *Z *m Yà e e ė *Z YY e m J e ~b ņ ` [ ee ` YY e I*b J ^ y}_ *Z YY YC `à jboss-seam-pdf.jar *m #I m *Z b [ņ _m m C_ m ~bņ m Yf ņ _m m C m m * [ ~b YY à Yf Y[ ņ [ jboss-seam-pdf.jar à WEB-INF/lib à [J _m m *Z #I e[ *m em eJ ė *Z YYe *m *Z [ Ė m e b [ m C_ m[Jà b Cf e m [`à à [ YY m e ~ #[[àņ Ė m e m f Y öJ *m examples/itext YB ZY[ e m ~b YY f YY Y[à Y öJJņ ` ZY[ m m öà ~b J e YY ^ <p:document> Y J `à e [ å*| e[ J J m http://jboss.com/products/seam/pdf Y m[ [f _à mC m document J m e m *m document J YY J m f *| m #` ©C© ş type ő *m àY e m ` Y [ C[ PDFņ RTF HTML e[ ~b Jņ à e m e [à _ö [à _m JJ ~b ş pageSize ş orientation ő *m č e m YJ ` J *m f [à C[ _[ ` LETTER A4 # e[[ [ e Yf Y YJ č ` e com.lowagie.text.PageSize [ #[C[àņ YJč YC m _m mJm e m YJ [à *m C[ a) gk)ņ e ZY[ņ ĖC[ m ^**^I YJ č ő *m e m YJ [ C[ hg *Z ~b J landscape [ Y ņ m mJm _m YJ č C[ C portrait ş margins ő *m [eņ Jmņ Y ` J C[ ş marginMirroring ş disposition ő m J J m[ ` f C [J YJ ő ]m JJ ~b _` `_ņ m f m **~ Content-Disposition e m [ C[ inlineņ _m m m m[ ` f Y[à m `_ __ e Y`[ņ attachmentņ _m m m m m[ ` _[ *m e[ C[ inline | #` ş title ş subject ş keywords ş author ş creator AJ <p:document xmlns:p="http://jboss.com/products/seam/pdf"> The document goes here. </p:document> ^1 Ä ] Ae[ _[[ m B Z̽ m_Cņ m A f Y J _ *| J e[ e JJ ~b ņ YC Y [ A Y e JJ `[ ~b *J [ö <p:image> <p:paragraph> m ` e e Y[ *J [ö <p:font> YC à[ e [[ m JJ m <p:paragraph> Y | e Z m[ ` YJYm m Z eJ ` e[_ņ e à[ [J [ JY #` ©C© hh *Z ~b J ş firstLineIndent ş extraParagraphSpace ş leading ş multipliedLeading ş spacingBefore ő *m `[ö Y ` `e m [f ş spacingAfter ő *m `[ö Y ` e m [f ş indentationLeft ş indentationRight ş keepTogether AJ <p:paragraph alignment="justify"> This is a simple document. It isn't very fancy. </p:paragraph> <p:text> Y *m text J [[_ Z eJ ` Y e YY[ f J [ b C m Cà f [ m outputText J _m J *| #` ş ő *m C[ ` Y[à *m _[[ àY [[à ` C[ `J ZY value AJ <p:paragraph> The item costs <p:text value="#{product.price}"> <f:convertNumber type="currency" currencySymbol="$"/> </p:text> </p:paragraph> <p:html> Y *m html J *| m ~b #` ©C© hk *Z ~b J ş ő *m Z ` Y[à value AJ <p:html value="This is HTML with <b>some markup</b>." /> <p:html> <h1>This is more complex HTML</h1> <ul> <li>one</li> <li>two</li> <li>three</li> </ul> </p:html> <p:html> <s:formattedText value="*This* is |Seam Text| as HTML. </p:html> <p:font> It's very^cool^." Y *m e J e m e[ e ` e [[ Z f e #` ş name ő *m e ņ e ZY[6 COURIERņ HELVETICAņ TIMES ZAPFDINGBATS ROMANņ SYMBOL ş size ő *m Y č e m e ş style ş encoding ő *m e à[ #à ` e 6 NORMALņ BOLDņ ITALICņ OBLIQUEņ UNDERLINEņ LINE-THROUGH ő *m m J AJ <p:font name="courier" style="bold" size="24"> <p:paragraph>My Title</p:paragraph> </p:font> <p:newPage> Y p:newPage YJ `ö AJ <p:newPage /> ©C© ko *Z ~b J <p:image> Y J m J ` ` [ e m [Ym e m _` YY[ Z f J m value ` p:image I [ ` à [[à J `à YY[ *m imageData ` Y eà C[ `J ZY _m C[ java.awt.Image `B #` ş value ő # m ZY `J YY[ fJ J ş rotation ş height ş width ş alignmentő ş alt ş indentationLeft ş indentationRight ş spacingBefore ő *m e m J J ő *m mJm e m J ő *m _m e m J *m [J e m J Æ ag)ņ ů#[J [Ű e Y`[ C[Ç ő #[C Z Y e m J ő *m `[ö Y ` `e m [f ş spacingAfter ő *m `[ö Y ` e m [f ş widthPercentage ş initialRotation ş dpi ş scalePercent ş wrap ş underlying ő *m [J e Æ Y JÇ e m J *m ` ZY J[ Y J C[ _ Y J C[ YJ Y Z à [J Y J AJ ©C© k *Z ~b J <p:image value="/jboss.jpg" /> <p:image value="#{images.chart}" /> <p:anchor> Y e [ ö`[ [ö e YY m e[[_J `6 p:anchor #` ş name ő *m e f m ş reference ő *m m [ö e ö m Y m m[ `J _m ͼ b ZY[ņ ͼ[ö e m Y _m name e link1 ö à [ ` e[[ AI Y e m AJ <p:listItem><p:anchor reference="#reason1">Reason 1</p:anchor></p:listItem> ... <p:paragraph> <p:anchor name="reason1">It's the quickest way to get "rich"</p:anchor> ... </p:paragraph> ^2 _ <p:header> Y <p:footer> *m p:header p:footer Y YC m `[à Y[ m e Z m YJ e J ņ _m m Z Y e m e YJ e [ m[ YY m Y e #` ©C© ş alignment ő *m [J e m m½e `Z Æ ag)ņ ů#[J [Ű e [J C[f Ç ş backgroundColor ş borderColor ő *m ` öJ [ e m m½e `Z Æ agņ ů¢[ [Ű e [ C[Ç ő *m ` [ e m m½e `Z f k) *Z ~b J C[ ` ` J borderColorLeftņ borderColorRightņ borderColorTop borderColorBottomÆ f agņ ů¢[ [Ű e [ C[Ç ş ő *m _m e m ` C[ ` ` Y e J borderWidthLeftņ borderWidthRightņ borderWidthTop borderWidthBottom borderWidth AJ <p:facet name="header"> <p:font size="12"> <p:footer borderWidthTop="1" borderColorTop="blue" borderWidthBottom="0" alignment="center"> Why Seam? [<p:pageNumber />] </p:footer> </p:font> </f:facet> <p:pageNumber> Y *m YJ ` ` Y[ e m ef J m p:pageNumber J *m YJ ` J [à ` m Z e m e [à ` AJ <p:footer borderWidthTop="1" borderColorTop="blue" borderWidthBottom="0" alignment="center"> Why Seam? [<p:pageNumber />] </p:footer> ^S <p:chapter> Y <p:section> e m J e[[_ `ö½ [ ņ m p:chapter p:section J ` YC m à [à ` e mYņ ` mà à ` `[à Y | ~b C_ YC à CJ `_ mY #` ş ©C© ő *m [J e m m½e `Z Æ ag)ņ ů#[J [Ű e [J C[f Ç alignment k+ *Z ~b J ş number ő *m mY ` ^Cà mY m[ ` J mY ` ş numberDepth ő *m Ym e `J e #[[ ` [C m J mY½ *m em e e m e e mY m _[ ` +Qņ e Y[à m e[ ` Ym e m * m mY `ņ ` Ym e ) m[ ` m ņ m ` _[ ` Y[à Q AJ <p:document xmlns:p="http://jboss.com/products/seam/pdf" title="Hello"> <p:chapter number="1"> <p:title><p:paragraph>Hello</p:paragraph></p:title> <p:paragraph>Hello #{user.name}!</p:paragraph> </p:chapter> <p:chapter number="2"> <p:title><p:paragraph>Goodbye</p:paragraph></p:title> <p:paragraph>Goodbye #{user.name}.</p:paragraph> </p:chapter> </p:document> <p:header> Y #à mY p:title *m [ _[[ ` Y[à Z m mY½ ` *m `à e m [ à _ Z à ` p:paragraph ^[ ` Y[à J m p:list p:listItem J à `[àf `[ à ` e [ m e[[_J m ui:repeat J Y[à [ e C[ C e f Y <p:document xmlns:p="http://jboss.com/products/seam/pdf" xmlns:ui="http://java.sun.com/jsf/facelets" title="Hello"> <p:list style="numbered"> <ui:repeat value="#{documents}" var="doc"> <p:listItem>#{doc.name}</p:listItem> </ui:repeat> </p:list> </p:document> ©C© kQ *Z ~b J <p:list> #` ş style ő *m J½`[[J à[ e [ e6 NUMBEREDņ LETTEREDņ GREEKņ ROMANņ ZAPFDINGBATSņ ZAPFDINGBATS_NUMBER e à[ JCņ m [ `[[ ş listSymbol ş indent ş lowerCase ş charNumber ş numberType ő b `[[ [ņ Y e m `[[ à`[ ő *m [C[ e m [ ő b [ à[ J [ņ _mm m [ m[ ` [_ ő b ͽ#~bùó#*ņ m m e m `[[ m ő b ͽ#~bùó#*͘ùA|^Iņ m `J à[ AJ <p:list style="numbered"> <ui:repeat value="#{documents}" var="doc"> <p:listItem>#{doc.name}</p:listItem> </ui:repeat> </p:list> <p:listItem> Y p:listItem YY m e[[_J `6 #` ş alignment ő *m [J e m m½e `Z Æ ag)ņ ů#[J [Ű e [J C[f Ç ş alignment ş indentationLeft ş indentationRight ş listSymbol ő *m [J e m [ Æ ag)ņ ů#[J [Ű e Y`[ C[Ç f ő *m [e ő *m Jm ő C m e[ [ à`[ e m [ AJ ... ©C© k\ *Z ~b J ^^ *`[ ` J m p:table p:cell J A[ö à `[ ņ m ZY[ _ [ e `[ m + [ņ m Cà + [[ _[[ [[à e _ e _ ` [ņ m m e _[[ ` Y m C `[ Y [Y[ YJ <p:table> Y p:table YY m e[[_J ` #` ş columns ő *m ` e [ Æ [[Ç m ö Y `[ _ ş widths ő *m [C _m e m [ *m m[ ` C[ e m [ b ZY[6 _m̾) _[ m m + [ m e [ m[ ` _ m č e m m [ ş headerRows ş footerRows ş widthPercentage ő *m [ ` e _ _m m ` m e _ m[ ` Y e m `[ Y [Y[ YJ ő *m ` e _ m ` ef _ *m C[ ` e m headerRows C[ e m ) _ _m m ö Y m m _ m ö Y m eņ headerRows m[ ` + footerRows m[ ` ő *m Y J e m YJ _m m m f `[ Y ş horizontalAlignment ő *m mč[ [J e m `[ Æ ag)ņ ů#[J [Ű e Y`[ C[f Ç ş skipFirstHeader ş runDirection ş lockedWidth ş splitRows ş spacingBefore ő *m `[ö Y ` `e m [f ş spacingAfter ő *m `[ö Y ` e m [f ©C© ka *Z ~b J ş extendLastRow ş headersInEvent ş splitLate ş keepTogether AJ <p:table columns="3" headerRows="1"> <p:cell>name</p:cell> <p:cell>owner</p:cell> <p:cell>size</p:cell> <ui:repeat value="#{documents}" var="doc"> <p:cell>#{doc.name}</p:cell> <p:cell>#{doc.user.name}</p:cell> <p:cell>#{doc.size}</p:cell> </ui:repeat> </p:table> <p:cell> Y p:cell YY m e[[_J ` #` ©C© ş colspan ő ¢[[ Y m [ `à [J colspan J m *`[ mC m `[à Y [Y[ _ ş horizontalAlignment ş verticalAlignment ş padding ş useBorderPadding ş leading ş multipliedLeading ş indent ş verticalAlignment ş extraParagraphSpace ő *m mč[ [J e m [[ Æ ag)ņ ů#[J [Ű e Y`[ C[f Ç ő *m C [ [J e m [[ Æ ag)ņ ů#[J [Ű e Y`[ C[Ç ő ~J JC [ ` Y e J paddingLeftņ paddingRightņ paddingTop paddingBottom kg *Z ~b J ş fixedHeight ş noWrap ş minimumHeight ş followingIndent ş rightIndent ş spaceCharRatio ş runDirection ş arabicOptions ş useAscender ş grayFill ş rotation AJ <p:cell>...</p:cell> ^b } *m e m m `à ` [Y[ J ^b à YY e[[ [ Y e ¢[àņ [à [f YY *mà 6 whiteņ grayņ lightgrayņ darkgrayņ blackņ redņ pinkņ yellowņ greenņ magentaņ cyan blue ^b1 + ]m [J C[ ņ m ~b YY m e[[_J mč[ [J C[6 leftņ rightņ centerņ justify justifyall *m C [ [J C[ topņ middleņ bottomņ baseline ^c Ä J _ö e m `Z _m [ eJ _Cņ m e_ Y e eJ m e YY[ f *m e[ Y[ C ~b e J AI ņ /seam-doc.seam |à ©C© kh *Z ~b J `_ Æ Ç _[ Ye AI m m [ ~b [ö / myDocument.pdf *m Y`[à Ė eJ * C ~b e[ņ [[ ;Ye m[ ` YY m C[ b[ m C[6 <filter> <filter-name>Seam Servlet Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamServletFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Servlet Filter</filter-name> <url-pattern>*.pdf</url-pattern> </filter-mapping> <servlet> <servlet-name>Document Store Servlet</servlet-name> <servlet-class>org.jboss.seam.pdf.DocumentStoreServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Document Store Servlet</servlet-name> <url-pattern>*.pdf</url-pattern> </servlet-mapping> *m useExtensions Y m Y Y[ m e [à `à J m J AI _m m e[ Z e m àY `J J <components xmlns="http://jboss.com/products/seam/components" xmlns:pdf="http://jboss.com/products/seam/pdf"> <pdf:documentStore useExtensions="true" /> </components> ó C Y _[[ ZY _m m Cf # m Yņ e m _[[ ` C[ * Ő Y eà e[ C_ ` m_ _m Z J m errorPage YYà e m <pdf:documentStore useExtensions="true" errorPage="/pdfMissing.seam" /> ^1 ¢mJ YY [ YC _m jboss-seam-pdf.jar ¢m ` ~b f ` J *| YJ ¢mJ Ė m b¢m [`à Æjfreechart.jar jcommon.jarÇ ` m WEB-INF/lib à *m àY e m [à YY6 Y mņ ` m [ m <p:barchart> Y Y[à ` m #` ş ©C© ő ¢[ _mm ` Y[à m m borderVisible kk *Z ~b J ş borderPaint ő *m [ e m `ņ e C`[̽ ş borderBackgroundPaint ő *m e[ ` öJ [ e m m ş borderStroke ő ş domainAxisLabel ő *m Z [`[ e m Z ş domainAxisPaint ő *m [ e m Z [`[ ş domainGridlinesVisibleő ş domainGridlinePaintő ¢[ _mm J[ e m Z m_ m m *m [ e m J[ņ e Cf `[ ş domainGridlineStroke ő J[ņ e C`[ ş height ş width ş is3D ş legend ş legendItemPaintő *m ö à[ e m ő *m mJm e m m ő *m _m e m m ő # `[ C[ J m m m m[ ` + e ) ő # `[ C[ J _mm m m m[ [ [J *m e[ [ e m Z [`[ m [J ş legendItemBackgoundPaintő *m ` öJ [ e m [Jņ e ee e m m ` öJ [ ş orientation ş plotBackgroundPaintő ş plotBackgroundAlphaő ş plotForegroundAlphaő ş plotOutlinePaintő *m [ e m J J[ņ e C`[ ş plotOutlineStroke ő *m ö à[ e m J J[ņ ő *m e m Y[ņ m vertical Æm e[Ç horizontal *m [ e m Y[ ` öJ *m [Ym ÆY àÇ [C[ e m Y[ ` öJ m[ ` ` `_ o Æ Y[[à f YÇ Æ Y[[à YĖÇ *m [Ym ÆY àÇ [C[ e m Y[ m[ ` ` `_ o Æ Y[[à YÇ Æ Y[[à YĖÇ e C`[ ©C© )oo *Z ~b J ş rangeAxisLabel ő *m Z [`[ e m J Z ş rangeAxisPaint ő *m [ e m J Z [`[ ş rangeGridlinesVisibleő ş rangeGridlinePaintő ¢[ _mm J[ e m J Z m_ m m *m [ e m J J[ņ e Cf `[ ş rangeGridlineStroke ő *m ö à[ e m J J[ņ e C`[ ş title ő *m m [ Z ş titlePaintő ş titleBackgroundPaintő *m [ e m m [ Z *m ` öJ [ m m [ ş width ő *m _m e m m AJ <p:barchart title="Bar Chart" legend="true" width="500" height="500"> <p:series key="Last Year"> <p:data columnKey="Joe" value="100" /> <p:data columnKey="Bob" value="120" /> </p:series> <p:series key="This Year"> <p:data columnKey="Joe" value="125" /> <p:data columnKey="Bob" value="115" /> </p:series> </p:barchart> <p:linechart> Y Y[à [ m #` ş borderVisible ő ¢[ _mm ` Y[à m m ş borderPaint ş borderBackgroundPaint ő *m [ e m `ņ e C`[̽ ő *m e[ ` öJ [ e m m ş ©C© borderStroke ő )o *Z ~b J ş domainAxisLabel ő *m Z [`[ e m Z ş domainAxisPaint ő *m [ e m Z [`[ ş domainGridlinesVisibleő ş domainGridlinePaintő ¢[ _mm J[ e m Z m_ m m *m [ e m J[ņ e Cf `[ ş domainGridlineStroke ő J[ņ e C`[ ş height ş width ş is3D ş legend ş legendItemPaintő *m ö à[ e m ő *m mJm e m m ő *m _m e m m ő # `[ C[ J m m m m[ ` + e ) ő # `[ C[ J _mm m m m[ [ [J *m e[ [ e m Z [`[ m [J ş legendItemBackgoundPaintő *m ` öJ [ e m [Jņ e ee e m m ` öJ [ ş orientation ş plotBackgroundPaintő ş plotBackgroundAlphaő ş plotForegroundAlphaő ş plotOutlinePaintő *m [ e m J J[ņ e C`[ ş plotOutlineStroke ő *m ö à[ e m J J[ņ ő *m e m Y[ņ m vertical Æm e[Ç horizontal *m [ e m Y[ ` öJ *m [Ym ÆY àÇ [C[ e m Y[ ` öJ m[ ` ` `_ o Æ Y[[à f YÇ Æ Y[[à YĖÇ *m [Ym ÆY àÇ [C[ e m Y[ m[ ` ` `_ o Æ Y[[à YÇ Æ Y[[à YĖÇ e C`[ ©C© ş rangeAxisLabel ő *m Z [`[ e m J Z ş rangeAxisPaint ő *m [ e m J Z [`[ ş rangeGridlinesVisibleő ¢[ _mm J[ e m J Z m_ m m )o) *Z ~b J ş rangeGridlinePaintő *m [ e m J J[ņ e Cf `[ ş rangeGridlineStroke ő *m ö à[ e m J J[ņ e C`[ ş title ő *m m [ Z ş titlePaintő ş titleBackgroundPaintő *m [ e m m [ Z *m ` öJ [ m m [ ş ő *m _m e m m width AJ <p:linechart title="Line Chart" width="500" height="500"> <p:series key="Prices"> <p:data columnKey="2003" value="7.36" /> <p:data columnKey="2004" value="11.50" /> <p:data columnKey="2005" value="34.625" /> <p:data columnKey="2006" value="76.30" /> <p:data columnKey="2007" value="85.05" /> </p:series> </p:linechart> <p:piechart> Y Y[à Y m #` ©C© ş titleő *m m [ Z ş labelő *m e[ [`[ Z e Y ş legendő ş is3Dő# ş labelLinkMarginő ş labelLinkPaintő ş labelLinkStrokeő ş labelLinksVisibleő # `[ C[ J _mm m m m[ [ [J e[ C[ `[ C[ J m m m m[ ` + e ) *m [ö J e [`[ *m Y e m [`[ [öJ [ m ö e m [`[ [öJ [ # e[J m [ _mm m [f `[ [ö _ )o+ *Z ~b J ş labelOutlinePaintő *m Y _ m [ e m [`[ ş labelOutlineStrokeő *m ö _ m [ e m [`[ ş labelShadowPaintő *m Y _ m m_ e m [`[ ş labelPaintő *m [ _ m [`[ ş labelGapő ş labelBackgroundPaintő ş startAngleő ş circularő ş directionő ş sectionOutlinePaintő ş sectionOutlineStrokeő ş sectionOutlinesVisibleő ş baseSectionOutlinePaintő ş baseSectionPaintő ş baseSectionOutlineStrokeő *m JY `_ m [`[ m Y[ Y f J e m Y[ _m *m [ _ m ` öJ e m [`[ e m [[ņ m ` öJ e[[ *m J J[ e m e # `[ C[ J m m m m[ ` _ [ e e[ņ m m _ [[Y *m e[ *m m Y _ e6 clockwise anticlockwise *m e[ clockwise *m [ Y e [[ *m [ ö e [[ _mm [ _ e m m Y[ *m ` [ Y *m ` Y *m ` [ ö AJ <p:piechart title="Pie Chart" circular="false" direction="anticlockwise" startAngle="30" labelGap="0.1" labelLinkPaint="red"> <p:series key="Prices"> <p:data key="2003" columnKey="2003" value="7.36" /> <p:data key="2004" columnKey="2004" value="11.50" /> <p:data key="2005" columnKey="2005" value="34.625" /> <p:data key="2006" columnKey="2006" value="76.30" /> <p:data key="2007" columnKey="2007" value="85.05" /> </p:series> </p:piechart> ©C© )oQ *Z ~b J <p:series> Y ¢Jà ` `ö _ *m J Jč e _m YY[à à[J m #` ş key ő *m ş seriesPaint ş seriesOutlinePaint ő *m [ e m m ő *m [ [ e m m ş seriesOutlineStroke ő *m ö _ m m ş seriesVisible ő # `[ J e m m[ ` Y[à ş ő # `[ J e m m[ ` [ m [J seriesVisibleInLegend AJ <p:series key="data1"> <ui:repeat value="#{data.pieData1}" var="item"> <p:data columnKey="#{item.name}" value="#{item.value}" /> </ui:repeat> </p:series> <p:data> Y *m J ` m Y ` Y[à m JYm #` ş key ő *m e m ş series ő *m ņ _m ` <p:series> ©C© ş value ő *m C[ ş explodedPercent ş sectionOutlinePaint ő b Y mņ m_ ZY[ e m Y Y ő b ` mņ m [ e m )o\ *Z ~b J [ ş sectionOutlineStroke ő b ` mņ m ö àY e m [ ş sectionPaint ő b ` mņ m [ e m AJ <p:data key="foo" value="20" sectionPaint="#111111" explodedPercent=".2" /> <p:data key="bar" value="30" sectionPaint="#333333" /> <p:data key="baz" value="40" sectionPaint="#555555" sectionOutlineStroke="my-dot-style" /> <p:color> Y *m [ Y [ [ J m ` ef _m _J e[[ mY #` ş color ő *m [ C[ b J [ņ m m J [ agņ ů¢[ [Ű ş color2 ş point ő *m f _m m J [ `J ş point2 ő *m f _m m J [ ő b J [ņ m m [ m m J AJ <p:color id="foo" color="#0ff00f"/> <p:color id="bar" color="#ff00ff" color2="#00ff00" point="50 50" point2="300 300"/> <p:stroke> Y ` ö _ [ m #` ş width ş cap ő *m _m e m ö ő *m [ Y àY [ C[ buttņ round square ©C© )oa *Z ~b J ş join ő *m [ B àY [ C[ miterņ round bevel ş miterLimit ő b Bņ m C[ m [ e m č e m B ş dash ş dashPhase ő *m m C[ m m Y ` _ m [ *m Y Y J m [Jm e m [J _ _ J ő *m m Ym m ee m m Y m m m [ m[ ` _ _m AJ <p:stroke id="dot2" width="2" cap="round" join="bevel" dash="2 3" /> ^2 *Z J ` _ Cà e e *m ` ` ` ~b Y[à J _` YJ ù m _m _m *| Jņ ` [à Y[à ` Z m ` <p:barCode> Y Y[à ` J #` ş type ő # ` àY YY `à *Z [ C[ f [6 EAN13ņ EAN8ņ UPCAņ UPCEņ SUPP2ņ SUPP5ņ POSTNETņ PLANETņ CODE128ņ CODE128_UCCņ CODE128_RAW CODABAR ş codeő *m C[ ` `à m ` ş xposő b ~bņ m `[ à Y e m ` m YJ ş yposő b ~bņ m `[ à Y e m ` m YJ ş ő b ~bņ m e e m ` rotDegrees J ©C© ş barHeight ő *m mJm e m ` m `¢ ş minBarWidth ő *m ` _m )og *Z ~b J ş barMultiplier ő *m ` [Y[ e _ ` m f `_ ` e POSTNET PLANET ş barColor ş textColor ş textSize ş altText ő *m [ _ m ` ő *m [ e à Z m ` ő *m č e m ` Zņ e à ő *m alt Z e *| J [ö AJ <p:barCode type="code128" barHeight="80" textSize="20" code="(10)45566(17)040301" codeType="code128_ucc" altText="My BarCode" /> ^S j ēº+\ _ YC ZY[ YY e J _J Y ~b f J _J [ö e[ YYņ `[à m C _Jņ _[[ [à <p:swing> Y I _J Y ~b #` ş width ő *m _m e m Y ` ş height ş component ő *m mJm e m Y ` ő # ZY _m C[ _J #]* Yf AJ <p:swing width="310" height="120" component="#{aButton}" /> ^[ _ ©C© )oh *Z ~b J b em e *Zņ 6 ş *Z ~J ŬmY6½½___[_J ½*Z½ŭ ş *Z # ŬmY6½½___J ½[_J½ŭ ©C© )ok b ] &ɍħë«ì,Dp³£&Ċ45;RSsġŖò¬«"vûŖ´ŗ ^[ &R jboss-seam-mail.jar Â&p³£ñò¬Â b =;RSsġŖòŖ´ŗ «ûƿǀñòŖ´ŗ ;Kë«ì Œ& [ #I mailSession ZY[½[ KPG'(tuvÅ£ [ R&sġŖò2°Ŗ´ŗ Ţ¯°âF3ä&ēĔ(°n ŖǹǰRñò2°¬Ơvķu'ęz´s°ţÖºġŖò2°Ŗ´ŗ Ő [ à [ė J ė J J C f ++++ņ ůJ *J |[Ű b ¿JI'k°±© |[ "1,Dp³£&®¯°Ə˛ͿȦ}̍ʻŲµûŖĿŻ ő [ ſȩ e [ vûŖ´ŗ <m:message xmlns="http://www.w3.org/1999/xhtml" xmlns:m="http://jboss.com/products/seam/mail" xmlns:h="http://java.sun.com/jsf/html"> <m:from name="Peter" address="[email protected]" /> <m:to name="#{person.firstname} #{person.lastname}">#{person.address}</m:to> <m:subject>Try out Seam!</m:subject> <m:body> <p><h:outputText value="Dear #{person.firstname}" />,</p> <p>You can try out Seam by visiting <a href="http://labs.jboss.com/jbossseam">http://labs.jboss.com/jbossseam</a>.</p> <p>Regards,</p> <p>Pete</p> </m:body> </m:message> NÂFEŹȔ̿Øn &Dĕôª´¬«"Ɠz¯Ŗ´ŗ <m:message> ÂFE&ɍħ˵&cd <m:from> Nn ɍħĨ&Ɠd <m:to> q°¬&%!òż ^ &£ēĔơƬ¯2ţŦñ°Çn N£¯Ŗ´ŗ <m:message> [ &ÿ@̿ØŖ´ŗ ;RSq£´¬Œ}s%ÞŖ´ŗ <m:body> *| N Ŗ [ Nq%n ÆĻļ&e [ <m:subject> ޱNÿ@qĝ b Œò% [ ,D&%Þµsû%´ŗ ɍħēĔÖ°2%´sn m:message &Dĕ&šŶn mailSession s [ ɍħ´¬«";ñò¬&%n 78s´ƚÞŒ} !&lDĕ´¬«"ƼÕ´¬ŦŨ%´ŗ @In(create=true) private Renderer renderer; ©C© )o ^[ public void send() { try { renderer.render("/simple.xhtml"); facesMessages.add("Email sent successfully"); } catch (Exception e) { facesMessages.add("Email sending failed: " + e.getMessage()); } } }ýũn ȳîv [ !&èésÃĭFñò278ĚzñòŖ´ŗ <D-Ūū´¬}èésƥɅ»òn b ĢÜ % [ ǵ&OáMģÝsrƱv2°Ŗ´ŗ OáMɕp´¬ę£ñò¬Ƒƒ BC NM&ź}ŻŠż¯2°Ŗ´ŗ jboss-seam-mail.jar [ ɍħ¯°ŷĆn <m:attachment value="/WEB-INF/lib/jboss-seam-mail.jar"/> OáMGH-â-º»K<¯2n [ !&OáMģݯŖ´ŗ O¶%n jboss-seam-mail.jar }°"Ò%ģÝñòŖ´ŗ Ɛ&Ò¯°ŷĆ fileName ƙĬǣǤ´¬ŦŨ%´ŗ <m:attachment value="/WEB-INF/lib/jboss-seam-mail.jar" fileName="this-is-so-cool.jar"/> java.io.Fileņ java.net.URL ģÝ´¬Œ}Ŕ%ÞŖ´ŗ <m:attachment value="#{numbers}"/> Ŗn byte[] µ¬° java.io.InputStream <m:attachment value="#{person.photo}" contentType="image/png"/> } java.io.InputStream ¯2ģÝ& ||^ NMƓd´¬Ųsµ¬&sľºûŖ´ ÆŒ&ȟȠOáM&wĥ}¯2ijľòv°1Çŗ byte[] ñ»ưĮvŒ}n £´¬Ļļ&N&Ŷ <m:attachment> ²³ ~b ĝƑƒ b l ģÝ´¬Œ}s%ÞŖ´ŗ %HF´¬ŦŨ% <m:attachment fileName="tiny.pdf"> <p:document> A very tiny PDF </p:document> </m:attachment> ģݯ°OáMw¿sɻ˵µ¬ŷĆ <ui:repeat> "ŦŨ%ģÝ%ÞŖ´ŗ Æèn N¹-º»K<¯ɬw¿Çn <ui:repeat value="#{people}" var="person"> <m:attachment value="#{person.photo}" contentType="image/jpeg" fileName="#{person.firstname}_#{per </ui:repeat> ©C© ) ^[ # e à _ Y[à m J [6 <m:attachment value="#{person.photo}" contentType="image/jpeg" fileName="#{person.firstname}_#{person.lastname}.jpg" status="personPhoto" disposition="inline" /> <img src="cid:#{personPhoto.contentId}" /> Ő à ` _J _m cid:#{...} ][[ņ m ^*b Y e m `à YJ m m e à Jņ m m _[[ ` [ö _m àJ [ m J Æm Content-IDė mÇ ő J Ņ Ő [ m m `e àJ m `B b1 zºÄ ģøĤ¾ ɭĵ%n ź}ŻŠ&Â78 *| ż¯2°¬vºn ż¯2°v°78Ŕ°Ŗ´ŗ Œ&1n &ÿ@Ĥü}v¬D,Ã-ǣǤ´¬Œ}s%ÞŖ´ŗ *| [ <m:body> <f:facet name="alternative">Sorry, your email reader can't show our fancy email, please go to http://labs.jboss.com/jbossseam to explore Seam.</f:facet> </m:body> b2 Ó.ĥĦħ [ Ô&ɍħĨɍħ´¬Ųsµ¬Œ}ŔǙvţµûŖĿŻ Æ78vŠ ŗ ĦħĨÂN´ƚ2 <ui:repeat> qTǞ´¬Œ}s%ÞŖ´ŗ <ui:repeat value="#{allUsers} var="user"> <m:to name="#{user.firstname} #{user.lastname}" address="#{user.emailAddress}" /> </ui:repeat> bS Ó.¿JI Ŧ¯n ͮͯɂv¬qr&ÂFEŚĦħmñɍħ´¬Ųsµ¬ŷĆŔµûŖ´ Æâ-ð<&EFvŠÇŗ šǃvēĔ}¯2n ÂFEŹȔ <ui:repeat> qTǞ´¬Œ}%´ŗ <ui:repeat value="#{people}" var="p"> <m:message> <m:from name="#{person.firstname} #{person.lastname}">#{person.address}</m:from> <m:to name="#{p.firstname}">#{p.address}</m:to> ... </m:message> </ui:repeat> b[ 3%&H .k° Â&,Dp³è%n ©C© e [ ,D )) ^[ ÂN%Ţ¯ţ/p´¬Œ}z¯2°Ŗ´ŗ B`J & template.xhtml ŧsġŖò2°Ŗ´ŗ <m:message> <m:from name="Seam" address="[email protected]" /> <m:to name="#{person.firstname} #{person.lastname}">#{person.address}</m:to> <m:subject>#{subject}</m:subject> <m:body> <html> <body> <ui:insert name="body">This is the default body, specified by the template.</ui:insert> </body> </html> </m:body> </m:message> B`J & templating.xhtml ŧsġŖò2°Ŗ´ŗ <ui:param name="subject" value="Templating with Seam Mail"/> <ui:define name="body"> <p>This example demonstrates that you can easily use <i>facelets templating</i> in email!</p> </ui:define> Ő [ e [ J à [ņ ` à Y[ m B WEB-INF/lib f e J m .taglib.xml e web.xml ė [`[ _m J |[ Æe à à [ à m[à |[ ė mC m e[[ b C[ Zņ ė ö_ ` web.xml eJ YÇ e à eJ b [ b _m J [ņ àė[[ C m I Y m eJ YJ [[à f [à e C Ņ b^ ėĘâ ĘęäÂFE&ɍħż¯2°Ŗ´ŗ O¶%n b %ƿǀñò¬?;@s£ñòŖ´sn ,D%$ɆÞ´¬Œ}s%ÞŖ´ŗ <m:message charset="UTF-8"> ... </m:message> ÿ@n ÜÒn !¯2ĦħĨÒ}ɍħĨÒ;<äñòŖ´ŗ ,D&?;@cd¯2 e [ sŢ¯°ĠEF>£´¬«"Ťť´¬ŲsµûŖ´ŗ <?xml version="1.0" encoding="UTF-8"?> bb ).Ĩ.ĩJĒ !&ĩ&ĪFĕ [ ǣǤ¯°Œ}sµûŖ´ŗ sż¯2°¬Ŕ&s°ţÖºµûŖ´ Æ g\ņ ůNŰ ȺȻÇŗ }ýũn [ &ƢƂcd´¬Œ}s%ÞŖ´ŗ <m:message xmlns:m="http://jboss.com/products/seam/mail" ©C© )+ ^[ importance="low" requestReadReceipt="true"/> Œòśén <m:header> N2ÂFEµ»Ƈ¬ĪFĕǣǤ´¬Œ}s%ÞŖ´ŗ <m:header name="X-Sent-From" value="JBoss Seam"/> b1 'ĥĦ±© e à J ^ m à | Æ|J C Ç C [ YC ¢# Y ő mail-ra.rar ő ` m C ` _m # m ` e [ Æ ė `[ CÇ me _ J m mail-ra.rar ` _m Æė m mail à m `[Ç mail-ra.rar m[ ` Y[ $JBOSS_HOME/server/default/deploy̽ e m C e # à [à m m e[ņ Y[ ŧ&«"cd´¬Œ}s%ÞŖ´ŗ @MessageDriven(activationConfig={ @ActivationConfigProperty(propertyName="mailServer", propertyValue="localhost"), @ActivationConfigProperty(propertyName="mailFolder", propertyValue="INBOX"), @ActivationConfigProperty(propertyName="storeProtocol", propertyValue="pop3"), @ActivationConfigProperty(propertyName="userName", propertyValue="seam"), @ActivationConfigProperty(propertyName="password", propertyValue="seam") }) @ResourceAdapter("mail-ra.rar") @Name("mailListener") public class MailListenerMDB implements MailListener { @In(create=true) private OrderProcessor orderProcessor; public void onMessage(Message message) { // Process the message orderProcessor.process(message.getSubject()); } } Ħħ´¬ŚÂFE«ûn onMessage(Message message) s;ñò¬Œ}vûŖ´ŗ ź}ŻŠ& ï,45 | q%/p¯Ŗ´sn ij;,Ã-GE-¯v°%ţŦñ°ŗ Ő e e Y6½½_öB`J½_ö½]öBYćYJ̾`C|[ mail-ra.rar mf e à ė J # à [[ mail-ra.rar à à e à YY[ f C [ [ Y b2 `a 345 ^[ RġŖĿ¬n ]^fùb½[` @DGq jbossseam-mail.jar ġŖĿŖ´ŗ # £¯2°¬ŷĆn & [ R£´¬&ĞƐvcdŲµûŖĿŻŗ Œòśén C|[ #~ sµ¬ºn ©C© )Q ^[ C|[ #~ s'Ɗñò2°¬º Æ # %£ñò¬ #~ } Y[ lib/mail.jar }¯2 }ƹTħñò¬Çn C # C b_ö &;Čsµ¬º Ælib/activation.jar }¯2 }ƹTħñò¬Ç Ťť´¬ŲsµûŖ´ŗ ^[ Ål,GïK}¯2 b [ £´¬ŲsµûŖ´ŗ HMH&ɭŶ&5% ~ &£Ŕż´¬tuĬsµûŖ´ŗ Ŗn f âF3&£ŔŲ}vûŖ´ŗ mailSession b2 ;RS C|[ 2Đ'ę&đ |*~ }˄ħ¯Ŗ´ŗ mailSession ^^ ʼnŇ%pŘ¯2°¬n Ŗ cd& £%Þ¬ŷĆn C|[ s ù FGFº»£%Þ¬tuĬsµûŖ´ŗ [ ;RS&Kâ,@Ö°2&Ȩã ůÂŋŌ&;RSŰ %ɾǂñò2°Ŗ´ŗ +ohņ b2 + . õ} #JK"J& # deploy/mail-service.xml ù M<´¬ C|[ EF45cd¯Ŗ´ŗ O¶&l-cd£¯2°¬SFðGż2ÈĸsŲ}vûŖ´ŗ l-Ö°2&Ȩã mY6½½_öB`J½_ö½]öBYćYJ̾C|[ %ɾǂñò2°Ŗ´ŗ <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:mail="http://jboss.com/products/seam/mail"> <mail:mail-session session-jndi-name="java:/Mail"/> </components> ŒŒ% ù œ<´¬ÂEF45IJǁ´¬«"Ɠz¯Ŗ´ŗ º» java:/Mail b21 `a.I;<% ÂEF45 components.xml º»cd´¬Œ}s%ÞŖ´ŗ }¯2 smtp.example.com £´¬«"Ɠz¯Ŗ´ŗ ŒŒ% Y <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:mail="http://jboss.com/products/seam/mail"> <mail:mail-session host="smtp.example.com"/> </components> bS zē ė [ ZY[ |[_ Æe `J ŬmY6½½`JŭÇ [ C |[_ JY_ Y öJ m YC SMTPņ POP3ņ IMAPņ _`[ņ m [ ©C© )\ ^[ JYm [ [̽ ė _ ^^ YY[ ` Y[à # [J à YY[ *m C e |[_ ` _m Æ m mail/buni-meldware e[Ç Yf [[à [ e C[Y f [`Zņ [ Æ[ Ç f Cà m YY[ Y[à e à _ |[_ Y à m[ [[ m [ [ e `J ŬmY6½½`Jŭ * [`Zņ [ņ à m meldware Y6 <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:mail="http://jboss.com/products/seam/mail"> <mail:mail-session host="smtp.example.com"/> <mail:meldware> <mail:users> <value>#{duke}</value> <value>#{root}</value> </mail:users> </mail:meldware> <mail:meldware-user name="duke" username="duke" password="duke"> <mail:aliases> <value>[email protected]</value> <value>[email protected]</value> </mail:aliases> <mail:meldware-user name="root" username="root" password="root" administrator="true" /> </components> _ėC _ ņ dukeņ _m m _ [ _m m root b[ P ^[ http://jboss.com/products/seam/mail Ò--q%N2²³ñòŖ´ŗ <ÃÂļÂFE& message Nsµ¬Ŵ%´ŗ ÂFEN «¬ [ ²³&ƒU(°Ŗ´ŗ *m Y[J J e e [ ` [ m `à à à b J̽ e Ė Z[ Æà[mņ BC YÇ m ` m urlBase õ6J÷ ÂÂFE&N ş importance ő [_ ǼÇn [ ÆŀÇn mJm ÆƁÇ &°ŴòºvûŖ´ŗ O¶% [ ÆŀÇ vûn ŒòsÂÂFE&ƢƂcd¯Ŗ´ŗ ş precedence ş requestReadReceipt ő ÂFE&ÉÊƂcd¯Ŗ´ Æèn `[öÇŗ ő O¶% e[ %´ŗ cdñò¬}n ĦħĻǘ&G?-sǣǤñò2 From: &<D-ĦħĻǘsɍħñòŖ´ŗ ©C© )a ^[ ş ő cdñò¬}n !&Ɯs requestContextPath &ÊɉǣǤñò [ q% <h:graphicImage> vŠ&;RS£%Þ¬«"vûŖ´ŗ urlBase õ6e÷ [ & b6 <D-cd¯Ŗ´ŗ Ö&Ø£%ÞŖ´ŗ ş name ş address [ ¯2ŧ&"nj°Ŵòº ¯2ŧ&"nj°Ŵòº ő [ &ɍħ˵&Ò%´ŗ ő [ &ɍħ˵& [ <D-%´ŗ õ6Y[à*÷ [ & IY[àf6 Ö&Ø£%ÞŖ´ŗ ş address <D-cd¯Ŗ´ŗ [ ő [ &ɍħ˵& [ <D-%´ŗ õ6÷ [ ĦħĨǣǤ¯Ŗ´ŗ ĦħĨsÔ&ŷĆÔ& õ6÷ Œ&N õ6Y÷ vŠ&Njûĺ¯NqTǞ¯2ŔɦŹ%´ŗ ş name ş address N£¯Ŗ´ŗ ő ĦħĨ&Ò%´ŗ ő ĦħĨ& [ <D-%´ŗ õ6 ÷ [ ¢¢ &ĦħĨǣǤ¯Ŗ´ŗ ¢¢ sÔ&ŷĆÔ& õ6 ÷ N£¯Ŗ´ŗ Œ&N õ6Y÷ vŠ&Njûĺ¯NqTǞ¯2ŔɦŹ%´ŗ ş name ő ĦħĨ&Ò%´ŗ ş address ő ĦħĨ& [ <D-%´ŗ õ6` ÷ [ ¢¢ &ĦħĨǣǤ¯Ŗ´ŗ ¢¢ sÔ&ŷĆÔ& õ6` ÷ N£¯Ŗ´ŗ Œ&N õ6Y÷ vŠ&Njûĺ¯NqTǞ¯2ŔɦŹ%´ŗ ş name ő ĦħĨ&Ò%´ŗ ş address ő ĦħĨ& [ <D-%´ŗ õ6m÷ [ ĪFĕǣǤ¯Ŗ´ Æèn X-Sent-From: JBoss SeamÇŗ ş name ş value ő ǣǤ´¬ĪFĕÒ%´ Æèn X-Sent-FromÇŗ ő ǣǤ´¬ĪFĕƜ%´ Æèn JBoss SeamÇŗ õ6 m÷ ©C© )g ^[ [ ģÝǣǤ¯Ŗ´ŗ ş value ő ģÝ´¬OáM%´ŗ ş String ő String GH-â-q&OáMǵ&â-}¯2>ͻñòŖ´ŗ ş java.io.File ő ^ ¿s File ĊPGȺȻ%ÞŖ´ŗ ş java.net.URL ő ^ ¿s URL ĊPGȺȻ%ÞŖ´ŗ ş java.io.InputStream ş byte[] ő ^ ¿s InputStream ȺȻ%ÞŖ´ŗ Œ&ŷĆn fileName } contentType &ƝēsƓdñòvŨòũvûŖĿŻŗ ő ^ ¿s byte[] ȺȻ%ÞŖ´ŗ Œ&ŷĆn fileName } contentType &ƝēsƓdñòvŨòũvûŖĿŻŗ ƜƙĬsȇȈñò¬ŷĆn ş Œ&Ns <p:document> VWñò¬<ÃÂs²³ñò2 [ sƓdñòvŨòũvûŖĿŻŗ ş Œ&Ns!&ĩ& b <ÃÂs!Œº»²³ñò2 sƓdñò2°vŨòũvûŖĿŻŗ ş fileName ş contentType NġŻ%°¬v»n ģÝñòŖ´ŗ fileName NġŻ%°¬}n [ ģÝñòŖ´ŗ *| fileName ő ģÝ´¬OáM£´¬OáMÒƓd¯Ŗ´ŗ ő ģÝñò¬OáM& ||^ NMƓd¯Ŗ´ŗ õ6`B ÷ [ &ÜÒcd¯Ŗ´ŗ õ6`à÷ [ &ÿ@cd¯Ŗ´ŗ *| [ ż¯2°v°ĦŨIJûˬƿǀ´¬Ĥü,Ã-ġĢ OáEFR¯2°Ŗ´ŗ ş s²³ñò¬ŷĆ m[ alternative ő plain cd´¬}D,Ã-& [ s²³ñòŖ´ŗ Œòśé *| [ s²³ñòŖ´ŗ type ©C© )h c ĪÌĄīw¿JI% %n]`G?-¯2īÍĈÐ=("Œ}sīļžſ%ÞŖ´ŗ C ^^%&īÍĈĬ}°ýũnƾţ&ʥ|ȶ°ºƚ¬%¯Ƌ"ŗ ŒòŤº%Œ&ƺƻK´¬ˠ}Ö&ēĔ%´ŗ!¯2˥˦%ǂŤvl- ˽&Üsµ¬v»ũnŒòǃúvēĔ%´ŗ %n;RS2žſ|ÂFEɍĦħ%ÞŖ´ŗ ¯º¯ƾţ&7-3-%|˼΄%´ŗ 4vīÍĈÂÚF<}M¹ķŋ@-âFĭ&ǚǛż2DMˣä¯Ŗ´ ŗ ş java.util.concurrent.ScheduledThreadPoolExecutor ş m ^ C Æe ^ +o ʼnŇ Ç ş Ēč Æ O¶ Ç c ĪÌĄī #à m C m [[ mC m Ė[à e C ZY m [àJ Y m m *m e[ Y mņ ` Y ScheduledThreadPoolExecutor Ye ee [à ` YC YY e Y à m öņ m J m ö _[[ C [[à ` Z e àė _öf J C m YY ^ +oņ m e[[_J [ components.xml6 <async:timer-service-dispatcher/> m à à m ö _[[ ` Y `à m ė ^ C e àė e[ _m m * C ņ ė _àņ à ė _m [à e à _ à m m *m Y mJ ö_ m à J ^ +o Y[ _[[ mC m Y e J Y ņ _m m JC J m m ö _[[ C[[à ` Y #m [C m Y Ēč [`à J à m mf Ő `[ m Ēč [`à #I Æe m lib àÇ à ^#I [ C [ application.xml ņ à m e[f [_J [ components.xml [[ m Ēč Y m <async:quartz-dispatcher/> *m #~ e m e[ ScheduledThreadPoolExecutorņ m ^+ Timerņ m Ēč Scheduler [J[à m *mà B Y[J Y[à `à J [ components.xml c ĪÌĄ¿ÙJC šŔſȩvºnj%nīÍĈƭìƗ¯nÂÚF<ƭìƗ¯ƭìƗ¯ˬ¯2īÍĈ ©C© )k īÍĈĬ}ÂFE Æɂv¬-DF<%Ç Ð=ñĿ¬ŦŨ%´ŗ ΅ǔĻļnGHMʽʾD-R-ĺ¯nƢ°ƞɁFGHœ<%Ð=ñĿ °ŷĆnīÍĈƭìƗ¯°Ŗ´ŗ Œ&âNnGHMsÐ=§¨ǵ¼/R%Þ¬«"vn##å £´¬345%}2Ŕî¨%´ŗ ^;RS%nKLMNOP-ï,¯2ÂÚF<sīÍĈÐ=ñò ¬«"Ɠd¯Ŗ´ŗ @Local public interface PaymentHandler { @Asynchronous public void processPayment(Payment payment); } ÆC ˂Ģv»;RS&'ƊGH-ï,´¬Œ}s%ÞŖ´Ç ;RS%n īÍĈĬ&£`GH-̹˼%´ŗ @Stateless @Name("paymentHandler") public class PaymentHandlerBean implements PaymentHandler { public void processPayment(Payment payment) { //do some work! } } # [ Y m [6 @Stateful @Name("paymentAction") public class CreatePaymentAction { @In(create=true) PaymentHandler paymentHandler; @In Bill bill; public String pay() { paymentHandler.processPayment( new Payment(bill) ); return "success"; } } īÍĈÂÚF<ŸŹ®±&M¹;,Ã-%Ð=ñòn ƭìƗ¯ˬ&EF45Ŗ;,Ã-&ƪƫGE-%ÞŖĿŻŗ ¯º¯lS-KE-;,Ã-ʋʌñòŖ´ŗ īÍĈÂÚF<ƭìƗ¯@Durationn@Expirationn Ŷ&'(&1-3%ÞŖ´ŗ @IntervalDurationï,452n @Local public interface PaymentHandler { @Asynchronous public void processScheduledPayment(Payment payment, @Expiration Date date); @Asynchronous ©C© ))o īÍĈĬ}ÂFE public void processRecurringPayment(Payment payment, @Expiration Date date, @IntervalDuration Long interval)' } @Stateful @Name("paymentAction") public class CreatePaymentAction { @In(create=true) PaymentHandler paymentHandler; @In Bill bill; public String schedulePayment() { paymentHandler.processScheduledPayment( new Payment(bill), bill.getDueDate() ); return "success"; } public String scheduleRecurringPayment() { paymentHandler.processRecurringPayment( new Payment(bill), bill.getDueDate(), ONE_MONTH ); return "success"; } } m [ C à m Timer `B _m m C *m Timer `B m_ `[_ m ^+ _m à m ^+ Y m b m f e[ ScheduledThreadPoolExecutorņ m `B Future e m ʭ b m Ēč Y mņ QuartzTriggerHandleņ _m m _ _[[ m Z f @Local public interface PaymentHandler { @Asynchronous public Timer processScheduledPayment(Payment payment, @Expiration Date date); } @Stateless @Name("paymentHandler") public class PaymentHandlerBean implements PaymentHandler { @In Timer timer; public Timer processScheduledPayment(Payment payment, @Expiration Date date) { //do some work! return timer; //note that return value is completely ignored } } @Stateful @Name("paymentAction") public class CreatePaymentAction { @In(create=true) PaymentHandler paymentHandler; @In Bill bill; public String schedulePayment() { Timer timer = paymentHandler.processScheduledPayment( new Payment(bill), bill.getDueDate() ); ©C© )) īÍĈĬ}ÂFE return "success"; } } #à m m à m C[ m [[ c1 +ĉ ē ďĊ } *m Ēč Y m Æ [ m_ [[ Ç [[_ à m @Asynchronousņ @Durationņ @Expirationņ @IntervalDuration `C m Y_e[ [ e *m Ēč Y m YY m _ f *m @FinalExpiration Y e e m J ö // Defines the method in the "processor" component @Asynchronous public QuartzTriggerHandle schedulePayment(@Expiration Date when, @IntervalDuration Long interval, @FinalExpiration Date endDate, Payment payment) { // do the repeating or long running task until endDate } ... ... // Schedule the task in the business logic processing code // Starts now, repeats every hour, and ends on May 10th, 2010 Calendar cal = Calendar.getInstance (); cal.set (2010, Calendar.MAY, 10); processor.schedulePayment(new Date(), 60*60*1000, cal.getTime(), payment); ù m m m m QuartzTriggerHandle `B ņ _m m à [ Yņ Yņ m m[ *m QuartzTriggerHandle `B [č`[ņ à C m ` e à öY e Z Y e QuartzTriggerHandle handle = processor.schedulePayment(payment.getPaymentDate(), payment.getPaymentCron(), payment); payment.setQuartzTriggerHandle( handle ); // Save payment to DB // later ... // Retrieve payment from DB // Cancel the remaining scheduled tasks payment.getQuartzTriggerHandle().cancel(); *m @IntervalCron YY AZ B` àZ e ö m[J b f ņ m e[[_J à m m )6oY )6QQY Cà ]à m m e | m // Define the method @Asynchronous public QuartzTriggerHandle schedulePayment(@Expiration Date when, ©C© ))) īÍĈĬ}ÂFE @IntervalCron String cron, Payment payment) { // do the repeating or long running task } ... ... // Schedule the task in the business logic processing code QuartzTriggerHandle handle = processor.schedulePayment(new Date(), "0 10,44 14 ? 3 WED", payment); *m @IntervalBusinessDay YY C m m à f b ņ m e[[_J à m m Q6oo m ) ` à e m m à e[ņ Z [ [[ _ö A e[ m[à [ )oo e m ` à // Define the method @Asynchronous public QuartzTriggerHandle schedulePayment(@Expiration Date when, @IntervalBusinessDay NthBusinessDay nth, Payment payment) { // do the repeating or long running task } ... ... // Schedule the task in the business logic processing code QuartzTriggerHandle handle = processor.schedulePayment(new Date(), new NthBusinessDay(2, "14:00", WEEKLY), payment); *m NthBusinessDay `B m eJ e m C JJ Ő Y eà m[à ÆJņ Yà m[àņ fA m[à Ç C m additionalHolidays YYà public class NthBusinessDay implements Serializable { int n; String fireAtTime; List <Date> additionalHolidays; BusinessDayIntervalType interval; boolean excludeWeekends; boolean excludeUsFederalHolidays; public enum BusinessDayIntervalType { WEEKLY, MONTHLY, YEARLY } public NthBusinessDay () { n = 1; fireAtTime = "12:00"; additionalHolidays = new ArrayList <Date> (); interval = BusinessDayIntervalType.WEEKLY; excludeWeekends = true; excludeUsFederalHolidays = true; } ... ... } *m @IntervalDurationņ @IntervalCronņ @IntervalNthBusinessDay [[à Z [C e mà m mņ RuntimeException _[[ ` m_ ©C© ))+ īÍĈĬ}ÂFE c2 +ĉ Æ ¢YfC C à [ ` à m * C e à m Yf Jņ Y[à [[ m raiseAsynchronousEvent() m e m Events [ * m[ Cņ [[ m raiseTimedEvent() mņ YJ m[ `B Æe m f e[ Y m C Y mņ TimerScheduleÇ ¢Y à `C à m C m [ _àņ ` ` m [à m ` Y Z YYJ m à m m c1 z ö à C | J e Y c1 * eJ ė e e J | Jņ à [[ ` à Y Ė à _ J ņ [ [[ _m e m QueueConnectionFactory ½ TopicConnectionFactory e[ J UIL2ConnectionFactory _m m m [ e à e _m |Ē e à J m | YCņ à `m e queueConnection.queueConnectionFactoryJndiName topicConnection.topicConnectionFactoryJndiName seam.propertiesņ web.xml components.xml Ő [ [ Y Ė components.xml [[ J TopicPublisher QueueSender6 <jms:managed-topic-publisher name="stockTickerPublisher" auto-create="true" topic-jndi-name="topic/stockTickerTopic"/> <jms:managed-queue-sender name="paymentQueueSender" auto-create="true" queue-jndi-name="queue/paymentQueue"/> c11 ù_ņ à B | TopicPublisher TopicSession à Y6 @In private TopicPublisher stockTickerPublisher; @In private TopicSession topicSession; public void publish(StockPrice price) { try { stockTickerPublisher.publish( topicSession.createObjectMessage(price) ); } catch (Exception ex) { throw new RuntimeException(ex); } } ©C© ))Q īÍĈĬ}ÂFE ņ e _öJ _m Ė6 @In private QueueSender paymentQueueSender; @In private QueueSession queueSession; public void publish(Payment payment) { try { paymentQueueSender.send( queueSession.createObjectMessage(payment) ); } catch (Exception ex) { throw new RuntimeException(ex); } } c12 jÆ |Æ Ő Y J J à ^+ J C ` |JfC ` à C ` Yņ _m m Y`[ B m C YY[ f Y Y c1S jÆ IJ [ à ` ` | Y e [f C Y *m f ` ¢mY )ņ IJ ©C© ))\ f ÀĬJ; ź}ŻŠ&ŷĆn ΆŘ345ëŨ¬ƠvÿSFGN¹-%´ŗ !¯2n N¹-'(ʼnŇ&ŀ%Ŕ}Ŕ-3H¯ţ°ĥÁ%´ŗ ~~ ĝ I`à &ʥǔn °ľƇ¬ m mJ Ã,Gĭ´òũȁȂsµ¬}Ə"%¯Ƌ"ŗ Ťº!òɁ'ºŔ¯òŖĿŻsn GH-N޳&Ôï<ç%ǬŔÚ-ƹí¯v°%cȸ%Þ¬345vŠn µŖûƃŒ}sµûŖĿŻŗ ·ºvΈ»s Ǫý2°¬&ĐN¹-śéđ m mJ }°"Ã,Gĭ%¯Ƌ"ŗ ¤78£345ȁȂ¯ţţ¯2°¬&n ŔnjȅŻN¹-ƹí%´ŗ ¯s2nŒ&Ã,GĭƁ°ȁȂĬsµ¬}ƠȂ´¬&ȳ=sµûŖ´sn Έ»ǔ&345ţñŻ&Îçĉ°2°Ŗ´ŗ N¹-&ƹív¬ƚţǙvţ%Þ¬ēĔsµòũn´ƚ2'(´¬ȣƜsµûŖ´ŗ !Œ%ÃĭF4&9ŷ%´ŗ¯ºŔΉȑˏ%µûŖĿŻŗ 345Ţ¯ţcȸ´òũnǬDžŔľ¬̴ͱvÃĭF4ΊȈ3 45&´ƚ2&Dž%Į£´¬Œ}s%Þ¬&%´ŗ ş N¹- Ǐvs»ǯ¼&ÃĭF4Õ2°Ŗ´ŗ Œ&Œ}ǕÈƢ%´sn345&ÃĭF4&«"vȁȂĬµûŖĿŻŗ ş I|Ú45 Æ`ĝ!&ĩ&~#'ƊvŠÇ N¹-º»NͤŧÃĭF4ǞÞŖ´ŗ Œò}2ŔLjūvķuv&%´snçDZľòēñòsnj%´ŗ H8G45&ÃĭF4NGH-NʼnŇ&Źï<%wɖĬÕĿnN¹ -}ŔÍĈñĿ¬}nīļƢ°Ð=vûŖ´ŗ Ô78%ƹíñònĸ®sŖòvNƷ°ºŔǘòŖĿŻŗ wʕv-,D-vÃ,Gĭ%nͤŧÃĭF4ƪƫÃĭF4¯«"} ¯Ŗ´snŒòƷ°Œ}%µûŖĿŻŗ Ğ&ŷĆnɴû%´ŗ ş &;,Ã-nƪƫ&ÃĭF4%´ŗ ;,Ã-ƀ¸¯;RSn78&MNHG45ŋŌ¯ƪƫà ĭF4¯nƀÕ¯Ŗ´ŗ ş Ğns=´¬ij;,Ã- Ƶ¬°-;&-,OEF45lŋŌÝŨ»ò^;,ê=&ȁ Ȃij;,Ã-Ç n ǹǰ&ıØÙŖòN&ÃĭF4}¯2ɸɹ°Ŗ´ŗ Œ&ÃĭF4&ΌFɓĻļ}2ŔƁţvûŖ´̛ GH-NʼnŇ%ns=´¬ij;,Ã-«2D345sšǃä ñònN¹-&H8G45&wɖĬȾ´¬ŲµûŖĿŻ Æ̲ˋKFG%Á%´Ç ŗ ˠ}Ö&ij;,Ã-ǬΎŔ&ĊPGıØÙŖv°ȃûnŒ&ÃĭF4&îɓ Ö°2µŖûȾ´¬ŲµûŖĿŻŗ ş H8G45ŋŌ¯v°ƪƫ&345;,Ã-ÃĭF4´¬ Œ}Ŕ%ÞŖ´ŗ 345;,Ã-ƀÕñòƪƫnGH-Nq&ĩ&ï<ŔnjȅŻƃ ýŖĿŻŗ ©C© ))a ÃĭF4 ş ;RSÃĭF4% H8G45&ƪƫn¢ m&pojoCacheÞŖ´ŗ ¢ mGH-N%£¯2°òũnŒ&ƪƫĩ&ï<ŔƃýŖ´ŗ ş šŶnDĕñòb&įİÃĭF4´¬Œ}s%ÞŖ´ŗ I|Ú45&ͤŧÃĭF4}DZ°nNsÈĸñò2Ŕ¼/ȳîv¬Œ} v°&%n ǂzȳîä´¬345;<ɆţºnǃúvíîĈȃR4cd´¬Ų sµûŖ´ŗ ͤŧÃĭF4īļ̚ØŪʝ%´&%nȨãÖ°2ë°&I|Ú45&Ġ ɆȺȻ¯2ţŦñ°ŗ «¬įİ&ÃĭF4vŠn¢ Œ&ɽ%nYB¢ m;RSĝn<s:cache>mƣƤĮ£´¬ēĔÖ°2ɾǂ¯Ŗ´ŗ f - 'ĭ¡±© lM& pojoCache ;RS org.jboss.cache.aop.PojoCache &M-N-=¯Ŗ´ŗ ƄÈ& C ĊPG%µòũɦŹÃĭF4ǞţŒ}s%Þn ĊPGGH-Nq%D345ñòŖ´ ÆD345síîvŷĆÇŗ Èĸ&tuĬsµ¬ĊPGÃĭF4Õnj°ŷĆn ¢ m &M;<KEF'(¯n ĊPG&Èĸs¼/¥ǘñòn D345ñò¬«"´¬ŲsµûŖ´ŗ }°"Ú-ǃú v m&cdVW´ YB¢ m"nGH-â-JBossCache&BǞÞntreecache.xml¬ŦŨ%´ŗ ¢ m̃ȅ¯ţ̡˴%Ώ»ľ¯°cdsţñŻµ¬&%nŒŒ%ɾǂ¯ŖĿŻŗ Ȩ㢠m&ĠɆȺȻ¯2ţŦñ°ŗ Ő e Y[ treecache.xml examples/blog/resources/treecache.xml ^#IKM´¬ŷĆn¢ m&B}cdOáM^#IƣƤġ1¬Œ}ëȿ1 ¯Ŗ´ŗ application.xmlBVW´¬Œ}ʅòv°%ţŦñ°ŗ ŧ&«"n;RSÃĭF4MPG¯Ŗ´ŗ @Name("chatroom") public class Chatroom { @In PojoCache pojoCache; public void join(String username) { try { Set<String> userList = (Set<String>) pojoCache.get("chatroom", "userList"); if (userList==null) { userList = new HashSet<String>(); pojoCache.put("chatroom", "userList", userList); } userList.put(username); } catch (CacheException ce) ©C© ))g ÃĭF4 { throw new RuntimeException(ce); } } } ¢ mÔcd´¬ŷĆncomponents.xml£¯2ţŦñ°ŗ <core:pojo-cache name="myCache" cfg-resource-name="myown/cache.xml"/> f1 ~Įį.ÀĬJ; &¢ m &Į£%Ŕ}ŔȗȘș°&n bëŨ¬įİ&ÃĭF4ƺƻ>Ɣ´¬n <s:cache> N%´ŗ <s:cache> qĥ pojoCache "&%n £´¬ŷĆW&ɻË(2ţŦñ° Æ^#I B Ūò¬n ĝº°vcdúûɿŨ¬nvŠ&ɻË%´ŗÇ <s:cache>nµŖûÈĸñòv°DN;,ŏ£¯2ţŦñ°ŗ }ýũnš®&`[J?Ěz´¬`[J&œPL%´ŗ <s:cache key="recentEntries-#{blog.id}" region="welcomePageFragments"> <h:dataTable value="#{blog.recentEntries}" var="blogEntry"> <h:column> <h3>#{blogEntry.title}</h3> <div> <s:formattedText value="#{blogEntry.body}"/> </div> </h:column> </h:dataTable> </s:cache> Ɠd´¬Œ}«2n Śįİ&ÃĭF45ÔÕÖŒ}s%ÞŖ´ŗ Œ&è%n ˠ}Ö& `[J ¯2ˠ}Ö&ÃĭF45s¸ǰ¯Ŗ´ŗ region n ´ƚ2&5ƀ¸´¬ ¢ m &ï<Ɠd¯Ŗ´ŗ ɂv¬ï<ɂv¬íîĈȃR4ÕÖŷĆsµûŖ´ŗ ÆW&̡˴vcd%Ɠd%ÞŖ´ŗÇ key !¯2n <s:cache> &ǕÞvƺƻn ʎ&Ns°ÖÈĸñò¬º Æ}ýũn ®¯° `[J s°Öƥñò¬ºÇ ǘûǁv°}°"Œ}%´ŗ ÖŖûn ÃĭF4ñòįİn ǂzÃĭF4º»ΐƸ´¬ŲsµûŖ´ŗ public void post() { ... entityManager.persist(blogEntry); pojoCache.remove("welcomePageFragments", "recentEntries-" + blog.getId() ); } µ¬°nÈĸʽʾ78ƃĿ¬Ųsv°&%µòũn¢ mï<&íîĈȃ̷ ţcd¯2ŔƷ°%¯Ƌ"ŗ ©C© ))h 1i \ Æ J _m ] [[_ ^^ _` C ö e[[ CJ e ė Z[ e_öņ [J YY e C[ _` C *m mY _[ö mJm m Y Ė [[_ _` C _m f C 1i yĖ * [[_ Y _` C Ė m m à Z ` e m Ėņ Y [ #~ m[ ` eJ̽ org.jboss.seam.webservice.SOAPRequestHandler SOAPHandler Y[ m m _ö e JJ ė [e à [ J m Y e _` C Ė # Y [ eJ e[ņ standard-jaxws-endpoint-config.xml m[ ` Y[ m META-INF à e m jar e[ m m _` C [ *m e[ f m e[[_J #~ m[ eJ6 <jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd"> <endpoint-config> <config-name>Seam WebService Endpoint</config-name> <pre-handler-chains> <javaee:handler-chain> <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings> <javaee:handler> <javaee:handler-name>SOAP Request Handler</javaee:handler-name> <javaee:handler-class>org.jboss.seam.webservice.SOAPRequestHandler</javaee:handler-clas </javaee:handler> </javaee:handler-chain> </pre-handler-chains> </endpoint-config> </jaxws-config> 1i1 Æ \ Æ m_ C YYJ `_ _` C Ėć #~ m [ Y `m m #~ Ė Y J à m C e m m C ņ ` ö J ė ZY[ e _` C Ė m C 6 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:seam="http://seambay.example.seam.jboss.org/"> <soapenv:Header> <seam:conversationId xmlns:seam='http://www.jboss.org/seam/webservice'>2</seam:conversationId> </soapenv:Header> <soapenv:Body> <seam:confirmAuction/> </soapenv:Body> </soapenv:Envelope> ©C© ))k ]` C # à m `C #~ Jņ m conversationId [ _m m #~ m m m C e m Ėņ m 2 Aef [àņ ` _` C à ` `à Cà e _` C [ _ Cà e [JJņ Y m C[Y Y[ C YYJ `_ C[ _` C m ` _m m Y e J[ C # Y mJ m m conversationId m [ ` Ė[e _m Y e http://www.jboss.org/seam/webserviceņ m_ _[[ ` `[ m C e m Ė ė ZY[ e Y m `C Ė J6 <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header> <seam:conversationId xmlns:seam='http://www.jboss.org/seam/webservice'>2</seam:conversationId> </env:Header> <env:Body> <confirmAuctionResponse xmlns="http://seambay.example.seam.jboss.org/"/> </env:Body> </env:Envelope> # à ņ m Y J m conversationId [ m f Ė 1i1 + j ĉ # _` C ` Y[ m [ ` ~ņ f m e C[ _` C ņ m _` C e C[ Y e m _` C _ [ `ņ m [ Y`[ ö Y `à JCJ @Name J m [[_ ė `B Æ mÇ e ` m _` C [ [e ©C© )+o ]` C 1i2 + Ä ē Æ ė _[ö mJm ZY[ _` C *m m [[ e m à ZY[ YY[ ė /examples àņ e[[_ m Jà ` m YC ė e ö [ö m _` C [ e _` C m6 @Stateless @WebService(name = "AuctionService", serviceName = "AuctionService") public class AuctionService implements AuctionServiceRemote { @WebMethod public boolean login(String username, String password) { Identity.instance().setUsername(username); Identity.instance().setPassword(password); Identity.instance().login(); return Identity.instance().isLoggedIn(); } // snip } # à ņ _` C [ `ņ J m ] e m javax.jws Y öJņ e `à Ifh *m @WebService f [[ m m m [ Y[ _` C ņ m @WebMethod f m login() m e m m _` C m *m name serviceName ` m @WebService Y[ # Ė `à m Y e ņ m m m ` ZY _` C m [ ` [ m e e m _` C [ Æ_m m _` C [ `Ç m `C ZY[ņ m AuctionServiceRemote e [ m login() m @WebMethod # à m `C ņ m _` C Y[ login() m m [Jf ė `[f Identity Y öYJ _m Jàņ m _` C _ Y[ e ņ YJ ee m [ _ö Y *m [[_ e m J e ` [J `_ _` C m [f ė [ö m ZY[ *m _` C m `J _ C `à [f JJ m AuctionAction.createAuction() m6 @WebMethod public void createAuction(String title, String description, int categoryId) { AuctionAction action = (AuctionAction) Component.getInstance(AuctionAction.class, true); action.createAuction(); action.setDetails(title, description, categoryId); } # mė m e AuctionAction6 @Begin public void createAuction() { auction = new Auction(); ©C© )+ ]` C auction.setAccount(authenticatedAccount); auction.setStatus(Auction.STATUS_UNLISTED); durationDays = DEFAULT_AUCTION_DURATION; } b m _ m_ _` C Y Y [J J Cņ `à J e [JJ m [ _ö C[ Y ©C© )+) 1 j n ]` º» ##å Æ#à m C Y å| Ç £¯2;RSÅGE-´¬ưĮvēĔƿǀ¯Ŗ´ŗ Œ&ķu'ǹ´¬ODðG%n ôǶÎΑūsºº»v°«"v2°Ŗ´ f ;RSŲvŔ&n ##å Ļ2GE-tu}´¬1&ſȩvï,45ŦŨ%´ŗ Œ&ɽ%n ##å tuv ]` p¬1Ųv-,FÖ°2Wƚn !¯2 IJ ODðG&ķuÖ°2ŔȨ¯ţɾǂ¯Ŗ´ŗ 1 `a IJ &ķu£´¬n ŖŴ DFcd´¬ŲsµûŖ´ŗ web.xml OáMq% I <servlet> <servlet-name>Seam Resource Servlet</servlet-name> <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Seam Resource Servlet</servlet-name> <url-pattern>/seam/resource/*</url-pattern> </servlet-mapping> ŧ&-,Fn ]` Ųv C Y MR´¬Œ}%´ŗ MR´ƚÞ-Gsš́̐ÖµûŖ´ŗ š0&wÖn IJ &ķuíî´¬GHMM<ODðG&Ź2&;<ġØŖ´ŗ <script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script> ̐ÖƉ&-Gn ƭìƗ¯°;RS´¬-N}¡dÓġØŖ´ŗ !ò;RS&KLMNOP-Ĝ¯2/²³ñòn MNOP-&ÅÂÚF<ƭìƗ´&£ñò¬Ź2&GH-´¬¡dÓq ̿¯2°Ŗ´ŗ -G&Ò;RS&ÒsDzΒñòŖ´ŗ èýũn @Name("customerAction") }°"ï,45ÝÞ&-,D-EF45 ÕÖv»n -GNśŜ&«"vûŖ´ŗ <script type="text/javascript" src="seam/resource/remoting/interface.js?customerAction"></script> ͺ»wÖś$&;RSGE-¯°ŷĆn -GN&âHÂN}¯2!ò»Ź2ġ1Ŗ´ŗ <script type="text/javascript" src="seam/resource/remoting/interface.js?customerAction&accountAction"></script> #[C[àņ à à m s:remote J Y m Ė C Y Y m Y [ à _m Y _m 6 <s:remote include="customerAction,accountAction"/> ©C© )++ IJ 11 ĆRK ;RS}&GHMM<&MNHG45n ´ƚ2 Seam C Y ĊPGǐȍ%(ľòŖ´ŗ Œ&ĊPG remote.js dÓñòn ;RS´¬īÍĈƭìƗ¯!ò£¯Ŗ´ŗ !òn) Ö&ķuˆÁñòŖ´ŗ ;RS}Ōɺ´¬ÂÚF<ġĢ Seam.Component !¯2nÅG?-'(´¬ÂÚF<ġĢ Seam.Remoting %´ŗ Œ&ĊPGΓĻ´¬wŽrƱvēĔn žſvº»ª1¬Œ}%´ŗ 11 \ $%&# ĊPGsŠ&«"/p´¬ºƃ¬1n žſvĻ2wΔΕØƗ¯2ØŖ¯Ƌ"ŗ ŖŴš0nhelloAction }ƭũò¬®¯° ;RSp³¯Ŗ¯Ƌ"ŗ Seam @Stateless @Name("helloAction") public class HelloAction implements HelloLocal { public String sayHello(String name) { return "Hello, " + name; } } ®¯°;RS&1nKLMNOP-Ŕ²³´¬ŲsµûŖ´ŗ ï,45ĞơƬ¯2ţŦñ°ŗ Ļ2&ÂÚF<ǵ&GE-tu}´¬1Ų%´ŗ @WebRemote IJ @Local public interface HelloLocal { @WebRemote public String sayHello(String name); } ɆţŲsµ¬M<&;<ŒòŦŨ%´ŗ !ò%n]^ &1 ®¯°p³¯2n m[[# ;RSMR¯Ŗ¯Ƌ"ŗ f <s:remote include="helloAction"/> ŸŹMNHG,@v78?G-?-}´¬1nÿNÝŨŖ¯Ƌ" ŗ <button onclick="javascript:sayHello()">Say Hello</button> GFGñò}Þn'ęÿNǬº(ľĿ¬1nŔ"Ǚ¯-GǣǤ´¬Ų sµûŖ´ŗ <script type="text/javascript"> //<![CDATA[ function sayHello() { var name = prompt("What is your name?"); Seam.Component.getInstance("helloAction").sayHello(name, sayHelloCallback); } function sayHelloCallback(result) { alert(result); ©C© )+Q IJ } // ]]> </script> pŘŸą%´Ņ 345KM¯2nHœƛ¯Ŗ¯Ƌ"ŗ ÿNGFG¯2nKsƗ»ÒŪū¯Ŗ¯Ƌ"ŗ ƭìƗ¯&³øŤť´¬1& m[[ ÂFEsnÂFEÿFG-ĚzñòŖ´ŗ Ǚ¯ÎçΖ¯°&%µòũn & /examples/remoting/helloworld @DGŒ& [[ ][ &´ƚ2&Ú-;<sµûŖ´ŗ }Œȅ%nŒ&-G&;<Ǭ´¬&%¯Ƌ"ºŗ Ŕ}ãºţÁ>¯2ØŖ¯Ƌ"ŗɻª1n) Ö&ÂÚF<'Ɗ¯ C Y ;<º»ƃ2°ÞŖ¯Ƌ"ŗ š0&ÂÚF<78¯2ÒŪū´¬«"ʳ¯nÅG?-("}°"˯˰ ÕnjŖ´ŗ śŜ&(º»ƃ2ØŖ¯Ƌ"ŗ Seam.Component.getInstance("helloAction").sayHello(name, sayHelloCallback); Œ&(&š0&ĥÁ Seam.Component.getInstance("helloAction") n helloAction ;RS&KÃ4nµ¬°-Nĺ¯Ŗ´ŗ Œ&-N¯2;RS&ÂÚF<ƭìƗ¯stu%´ŗ !ònŖñŒ&(&Ȥû&ĥÁ%Ƕ²¯Ŗ´6 sayHello(name, sayHelloCallback); ;<(ŹȔ%(2°¬Œ}n;RS&sayHelloÂÚF<&ƭìƗ¯}n âHÂN}¯2nameț´Œ}%´ŗ ) ŽƉ&âHÂNsayHelloCallbackn Œ&;RS& sayHelloÂÚF<&âHÂN%µûŖĿŻŗ !&Ĥľûn If J ODðGG?-ǵ&D-R-ĦŨ»n !ò sayHelloCallbackÂÚF<ț´ƚÞŒ}Ɠz¯Ŗ´ŗ Œ&;FGâHÂNŸŹĊ45%´ŗ ĺûƜ C &ÂÚF<ƭìƗ´ŷĆn µ¬°§¨Ⱦ¯v°ŷĆn Η͜vţ!&ŖŖ¯2ţŦñ°ŗ sayHelloCallbackÂÚF<snÅG?-´¬D-R-Ħħ¯ŷĆn ÂÚF<ƭìƗ¯&§¨Ěz´¬HÂFEsǹòŖ´ŗ 111 C Y ĊPGn ;RS}Ōɺ´¬ƾţ&GHMÂÚF<ƿǀ¯Ŗ´ŗ Ơv ) Ö&ÂÚF<nnewInstance()} getInstance()n śʶ&ɽŔVWñò2°Ŗ´sn Œò»&ƠvDZ°nnewInstance() n4 &MN- ĺ´Œ} n°ÖŔ;RSNM&®¯°M-N-²³¯n!¯2ngetInstance()%´ŗ Seam.Component ēÃÅ ©C© )+\ IJ ®¯°?,@,@nµ¬° C ;RSM-N-²³´¬1Œ&ÂÚF<£¯Ŗ´ŗ Œ&ÂÚF<«ûĺñò¬ĊPGn M<&ż´¬Ŕ&}Í J½ ÂÚF<ÕÖºn µ¬°nĤü}¯2në˂Øv»ũn!&O@<ƣƤGE-stu%´ŗ è}¯2nśŜ& ?,@,@;RSȦxţŦñ°ŗ @Name("customer") @Entity public class Customer implements Serializable { private Integer customerId; private String firstName; private String lastName; @Column public Integer getCustomerId() { return customerId; } public void setCustomerId(Integer customerId} { this.customerId = customerId; } @Column public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } @Column public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } } GHMM< ¢ ²³´¬1nśŜ&;<VW¯Ŗ´ŗ var customer = Seam.Component.newInstance("customer"); !¯2nŒŒº» ĊPG&O@<&cdstu%´ŗ customer.setFirstName("John"); // Or you can set the fields directly customer.lastName = "Smith"; ÃÅ getInstance()ÂÚF<n EF45 ;RS&n-Nǵ&ȺȻIJǁ´¬1£ñòŖ´ŗ !òn;RS¯2Å&ÂÚF<'(£tu%´ŗ Œ&ÂÚF<nĞd&;RS&4ĺ¯Ŗ´ŗ !&§¨njŨ2Í;RSÒ% ʗƭìƗ´}nÍ;RSM-N-sĺñòŖ´ŗ ) V&º»jŨ2n ©C© )+a IJ ;RS&saveCustomer()ÂÚF<!òț¯Ŗ´ŗ Seam.Component.getInstance("customerAction").saveCustomer(customer); õÃÅ !òs;RS&ŷĆn ĊPGŒ&ÂÚF<ț´};RSÒĺ¯Ŗ´ŗ Ŗn;RS%v°ŷĆn[[ ĺ¯Ŗ´ŗ if (Seam.Component.getComponentName(instance) == "customer") alert("Customer"); else if (Seam.Component.getComponentName(instance) == "staff") alert("Staff member"); 112 j IJ &ǕĥÁ&GHMM<&ķunSeam.RemotingĊPGġŖòŖ´ŗ ÂÚF<ƣƤƭʻŲź}ŻŠv°}°ýn Ə̥´¬ȣƜ&µ¬ƢvŔ&sµûŖ´ŗ jĉÃÅ 345s ;RS%v° C ġĢºnµ¬°n"ŷĆn âHÂN;RSÂÚF<ț´1nGHMM<%Œò»&NMp³ ´¬Ųsµ¬ºŔ¯òŖĿŻŗ ŲvNM&M-N-p³´¬1ncreateType()ÂÚF<£¯2ţŦñ°ŗ âHÂN}¯2nŸŹ˃˸& C GH-ț¯2ţŦñ°ŗ var widget = Seam.Remoting.createType("com.acme.widgets.MyWidget"); jĉõÃÅ Œ&ÂÚF<n;RS%v°¡£%µ¬Œ}Ɛ´òũn¢YJ¢Y ùÆÇ}ɰȣ%´ŗ ĊPGM-N-NM&Òĺ¯Ŗ´ŗ ŖnNMs·ǘ%v°ŷĆn[[ ĺ¯Ŗ´ŗ Œ&ÒnNM& C GH-ŸŹ˃˸Ò%´ŗ 12 ]Æ ] ]Ä IJ [ YY m C[ e ^ ZYņ _m m YC m f C m e CJ e m C AJ m Seam.Remoting.eval() e f ņ ^ ZY ` [à C[ m C m [J C[ [f [[` ö m *m e Y _ Yņ m e `J m ^ ZY C[ņ m `J m [[` ö m Cö _m m C[ e m ZY ė ZY[6 function customersCallback(customers) { for (var i = 0; i < customers.length; i++) { alert("Got customer: " + customers[i].getName()); } ©C© )+g IJ } Seam.Remoting.eval("#{customers}", customersCallback); m ZY[ņ m ZY #{customers} C[ `à ņ m C[ e m ZY Æ m [ e ¢ `B Ç m customersCallback() m Y ` m m `B m _à mC m àY Y ÆC s:remoteÇ ` `[ _ö _m m C Y _ö _m [ e customer `B ņ Ė Y m customer àY6 <s:remote include="customer"/> 1S KLO"% O%PQR4 $Vncd&ɽ%n MNOP-nµ¬°n;RS&1& -N nseam/ remoting/interface.jsĻ2nµ¬° s:remote £¯2MRñòŖ´ŗ <script type="text/javascript" src="seam/resource/remoting/interface.js?customerAction"></script> <s:remote include="customerAction"/> Œ&-GMG<´¬Œ}«ûn ;RS&1&MNOP-dÓǤý2n;RS&ÂÚF<'(´¬1 Ųv!&ĩ&;RS}NMs²³ñòn IJ ODðG%£tuvûŖ´ŗ ²³ñò"¬GHM-Nn̐Ö&NMsµûŖ´ŗ'(tu -Nn!¯2nNM -N%´ŗ '(tu-Nnɸ¬ɹ°ÕnjnEF45 ;RS´¬ÂÚF<'(´¬1£ñòŖ´ŗ wēnNM-NnƪƫƀÕ¯nâHÂNµ¬°§¨}¯2ĺûƜ}¯2ɍÝtuvN MĚ¯Ŗ´ŗ ²³ñòGHM-N&NMn;RS&NMĸ¯Ŗ´ŗ;R SsEF45 &ŷĆ'(tu-Ns²³ñòn !òśé&?,@,@nŖC&ŷĆNM-Ns²³ñòŖ´ŗ Œ&±Ƴ Ö&èésµûŖ´ŗ ;RSs C ÆÖŖûnEF45 ĝ ?,@,@ %v°ŷĆÇ %nºÖ!&ÂÚF<©]`I ï,45sÝŨ»ò2°ŷĆnNM-N&Ĥľû'(tu-Ns²³ñòŖ´ ŗ ŒònEF45 GE-%Þv°ī^ ʼnŇ%nC ;RS&ÂÚF<ƭìƗ´ IJ £tu¯Ŗ´ŗ 1[ B%3À4 Å;,Ã-n IJ &G?- D-R-MG&wĥ}¯2ɍĦħñò¬ǣǤȟȠġŻ%°Ŗ´ŗ ǹʮDŽ% ŦŨ¯ºġŻ%°ŖĿŻsnʹƦȁȂñò¬tuĬsµûŖ´ŗ ©C© ½ )+h IJ 1[ } .`awİ×Ø× -;%ÅƭìƗ¯¯«"}´¬ŷĆn IJ;,Ã-qµ¬ &ıØÙØ}cds(ý¬ŲsµûŖ´ŗÅG?-&Ŷ ıØÙĢ1nSeam.Remoting.getContext().getConversationId()ƭìƗ¯Ŗ´ŗ G?-& cd´¬1nSeam.Remoting.getContext().setConversationId()ƭìƗ¯Ŗ´ŗ sǂz Seam.Remoting.getContext().setConversationId()%cdñòv°ŷĆn ÅƭìƗ¯«2ĺñò¬š0&íîv s¼/ĉû 2»òŖ´ŗ q%Ô& £´¬ŷĆn!òɇò&ƭìƗ¯&ǂzcd´¬Ųsµ¬ºŔ¯òŖĿ ŻŗÖ&ŦŨ£´¬ŷĆn ĞƐvŒ}´¬ŲµûŖĿŻŗ 1[1 j ē Æ à ` Ė ö [[ _m m Y e m C_ė C * mņ à ZY[ [à m C m e m C_ `e öJ m [[ *m [[ YY e C Y _[[ m C m e J [[ m C_ė C 6 Seam.Remoting.getContext().setConversationId( #{conversation.id} ); 1^ J!KF4 IJ nÔ&;RSƭìƗ¯s Ö&G?-q%'(ñò¬Œ}tu¯Ŗ´ŗ SFðGHO@FGɑǙ´¬Œ}sǃú%µòũn ŠŒ%ŔŒ&ĞȬ£´¬Œ}ʰʱ¯Ŗ´ŗ Seam.Remoting.startBatch()ÂÚF< n F./Ŷ'(ñò;RSƭìƗ¯n ʽʾɍ»ò¬&%vţnÃMñòŖ´ŗ ®vF./¯Ŗ´ŗ Seam.Remoting.executeB Ų}ñò¬´ƚ2&;RSƭìƗ¯sFǣǤñò}Þnatch()ÂÚF<n ÃMñòƭìƗ¯´ƚ2ġĢ Ö&G?-ɍħ´¬%¯Ƌ"ŗ !¯2n!Œ%ËŽ'(ñòŖ´ŗ ƭìƗ¯s'(ñòŶn ´ƚ2&ĺûƜġĢ Ö&D-R-n GHMĺñòn;FGķus ÆŔ¯ncdñò2°òũÇ '(}ÍËŽ%./ñòŖ´ŗ ©C© )+k IJ ÂÚF<nÃΘŖŹ2&ƭìƗ¯Ȓȓ¯2nFÅ Seam.Remoting.cancelBatch()<Ąą¯Ŗ´ŗ FsĮ£ñò2°¬ƃ¬n/examples/remoting/chatroomȺȻţŦñ°ŗ 1b PPO&.ı÷IJ 1b &!ij3G º ě PO& Œ&ɽnĜNNM&RÖ°2Wƚ2°Ŗ´ŗ M<%Œò»&ƜnwʕĴ,@NMnµ¬°nż´¬HFâGH}ʹʺĬsµûŖ´ŗ J âHÂNƜcd´¬ŷĆn ĊPG£¯2ţŦñ°ŗ ſȩ C Y J õ C %Rñò2°¬´ƚ2&ƜNMRñò2°Ŗ´ŗ GHMM<%n Ɯļ J Ěǹ}¯24HMƛñò2°Ŗ´ŗ !¯2nM<%nŒò»nŢ¯°Ɖ&NMÈʺñòŖ´ŗ Ĵ,@nŖnHFâNMǵ&Èʺn àn`[n b[nJn Jn !¯2nm NMR¯Ŗ´ŗ [ nGHMM<% C Y& [ Ɯ%ĚǹñònM<% C `[ %ĚǹñòŖ´ŗ 1b1 Æ wʕnŒò»n ?,@,@nC ;RSnŖnf Y GH-%´ŗ ĊPG&®¯°M-N-²³´¬1nǃúvÂÚF<£¯2ţŦñ°ŗ ;RSSeam.Component.newInstance()n Ŗn!&ĩ&Ŕ&Seam.Remoting.createType()£¯2ţŦñ°ŗ âHÂNsnŒ&EG45&Ɛ&ŷǧ%VWñò!&ĩ&íîvNM& Ö%v°ŷĆn Œò» ) Ö&ÂÚF<&Šnj»º«2²³ñò¬ĊPGŦŨsâHÂNƜ}¯2£ñò¬ƚ Þ%µ¬Œ}ȾʔţŒ}Ƣ%´ŗ °ţÖº&ƪɠ%n śŜ&«"˥˦âHÂNNMƔd%Þv°;RSÂÚF<sµ¬ºŔ¯òŖĿ Żŗ @Name("myAction") public class MyAction implements MyActionLocal { public void doSomethingWithObject(Object obj) { // code ©C© )Qo IJ } } Œ&ŷĆn myWidget ;RS&M-N-ț¯°}Œȅ%´sn myAction &MNOP-!&°Ŵò&ÂÚF<º»ŔƣƤȺȻñòv°1 myWidget ġØŖĿŻŗ Œòʗʘ´¬n MyWidget ǂzMR´¬ŲsµûŖ´ŗ <s:remote include="myAction,myWidget"/> Œò«û myWidget ĊPGs Seam.Component.newInstance("myWidget") %p³ñò¬«"vûn Œòs myAction.doSomethingWithObject() țñòŖ´ŗ 1b2 ĴÜwÍĵ ĵÝ&Ɯn ĴΙſÌŖ%ŢŤv J ĚzŌjäñòŖ´ŗ GHMˬ% Cf Y ĊPG2ĵÝƜ}/pñĿŖ´ŗ ˬ% java.util.Date £¯Ŗ´ ÆŖ java.sql.Date ĝ java.sql.Timestamp vŠ&ŜÌGH-Çŗ 1bS ] GHMˬ%n J âHÂN&Ɯcd´¬ŷĆſȩ & ŧ&;RSè}¯2ȺȻ¯2ţŦñ°ŗ }ÍƟijľòŖ´ŗ J Ěǹ°Ŗ´ŗ @Name("paintAction") public class paintAction implements paintLocal { public enum Color {red, green, blue, yellow, orange, purple}; public void paint(Color color) { // code } } paint() ÂÚF< red &͢2ƭìƗ´n J &ŖŖ%âHÂNƜț¯Ŗ´ŗ Seam.Component.getInstance("paintAction").paint("red"); ʖŔɬvûŖ´ŗ ÖŖûn ;RSÂÚF<s ÆŖĺñò¬ĊPGHO&ŠŒº GHMˬ% J }¯2ĚzñòŖ´ŗ âHÂNĺ´ŷĆ O@<ġĢŷĆÇn 1b[ BHK;<% J DMn ȡĆn wxn EFvŠ´ƚ2&ȡĆNMʎ}¯ ÆŦ¯ |Y Ƹţn ŒòÖ°2ŧ&EG45ȺȻÇn C Y DM}¯2GHMˬ%'ƊñòŖ´ŗ âHÂN}¯2Œò»&NM&°ŴòºĦŨIJ¬;RSÂÚF<ƭìƗ´ŷĆn £´¬âHÂN C Y DM¯Ŗ´ŗ ;RSÂÚF<sŒò»&NM&°Ŵòºĺ´ŷĆn ĺûƜŔ C Y ©C© )Q IJ DMvûŖ´ŗ IJ ODðGn ˬ% ;RSÂÚF<;¯2ǃúvNMÈʺ´¬Œ}stu%´ŗ `J z C Y q% |Y ´¬SM,@&Rv°1n 4v |Y 'Ɗs IJ ODðG%ƿǀñòŖ´ŗ Å;´¬âHÂN}¯2£%Þ¬ |Y p³´¬n ® Seam.Remoting.Map ĊPGp³¯Ŗ´ŗ var map = new Seam.Remoting.Map(); Œ& C Y 'Ɗ% |Y }/p´¬Œ}Ɖ}¯ĜvÂÚF<n size()n isEmpty()n keySet()n values()n get(key)n put(key, value)n remove(key)n contains(key) ƿǀ¯Ŗ´ŗ !òɇò&ÂÚF< C &!ò}ÍɰvûŖ´ŗ ÂÚF<s keySet() ̥ì values() vŠ& ȡĆĺ´}n !&ÃŖƜĊPGġĢ C Y #à ĊPGsĺñòŖ´ŗ 1c JĶp &ǣΚƼƽ´¬Ɖ%n RFFœ@<œq%GHM}ç(ûƦû´¬´ƚ2&â3F& qrĚz´¬FÅ<íî´¬Œ}s%ÞŖ´ŗ FÅ<íî´¬n ŧ&°Ŵòº(°Ŗ´ŗ C Y q% setDebug() ÂÚF<'(´¬ēĔŧ&Ļû%´ŗ Seam.Remoting.setDebug(true); YZ[ 2cd("ēĔŧ&«"vûŖ´ŗ <remoting:remoting debug="true"/> FķuĊO´¬n setDebug(false) Λ&ÂFEFKɆÞÙØ°ŷĆn ƭìƗ¯Ŗ´ŗ ƭìƗ¯Ŗ´ŗ Seam.Remoting.log(message) 1f ¿JI'MC±© ǽƧ&$ĥʚ˫O¶%Ězñò¬K@ÂFEn Dĕ&L-N¤Mƛn ŸŹĊO´¬vŠstu%´ŗ Èĸn 1f ¿JI'Çķ±© O¶& ~[ ] }°"ÂFEƐ&ÂFEÈĸ´¬n Seam.Remoting.loadingMessage &Ɯcd¯Ŗ´ŗ Seam.Remoting.loadingMessage = "Loading..."; 1f1 MG%¿JI'ĸ± ©C© )Q) IJ K@ÂFEŸŹĚzñĿv°«"´¬n displayLoadingMessage() ë«ì hideLoadingMessage() ǬŔ(ľv°ķu%$ɆÞ¯Ŗ´ŗ // don't display the loading indicator Seam.Remoting.displayLoadingMessage = function() {}; Seam.Remoting.hideLoadingMessage = function() {}; 1f2 N4P.MG%O%:P K@M3N$ɆÞ¯2ŎÂ&M;&ĩn ƩÞvŔ&ĚzñĿ¬Œ}s%ÞŖ´ŗ displayLoadingMessage() &ŚÂFEǯ¼&'Ɗ%$ɆÞ¯2Œò(°Ŗ´ŗ } hideLoadingMessage() Seam.Remoting.displayLoadingMessage = function() { // Write code here to display the indicator }; Seam.Remoting.hideLoadingMessage = function() { // Write code here to hide the indicator }; 1i Ĺðñ©P'þÿ±© ÅÂÚF<s'(ñò¬}n !&§¨GHMĺñò¬ å| D-R-ŌjäñòŖ´ŗ Œ&D-R-ŧGHM«û C Y ĊPG¤4ĭñòŖ´ŗ ĩ&ĊPGǵ&ȺȻġĢÔƴvNM&ŷĆ ÆC` vŠÇn Œ¯ȺȻñò¬ĊPGŔ´ƚ2D-R-&wĥ}¯2ŌjäñòŖ´ŗ Œò»&ĊPGĩ&ĊPGȺȻ´¬Œ}s%Þn ŖŒ&ĩ&ĊPG!&ĩ&ĊPGȺȻ%Þ¬}°˭ĆvûŖ´ŗ PFG¯v°ŖŖ¯2ëţ}n Œ&ĊPGĐHOđĊPGç%¸ǰ´¬ŋʂ«2īļɄǕvŔ&v¬ tuĬsµûŖ´ŗ Μ²vƺƻ}¯2 ÆD-R-sɏɐ}v¬ƺƻ}ƐÇn GHM¯2ķ˦ȟȠsǿĚñò2¯Ŗ"&̑ˢ°ŷĆŔµ¬ºŔ¯òŖĿŻŗ IJ n ÅÂÚF<& @WebRemote ï,45& exclude O@<Ɠd´¬Œ}%!&ĊPGHOĐĂ´¬đ4vēĔƿǀ¯2° Ŗ´ŗ Œ&O@<<F ÆĐđÇ ĚV2Ɠdñò¬â-ŖÔ&â-ġĢ J DMĦŨIJûŖ´ŗ ÅÂÚF<ƭìƗ´}n Œò»&â-}wʄ´¬§¨}v¬ĊPGHOq&ĊPGsŌjäñò¬§¨â3 Fº»ƸéñòŖ´ŗ ´ƚ2&è%ŧ& Widget GH-£¯Ŗ´ŗ @Name("widget") public class Widget { private String value; private String secret; private Widget child; private Map<String,Widget> widgetMap; private List<Widget> widgetList; // getters and setters for all fields ©C© )Q+ IJ } 1i ĺĻ.QG#C'þ±© ÅÂÚF<s Widget &M-N-ĺ´ŨòŠ secret O@<ķ˦ȟȠsġŖò2°¬1ǿĚ¯ţv°ŷĆn ŧ&«"Ă¯Ŗ´ŗ @WebRemote(exclude = {"secret"}) public Widget getWidget(); &Ɯĺñò¬ĊPG& secret O@<ȺȻ¯Ŗ´ŗ ŒŒ%n GHM¯2Œ&ĞdO@<sǿôñò2ŔŞľv°}ʷd¯Ŗ´ŗ ĺñò¬ Widget child O@<sµûn ŒòŔ Widget vûŖ´ŗ Ĥľû child & secret ƜĹ¯°ŷĆŠ"¯»«°%¯Ƌ"ºŗ <FĚV£¯2§¨}v¬ĊPGHOq&Œ&O@<&â-Ɠd´¬Œ}s %ÞŖ´ŗ @WebRemote(exclude = {"child.secret"}) public Widget getWidget(); 1i1 z w BHK;<%'þ±© ĊPGHOqĊPGs¸ǰ%Þ¬!&ĩ&ŷǧ Map µ¬°vŻ»º&ȡĆ&ȑˏqvûŖ´ ÆListn Setn Array vŠÇŗ ȡĆžſ%n !&ĩ&O@<}ÍƟijýŖ´ŗ }ýũn Widget & widgetList O@<qĩ& Widget wxsġŖò2°2n Œ&wx& Widget & secret O@<Ă¯2°¬ŷĆn ï,45ŧ&«"vûŖ´ŗ @WebRemote(exclude = {"widgetList.secret"}) public Widget getWidget(); &ÃŖƜĂ´¬ŷĆ&ĚVǙ¯ɂvûŖ´ŗ Map &O@<Ò&Ŷȅ [key] ÝŨǤý¬} Map &ÃĊPGƜĂ¯n [value] ƜĊPG&ƜĂ¯Ŗ´ŗ ŧ&è% widgetMap O@<Ăñò secret O@<ÕĿ¬ēĔz¯2°Ŗ´ŗ Map @WebRemote(exclude = {"widgetMap[value].secret"}) public Widget getWidget(); 1i2 ĝaPO&.ĆRK 'þ±© šŶn§¨}v¬ĊPGHOq&ŠŒƗǹ´¬ºŋʂvţĊPGNM&O @<Ă£%Þ¬ĚVÖ°2ɾǂ¯Ŗ´ŗ Œ&ĚV;RSÒ ÆĊPGs ;RS%µ¬ŷĆÇ ŖŸŹ˃˸GH-Ò ÆĊPGs ;RS%v°ŷĆ&ØÇ &°Ŵòº£¯Ν̀Ξ2ĚǹñòŖ´ŗ @WebRemote(exclude = {"[widget].secret"}) public Widget getWidget(); ©C© )QQ IJ 1iS þÌļ'Ö×ĂĽľ© ĂÍĽĊPGHOq%Ô&â-º»ĊPGO@N´¬1×ØĆľĿ ¬Œ}Ŕ%ÞŖ´ŗ @WebRemote(exclude = {"widgetList.secret", "widgetMap[value].secret"}) public Widget getWidget(); 1 z ¿JI% IJ | ÂFE¯2'ǑRƿǀ¯2°Ŗ´ŗ EG45%ǹǰ'Ɗñò2°¬ | RÖ°2VȆ¯2°Ŗ´sn ɭŶn Èĸñò¬tuĬsµ¬&%ơƬ¯2ţŦñ°ŗ ǹǰn Œ&ķu'ʯΟʼnŇŜ%£´¬Œ}ʰʱñò2°ŖĿŻŗ 1 `a | ČFG-GHM´¬n ŖŴ IJ %-GHMñĿ¬Œ}s%Þ¬ČFGwxcd´¬ŲsµûŖ´ŗ seam.propertiesn web.xml Ŗ components.xml & org.jboss.seam.remoting.messaging.subscriptionRegistry.allowedTopics TŜµ¬ČFGwxĚzñĿŖ´ŗ <remoting:remoting poll-timeout="5" poll-interval="1"/> 11 z $4KLO±© ŧ&è% | *Y ǵ&-GHMēĔz¯2°Ŗ´ŗ function subscriptionCallback(message) { if (message instanceof Seam.Remoting.TextMessage) alert("Received message: " + message.getText()); } Seam.Remoting.subscribe("topicName", subscriptionCallback); ÂÚF< ) Ö&âHÂNĦŨIJûŖ´ŗ ÖƉ-GHM´¬ | *Y Òvûn ÖƉÂFEsĦŨIJ»ò¬}ƭìƗ´;FGķuvûŖ´ŗ Seam.Remoting.subscribe() ) Rñò2°¬ÂFE ) ȑˏ%n ,Ã-ÂFE}ĊPGÂFE%´ŗ ;FGķuțñò¬ÂFENM&,-Ų}´¬ŷĆn instanceof Ǻ͙X2ÂFEs Seam.Remoting.TextMessage v&º Seam.Remoting.ObjectMessage %µ¬&º,-´¬Œ}s%ÞŖ´ŗ TextMessage !& text O@<,Ã-ƜġØ ÆŖĤľû getText() ƭìƗ´Çn ObjectMessage !& object O@<ĊPGƜġØŖ´ ÆŖ!& getObject() ÂÚF<ƭìƗ´Çŗ ©C© )Q\ IJ 12 ĈJK.$4KLO'Ŀŀ±© ČFG&-GHMŀŁ´¬n ƭìƗ¯2ČFGÒ%ț¯Ŗ´ŗ Seam.Remoting.unsubscribe() Seam.Remoting.unsubscribe("topicName"); 1S T!%.&MI4'Łł±© R&Ƕ²ēĔĂă´¬1Èĸ%Þ¬âHÂNs ) Seam.Remoting.pollInterval ®¯°ÂFE¯2ŶjRsǶ²´¬ç͛Ăă¯Ŗ´ŗ O¶cd o vûŖ´ŗ ÖµûŖ´ŗ ÖƉ %n ΙſÌ%Ěǹ¯Ŗ´n ) ÖƉ&âHÂN Seam.Remoting.pollTimeout %n Œ&âHÂNŔΙſÌ%ĚǹñòŖ´ŗ ǵ&G?-sNMœ¯2æΠ&żΡɍħ´¬Ŗ%&®¯°ÂFEȏķ ´¬ɐñĂă¯Ŗ´ŗ O¶ oΙ%n sRñò¬}Tħ%Þ¬ÂFEsv°ŷĆæΠ&żΡsƣnjĺñòŖ´ŗ ƜƁţcd´¬ŷĆơƬsŲ%´ŗ ŚG?-sÂFEȏķ´¬Ųsµ¬}°"Œ}n ÂFEsĦħñò¬Ŗ%Ŗ!&G?-sNMœ´¬Ŗ%-DF<sǫ dñò¬}°"Œ}vûŖ´ŗ Œ"¯G?-sÍÎƾǶ²´¬}n ǕɎ&-DF<sǫdñò¬§¨vûŖ´ŗ pollTimeout Œò»&Ċ45 YZ[ ǐȍ%cd´¬Œ}ʰʱ¯Ŗ´sn Ųż2 C Y %$ɆÞ´¬Œ}s%ÞŖ´ŗ ŧ&è%RsºvûDF4Ƕ²´¬«"cd´¬ēĔz¯2°Ŗ´ŗ Œò»&âHÂNȦ£&345ǃúvƜcd¯2ţŦñ°ŗ YZ[6 <remoting:remoting poll-timeout="5" poll-interval="1"/> C Y6 // Only wait 1 second between receiving a poll response and sending the next poll request. Seam.Remoting.pollInterval = 1; // Wait up to 5 seconds on the server for new messages Seam.Remoting.pollTimeout = 5; ©C© )Qa 11 ò \ Ė b m m Ye m óJ[ ]` *[ö Æó]*Ç C[Y à ##å YY[ f ņ YC J [à m [[_ ó]* _J [à _m Y * ó]*ņ _ m à [à e[ _m m ó]* [ f e ` e mY6½½ JJ[ ½_`[ö½ *m mY Y Zf Y[ m_ ó]* _ö m_ 11 *m Y [ eJ Ė ó]* YY[ ņ m_C m C[ ` [[ ¢mY )\ņ ¢eJJ Y öJJ YY[ e [ 111 y ĉ *m e Y YYJ Y ` [[ C ó]*ņ `m àf m à m C e e m m à _m [[ m e m e m[ Z m ó]* e com.google.gwt.user.client.rpc.RemoteService6 public interface MyService extends RemoteService { public String askIt(String question); } *m à m e m[ ` [ņ Z Y m [ f [ AsyncCallback Y e m e m m [6 public interface MyServiceAsync extends RemoteService { public void askIt(String question, AsyncCallback callback); } *m à m e ņ m ZY[ MyServiceAsyncņ _[[ ` Y[ `à ó]* m[ C ` Y[ [à *m Z Yņ Y m Y[ m à m e 6 @Name("org.jboss.seam.example.remoting.gwt.client.MyService") public class ServiceImpl implements MyService { @WebRemote public String askIt(String question) { if (!validate(question)) { throw new IllegalStateException("Hey, this shouldn't happen, I checked on the client, " + "but its always good to double check."); } return "42. Its the real question that you seek now."; ©C© )Qg m óJ[ ]` *[ö } public boolean validate(String q) { ValidationUtility util = new ValidationUtility(); return util.isValid(q); } } *m m m m[ ` `[ C ó]* ` _m m @WebRemote ņ _m m Ė e [[ _`f`[ m 112 Ė ò\ ē *m Z Yņ _ m m m à m e m f Y *m m ` [ m _J [ņ _[[ ` `à m _f J ` e m à m [ `6 private MyServiceAsync getService() { String endpointURL = GWT.getModuleBaseURL() + "seam/resource/gwt"; MyServiceAsync svc = (MyServiceAsync) GWT.create(MyService.class); ((ServiceDefTarget) svc).setServiceEntryPoint(endpointURL); return svc; } *m e[ Y _ m _J m Cö m m m [ ` *m e[[_J ZY[ Y[ e _m [`[ņ Z Y `f 6 public class AskQuestionWidget extends Composite { private AbsolutePanel panel = new AbsolutePanel(); public AskQuestionWidget() { Label lbl = new Label("OK, what do you want to know?"); panel.add(lbl); final TextBox box = new TextBox(); box.setText("What is the meaning of life?"); panel.add(box); Button ok = new Button("Ask"); ok.addClickListener(new ClickListener() { public void onClick(Widget w) { ValidationUtility valid = new ValidationUtility(); if (!valid.isValid(box.getText())) { Window.alert("A question has to end with a '?'"); } else { askServer(box.getText()); } } }); panel.add(ok); initWidget(panel); } ©C© )Qh m óJ[ ]` *[ö private void askServer(String text) { getService().askIt(text, new AsyncCallback() { public void onFailure(Throwable t) { Window.alert(t.getMessage()); } public void onSuccess(Object data) { Window.alert((String) data); } }); } ... ]m [ öņ m ` Cö m askServer() m YJ m e m Y Z Æ m ZY[ņ C[ [ Ye m m Y C[ ĖÇ *m askServer() m Ė e m à m [ ` Æ `à m getService() mÇ Cö m askIt() m *m [ Æ J e m [[ e[Ç m_ [ __ *m Y[ e m ZY[ ` e m ` m examples/ remoting/gwt à 11S ò\ + b Y[à e ó]* YYņ m Y[ffC Y Y Æ_m m Y `f e m Ç *m [à _m m ` e m [ óA [à m ó]* YC * mņ à _[[ mC m ö B à [Ymņ _[[ ó]* _[ Æ_m m à _[[ e m àf _àÇ *mņ à e[ņ Y[ Æ m Y e à e[Ç6 <taskdef uri="antlib:de.samaflost.gwttasks" resource="de/samaflost/gwttasks/antlib.xml" classpath="./lib/gwttasks.jar"/> <property file="build.properties"/> ¢ build.properties e[ņ _m m m m 6 gwt.home=/gwt_home_dir ©C© )Qk m óJ[ ]` *[ö *m e m[ Y m à _m ó]* [[ *m ņ f J6 <!-- the following are are handy utilities for doing GWT development. To use GWT, you will of course need to download GWT seperately --> <target name="gwt-compile"> <!-- in this case, we are "re homing" the gwt generated stuff, so in this case we can only have one GWT module - we are doing this deliberately to keep the URL short --> <delete> <fileset dir="view"/> </delete> <gwt:compile outDir="build/gwt" gwtHome="${gwt.home}" classBase="${gwt.module.name}" sourceclasspath="src"/> <copy todir="view"> <fileset dir="build/gwt/${gwt.module.name}"/> </copy> </target> *m J _m [[ _[[ Y[ m ó]* YY[ ņ Yà m Y e à Æ_m m _[ ` m webapp Y e à _ f ` ó]* J *| C Y e Ç Ő C m [J m gwt-compile J f à [_à m ó]* à I` m ó]* _m m `_ f à m[ ` J m e à C[YJ _m ó]* e à ė J mņ B Y[J m ņ à ė JJ m e m [ö Æ e ņ e à ė _ė m m `_ņ _[ J e à à m[ ù* ` J ó]* [[ f ė m C[`[ŅÇ ©C© )\o 12 _ēĖ ŃĂ YJ ńĆÅ«û YJ ¹-&KPG rƱā(%Þ¬«"vûn&Øv»Ŵ &Śȑ&ƁƂvij;,Ã-=vŠ &Ơvķu YJ 345%Į£%Þ¬«"vûŖ´ŗ ùŅ *m YJ J [ m B`ff [`à *m Yf à Ė e [[ fYJ J mĖ C m mY YJ ´¬ &R«ûŧ&«"vŒ}stuvûŖ´ŗ ş ;RSM-N- YJ ` MPG´¬ ş YJ ` ;RSMPG´¬ ş YJ ` ;RSÈʺ´¬ ş YJ ` ;,Ã-TǞ%Þ¬«"´¬ ş ;RS % YJ ]` 345./´¬ ş YY e YJ ~[e* |J ş YC J Y[ e YJė OpenEntityManagerInViewFilter OpenSessionInViewFilter ş YY e YJ TaskExecutors ` ö @Asynchronous [[ 12 B%TU% ' O%RK ±© ;RSM-N-& YJ ` ǵ&MPG45n <seam:instance/> Òæç̜<H£¯2(°Ŗ´ŗ Òæç̜<Híî´¬n Òæç YJ ` dÓOáMǣǤ¯vŨòũvûŖĿŻŗ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:seam="http://jboss.com/products/seam/spring-seam" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://jboss.com/products/seam/spring-seam http://jboss.com/products/seam/spring-seam-2.0.xsd"> Œò%n ;RSŠŻv YJ ` ŔMPG45tu}vûŖ¯ŗ <bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype"> <property name="someProperty"> <seam:instance name="someComponent"/> </property> </bean> ;RSÒ&Ĥľû ^ ¿sĮ£tu%´ŗ <bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype"> <property name="someProperty"> ©C© )\ YJ b_ö ńĆ <seam:instance name="#{someExpression}"/> </property> </bean> ;RSM-N-n YJ ǵ&MPG45s%Þ¬«"vûŖ´ŗ ` % YJ ` <seam:instance name="someComponent" id="someSeamComponentInstance"/> <bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype"> <property name="someProperty" ref="someSeamComponentInstance"> </bean> ΣŅ Ô&;,Ã-ÕÖ-,Ov;RSÅż´¬Œ}Ĝc ȸñòŖ¯ŗ YJ !"%µûŖĿŻŗ &MPG45}ɂvûn YJ &MPG45ÂÚF<ƭìƗ¯ÎǶ²¯ŖĿŻŗ !&Ĥľûn YJ ` sM-N-äñò¬}ÞŦŨn MPG45Ƕ²¯Ŗ´ŗ ű2n ` sM-N-äñò¬}ÞĮ£tuvM-N-n `&HMOMGŹĈç% ` s£´¬Ŕ&}ÍM-N-%´ŗ èýũn ## -;;RS&M-N-s ƣƤn ſw& YJ ` MPGñò¬}n !&ſw& YJ ` !&sĄą¯ŶŔŴ}ÍM-N-´¬ȺȻƀÕ¯Ŗ´ŗ Œ&ƺƻ-;MČĕ-}ƭŻ%°Ŗ´ŗ 4-,ŹȔƭìƗ¯sȝò¬«"n MMPG45-;MČĕ-s¼ǏɗÕñò¬«"¯Ŗ´ŗ YJ %n ;RS&KÃ4MPG´¬Œ}%KÃ4sƭũòŷĆȺȻ>Ɣ´¬Ų sµûŖ´ŗ <seam:instance/> N%¼/ ;RSKÃ4%Þ¬«"vûŖ´ŗ <seam:instance id="seamManagedEM" name="someManagedEMComponent" proxy="true"/> <bean id="someSpringBean" class="SomeSpringBeanClass"> <property name="entityManager" ref="seamManagedEM"> </bean> Œ&n YJ ` º» =ij;,Ã-&°ē& Öz¯2°Ŗ´ŗ Æ =ij;,Ã- YJ OpenEntityManagerInView O@N&Ĥü}¯2ñ»ȱȲv£ēĔn YJ ëŨ¬ =;RS&Į£&ΖȺȻţŦñ°ŗÇ 121 ' B%TU% O%RK ±© YJ ` ;RSM-N-MPG´¬&ñ»žſ%´ŗ 'ęn tuvēĔ ) ÖµûŖ´ŗ ş ^ ¿£¯2 YJ ` MPG´¬ ş YJ ` ;RS´¬ ©C© )\) YJ b_ö ńĆ ) ŽƉ&Ċ45Ö°2ŧ&EG45%ɾǂ¯Ŗ´ŗ šŔžſvēĔ ^ ¿2 YJ ` GE-´¬ēĔ%´ŗ YJ DelegatingVariableResolver n YJ } b ńĆ´¬1 YJ «ûƿǀñò¬M,D45RM%´ŗ Œ& VariableResolver £´¬}n ` %´ƚ2& YJ ` ^ ¿ %£%Þ¬«"¯Ŗ´ŗ DelegatingVariableResolver faces-config.xml ǣǤ´¬ŲsµûŖ´ŗ <application> <variable-resolver> org.springframework.web.jsf.DelegatingVariableResolver </variable-resolver> </application> *m à B YJ ` J @In6 @In("#{bookingService}") private BookingService bookingService; ^ ¿%MPG45("1 YJ ` £´¬Œ}ĂȃµûŖĿŻŗ % ^ ¿s£ñò¬}Œȅv»ŠŒ%Ŕ YJ ` £´¬Œ}s%ÞŖ´ŗ KE-}OKdÓn ðÃÂÅ45vŠŗ 122 ' B%TU% ±© Òæç̜<H£´¬}n ŠŻv YJ ;RS´¬Œ}s%ÞŖ´ŗ ;RS¯° <seam:component/> NTǞ´¬ŦŨ%´ŗ <seam:component/> ` ` %Ŕ &ƎƏq <bean id="someSpringBean" class="SomeSpringBeanClass" scope="prototype"> <seam:component/> </bean> O¶%n <seam:component/> ` dÓ%ʫý»ò¬GH-}ÒÝŨ2 STATELESS;RS²³¯Ŗ´ŗ }ÞëûnFactoryBean s£ñò¬ŷĆvŠn YJ ` &GH- s ` dÓƗ2ţ¬GH-%v°Œ}sµûŖ´ŗ Œ&«"vŷĆn class ǂzƓdñòvŨòũvûŖĿŻŗ ÒÝŨΤĆ&tuĬsµ¬ŷĆn ;RSÒǂzƓd¯2ŔŞ°ŖĿŻŗ YJ ` Ğd& -;%=¯°ŷĆn <seam:component/> & scope ƙĬ£´¬Œ}s%ÞŖ´ŗ Ɠdñò¬ -;s STATELESS %v°ŷĆn YJ ` prototype -;ñòvŨòũvûŖĿŻŗ ·µ¬ YJ ` Ļļ-,D-vĞȬĜÕ2°Ŗ´&%n Œ&ƙĬwʕƄvûŖ´ŗ 12S 4B&. ńĆâF3n YJ )o -NM&L-N-;}¯2 ;,Ã-&Į£Ŕtu¯Ŗ´ŗ Š&«"v ;,Ã-ŀ%Ŕ´ƚ2& YJ ` ƎƏ´¬Œ}s%ÞŖ´ŗ Ŧ¯n YJ ;RSÅ-,Oż´¬«"Şȷñò2°v°Œ}ƲƂȶ°Ɨ¯2 ©C© )\+ YJ b_ö ńĆ ţŦñ°ŗŒ&Œ}º»nķu&£ΥƢ(2ţŦñ°ŗ Ğn EF45µ¬°-;& YJ `&GH-N̈́ș°ƺƻ»Ż%ëûn ˘°̟̠&-;º»ˎ°̟̠&-;& ` ` Ŗ;RSMPG´¬ŷĆn ɧÁơƬΦ2ţŦñ°ŗ YJ ` e à cd%<seam:configure-scopes/> wƂƓd´¬}n ´ƚ2& -;sL-N-;}¯2 YJ ` Į£tuvûŖ´ŗ YJ ` Ğd& -;ŋŌÝŨ¬n ` dÓ& scope ƙĬ% -;Ɠd¯2ţŦñ°ŗ <!-- Only needs to be specified once per bean factory--> <seam:configure-scopes/> ... <bean id="someSpringBean" class="SomeSpringBeanClass" scope="seam.CONVERSATION"/> dÓq& prefix ƙĬƓd´¬Œ}«2n -;Ò&DO@FG-Èĸ´¬Œ}s%ÞŖ´ŗ ÆO¶&DO@FG- seam. %´ŗÇ configure-scopes à e[ e YJ ¢Y J m _à [[à _m e J @In * mC f à m Yf eà @In(create=true) m B Y eà Y e ` ` f à m default-auto-create ` e configure-scopes ö [[ YJ ` _m Y Œ&ēĔ%dÓñò -;& YJ ` n <seam:instance/> £´¬Œ}vţĩ& YJ ` MPGtu%´ŗ Ŧ¯n -;MČĕ-sŲŴɗÕñò¬«"ɧÁơƬ¯2ţŦñ°ŗ YJ %wʕ£ñò¬ēĔn ` dÓq%& <aop:scoped-proxy/> &Ɠd%´ŗ ¯º¯n -;& YJ ` <aop:scoped-proxy/> }&ʹʺĬsµûŖĿŻŗ ¯s2n ſw& ` -; YJ `MPG´¬Ųsµ¬ŷĆn <seam:instance/>£¯vŨòũvûŖĿŻŗ <bean id="someSpringBean" class="SomeSpringBeanClass" scope="seam.CONVERSATION"/> ... <bean id="someSingleton"> <property name="someSeamScopedSpringBean"> <seam:instance name="someSpringBean" proxy="true"/> </property> </bean> 12[ yz YJ YC Z`[ J ` _m YY e à #~ Æ~#ņ `ņ ņ *#Ç YJ [ YC Jm J _m à YY[ C * |J m ]`Ym ]`[J YJ J ZY YY e à C e m f YY e[[ C ^^ YYJ [ [ö I^ĒAI^͘ù^] ù*͘A~~I*^ b e m YJ m ©C© )\Q YJ b_ö ńĆ ŬmY6½½ YJe_öJ½YJ½ ½)oZ½e ½ m[ŭ * eJ YJ `[ m YJ* Y [ö 6 <spring:spring-transaction platform-transaction-manager="#{transactionManager} *m spring:spring-transaction Y _[[ [č YJ à mč Y`[ e à mč [[` ö 12^ z y Ä e m Y_e[ e e C Y m `[à mC ^à|J Y e m [e e C *m [ à e m Y`[ _m m m f m e _[[ Jf e m LazyInitializationException YJ YC _à J Y Z `à m Y e J[ _` Ė ÆOpenEntityManagerInViewFilterÇ ņ _[ ` e YJ C[Y [ mC J Y Z J [[ e m [ YJ YC e J _m ~#ÆJ PersistenceAnnotationBeanPostProcessorņ JpaTemplateņ Ç YC _à e YJ J Y Z _m YJė YC ~# [ `JJ C Y Y Z Y`[ YJ YY[ *m J _ö YC m e[[_J e [à6 ş Y J Y Z J YJ YC [ ş C Y Y Z _` Ė ÆJ à m Ėč B`Ç ş [[_ e J J Y Z _m YJ J Æ_[[ e[m m Y Z [[àÇ YJė Y Z YYJ [ [[_ [à Y ^à|J Y ^f à|Jb à m J _ö `à _YYJ ^à|Jb à J Y Z <bean id="seamEntityManagerFactory" class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBe <property name="persistenceContextName" value="entityManager"/> </bean> ]m ėY ¢Zùė m e m J Y Z f Y à e[ m ^à|Jb à m ù Ė[ m Y m ėà|Jė e à _m YC ee ù à `à YCJ Y Aù [ö 6 <bean id="seamEntityManagerFactory" class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBe <property name="persistenceContextName" value="entityManager"/> ©C© )\\ YJ b_ö ńĆ <property name="persistenceUnitName" value="bookingDatabase:extended"/> </bean> *m ^à|Jb à m ` à YJ YC [ b ZY[ņ f J YJė PersistenceAnnotationBeanPostProcessor m Z `e <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> e à e à [ ^à|Jb à YJ ` _m J Y Z à [[ m PersistenceAnnotationBeanPostProcessor _m m Yf Aù à _m `à e[ `à Y eàJ m defaultPersistenceUnitName YYf à *m applicationContext.xml Jm [ö [ö6 <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> <property name="persistenceUnitName" value="bookingDatabase"/> </bean> <bean id="seamEntityManagerFactory" class="org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBe <property name="persistenceContextName" value="entityManager"/> <property name="persistenceUnitName" value="bookingDatabase:extended"/> </bean> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"> <property name="defaultPersistenceUnitName" value="bookingDatabase:extended"/> </bean> *m component.xml Jm [ö [ö6 <persistence:managed-persistence-context name="entityManager" auto-create="true" entity-manager-factory="#{entityManagerFactory}"/> JpaDaoSupport eJ m _à e J Y Z mà _[ ` e J Y Z JpaTemplate <bean id="bookingService" class="org.jboss.seam.example.spring.BookingService"> <property name="entityManagerFactory" ref="seamEntityManagerFactory"/> </bean> 12b z *m YJ J [ YC YY e Y[ J ` J YJė [ *m J Cà [ m ~# f J ö YJė ~# J YJė YYJ [ [[_ [à Y ^à|f J Y ^à|Jb à Y ććć ` C[`[ YJ [ ņ m J _ö `à _YYJ YZà b à J ` Z <bean id="seamSessionFactory" class="org.jboss.seam.ioc.spring.SeamManagedSessionFactoryBean"> <property name="sessionName" value="hibernateSession"/> </bean> ]m ėùė m e m persistence:managed-hibernate-session Y ©C© )\a YJ b_ö ńĆ *m b à m ` à YJ YC [ *m J [ YC YY e [[ SessionFactory.getCurrentInstance() [J à [[ Jf ¢ ÆÇ m SeamManagedSessionFactory 12c B%TU% Ä w¬9. + | 345&ÕÖ YJ & #YY[ ¢Z ./´¬1 YJ & ContextLoaderListener £´¬Œ}%ÞŖ´sn Ăs°ţÖºµûŖ´ŗ ş YJ #YY[ ¢Z n SeamListener&Ŷ./ñòvŨòũvûŖĿŻŗ ş 7ŎF̥ìńĆ,-%&£Ɖ}¯ &./̡˴vŒ}sµûŖ´ŗ YJ #YY[ ¢Z Œò» ) Ö&ĂΧΨ´¬1 YJ ńĆ YJ #YY[ ¢Z ./´¬ ;RSsġŖò2°Ŗ´ŗ Œ& ;RS£´¬n <spring:context-loader/> &dÓ components.xml TǞ¯Ŗ´ŗ config-locations ƙĬ%£´¬ YJ ;,Ã-OáM&ŷǧƓd¯Ŗ´ŗ Ô&cdOáMsŲvŷĆn S-ñò¬ <spring:config-locations/> ?DÂTǞ´¬Œ}s%ÞŖ´ŗ Œò("n components.xml OáMÔ&Ɯ?DÂǣǤ´¬Ĝƒű2ţŦñ°ŗ <components xmlns="http://jboss.com/products/seam/components" xmlns:spring="http://jboss.com/products/seam/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-2.0.xsd"> <spring:context-loader config-locations="/WEB-INF/applicationContext.xml"/> </components> 12f Ė]Ä ĕ+ĉ YJ YC ` e Z J à m[à [[ TaskExecutor *m YJ J [[_ e m e YJ TaskExecutor e Z J f @Asynchronous m [[ * `[ m e [à [[ m SpringTaskExecutorDispatchor YC YJ ` e ö^Z [ö 6 <spring:task-executor-dispatcher task-executor="#{springThreadPoolTaskExecutor YJ TaskExecutor YY m[J e à m C e[[f ` ö Dispatcher ` YC m[ m[ à m C [ö 6 <!-- Install a ThreadPoolDispatcher to handle scheduled asynchronous event --> <core:thread-pool-dispatcher name="threadPoolDispatcher"/> ©C© )\g YJ b_ö ńĆ <!-- Install the SpringDispatcher as default --> <spring:task-executor-dispatcher task-executor="#{springThreadPoolTaskExecutor}" schedule-dispatcher=" ©C© )\h 1S 1S b[[ Z m J [ö #Y m Ω Cà Y_e[ m[Jà `J e Z½ee Ė YY[ e ee C[ m _m [J _m `B [ ÆöYJ m Z Y ņ m `_ m Z f m [ņ ĖàJ mÇ ` m Z à [ mö e_ ņ ö e m ` ½ Z à mč `J à ` ö J[ J `B e e Z Ė ` m J #Y m m C ` m m ` J J [à [[à Y`[ _m ~# ` # [ Zņ YC ` m Jf ~[ e m ` m Ŭćććŭ e e Y e m ` m YB 1S1 ` m eJ m m META-INF/persistence.xml hibernate.cfg.xml e[ ` m eJ m `[ e[ e eJ Yņ Y e m [ eJ J <persistence-unit name="sample"> <jta-data-source>java:/DefaultDS</jta-data-source> <properties> [...] <!-- use a file system based index --> <property name="hibernate.search.default.directory_provider" value="org.hibernate.search.store.FSDirectoryProvider"/> <!-- directory where the indexes will be stored --> <property name="hibernate.search.default.indexBase" value="/Users/prod/apps/dvdstore/dvdindexes"/> </properties> </persistence-unit> e à Y[ J ` # ^à|J +)Z Æ` # Q)ó#Çņ à [ eJ m YYY C [ <persistence-unit name="sample"> <jta-data-source>java:/DefaultDS</jta-data-source> <properties> [...] <!-- use a file system based index --> <property name="hibernate.search.default.directory_provider" value="org.hibernate.search.store.FSDirectoryProvider"/> <!-- directory where the indexes will be stored --> <property name="hibernate.search.default.indexBase" value="/Users/prod/apps/dvdstore/dvdindexes"/> ©C© )\k ` m <property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.FullTextIndexEventListener"/> <property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.FullTextIndexEventListener"/> <property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/> </properties> </persistence-unit> ù *m Y [J e[ e ` # ^à|J ++Z m eJ e[ņ m e[[_J B mC ` Y[à6 ş m`f mB ş m`f fB ş [ f B ù e à Y[à m ^#Iņ ė eJ Y application.xml 1S2 ` m Y Zņ m ö m e ŬmY6½½___m`J½m`͘ ½ m½e ½½m[͘J[½ŭ e e ` m e[[à J _m m #~ e ~# ½ ` _ mJ e Ē ¢ ` Ėà Ė B e_ [ e *m #~ m YY[ _m m FullTextSession #~ Æ` [ e `ė SessionÇ ]m ` m Yņ B FullTextSession @Stateful @Name("search") public class FullTextSearchAction implements FullTextSearch, Serializable { @In FullTextSession session; public void search(String searchString) { org.apache.lucene.query.Query luceneQuery = getLuceneQuery(); org.hibernate.Query query session.createFullTextQuery(luceneQuery, Product.class); searchResults = query .setMaxResults(pageSize + 1) .setFirstResult(pageSize * currentPage) .list(); } [...] } ©C© )ao ` m ù Z org.hibernate.Session m ` J[ ` FullTextSession e m C ~ #~ ņ m J YY @Name("search") public class FullTextSearchAction implements FullTextSearch, Serializable { @In FullTextEntityManager em; public void search(String searchString) { org.apache.lucene.query.Query luceneQuery = getLuceneQuery(); javax.persistence.Query query = em.createFullTextQuery(luceneQuery, Product.class); searchResults = query .setMaxResults(pageSize + 1) .setFirstResult(pageSize * currentPage) .getResultList(); } [...] } ]m ` m Yņ FulltextEntityManager B FullTextEntityManager Z EntityManager _m m Y e mņ m _à FullTextSession Zf Session ]m ^ +o |J C B Æ J ©~ ¢ZÇņ Y`[ Y[ m EntityManager e `à m FullTextEntityManager e m [ _Cņ m Y[ B _[[ ` FullTextEntityManager Y[6 _ J m Y`[ @Stateful @Name("search") public class FullTextSearchAction implements FullTextSearch, Serializable { @PersistenceContext EntityManager em; public void search(String searchString) { org.apache.lucene.query.Query luceneQuery = getLuceneQuery(); FullTextEntityManager ftEm = (FullTextEntityManager) em; javax.persistence.Query query = ftEm.createFullTextQuery(luceneQuery, Product.class); searchResults = query .setMaxResults(pageSize + 1) .setFirstResult(pageSize * currentPage) .getResultList(); } [...] } ¢ b YY[ ` m Search.createFullTextSession à e ņ m J ¢m ö m m `[J ZY[ e m ` e ©C© )a ` m e ` m ©C© )a) 1[ Ė ¢eJ Cà `J Y Z[à Y Ae[àņ C[ [ e å| Ė J à b Y[ f C[ *mė ` Y ee `à m e[[_J ̽ àė[[ C àY à e m ee à[eņ à B Yà Y e m Zf Y[ YY[ Ņ 1[ bņ [ė [ö m ` eJ m _mC _ _m b 1[ ē _ ĉ Æ e ņ à e C[Ņ <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.seam</url-pattern> </servlet-mapping> ÆŐ B m AI Y à Ç ņ Ė m e[[_J à à web.xml e[6 <listener> <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> </listener> *m [ Y`[ e `YYJ ņ e àJ Yf Y[ Z b Y[ mC `ö Y[ e Cf CJ m e _m ė C YYJ e à mC Y`[ _m C YYJ J e `ņ à _ mJ [f CJ Őė[[ m web.xml6 <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> 1[1 ©C© )a+ ¢eJJ Y öJJ YY[ e à _ e[[_ C e [ e ~ņ m e[[_J [ faces-config.xml6 <application> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> # m e[[_J [ web.xml6 <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> 1[2 j Æ *m I C[ YC `à IJņ Y m Æ m f à mYÇ b A [ ¢eJJ m I C[ Ė m e[[_J à web.xml6 <servlet> <servlet-name>Seam Resource Servlet</servlet-name> <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Seam Resource Servlet</servlet-name> <url-pattern>/seam/resource/*</url-pattern> </servlet-mapping> 1[S Æ ė à C[ e[ e ` Y _Cņ m C[ e _m m Y Y m e e[ * ö mJ ņ [ à eJ C[ e[ B [ö à _[ eJ m `[f Yf * ö CJ e m eņ _ e [[ e[ web.xml6 <filter> <filter-name>Seam Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> *m e[ ` m e e[ Y e web.xml *m e *m e[ m ` e `ņ à m components.xml à Y `[_6 ş url-pattern ő A Y eà _m m Ė e[ņ m e[ [[ Ė ©C© )aQ ¢eJJ Y öJJ YY[ url-pattern * à[ Y _m m [[_ _[ eeZ ş regex-url-pattern ő A Y eà _m m Ė e[ņ m e[ [[ f Ė regex-url-pattern J[ ZY m e Ė Ym ė _m J _m YJ m J[ ZY m m Ė Ym f m C Ė Z Ym ş disabled ő A `[ `[ e[ #J m e[ `[ m e[[_J `[f e[ ]Ä *m e[ YC m Z Y YYJ e [à pages.xml Æ[ [[ YY[ f _[[ mÇ [ ö e [[J ` ö _m Jm Z Y Æ# J m C ^^ Y e ņ m _` m[ m [[àņ ` _ėC e m m `mC ` [ Y [[ YY[ C # [à Ė e Y[ C[ J [ö * Ç à e[ņ m Z Y m[J e[ _[[ Y [[ Ėņ m_C m `mCf à ` B `à J <web:exception-filter> à components.xmlņ m_ m ZY[6 <components xmlns="http://jboss.com/products/seam/components" xmlns:web="http://jboss.com/products/seam/web"> <web:exception-filter url-pattern="*.seam"/> </components> Æ ē *m e[ [[_ YYJ m C Z `_ Y à `_ Ė Y m Y e m C e *m e[ _[[ Y [[ Ė `à e[ņ ` m `mC [ ` B components.xml6 <web:redirect-filter url-pattern="*.seam"/> z *m e à _m J m e[ Y[ b [ [f Y e Ė Y m J m [Y½ef Y e ÆIb¢f)+hhÇ * C m e[ Jņ m e[[_J à components.xml6 <web:multipart-filter create-temp-files="true" max-request-size="1000000" url-pattern="*.seam"/> ©C© )a\ ¢eJJ Y öJJ YY[ ş create-temp-files ő e trueņ Y[ e[ _ Yà e[ Æ e m[ àÇ *m à ` Y e [J e[ Yf [ ZY *m e[ J false ş max-request-size ő e m č e e[ Y[ Ė Æ `à J m Content-Length m m ĖÇ Z m C[ņ m Ė _[[ ` ` *m e[ J o Æ č [Ç m m J e ` e *m e[ [[ `à e[ Ė à components.xml `[ 6 <web:character-encoding-filter encoding="UTF-16" override-client="true" url-pattern="*.seam"/> ş encoding ő *m J ş override-client ő e m trueņ m Ė J _[[ ` _mC Y e `à encoding _mm m Ė [à Y e J e falseņ m Ė J _[[ [à ` e m Ė ė [à Y eà J *m e[ J false j_ e I mb à YB ņ _[[ [[ m I mb #BZ e[ e àņ öJ [[ `e [[ m `[f e[ Ő ė f [[ m I mb #BZ e[ web.xml à[e *m I mb #BZ e[ [à [[ e m I mb B Y à YB * C m e[ Jņ m e[[_J à components.xml *m Y m m Y e m I mb C[Y ó6 <web:ajax4jsf-filter force-parser="true" enable-cache="true" log4j-init-file="custom-log4j.xml" url-pattern="*.seam"/> ş force-parser ő e [[ b YJ ` C[ `à I me ė å| àZ m ö e falseņ [à ##å Y C[ C _[[fe å| J force-parser false YC Ye ņ ` YC C[ e ##å Y ş enable-cache ő `[ mJ e e_öfJ ÆJ BC Yņ ¢ņ Jņ Ç ]m C[YJ BC Y ¢ņ J YC m `_ e mJ m ©C© )aa ¢eJJ Y öJJ YY[ ş ő Y YfYY[ [JJJ # Ymņ [C _` Yf Y[ Zņ m [JQBZ[ eJ e[ m[ ` YC log4j-init-file ĉ *m e[ m m m [JQB YY J Z m ` [ e [J Y e ņ `à J ʿåΪΫ m Y à e[ņ m [JJJ e[ _[[ Y [[ Ėņ m_C m `mC à ` B `à J <web:logging-filter> à components.xmlņ m_ m Zf Y[6 <components xmlns="http://jboss.com/products/seam/components" xmlns:web="http://jboss.com/products/seam/web"> <web:logging-filter url-pattern="*.seam"/> </components> Ä Æ IĖ C[ m m m b C[ Y mJm m b [e à [ņ YC C[ e[ m ` YY[ à m C[ m Y *m e[ [[_ C[ _m m Z Y m Z m `JJ e m Ėņ m _ m e m f Ė Ő m[ ö m m e[ C YY[ m b FacesServlet m Ym [ e Z J b Ė *m e[ [[ `à e[ Ė à components.xml `[ 6 <web:context-filter url-pattern="/media/*"/> *m Z e[ ZY e m C e à C Z Ė Y conversationId Ő Y`[ e J m J m Ė Ő [ Y`[ e J YYJ e à _ C ` ö m [ ZY m C YYà e m `[ Y conversation + [[ à e[ e àņ [[_J à Y eà _m m m à e[ Y[ Æm C[ Y e ė YC _[[ e e à Y eà à e[ web.xmlÇ m @Filter à Y Æ_m m Y[ javax.servlet.FilterÇ6 @Startup @Scope(APPLICATION) @Name("org.jboss.seam.web.multipartFilter") @BypassInterceptors ©C© )ag ¢eJJ Y öJJ YY[ @Filter(within="org.jboss.seam.web.ajax4jsfFilter") public class MultipartFilter extends AbstractFilter { #J m @Startup m m Y C[`[ J Y̽ `B ė C[`[ m Æ@BypassInterceptorsÇ̽ m e[ m[ ` em _ m m m m I mb e[ Æ@Filter(within="org.jboss.seam.web.ajax4jsfFilter")Ç 1[[ ē ĉ ] ] YY[à m SeamInterceptor Y *m Y[ _à m YY[ m e[[_J Y eJ ejbjar.xml6 <interceptors> <interceptor> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor> </interceptors> <assembly-descriptor> <interceptor-binding> <ejb-name>*</ejb-name> <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> </interceptor-binding> </assembly-descriptor> ö_ _m J e ` ù _à m Yf eà m @JndiName Cà ` Y _Cņ m Ė # ` YY m Y eà Y m [ [ m ù e m ^ Ae[àņ m YYJ J[`[ ù e m ^+ Y e ņ m YYJ CfY e ] [[à Y eà m Y components.xml b #ņ m e[[_J Y 6 <core:init jndi-name="myEarName/#{ejbName}/local" /> ]m myEarName m e m ^#I _m m m ` Y[à m Z e ^#I Æ_m J m ^``[ ^+ Çņ m e[f [_J Y m 6 <core:init jndi-name="#{ejbName}/local" /> Őė[[ mC ZY e m Jm J e m YY[ C ù m C Æ m ó[bmÇ Ė à Y eà ù e [[ ^ f Y ZY[ [à Æ [àÇ m ņ à Y ö à _ Y ̽fÇ ^+ Cņ _ m e Y [ `[f Y e f Jņ m e[[à _ e ņ [à Y C J _m m Events Y e à ė m [ à components.xml e[ņ _ė ö_ _m fJ 6 ©C© )ah ¢eJJ Y öJJ YY[ <transaction:ejb-transaction/> 1[^ }Ĕ ń *m e[ à ö_ ` Ő Y[ seam.propertiesņ METAINF/seam.properties META-INF/components.xml e[ à mC _m m à f Y Y[à ÆC Yà YY e[ _[[ Ç # Yņ _[[ à mC _m seam.properties e[ e Y _` mC Æ]#IÇ e[ņ à Y[ seam.properties e[ m WEB-INF/classes à e à mC à Y [ m *mė _mà [[ m ZY[ mC Yà seam.properties e[ Ő ė B [ m e[ ZY CàmJ [[ _öŅ Ő Jm mö m [[à _m ö e e_ö J _[ ö Yà e[ ee m `mC e m e_ćć ][[ņ m _ö e [f e m |őe _ ė m mņ Z ` Y _[ ` e à [ Cà Y ZY[ [à components.xmlņ B [ö m f YJ e_ö Ņ mö àė[[ [ö _à ` 1[1 Æ ]] [ e àė J C ^^ \ Cņ m [[ m eJ Ė J Ņ 1[1 yĖ àėC Y öJ [[ m ee Jm ^#Iņ m mC _[[ [ö mJ [ö m6 my-application.ear/ jboss-seam.jar lib/ jboss-el.jar ©C© )ak ¢eJJ Y öJJ YY[ META-INF/ MANIFEST.MF application.xml my-application.war/ META-INF/ MANIFEST.MF WEB-INF/ web.xml components.xml faces-config.xml lib/ jsf-facelets.jar jboss-seam-ui.jar login.jsp register.jsp ... my-application.jar/ META-INF/ MANIFEST.MF persistence.xml seam.properties org/ jboss/ myapplication/ User.class Login.class LoginBean.class Register.class RegisterBean.class ... Ő m[ [ jboss-seam.jar B` [ META-INF/application.xml̽ jbossel.jar m[ ` Y[ m ^#Iė [` à ÆYJ m ^#I [Ym e à _ B~| [ņ à [ m B m ^#Iė [` f à e à _ e [ Æ Çņ à [ jsf-facelets.jar m WEB-INF/lib à e m ]#I e à _ m J [`à Æ YY[ Çņ à [ jboss-seam-ui.jar m WEB-INF/lib à e m ]#I e à _ m ~b [ J [`ņ à Y jboss-seam-pdf.jar jboss-seam-mail.jar WEBINF/lib e à _ m `J YJ Æ[à _ö e YY[ J e [Çņ à [ jboss-seam-debug.jar m WEB-INF/lib à e m ]#I mY _m C[ ZY[ YY[ m Y[à`[ à C ^^ m YY ^ +o [[à _m m _ [[ m _ à m Y e eJ ` ef [à _ė [à ` m e m _à m e àė C_m[ `à [[ m eJ eeņ e[ e öY C m e m ` ö [ 1[2 1]] ©C© )go ¢eJJ Y öJJ YY[ e[ C e àė à à ö m Y[J ^ +o m à _[ `+ ~# e ^ +o Y ņ Y[ C f e ` Őė[[ e m e e ` ` _[[ ` Cà à J ^ +o _m àė à ņ m ņ àė[[ ` `[ ö CJ e ė Ė [C J m C Y YC [C [ö ` Ő [ J à [[à J m *# UserTransaction f [C[à J ė @Transactional YY[ _[[ B J _m J ` _m C *m ` [ C e m `öJ ZY[ YY[ m f `+ C e ^+ņ m C m ~# C *m ZY[ YY[ à Y[à à )^^ YY[ C 1[2 _[[ `Y ` SessionFactory e à hibernate.cfg.xml e[ e à f [[ `[f Y6 <persistence:hibernate-session-factory name="hibernateSessionFactory"/> Ő _[[ [ eJ J e à _ J ` Session ` C[`[ C B <persistence:managed-hibernate-session name="hibernateSessionFactory" session-factory="#{hibernateSessionFactory}"/> 1[21 y+ _[[ `Y ~# EntityManagerFactory e à persistence.xml e[ e à f [[ m `[f Y6 <persistence:entity-manager-factory name="entityManagerFactory"/> ©C© )g ¢eJJ Y öJJ YY[ Ő _[[ [ eJ J Y Z e à _ J ~# EntityManager ` C[`[ C B <persistence:managed-persistence-context name="entityManager" entity-manager-factory="#{entityManagerFactory}"/> 1[22 yĖ ] Y öJ YY[ ]#Iņ m e[[_J 6 my-application.war/ META-INF/ MANIFEST.MF WEB-INF/ web.xml components.xml faces-config.xml lib/ jboss-seam.jar jboss-seam-ui.jar jboss-el.jar jsf-facelets.jar hibernate3.jar hibernate-annotations.jar hibernate-validator.jar ... my-application.jar/ META-INF/ MANIFEST.MF seam.properties hibernate.cfg.xml org/ jboss/ myapplication/ User.class Login.class Register.class ... login.jsp register.jsp ... e _ _ Y[à ` f^^ C [ö * *ùóņ _ [[ ` _ö 1[S Æ ]Ņ ē ] Y`[ Y[[à e ^^ C m ņ à [[ m_ J ņ m _[[ ` *# C[`[ e àė J ~#ņ à [[ ~# f[ [ ņ EntityTransactionņ [ö 6 <transaction:entity-transaction entity-manager="#{entityManager}"/> e àė J `ņ à [[ m ` #~ [ö m6 <transaction:hibernate-transaction session="#{session}"/> ©C© )g) ¢eJJ Y öJJ YY[ e ņ àė[[ [ e # ` [C ^` J m ^^ #~ 1[[ Æ ]Ņ ē ] ^` [ à ^+ Y m Z e m C ^^ \ YY[ f C *m Y [[àņ ` [àņ e[ e J *m `öJ ZY[ YY[ [ *ùó J m ^` C SeamTest *m `öJ ZY[ YY[ à C ` Y[à * 1[[ ] ^` `à [[ * e YY[ [à ^` [à ʭ \ Æ ʭ aÇ ^` ` _[ m ŬmY6½½ eJ½YB ½m_e[YmYćJY̾͘))haaάY öJ̾͘))hkggŭ *m Y e [[J ^` * a Ė Y[ bņ à m[ Yà m ^` #I eJ e[ * ş ¢Yà [[ e[ m ^` bootstrap lib ņ Z Y e m jndi.properties e[ņ m * lib à ş IC m annotations-api.jar e[ e m * lib à ©C© )g+ ¢eJJ Y öJJ YY[ ùZņ _ eJ e[ ` Y ^` fY e e f [à ş # m ^` [ conf/server.xml m[ YY e [[ m [ m e[ <Listener className="org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener" /> ş ]#I e[ J m[ ` `[ `à J [ conf/context.xml <Listener className="org.jboss.embedded.tomcat.WebinfScanner" /> b eJ Yņ Y[ m ^` * J _ö à ŬmY6½½_öB`J½_ö½]öBYćYJ̾^`#* ŭ 1[[1 yĖ *m mC e ]#If` Y[à C[ J [ö * _[[ [ö mJ [ö m6 my-application.war/ META-INF/ MANIFEST.MF WEB-INF/ web.xml components.xml faces-config.xml lib/ jboss-seam.jar jboss-seam-ui.jar jboss-el.jar jsf-facelets.jar jsf-api.jar jsf-impl.jar ... my-application.jar/ META-INF/ MANIFEST.MF persistence.xml seam.properties org/ jboss/ myapplication/ User.class Login.class LoginBean.class Register.class RegisterBean.class ... login.jsp register.jsp ... | e m ZY[ YY[ à ` Y[à * `à J ant deploy.tomcat 1[^ xyz ©C© )gQ ¢eJJ Y öJJ YY[ ė B~| J [[ `à e[ņ àė[[ `[ B~| `à f [[J `[f Y Őė[[ [ ZY[ [à [ à Y YJf e[_ e components.xml6 <bpm:jbpm> <bpm:pageflow-definitions> <value>createDocument.jpdl.xml</value> <value>editDocument.jpdl.xml</value> <value>approveDocument.jpdl.xml</value> </bpm:pageflow-definitions> <bpm:process-definitions> <value>documentLifecycle.jpdl.xml</value> </bpm:process-definitions> </bpm:jbpm> ù em Y [ eJ e à [à mC YJe[_ e à mC ` Y eņ à YC B~| eJņ ` eJ e B~| *m [ ZY[ jbpm.cfg.xml hibernate.cfg.xml e[ m _[[ _ö _m 6 <jbpm-configuration> <jbpm-context> <service name="persistence"> <factory> <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory"> <field name="isTransactionEnabled"><false/></field> </bean> </factory> </service> <service name="tx" factory="org.jbpm.tx.TxServiceFactory" /> <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" /> <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" /> <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" /> <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" /> </jbpm-context> </jbpm-configuration> *m Y mJ m m B~| [ `[ ^+ m[ [ m *# 1[^ yĖ *m à à _[[fe Y öJJ e e B~| eJ Y ½ YJe[_ e e[ m ZY[ _ėC Y[à Y öJ [[ m e[ m e m ^#I eņ _ _[[ Y``[à J m Y öJJ e m ^#I [ö mJ [ö m6 my-application.ear/ jboss-seam.jar lib/ jboss-el.jar jbpm-3.1.jar META-INF/ MANIFEST.MF application.xml my-application.war/ META-INF/ MANIFEST.MF ©C© )g\ ¢eJJ Y öJJ YY[ WEB-INF/ web.xml components.xml faces-config.xml lib/ jsf-facelets.jar jboss-seam-ui.jar login.jsp register.jsp ... my-application.jar/ META-INF/ MANIFEST.MF persistence.xml seam.properties org/ jboss/ myapplication/ User.class Login.class LoginBean.class Register.class RegisterBean.class ... jbpm.cfg.xml hibernate.cfg.xml createDocument.jpdl.xml editDocument.jpdl.xml approveDocument.jpdl.xml documentLifecycle.jpdl.xml 1[b y * YY[ Y[ņ àė[[ YC Y[ Æportlet.xmlņ Ç m [ C ^^ m examples/portal f à e ZY[ e m `öJ Y eJ ~[ 1[c _ + Cà Y m m e e[ mJm m m e **~ ņ m_ bė à `e m ė **~ m #YY[ C m e[ ` e +o ņ _m m eJ server/default/conf/standardjboss.xml ÆY[ e[ _m à _ eJÇ *m e[ b ` B `à eàJ m C[ e max-bean-life m LRUStatefulContextCachePolicy m eJ6 <container-cache-conf> <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy> <cache-policy-conf> <min-capacity>50</min-capacity> <max-capacity>1000000</max-capacity> <remover-period>1800</remover-period> <!-- SFSB timeout in seconds; 1800 seconds == 30 minutes --> <max-bean-life>1800</max-bean-life> <overager-period>300</overager-period> <max-bean-age>600</max-bean-age> ©C© )ga ¢eJJ Y öJJ YY[ <resizer-period>400</resizer-period> <max-cache-miss-period>60</max-cache-miss-period> <min-cache-miss-period>1</min-cache-miss-period> <cache-load-factor>0.75</cache-load-factor> </cache-policy-conf> </container-cache-conf> *m e[ **~ ` e server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml e QoZņ server/default/deploy/jboss-web.deployer/conf/web.xml e Q)Z *m e[[_J à m e[ [ m e[ e [[ _` YY[ 6 <session-config> <!-- HTTP Session timeout, in minutes --> <session-timeout>30</session-timeout> </session-config> * C m C[ e à _ YY[ ņ Y[à [ m à à Yf Y[ ė _ web.xml ©C© )gg 1^ { S ¢Q Æ [ ¢ e CÇ J Æ [à * m[Jà ~C_ [Ç f [ė ^^\ YY[ C YY[ ` Y[à ¢Qņ ` Ė [ eJ mJņ Y *m mY _[[ m_ à Zf [à _m ` ] _[[ `à [öJ m `[J Y[àJ m ^^\ [ öJ ZY[ YY[ _m m _m *m _ _[[ Y[à YB J `à seam-gen b ` seam-gen YY[ _m I mb BZ Yņ e [ *m ZY m YY[ [ à _m [ņ ~# YC _m m`ņ ¢IA C JJ e |àĒ ` 1^ { S b _ [[ m J f ¢QB *m mY Ė à ¢Q J * m[Jà ~C_ Æ ¢Q oJÇ Ő _[ ¢Q J e mf Y6½½___ [ ½ m[Jའm½BC½ QB½½ ŬmY6½½___ [ ½ m[Jའm½BC½ QB½½ŭ [_ [[ [ mņ ņ m_ m J [ b em e [[J ¢Qņ [ m readme.txt ` _m ¢Qņ m ¢Q [[ J [ _[ čY ¢Q ) |ö à mC $JAVA_HOME $ORACLE_HOME C C`[ Æ $ORACLE_HOME m à _m m à čY ¢QÇ b em e f [[J ¢Qņ [ m readme.txt ` _m ¢Q + #YY[ ƽ_Ç Y[à m $ORACLE_HOME/j2ee/home/applications f à ù m ¢Q YY m Y[à `à e[ *m Cà à Y[à m YY[ à m C Q ¢Q6 $ORACLE_HOME/j2ee/home/java -jar -XX:MaxPermSize=256M oc4j.jar Ő C m e[ ~ó à J J `C ¢Q [ ŬmY6½½___ [ ½ m[Jའm½BC½ QB½½ QBf[m[ŭ e [ Ő _[[ ` ö m Y_ e m m e à mC f ¢Q \ Y[à à m ö à YY[ ht- tp://localhost:8888/<your-app-path> a Ő Y m C `à YJ CTRL-C m [ _m m m C f J ©C© )gh ¢Q 1^1 jee5/booking Ä *m jee5/booking ZY[ ` m [ öJ ZY[ Æ_m m #Ç e m `Z J ó[emņ ` ė à `[ e ¢Q [ m $SEAM_DIST/examples/jee5/booking à 1^1 Ė ]Ä } bņ [ [ö m ` Y e m `öJ ZY[ # _m m ö_f [J _ [ö m Z Y Ė m ¢Q ] _[[ m_ à m_ J m Y m YY[ )a)+ņ ů [J m B\½`öJ ZY[ Ű `[_ 1^1 ş jboss-seam.jar ő ] [ m ^+ [ Æ_màć _[[ ` `[ _m J ̽ m Y[ ^+ e[ Ç ş jboss-el.jar ş jboss-seam-ui.jar ş jboss-seam-debug.jar ş jsf-facelets.jar ş richfaces-api.jar ő ė b [ Y #Y mė f`[ ņ richfaces-impl.jar richfaces-ui.jar ő _m m Ė #Y m f fJ f`[ 1^11 ]Ä ş ` ő e ņ _ ` m ~# YC Æm m *Y ö ^[ _m m mY _m ¢QÇ * ` à ~# YC à m e[[_J B6 ş hibernate.jar ş hibernate-annotations.jar ş hibernate-entitymanager.jar ş hibernate-validator.jar ş jboss-common-core.jar ş commons-logging.jar ©C© )gk ¢Q ş ş ş commons-collections.jar *m Yà B ő C B e m ZY[ ş javaasist.jar ş dom4j.jar ş cglib.jar ş asm.jar ş commons-beanutils.jar ş commons-digester.jar ş log4j.jar ő *m ` [e e à JJ eJ [JQB e Y öJ ` eJ [JJJ _[[ ` m QB ^Z ¢Q B ő IJ YY[ C Æ m # ó[emÇ à [à [ m Y e m ` e à f [[à ÆJ e à *Z à [ #ù* IÇ̽ `ņ ¢Qņ J [[J à [_à [ m6 ş hibernate-search.jar ş hibernate-common-annotations.jar ş lucene-core.jar ş antlr.jar ş jbpm-jpdl.jar ş quartz.jar ş dbunit.jar ş jboss-embedded-api.jar ş [ ő e à ] ė J à _m [ņ ` mC [ [ e a B6 ő e m` m ő e m` m ő e *Z ő e ė ~| ő e J [ ş drools-core.jar ş drools-compiler.jar ş janino.jar ş mvel141.jar ş core.jar ©C© ő e J [ )ho ¢Q ş antlr-runtime.jar [ J m ZY[ 1^11 *m B e_ mJ ` 6 web.xml Ő [ [[ à B`ė m web.xml *m [[à Ė e ` e ^^\ YY[ C f e ZY[ ¢Q ó[em *m [à m ZY[ė _`Z[ e[ņ `[_ ZY[ <ejb-local-ref> <ejb-ref-name> jboss-seam-jee5/AuthenticatorAction/local </ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local> org.jboss.seam.example.booking.Authenticator </local> <ejb-link>AuthenticatorAction</ejb-link> </ejb-local-ref> persistence.xml Ő YC m eJ e à ~# Y[ ] f J ` ¢Q `[J [ #ù* Iņ _ [C Ėà e àņ _ [ _ m ¢Q J6 b ZY[ eà m resources/META-INF/persistence.xml e[ ¢ m ó[em YY f m ¢Q YY <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> <property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OrionTransactionManagerLookup"/> 1^12 jee5/booking Ä |eà m build.xml e[ m ZY[6 ş Af m [`[ ¢Qf[ [`à YY *m _[[ [ [[ m Z Y `C m[ [ö [ö m e[[_J6 <!-- add libs for oc4j (eager classloading) --> <property name="jbpm.lib" value="true"/> <property name="drools.lib" value="true"/> <property name="quartz.lib" value="true" /> ©C© )h ¢Q <property name="search.lib" value="true" /> <property name="dbunit.lib" value="true" /> <property name="jboss-embedded-api.lib" value="true" /> ) [ m YY `à J ant m examples/jee5/booking à *m `[ J dist/jboss-seam-jee5.ear + ¢Yà dist/jboss-seam-jee5.ear e[[_J m `[_ 1^2 }ĉ { S *m f[ ` m Æe[à Ç Y Ė Y[à ^^ \ Y[ ¢Q à mC [à _[ [[ e[[_J )aņ ů[[ Y e ¢QŰ [ Y[àJ m jee5/booking ZY[ņ J m ` mĖ[` ` * Y[à m YY[ à _[ [ m YY[ Yf m à f ¢Yà hsqldb.jar ¢Q m [`à à6 cp ../../seam-gen/lib/hsqldb.jar $ORACLE_HOME/j2ee/home/applib/ Æ¢Q ė _m ` ` _ f Ē Ç ) ^ m ¢Q e[ $ORACLE_HOME/j2ee/home/config/data-sources.xml ņ f <data-sources> ņ <managed-data-source connection-pool-name="jee5-connection-pool" jndi-name="jdbc/__default" name="jee5-managed-data-source" /> <connection-pool name="jee5-connection-pool"> <connection-factory factory-class="org.hsqldb.jdbcDriver" user="sa" password="" url="jdbc:hsqldb:." /> </connection-pool> *m jndi-name m jta-data-source persistence.xml + ^ $ORACLE_HOME/j2ee/home/config/server.xml ņ <application-server> ņ <application name="jboss-seam-jee5" path="../../home/applications/jboss-seam-jee5.ear" parent="default" start="true" /> * öY mJ Y[ m à e YB Q ^ $ORACLE_HOME/j2ee/home/config/default-web-site.xml ņ ņ <web-site> ņ <web-app application="jboss-seam-jee5" name="jboss-seam-jee5" load-on-startup="true" root="/seam-jee5" /> ©C© )h) ¢Q *m root m Z Ym à _[[ Y à _` `_ m YY[ f \ ¢Yà m YY[ ¢Q6 cp dist/jboss-seam-jee5.ear $ORACLE_HOME/j2ee/home/applications/ a ½Y ¢Q e[[_J )aņ ů[[ Y e ¢QŰ `C g ¢m ö m YY 6 http://localhost:8888/seam-jee5 1^S { S }ĉ seam-gen J [ e C[Y m Ė ö[à J à Y J _m e[[ YY[ _C m YB m eJ # *m m Z Y mC Z ¢QB *m e[[_f J ZY[ à J m [ Y[ Z ņ ` e à à eC ^ seam-gen YB _m YY e ^ [Y ù` seam-gen ] _[[ `à J Y[àJ Yà Y[ YY[ J seam-gen *m _ė[[ m_ à m_ à seam-gen ` *[ C J ` m e [ ¢IA YY[ seam-gen _[[ ~# à `ņ #YY[ b_ö Y b C_ e à ] _[[ [ à J [ *m [ |àĒ Æ` e à [ à `ņ [J m Ē YYYÇ̽ [[ņ eJ |àĒ ņ m ` _m Y[ ė eJ [ _[ m mysql-connector-java-X.jar e B` YY ]m J Y à m [ _[[ m `[ User _m [ username password _m [ à à m à Y à àY e Y[ `[ à _[ [ö 1^S ò seam-gen b _ [[ m seam-gen _m _ _ņ ./seam setup m ` à b[[_ m J ZY[ `[_ ` à à Y ÆZ à ` e oc4jexample Ç > ./seam setup Buildfile: build.xml init: setup: [echo] Welcome to seam-gen :-) [input] Enter your Java project workspace (the directory that contains your Seam projects) [C:/Pro /home/jbalunas/workspace [input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.2.GA] [C:/Program Files/jboss/home/jbalunas/jboss/jboss-4.2.2.GA ©C© )h+ ¢Q [input] Enter the project name [myproject] [myproject] oc4j_example [echo] Accepted project name as: oc4j_example [input] Select a RichFaces skin (not applicable if using ICEFaces) [blueSky] ([blueSky], classic, [input] Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [e [input] Enter the Java package name for your org.jboss.seam.tutorial.oc4j.action [input] Enter the Java package name for your org.jboss.seam.tutorial.oc4j.model [input] Enter the Java package name for your org.jboss.seam.tutorial.oc4j.test [input] What kind of database are you using? mysql [input] Enter the Hibernate dialect for your session beans [com.mydomain.oc4j_example] [com.mydoma entity beans [org.jboss.seam.tutorial.oc4j.action] [o test cases [org.jboss.seam.tutorial.oc4j.action.test] [hsql] ([hsql], mysql, oracle, postgres, mssql, db2, database [org.hibernate.dialect.MySQLDialect] [org.hi [input] Enter the filesystem path to the JDBC driver jar [lib/hsqldb.jar] [lib/hsqldb.jar] lib/mysql-connector.jar [input] Enter JDBC driver class for your database [com.mysql.jdbc.Driver] [com.mysql.jdbc.Driver] [input] Enter the JDBC URL for your database [jdbc:mysql:///test] [jdbc:mysql:///test] jdbc:mysql:///oc4jexample [input] Enter database username [sa] [sa] username [input] Enter database password [] [] password [input] skipping input as property hibernate.default_schema.new has already been set. [input] Enter the database catalog name (it is OK to leave this blank) [] [] [input] Are you working with tables that already exist in the database? [n] (y, [n], ) y [input] Do you want to drop and recreate the database tables and data in import.sql each time you n [input] Enter your ICEfaces home directory (leave blank to omit ICEfaces) [] [] [propertyfile] Creating new property file: /home/jbalunas/workspace/jboss-seam/seam-gen/build.properti [echo] Installing JDBC driver jar to JBoss server [copy] Copying 1 file to /home/jbalunas/jboss/jboss-4.2.2.GA/server/default/lib [echo] Type 'seam create-project' to create the new project BUILD SUCCESSFUL *àY ./seam new-project à YB cd /home/jbalunas/workspace/oc4j_example m _[à YB 1^S1 ĉ { S ] _ ö mJ m J YB 1^S1 ė _m m eJ e[6 build.xml ş ¢mJ m e[ J mC Æ_ ė JJ C Y[à ¢QÇ <project name="oc4j_example" default="archive" basedir="."> ©C© )hQ ¢Q ş ¢Q [ö e m [ e[ /security.drl e[ m e m war e[ f e m e m ear e[ _ mC m build.xml C m [ `[ *m e[[_J ` m Y e m <target name="war" depends="compile" description="Build the distribution .war file"> J <copy todir="${war.dir}"> <fileset dir="${basedir}/resources" > <include name="*.drl" /> </fileset> </copy> resources/META-INF/persistence-dev.xml ş #[ m jta-data-source ` jdbc/__oc4jexample Æ m m jndi-name _m J m data-sources.xml [ J Y[àÇ ş # m YY Æ ` jee5/booking ZY[Ç6 <property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory" /> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OrionTransactionManagerLookup" /> <property name="hibernate.transaction.flush_before_completion" value="true"/> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> ş IC m # Y e m e ZYJ m ^à|Jb à6 <property name="jboss.entity.manager.factory.jndi.name" value="java:/oc4j_exampleEntityManagerFactory"> ş Őė[[ [ persistence-prod.xml _[[ e à _ Y[à ¢Q f J m Y Ye[ resources/META-INF/jboss-app.xml Ő [ m e[ _ ė Y[àJ # Æ jboss-app.xml `[ [[J [ #Ç resources/*-ds.xml Ő [ m e[ _ ė Y[àJ # Æm e[ e f #ņ ¢Q à mC m data-sources.xml e[Ç resources/WEB-INF/components.xml ş ^`[ J <transaction:ejb-transaction /> Yņ J f m ė Y [ xm- lns:transaction="http://jboss.com/products/seam/transaction" ş #[ m jndi-pattern java:comp/env/oc4j_example/#{ejbName}/local ş ] _ |J ~ ¢Z YY[ Ae[à ©C© )h\ ¢Q ¢Q ė ZY m ^à|Jb à ùņ ` YC `[f J Y * C m e[[_J à6 <persistence:entity-manager-factory auto-create="true" name="oc4jEntityManagerFactory" persistence-unit-name="oc4j_example" /> ] m [[ ņ _ [ m managed-persistence-context f B J m ^à |J b à m ZJ [6 <persistence:managed-persistence-context name="entityManager" auto-create="true" entity-manager-factory="#{oc4jEntityManagerFactory}" /> resources/WEB-INF/web.xml Ő m J J ^ à `[_ If ` e ¢QB à [ [[ à ^ m e à eà m YY[ em <ejb-local-ref> <ejb-ref-name> oc4j_example/EjbSynchronizations/local </ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local> org.jboss.seam.transaction.LocalEjbSynchronizations </local> <ejb-link>EjbSynchronizations</ejb-link> </ejb-local-ref> resources/META-INF/orion-application.xml ş *m e[ m à m I mb #BZQe à[m _[[ _ö _m ¢Q *m e[ ` [[à [[ ¢Q e _ m AI f J <?xml version = '1.0' encoding = 'utf-8'?> <orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/ orion-application-10_0.xsd" schema-major-version="10" schema-minor-version="0" component-classification="internal"> <imported-shared-libraries> <remove-inherited name="oracle.xml"/> </imported-shared-libraries> </orion-application> ş ù_ à [[ m build.xml e[ m Yà m e[ m ear mC b m <target name="ear" description="Build the EAR"> J eà m <copy todir="${ear.dir}/META-INF"> [ö [ö m e[[_J6 <copy todir="${ear.dir}/META-INF"> <fileset dir="${basedir}/resources/META-INF"> ©C© )ha ¢Q <include name="application.xml" /> <include name="orion-application.xml"/> <include name="jboss-app.xml" /> </fileset> </copy> 1^S11 ]Ä x *m YY[ m [ Ė m jee5/booking ZY[ `C *m build.xml ` e m B [ `[_ m J mC e[ ö e m <fileset dir="${basedir}"> `[_ m Y f m m m [` `J Y <target name="ear" description="Build the EAR"> <copy todir="${ear.dir}"> <fileset dir="${basedir}/resources"> <include name="*jpdl.xml" /> <include name="*hibernate.cfg.xml" /> <include name="jbpm.cfg.xml" /> <include name="*.drl" /> </fileset> <fileset dir="${lib.dir}"> <include name="jboss-seam.jar" /> </fileset> <fileset dir="${basedir}"> <include name="lib/jbpm*.jar" /> <include name="lib/jboss-el.jar" /> <include name="lib/drools-*.jar"/> <include name="lib/janino*.jar"/> <include name="lib/antlr-*.jar"/> <include name="lib/mvel*.jar"/> <include name="lib/richfaces-api*.jar" /> </fileset> </copy> <copy todir="${ear.dir}/META-INF"> <fileset dir="${basedir}/resources/META-INF"> <include name="application.xml" /> <include name="jboss-app.xml" /> </fileset> </copy> </target> ş `6 <include <include <include <include <include <include <include <include <include ş name="lib/hibernate.jar"/> name="lib/hibernate-annotations.jar"/> name="lib/hibernate-commons-annotations.jar"/> name="lib/hibernate-entitymanager.jar"/> name="lib/hibernate-search.jar"/> name="lib/hibernate-validator.jar"/> name="lib/commons-logging.jar"/> name="lib/commons-collections.jar"/> name="lib/jboss-common-core.jar"/> [ ő ` _ J [ YC à [ņ _ ^ [Y * Y[ Æà ė m #̽ J m ¢Qė [[JÇ6 <include name="lib/core.jar"/> ©C© )hg ¢Q ş *m Yà B ő e m [à ` e ¢Qė [[J6 <include <include <include <include <include <include <include <include <include <include <include name="lib/javassist.jar"/> name="lib/quartz.jar"/> name="lib/dbunit.jar"/> name="lib/jboss-embedded-api.jar"/> name="lib/dom4j.jar"/> name="lib/lucene-core.jar"/> name="lib/cglib.jar"/> name="lib/asm.jar"/> name="lib/commons-beanutils.jar"/> name="lib/commons-digester.jar"/> name="lib/antlr.jar"/> Ő m[ Y _m mJ [ö6 <fileset dir="${basedir}"> <include name="lib/jbpm*.jar" /> <include name="lib/jboss-el.jar" /> <include name="lib/drools-*.jar"/> <include name="lib/janino*.jar"/> <include name="lib/antlr-*.jar"/> <include name="lib/mvel*.jar"/> <include name="lib/richfaces-api*.jar" /> <include name="lib/hibernate.jar"/> <include name="lib/hibernate-annotations.jar"/> <include name="lib/hibernate-commons-annotations.jar"/> <include name="lib/hibernate-entitymanager.jar"/> <include name="lib/hibernate-search.jar"/> <include name="lib/hibernate-validator.jar"/> <include name="lib/commons-logging.jar"/> <include name="lib/commons-collections.jar"/> <include name="lib/jboss-common-core.jar"/> <include name="lib/core.jar"/> <include name="lib/javassist.jar"/> <include name="lib/quartz.jar"/> <include name="lib/dbunit.jar"/> <include name="lib/jboss-embedded-api.jar"/> <include name="lib/dom4j.jar"/> <include name="lib/lucene-core.jar"/> <include name="lib/cglib.jar"/> <include name="lib/asm.jar"/> <include name="lib/commons-beanutils.jar"/> <include name="lib/commons-digester.jar"/> <include name="lib/antlr.jar"/> </fileset> 1^S2 ĉ |Ĕ { S *m Cà [ m )a+ņ ůY[àJ m Yf Y[ ¢QŰ ` _m m e e m oc4j_example YY[ ş [ à YY[ `à [[J ant m ` à e à YB ÆZ / home/jbalunas/workspace/oc4j_example Ç *m J e m `[ _[[ ` dist/ oc4j_example.ear ş ¢Yà m mysql-connector.jar e[ m $ORACLE_HOME/j2ee/home/applib à m B` C C[`[ ş $ORACLE_HOME/j2ee/home/config/data-sources.xml <managed-data-source ©C© )hh ¢Q connection-pool-name="oc4j-example-connection-pool" jndi-name="jdbc/__oc4jexample" name="oc4j-example-managed-data-source" /> <connection-pool name="oc4j-example-connection-pool"> <connection-factory factory-class="com.mysql.jdbc.Driver" user="username" password="password" url="jdbc:mysql:///oc4j" /> </connection-pool> ş $ORACLE_HOME/j2ee/home/config/server.xml <application name="oc4j_example" path="../../home/applications/oc4j_example.ear" parent="default" start="true" /> ş $ORACLE_HOME/j2ee/home/config/default-web-site.xml <web-app application="oc4j_example" name="oc4j_example" load-on-startup="true" root="/oc4j_example" /> ş ½Y ¢Q e[[_J m Installation and operation of OC4J `C ş ¢m ö m YY 6 http://localhost:8888/oc4j_example 1^SS ]Ä Ä ē Æ j} } m _ Z m ` seam-gen YY[ e[[ `[_ ¢IA YY[ f ` ZJ ` ~[ _ _[[ Drools ` à _[[ 1^SS Æ seam-gen ĉ j} *àY ./seam generate-entities m ` à e à ` *m _[[ m ņ m #YY[ b_ö [ m [C C_ e m ¢IA YY[ *mė [[àmė [ Y[à `e e à[e 1^SS1 Ė ĉ ē j} # `C m à ` m User `[ _m username password [ _m [ à e à ė mC m à à eà m authenticate m `[_ [ö User à à `à öJ m [ f [ Æ¢Q ^+ e [[ŅÇ6 ©C© )hk ¢Q ş # m @Stateless m Authenticator [ ş I m [ AuthenticatorAction ş ¢ e [[ Authenticator _m m AuthenticatorAction Y[ Æ^+ Ė ` mC [ [ e Ç # m e _m @Local ņ J[ m _m J m authenticate AuthenticatorAction @Name("authenticator") @Stateless public class AuthenticatorAction implements Authenticator { @Local public interface Authenticator { public boolean authenticate(); } ) A @PersistenceContext B ^à|J `à J m [ m AuthenticatorAction [6 @PersistenceContext private EntityManager entityManager; + Y[ m 6 public boolean authenticate() { List <User> users = entityManager .createQuery("select u from User u where u.username = #{identity.username} and u.password = #{identity.password}") .getResultList(); if (users.size() == 1) { identity.addRole("admin"); return true; } else { return false; } } Q # m m ^+ e web.xml 6 <ejb-local-ref> <ejb-ref-name> oc4j_example/AuthenticatorAction/local </ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local> org.jboss.seam.tutorial.oc4j.action.Authenticator </local> <ejb-link>AuthenticatorAction</ejb-link> </ejb-local-ref> [ Y[à `e m _ [à [ Y_ f Y 1^[ _ *mė ņ _ė mJm Ő _ mC J J Y e à ` YY[ f Y[à ¢Q ©C© )ko 1b ]+Ĕ \ ]`[J oå ^#ė ^^\ C eeJņ [à oo|~ m `[ [ņ o+*~ m [ m YC_ [ YY[ ` Y[à C[Y ]`[J Cņ m mY _[[ m_ à m_ *m ö_ _m m ]`[J C m _[[ ` _ö ņ eJ mJ m b Y J ]`[J _[ņ [[ J Æ [[ eÇ *m _ė[[ [ö ` ė ^^\ ZY[ m m[ JJ Jņ _m `[ ö Z #e m m ~# ZY[ _[[ ` e Y[à m C *m e[[à _ _[[ seam-gen YY[ J Y J YC BY à YY[ 1b \ b mJ e _ J m C [[ f m m ` ]`[J oo|~ m `[ [ņ _m[ o+*~ m [ YC_ C m eZ mJ `ö m ş ő _[ ŬmY6½½ ` ½m_Y BYće[à̾] άB̾oά̾ŭ Weblogic 10.0.MP1 YJ oo|~ m ö_ _m ^ m varargs m m Æ e m transient Ç *m Z Y _m ]`[J Y Y[ m ^ varargs *m ` _ö m oo|~ e m [à m jpa ]#I ` seam-gen ZY[ _ö _m m C m jee5/booking ZY[ e [ ş 10.3.TP ő _[ YJ ŬmY6½½ ` ½m_Y BYće[à̾] άB̾o+* mά̾fά ̾___͘] ͘of+* m~C_͘ ά]* ̾ ͘___͘] ͘o+͘* m~C_ ŭ Weblogic *m C [[ m eZ m varargs `Jņ m _ _m ^ m kodo Æ^#ė Y[ e ~#Ç m jee5/booking ZY[ e [ _C e m varargs JJ J eZ _[[ [ö[à ` Y m C b m [ `Cņ m e m o+*~ J [ m J[ e ^+ YY ]`[J ņ o+*~ _[[ ` e m ZY[ `[_ 1b i2y m Ė ö Y [[J ]`[J o+*~ b [ e à mCJ à Y[ m ö _m m ^# m * m ~C_ ¢ ŬmY6½½ ` ½_[½Z½* m~C_½ŭ _ [[ m I^ \ C J m JYm [ [[6 ©C© )k ^#ė ]`[J b[[_ m [ö JC `C e o+*~ _[ m C e à f C Ő _[[ J Y e _m ^# m ) Ő à mJ m m server103tp_XX.bin e[ ` Z `[6 chmod a+x server103tp_XX.bin + ^Z m [[6 ./server103tp_XX.bin Q ]m m JYm [ [[ [ņ à m ^# m [ *m _m [[ ^# YY[ [[ *m [ _[[ ` ö_ $BEA_HOME m J6 /home/jbalunas/bea \ [ Complete m [[ àY Ő [[ m Z e m f Y[ [[ Æ m `mC [`Çņ ` _[[ m a *m à [[ _m [[ m C Y6 $BEA_HOME/wlserver_10.3tp 1b1 ĉ \ # ]`[J [ C eJ f [e C *m ]`[J C à B [[ m ZY[ ņ ` _ JJ B e m ZY[ Ő m ZJ e à _m Æeà m Ç Y m ]`[J eJ _č6 $BEA_HOME/wlserver_10.3tp/common/bin/config.sh ) ¢m _ ņ eJ YY Weblogic Server TP ù m m m e[ Y + Y_ e m Q ùZ m Development Mode m e[ ʭ _m JC m Y \ *m Z ö e à _ č à J [ No a b[[à m e m seam_examples [C m e[ [ f 1b2 ē ºº+ ĉ ù_ m m C [[ m à ö_ m_ ©C© )k) ^#ė ]`[J Y ņ Y[ m_ eJ [ ş J m 6 *m m à Y f J m $BEA_HOME/user_projects/domains/seam_examples/bin f à m ./startWeblogic.sh Y ş # J m eJ [6 m http://127.0.0.1:7001/console à _` `_ _[[ ö e à Y_ m à `e ] _ė J m m _ņ ` m m J Y e [ e m C eJ m [ ş YYJ m 6 *m Y[ e Y m6 ş ş *m _à mJm m eJ [6 [ seam-examples m [e m e m [ ) ¢m m Control ` m [ e m YJ + [ m m ö `Z AdminServer m `[ Q ¢m Shutdown B `C m `[ņ [ m When work completes Force shutdown now YYY \ *m e[[à e m à _ m m C _ J Ctrl-C m [ _m à m ù JC ee mC ` ņ ` _ _[ J m _m[ m [ e eJ mJ m [ ş # ]`[J [[J ]m J m @DOMAIN/autodeploy à ` m mY à à NoClassDefFound Z Y e à m à J m ]`[J C e à [[ C m fY[à ^#I½]#I e[ņ m Cņ Y[à ] [ e Y e e mņ ` m ` mCf J m _[[ 1b1 jee5/booking Ä à _ J ^ė ]`[J ć e m `[ ö m öY e _öJ *m ` _m mJ m jee5/booking Zf Y[ J [ Y[àJ Y`[ b _ė[[ [ö ` m `[ ö _m mà ee ©C© )k+ ^#ė ]`[J 1b1 ] Ė ē \ b C[ [ e ]`[J m m ` _m Y[J ^ė m C`[ J m m *m e m ]`[J kå oå Cf ] m mY m m _[ ` [C m m YC_ [ņ ` C`[ J [ ^ė [ m eZ _m ^ė _[[ _ö *m J e m m m ]`[J ^ Y[ `[C m m m varargs transient m Y[à _[[ e[ _m Z Y [ö `[_6 java.io.IOException: Compiler failed executable.exec: /home/jbalunas/bea/wlserver_10.3tp/user_projects/domains/seam_examples/servers/AdminServer /cache/EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/ TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:194: modifier transient not allowed here public transient javax.ejb.Timer scheduleAsynchronousEvent(java.lang.String arg0, java.lang.Object[] arg1) ^ /home/jbalunas/bea/wlserver_10.3tp/user_projects/domains/seam_examples/servers/AdminServer /cache/EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/ TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:275: modifier transient not allowed here public transient javax.ejb.Timer scheduleTimedEvent(java.lang.String arg0, org.jboss.seam.async.TimerSchedule arg1, java.lang.Object[] arg2) ^# à m m `J _m C Y e m ņ YC _ö ņ _[[ eZ m ş ^# e ŬmY6½½e` ½mBYćm̾+oooo)ogQŭ ő m JJ _J e _ [ e oå ş ^# e ŬmY6½½e` ½mBYćJ̾+ooooa)koŭ ő Y e ^# YY m ^# àJ _m m Y _m [ö m `J ş `J Y ŬmY6½½`J ½`J`½C_͘`Jć`J̾͘a\ahk\ŭ ő f ` [ e m ņ ` à m _[[ ` eZ _m m ć # [ e _ ^ė _m C`[ J _[[ ]`[J 1b1 ĉ ē yÆē # [ C [ Y m m YC_ C e ]`[J Ő à ~# YC _m ^ė Z Y e m e[ kodo openJPA Y[ # à Y m ZY[ à _[[ m `e m varargs Y`[ Aef [à J kodo openJPA m[Y _m m `[ ö ` `C ` Yf ö_ m mC m _m m m YC_ _[ mY½ZY m _[[ ` eZ e [ Æ ^# b ŬmY6½½e` ½mBYćm̾+ooooQQo+ŭÇ *m e à m m Z ö ņ m Y e ^# ©C© )kQ ^#ė ]`[J 1b11 jee5/booking Ä m _[[ _[[ Ė ö[à J C m Y J m jee5/booking ZY[ m Y m `[ ö m_ [e 1b11 è *m ZY[ m à màY `ņ m ` Y *m [ _č [ö e YJ eJ ¢Yà hsqldb.jar _`[J ė m [`à à6 cp ../../seam-gen/lib/hsqldb.jar /home/jbalunas/bea/user_projects/domains/seam_examples/lib ) Y m C CJ m [ e[[_J f )g+ņ ů_ ½Y½# à Ű + m [e CJ seam_examples - Services- JDBC - Data Sources Q Ő [ ö m eJ J m ` m YY [e `Z \ *m [ ` New ` m Y e m `[ a b[[ m e[[_J6 ù6 seam-jee5-ds ` ù ù6 seam-jee5-ds ` *àY C6 other [ Next ` g [ Next ` m Transaction Options YJ h b[[ m e[[_J m Connection Properties YJ6 k ` ù6 hsqldb ` ù6 127.0.0.1 ~6 9001 A6 sa _[[ Yà Y_ e[ [ Next ` b[[ m e[[_J m Connection Properties YJ6 C ¢[ ù6 org.hsqldb.jdbcDriver ` AI 6 jdbc:hsqldb:. ©C© )k\ ^#ė ]`[J A6 sa _[[ Yà Y_ e[ C m e m e[ Yà [ Next ` o ¢m m J e m m [à AdminServer ¢[ ö Next b[[à f YY[à m mJ `à [ J m Apply Changes ` m YY [e 1b111 resources/META-INF/persistence.xml ş m m YC_ C _[[ [à _ö _m kodo openJPA m ~# YC à mJ m YC 6 <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> ş ùZ à mJ m jta-data-source _m à `C 6 <jta-data-source>seam-jee5-ds</jta-data-source> ş *m m YY m e[ m` Y e `à openJPA ` ` [e 1b112 }ĉ + *m mJ m `[ Y m _ Y Y[à m YY build.xml ]`[J mY _m e[ b Y[ _ m b [` m ]#I # m e[[_J m build.xml m _[[ m B ù m richfaces-api.jar [à e J m [ Y[à b ]`[J m WAR _m m YY[ <fileset id="war.lib.extras" dir="${seam.dir}"> <include name="lib/jsf-api.jar" /> <include name="lib/jsf-impl.jar" /> <include name="lib/richfaces-api.jar" /> </fileset> ù_ _ `[ m YY[ `à J ant archive m ` e m ZY[ f à _ m ]`[J C[Y _ Y[à m Yf Y[ `à YJ m ^#I e[ m Y[à à ©C© )ka ^#ė ]`[J cp ./dist/jboss-seam-jee5.ear /home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy _m _ m varargs m [ Y à _[[ ʭ _f Jņ m Z Y Y[ [ö m `[_ <Error> <EJB> <BEA-012036> <Compiling generated EJB classes produced the following Java compiler error message: /home/jbalunas/bea/user_projects/domains/seam_examples/servers/AdminServer/cache/ EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/ TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:32: modifier transient not allowed here public transient void scheduleTransactionSuccessEvent(java.lang.String arg0, java.lang.Object[] arg1) ^ /home/jbalunas/bea/user_projects/domains/seam_examples/servers/AdminServer/cache/ EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/ TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:113: modifier transient not allowed here public transient javax.ejb.Timer scheduleAsynchronousEvent(java.lang.String arg0, java.lang.Object[] arg1) ... *m e _ J _m ]`[J J ^ė _m [ m varargs [C 1b2 jpa Ė Ä *m m [ öJ ZY[ Y[ ~ ` ~# Ė ^+ YY *m ZY[ [à m `ö e eJ `[ Y e à e m [J ]`[J oå b _ė[[ `[ m ZY[ e ]`[J oZ m Y Y[à *m _ė[[ [ö ` _m ee `_ m ]`[J Cņ _m m # C 1b2 ĉ jpa Ė Ä Y Y m ņ Y _ `[ m YYņ Y m Y[à 1b2 *m ]`[J oå C e m ZY[ m à mĖ[ ` e m `[ ~ ` e à _m m ~ ` à Y ~ ņ B m m` J persistence.xml m ~ [ b e m jpa/weblogic92 ZY[ ~ ¢eJJ m Cà [ m B\ )g))ņ ůJ Y m mĖ[ Ű b[[_ m Y m ņ ` m e[[_J _m ©C© )kg ^#ė ]`[J ş ù6 seam-jpa-ds ş ù ù6 seam-jpa-ds 1b21 Ä [J [à Ė J m 6 ant -f build-weblogic10.xml *m _[[ Y e ` ZY[ mC 1b22 }ĉ Ä ]m _ [[ ]`[J e[[_J )g)ņ ů¢J à ]`[J Ű _ m mC m C[Y *m Y[à m YY[ [[ _ Yà m Y[à à cp ./dist-weblogic10/jboss-seam-jpa.war /home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy ¢m ö m YY[ m e[[_J http://localhost:7001/jboss-seam-jpa/ 1b21 \Ĕ ē \ iÄ ş _ m m ]`[J oZ k) ZY[ m C[ ee 6 ş META-INF/persistence.xml ő *m k) C eJ m PointBase f ` Yf[[ *m oZ C m hsql ` ş WEB-INF/weblogic.xml ő *m e[ [C _m [ Cf e m ANTLR [` m ]`[J oZ [[à ¢Q mC m _[[ <?xml version="1.0" encoding="UTF-8"?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd"> <container-descriptor> <prefer-web-inf-classes>true</prefer-web-inf-classes> </container-descriptor> </weblogic-web-app> *m e[ ö ]`[J [ [` m _` YY[ `e m [` m [Ym ]m m mJ m` Ė [ņ [_ Ėà e à `à J m e[[_J YYà m METAINF/persistence.xml e[ <property name="hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/> ©C© )kh ^#ė ]`[J ş WEB-INF/components.xml ő m ]`[J oZ C ~# à f `[ `à J6 <transaction:entity-transaction entity-manager="#{em}"/> ş _ m ]`[J oZ C m C m mJ m _6 ş META-INF/persistence.xml ő ^Z Y e m ]` J C 6 <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/> ş WEB-INF/jboss-web.xml ş WEB-INF/lib ő *m C m e weblogic.xml ő *m ]`[J C Ė C[ [`à Y öJ ` mà [ mà _m # *m Y[à e m`ņ bf I YY m Y ş ş ş * ` à ~# YC à m e[[_J B6 ş hibernate.jar ş hibernate-annotations.jar ş hibernate-entitymanager.jar ş hibernate-validator.jar ş jboss-common-core.jar ş commons-logging.jar ş commons-collections.jar ş jboss-archive-browsing.jar Ė b ) m B e m ]`[J o+*~ mY b [` [[ `à e[ ş jsf-api.jar ş jsf-impl.jar m Yà B m ]`[J 6 ş antlr.jar ş cglib.jar ©C© )kk ^#ė ]`[J ş asm.jar ş dom4j.jar ş el-ri.jar ş javassist.jar 1bS }ĉ \ iÄ seam-gen Cà e[ [ e C[Y Ė ö[à J YY[ Y f Jņ YC e à _ e [à e `Z seam-gen _[[ Y YY[ eJ # *m _[[ m_ m Y J ]`[J seam-gen _ `[ e Y[ à ņ à Jņ Y[àJ YY[ Jf `à seam-gen ]`[J oZ m [[à e YJ CJ eJ e[ņ J Y B m ]`[J oZ mY _m seam-gen ] [[ [C _m m Y `à ]`[J ņ ` e m m ZY[ _[[ J WAR ` YY[ e EAR f )g)ņ ů^ [ ö _m ]`[J Ű e [ *m ZY[ _[[ C m ` seam-gen WAR Y[à *m _[[ ~ Yņ ` ~#ņ b [ņ [ àņ I mb ņ eJ`[ f 1bS j seam-gen *m e mJ _ [[ seam-gen ` m YB _ _ ö *m `à J ./seam setup m ` à e m ` ù m Ym m à _ņ e[ e mJ e à C ./seam setup Buildfile: build.xml init: setup: [echo] Welcome to seam-gen :-) [input] Enter your Java project workspace (the directory that contains your Seam projects) [C:/Pro /home/jbalunas/workspace [input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.2.GA] [C:/Program Files/jboss/home/jbalunas/jboss/jboss-4.2.2.GA [input] Enter the project name [myproject] [myproject] weblogic-example [echo] Accepted project name as: weblogic_example [input] Select a RichFaces skin (not applicable if using ICEFaces) [blueSky] ([blueSky], classic, ©C© +oo ^#ė ]`[J [input] Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [e war [input] Enter the Java package name for your org.jboss.seam.tutorial.weblogic.action [input] Enter the Java package name for your org.jboss.seam.tutorial.weblogic.model [input] Enter the Java package name for your org.jboss.seam.tutorial.weblogic.test [input] What kind of database are you using? session beans [com.mydomain.weblogic_example] [com.my entity beans [org.jboss.seam.tutorial.weblogic.action test cases [org.jboss.seam.tutorial.weblogic.action.t [hsql] ([hsql], mysql, oracle, postgres, mssql, db2, [input] Enter the Hibernate dialect for your database [org.hibernate.dialect.HSQLDialect] [org.hib [input] Enter the filesystem path to the JDBC driver jar [lib/hsqldb.jar] [lib/hsqldb.jar] [input] Enter JDBC driver class for your database [org.hsqldb.jdbcDriver] [org.hsqldb.jdbcDriver] [input] Enter the JDBC URL for your database [jdbc:hsqldb:.] [jdbc:hsqldb:.] [input] Enter database username [sa] [sa] [input] Enter database password [] [] [input] Enter the database schema name (it is OK to leave this blank) [] [] [input] Enter the database catalog name (it is OK to leave this blank) [] [] [input] Are you working with tables that already exist in the database? [n] (y, [n], ) [input] Do you want to drop and recreate the database tables and data in import.sql each time you [input] Enter your ICEfaces home directory (leave blank to omit ICEfaces) [] [] [propertyfile] Creating new property file: /rhdev/projects/jboss-seam/cvs-head/jboss-seam/seam-gen/bui [echo] Installing JDBC driver jar to JBoss server [copy] Copying 1 file to /home/jbalunas/jboss/jboss-4.2.2.GA/server/default/lib [echo] Type 'seam create-project' to create the new project BUILD SUCCESSFUL *àY ./seam new-project home/jbalunas/workspace/weblogic_example à YB m _[à YB cd / 1bS1 \ \ iã b _ mJ [ eJ e[ņ m _ Y m [` m Y[à _m m YY[ 1bS1 build.xml ş ¢mJ m e[ J archive <project name="weblogic_example" default="archive" basedir="."> resources/META-INF/persistence-dev.xml ş #[ m jta-data-source ` seam-gen-ds Æ m m jndi-name _m f ©C© +o ^#ė ]`[J J m ]`[J ė [Ç ş ¢mJ m àY RESOURCE_LOCAL m _ ~# <persistence-unit name="weblogic_example" transaction-type="RESOURCE_LOCAL"> ş #½eà m YY `[_ e ]`[J YY6 <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/> ş IC m # Y e m e ZYJ m ^à|Jb à6 <property name="jboss.entity.manager.factory.jndi.name" value="java:/weblogic_exampleEntityManagerFactory"> ş Őė[[ [ persistence-prod.xml _[[ e à _ Y[à ]`[J J m Y Ye[ resource/WEB-INF/weblogic.xml Ő _[[ m e[ YY[ e[[_J Y e ]^f ùb½_`[J Z[ Ŭ)khŭ resource/WEB-INF/components.xml ] _ ~# _ m e[[_J [ ö_ <transaction:entity-transaction entity-manager="#{entityManager}"/> Ő _[[ [ m Y m [ m Y e m xmlns:transaction="http://jboss.com/products/seam/transaction" http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd resources/WEB-INF/jboss-app.xml Ő [ m e[ _ ė Y[àJ # Æ jboss-app.xml `[ [[J [ #Ç resources/*-ds.xml Ő [ m e[ _ ė Y[àJ # *m e[ e #ņ ]`[J _ _[[ m [ 1bS11 ĉ *m seam-gen YY[ m Cà [ [`à Y m jpa ZY[ `C )g+)ņ ů]mė ee _m ]`[J oZŰ [_ m mJ m J m m YY[ ş |J B ő *m _ [` m seam-gen YC `à e[ ©C© +o) ^#ė ]`[J *m ` Y à YB lib à [[à ş ş B`f mCf`_JB ő ` e m @SEAM_DIST/examples/jpa/lib f à ş [fB ő [ e m @SEAM_DIST/examples/jpa/lib à `[Z[ ő ù_ _ B m build.xml b m J war m e[f [_J m e m J <copy todir="${war.dir}/WEB-INF/lib"> <fileset dir="${lib.dir}"> <!--JSF implementation --> <include name="jsf-api.jar" /> <include name="jsf-impl.jar" /> <!-- Misc 3rd party --> <include name="commons-logging.jar" /> <include name="dom4j.jar" /> <include name="javassist.jar" /> <include name="cglib.jar" /> <include name="antlr.jar" /> <!-- Hibernate --> <include name="hibernate.jar" /> <include name="hibernate-commons-annotations.jar" /> <include name="hibernate-annotations.jar" /> <include name="hibernate-entitymanager.jar" /> <include name="hibernate-validator.jar" /> <include name="jboss-archive-browsing.jar" /> <!-- Needed for Drools --> <include name="core.jar"/> </fileset> </copy> 1bS12 seam-gen Æ *m [à _m m `mC e m seam-gen WAR YY[ _m `[ J m C[Y Ye[ Æm e[Ç Y[à ]`[J *m àY m m [J YJ e m YY[ _[[ [_à m_ login failed J ]m m YY[ `[ J m C[Y Ye[ m action [ e[ Y[ m WEB-INF/dev à ù[[à m [ e[ m Y[à`[ J `à *m mYY ]`[J Æ B ^#|f)Q\\ ŬmY6½½BB` ½B½`_½^#|f)Q\\ŭ e [ Ç * _ö m à eà m build-dev.properties e[ Y[à C m YYà action.dir=WEB-INF/dev 1bS2 }ĉ ĉ b[[à [[ mė [e Y[àJ m YY[ *m C[C J Y ņ `[J m YYņ Y[àJ 1bS2 ©C© +o+ ^#ė ]`[J ¢eJJ m Cà [ m B\ )g))ņ ůJ Y m mĖ[ Ű ^Z Y e _m [ m e[[_ m e m [ö ş ù6 seam-gen-ds ş ù ù6 seam-gen-ds 1bS21 *m à àYJ ant m YB ` à 1bS22 }ĉ Ä ]m _ [[ ]`[J e[[_J )g)ņ ů¢J à ]`[J Ű _ m mC m C[Y *m Y[à m YY[ [[ _ Yà m Y[à à cp ./dist/weblogic_example.war /home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy ¢m ö m YY[ m e[[_J http://localhost:7001/weblogic_example/ ©C© +oQ 1c zĔ \ ]`Ym aZ |ė YY[ C eeJ *m [ [ ao+ _m m mC EJB3 JEE5 YY *m [à [ ÆùC ogÇ EJB3 ef Y ö _m m YC YY e EJB3 JPA ¢[à m JEE5 eeJ e | *m _m J _m YY[ m ^+ b _ _[[ J C ` e ` m ]`Ym C m _ e m ZY[ #e J [ e m _ö _ _ `[ J ^+ Yf Y[ e [à ] _[[ J C m [ e m Y _m m B\ ZY[ ] _[[ [ Y[à m m ~# ZY[ YY[ 1c \ Æ ĉ ]`Ym [ Y _ _[[ m [ e [[f m m à e[[_ m YC `à à Y [ [[ àY [ *m _[[ [ m Z C C ņ [[ Yņ YY m e [[ e m ZY[ 1c Æ #[[ e m ZY[ e m mY ` m m [ C e ]`Ym m e m _J ş ]`Ym #YY[ C ŬmY6½½___` ½C[Y_ö½_`Ym½č½_½ŭ ao+ ş b ~ ö e ^ +o e ]`Ym #YY[ C a Æ+oao+Ç ŬmY6½½___f` ½YY½ C__ć̾hoά̾_J))hg\gkŭ *m ^+ e Y ö m _ [[ _m m ao+ Y m C e ]`f Ym [[J m e Y ö m à C _[[ mC m YY C e ^+ YY[ m Y e m [[ e m ef Y ö à e[[_ m _ C Ye[ _m m ^+ ef Y ö `[ņ J e à ZJ *m [ ` e m [[ `à J m Ye[ J [ # ` J m C *m m J m C _[[ ` Ė e Y[àJ mJ m ZY[ m mY [ö Cà mJ Ė e à J Z Y e eJ YYà Y[àJ YY[ à m C 1c1 jè ©C© +o\ |ė ]`Ym *m Y[ e ]`Ym YY m Ė e J *m YY Y e [[à e ņ ` _ö _m ]`Ym *m e[[_J m m 6 J _` YY ŬmY6½½___f` ½YY½ C__ć̾hoά̾_J))hQ+k\ŭ ş ő *m [C e[à _m ]`Ym _m YY[ J [J ½ _m YJ e m m java.net.MalformedURLException _[[ ` m_ ]m m YYf à à _[[ [[ _Jņ ` m _[[ ` C ZY prependSlashToResource = "true" [ ` e 6 I^o)+h^6 I Ym mC ŬmY6½½___f` ½YY½ C__ć̾_J)ko)+Qŭ ş [J [m ő *m [C _m ]`Ym _m m_ FileNotFoundException _m _` YY[ Y e[ m [[à Z ö *m Y _` YY[ _m e[ C[ Y f Ė [ö m *m e [e e[ C C Yņ ¢ņ Jņ _m ĖJ _` YJ com.ibm.ws.webcontainer.invokefilterscompatibility = "true" [ ` e 6 ~ʭ++oko̽ a6 # e[ m C e[ YYfY [ J ŬmY6½½___f` ½YY½ C__ć̾_J)QoQg\hŭ 1c1 jee5/booking Ä *m jee5/booking ZY[ ` m [ öJ ZY[ Æ_m m #Ç e m `Z J ó[emņ ` _m m Y `[_ ` f Y[à ]`Ym [ m $SEAM_DIST/examples/jee5/booking à # `e m EJB3 e Y ö YC e[[ jee5 Y[ *m m m ö JJ YY[ Y[à e J 1c1 [_ m eJ e[ mJ m m ` ZY[ resources/WEB-INF/components.xml ] mJ m _à m _ [ö Y ^ e ]`Ym ] C m / local e m e m jndi-pattern ` m[ [ö [ö m6 <core:init jndi-pattern="java:comp/env/jboss-seam-jee5/#{ejbName}" debug="true"/> ©C© +oa |ė ]`Ym resources/WEB-INF/web.xml *m m e Y[ m _ ZY mJ ` m e[[ jee5 Y[ ]`Ym YY Servlet 2.5ņ Ė Servlet 2.4 b m mJ _ B m Y e m web.xml e[ [ö [ö m e[[_J6 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> ùZ _ mC ö mJ m ^ e m web.xml *m mJ _m _[[ [[_ ]`Ym ` m ^) e m _` [ m m [ ^+ ` m ^#I [ IY[ [[ e m ejb-local-refs _m m C[ `[_ <!-- JEE5 EJB3 names --> <ejb-local-ref> <ejb-ref-name>jboss-seam-jee5/AuthenticatorAction</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.example.booking.Authenticator</local> </ejb-local-ref> <ejb-local-ref> <ejb-ref-name>jboss-seam-jee5/BookingListAction</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.example.booking.BookingList</local> </ejb-local-ref> <ejb-local-ref> <ejb-ref-name>jboss-seam-jee5/RegisterAction</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.example.booking.Register</local> </ejb-local-ref> <ejb-local-ref> <ejb-ref-name>jboss-seam-jee5/ChangePasswordAction</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.example.booking.ChangePassword</local> </ejb-local-ref> <ejb-local-ref> <ejb-ref-name>jboss-seam-jee5/HotelBookingAction</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.example.booking.HotelBooking</local> </ejb-local-ref> <ejb-local-ref> <ejb-ref-name>jboss-seam-jee5/HotelSearchingAction</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.example.booking.HotelSAll of the examples and informaearching</local> </ejb-local-ref> <ejb-local-ref> ©C© +og |ė ]`Ym <ejb-ref-name>jboss-seam-jee5/EjbSynchronizations</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.transaction.LocalEjbSynchronizations</local> </ejb-local-ref> *m Y mJ m m Yà local-home [ e m ^ *m [[ ]`Ym ö m `J `_ m _` [ m ^+ ` *m ejb-link [ Y[à resources/META-INF/persistence.xml b m ZY[ _ _[[ ` J m e[ m _m ]`Ym * m mJ m jta-data-source [6 <jta-data-source>DefaultDatasource</jta-data-source> *m _ B e m m` YY b m ó[em YY ùZ à ½ mJ m YY6 <!--<property name="hibernate.transaction.flush_before_completion" value="true"/>--> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> <property name="hibernate.dialect" value="GlassfishDerbyDialect"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/> ş hibernate.transaction.manager_lookup_class ő ` J YYà e ]`Ym aå ş ő *m ` _ _ m J m #[ e m true Z Y _[[ ` m_ `à ]`Ym _m m ^¢Z [ö Y hibernate.transaction.flush_before_completion com.ibm.wsspi.injectionengine.InjectionException: EJBContext may only be looked up by or injected into an EJB ş ő b ]# aok m ` _ _ m m `à ó[em hibernate.dialect resources/GlassfishDerbyDialect.class Ő _[[ J m GlassfishDerbyDialect.class Yà m /resources à *m [ Z m ~# ZY[ ` Y J m `f [_ J à jee5/booking à6 cp ../../jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class ./resources *m [ _[[ ` Y m jboss-seam-jee5.jar e[ J mJ m `[Z[ [ ©C© +oh |ė ]`Ym resources/import.sql *m e[ [ ` Y e m ~# ZY[ ` m m `à m [ YY mJ m ID [ *m e[ [ Z Y e m [ ee A m e[[_J ö m Yà cp ../../jpa/resources-websphere61/import.sql ./resources 1c11 jee5/booking Ä J m mJ _ mC YY[ _ ö mJ m build.xml *m [ [ B m Ė `à Yf Y[ _ö _m ]`Ym *m _[[ C _m mJ m build.xml 1c11 õē ş ş b [` ő ]`Ym a _m m _ C e b Æ Ė b )Ç _ m B YY[ ş jsf-api.jar ş jsf-impl.jar ]`Ym e[[à Y[ JEE5 Y[ _ m ^ [`6 ş el-api.jar ş el-ri.jar ş jboss-seam.jar ő e _m Y[àJ m YY[ mJm m ]`Ym [ e m jboss-seam.jar m ` e m ^#I mC *m m _ m /lib e m ^#I ş b[[à _ C m log4j.jar m [[ e m [J Y e YY[ _[[ ` m ]`Ym [J #[ Y Ė e[[à eJ [JQB m e m Y e m 1c111 build.xml # m e[[_J à m ` e m build.xml e[ *m C m e[ e[ m YY[ m jboss-seam-jee5.jar *m Yà mJ m f e m GlassfishDerbyDialect.class6 <fileset id="jar.resources" dir="${resources.dir}"> <include name="import.sql" /> <include name="seam.properties" /> <include name="GlassfishDerbyDialect.class" /> ©C© +ok |ė ]`Ym <include name="META-INF/persistence.xml" /> <include name="META-INF/ejb-jar.xml" /> </fileset> ùZ _ m [`à Y `C b m m e[[_J ` e m ear.lib.extras e[ à6 <!--<include name="lib/log4j.jar" />--> <include name="lib/el-api.jar" /> <include name="examples/jpa/lib/el-ri.jar" /> <include name="lib/jsf-api.jar" /> <include name="lib/jsf-impl.jar" /> <include name="lib/jboss-seam.jar" /> </fileset> ù_ [[ m [e Z m ant archive ö m `[ YY[ _[[ ` m jee5/booking/dist à 1c12 }ĉ \ _ _ mC CàmJ _ Y[ #[[ m [e Y[à f B e_ Y b m _ _[[ ]`Ymė [ # `e m ö Y m ` e[[_ *m Y `[_ e m ]`Ym C `Cņ à à ` [Jm[à eef J m [ https://localhost:9043/ibm/console ) # m Enterprise Application Y m Applications Y + # m Y e m Enterprise Application `[ [ Install [_ [[ _č YJ _m m6 ş ş Preparing for the application installation ş _ m examples/jee5/booking/dist/jboss-seam-jee5.ear e[ J m e[ Y[ _J ş [ m Next ` Select installation options ş [ m Deploy enterprise beans m ö `Z *m [ à ]`Ym [ Y öJ m YY[ ©C© +o |ė ]`Ym ş ş Map modules to servers ş ş [ m Next ` ù mJ m _ [à mC C [ m Next ` Map EJB references to beans *m YJ _[[ [ [[ e m ` m _ m _`Z[ ş ş |ö m Allow EJB reference targets to resolve automatically m ö `Z [ *m _[[ [[ ]`Ym ` ^+ ` m ^ e m _` [ ş [ m Next ` Map virtual hosts for Web modules ş ş Summary ş ş Q ù mJ m [ m Next ` ù mJ m [ m Finish ` Installation ş ù_ à _[[ [[J Y[àJ à YY[ ş ]m e em [ m Save [ö à _[[ ` m Enterprise Applications `[ ù_ m _ mC YY[ [[ _ ö B `f e _ 6 ş J e m Enterprise Applications `[ [ m Seam Booking [ö ş [ m Manage Modules [ö ş [ m jboss-seam-jee5.war [ö ş ¢mJ m Class loader order ` `Z Classes loaded with application class loader first ş [ Apply m Save Y ş I m Seam Booking YJ ş m YJ [ m Class loading and update detection [ö ş [ m ` e Classes loaded with application class loader first ©C© + |ė ]`Ym ş ^C mJm _ `[J [ [ à [ C[ ` m Polling interval for updated files Z Æč _ö eÇ ş [ Apply m Save Y ş Ő m[ Ceà m m mJ à B m ` ` ] mC m Y`[ _m m [ [ [ mJ öJ ee f C e f e m mJ ö à _[[ [[àņ e[[_J m 6 ş Y m e[[_J e[ Z e à m 6 $WebSphereInstall/$yourServerName/profiles/$yourProfileName/config/cells/ $yourCellName/applications/Seam Booking.ear/deployments/ Seam Booking/deployment.xml ş |eà m e[[_J [ m PARENT_FIRST _ PARENT_LAST6 <classloader xmi:id="Classloader_#######" mode="PARENT_FIRST"/> ş C m e[ _ _m J m Class loading and update detection YJ à m[ Classes loaded with application class loader first [ \ * m YY[ m Enterprise Applications `[ [ YY[ m [ *m m m Start ` m Y e m `[ a Ő _ m YY[ http://localhost:9080/seam-jee5/ # ` ]`Ym e[ ` *m e[ Y e ]`Ym a e[ ^ o *m m à à ^ Z Y e [ Yf `[ B m e m e[ ^ C[ `ņ ` m `à m Y e m m ]`Ym e [ 1c2 jpa Ė Ä *möe[[à JJ m jpa ZY[ _ö m m m jee5 ZY[ *m m [ öJ ZY[ Y[ ~ J ` ~# _m ~# Ė ^+ YY *m ZY[ [à m `ö e eJ `[ Y e à e m [J ]`Ym b mJ _ JJ `[ Y[à m ZY[ *m _ė[[ J C öà mJ m _ ©C© +) |ė ]`Ym 1c2 Ä jpa [J [à Ė J m 6 ant websphere61 *m _[[ Y e ` ZY[ mC _m m websphere61 [`[ 1c21 }ĉ jpa Ä *m [ m jee5 ZY[ )h)+ņ ůY[àJ m YY[ ]`YmŰņ ` _m à Y ş b m Enterprise Applications `[ [ m Install ` ş Preparing for the application installation ş _ m examples/jpa/dist-websphere61/jboss-seam-jpa.war e[ J m e[ Y[ _J ş m Context root Z `Z jboss-seam-jpa ş [ m Next ` ş [ m Next ` e m Z m YJņ mJ ş Summary ş YJ IC_ m J e à _m [ m Finish ` [[ m Yf Y[ ]m [[ em [ m Save [ö à _[[ ` f m Enterprise Applications `[ ş # _m m jee5 ZY[ m [ [ mJ `e _ m YY[ b[[_ m [[ B e B\ ZY[ ` Z mJ jboss-seam-jpa e Seam Booking ş b[[à m YY[ `à [ J m Enterprise Applications `[ [ öJ m Start ` ş Ő _ m YY[ m ht- tp://localhost:9080/jboss-seam-jpa/index.html 1c22 \ \ ^ *m ee `_ m ~# ZY[ m Y[à Q) ]`Ym a [à ZY ̽ [`à eJ e[ mJ ş ¢eJ e[ mJ ©C© ++ |ė ]`Ym ş ő m [à Je mJ m ]`Ym a [à YY m Y e m e[ _ mJ WEB-INF/web.xml Servlet 2.4 ş META-INF/persistence.xml ő m mJ m e m ù Ymņ _ mJ m ]`Ym a J [ö Y [ņ mJJ m m` [ ` GlassfishDerbyDialect ş WEB-INF/classes/GlassfishDerbyDialect.class ő m [ e m m` [ mJ GlassfishDerbyDialect ş ş ő m e m [ `à m ID [ ` YY[ `à m e[ _ C import.sql ¢mJ e Y [` ő *m ]`Ym C Ė C[ [`à Y öJ ` mà [ mà _m # *m Y[à e m`ņ bfI Yf Y m Y [_ [ [à m [ B `C `à m JPA ZY[ WEB-INF/lib ş ş ş * ` à ~# YC à m e[[_J B6 ş hibernate.jar ş hibernate-annotations.jar ş hibernate-commons-annotations.jar ş hibernate-entitymanager.jar ş hibernate-validator.jar ş commons-collections.jar ş jboss-archive-browsing.jar Ė b ) m m B e m ]`Ym a mY _m _ Y[ e b ş jsf-api.jar ş jsf-impl.jar ş el-ri.jar ş el-api.jar m Yà B m ]`Ym 6 ş antlr.jar ©C© +Q |ė ]`Ym ş cglib.jar ş asm.jar ş dom4j.jar ş javassist.jar 1cS }ĉ \ ^i2 seam-gen Cà e[ [ e C[Y Ė ö[à J YY[ Y f Jņ YC e à _ e [à e `Z seam-gen _[[ Y YY[ eJ # *m _[[ m_ m Y J ]`Ym # `C )h)ņ ů *m B\½`öJ ZY[ Ű m öà mJ J ^+ YY[ J *m _[[ ö à mJm m Z Y seam-gen *m e Y J Y seam-gen m ` YB *m C[ m `[_ņ Y e [[à m m` C[ m _ _[[ B m YB ./seam setup Buildfile: build.xml init: setup: [echo] Welcome to seam-gen :-) [input] Enter your Java project workspace (the directory that contains your Seam projects) [C:/Pro /home/jbalunas/workspace [input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.2.GA] [C:/Program Files/jboss/home/jbalunas/jboss/jboss-4.2.2.GA [input] Enter the project name [myproject] [myproject] websphere_example [echo] Accepted project name as: websphere_example [input] Do you want to use ICEFaces instead of RichFaces [n] (y, [n], ) [input] skipping input as property icefaces.home.new has already been set. [input] Select a RichFaces skin [blueSky] ([blueSky], classic, ruby, wine, deepMarine, emeraldTown [input] Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [e [input] Enter the Java package name for your org.jboss.seam.tutorial.websphere.action [input] Enter the Java package name for your org.jboss.seam.tutorial.websphere.model [input] Enter the Java package name for your org.jboss.seam.tutorial.websphere.test [input] What kind of database are you using? session beans [com.mydomain.websphere_example] [com.m entity beans [org.jboss.seam.tutorial.websphere.actio test cases [org.jboss.seam.tutorial.websphere.action. [hsql] ([hsql], mysql, oracle, postgres, mssql, db2, [input] Enter the Hibernate dialect for your database [org.hibernate.dialect.HSQLDialect] [org.hib [input] Enter the filesystem path to the JDBC driver jar [lib/hsqldb.jar] [lib/hsqldb.jar] [input] Enter JDBC driver class for your database [org.hsqldb.jdbcDriver] [org.hsqldb.jdbcDriver] ©C© +\ |ė ]`Ym [input] Enter the JDBC URL for your database [jdbc:hsqldb:.] [jdbc:hsqldb:.] [input] Enter database username [sa] [sa] [input] Enter database password [] [] [input] Enter the database schema name (it is OK to leave this blank) [] [] [input] Enter the database catalog name (it is OK to leave this blank) [] [] [input] Are you working with tables that already exist in the database? [n] (y, [n], ) [input] Do you want to drop and recreate the database tables and data in import.sql each time you [propertyfile] Creating new property file: /rhdev/projects/jboss-seam/svn-seam_2_0/jboss-seam-2_0/seam [echo] Installing JDBC driver jar to JBoss server [copy] Copying 1 file to /home/jbalunas/jboss/jboss-4.2.2.GA/server/default/lib [echo] Type 'seam create-project' to create the new project BUILD SUCCESSFUL Total time: 3 minutes 5 seconds *àY à YB home/jbalunas/workspace/websphere_example m _[à ./seam new-project cd / 1c[ ĉ \ ] _ ö mJ m J YB 1c[ resources/META-INF/persistence-dev.xml ş #[ m jta-data-source ` DefaultDatasource ] JJ ` J m f J ]`Ym ş # mJ m YY `[_ *m ` [ )h)ņ ů *m B\½`öJ ZY[ Ű6 <property <property <property <property <property name="hibernate.dialect" value="GlassfishDerbyDialect"/> name="hibernate.hbm2ddl.auto" value="update"/> name="hibernate.show_sql" value="true"/> name="hibernate.format_sql" value="true"/> name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/> ş IC m # Y e m e ZYJ m ^à|Jb à6 <property name="jboss.entity.manager.factory.jndi.name" value="java:/websphere_exampleEntityManagerFactory"> ş Őė[[ [ persistence-prod.xml _[[ e à _ Y[à ]`Ym J m Y Ye[ ©C© +a |ė ]`Ym resources/GlassfishDerbyDialect.class # _m m ZY[ _ [ m [ e YY ` Y e m jpa ZY[ m websphere_example/resources à cp $SEAM/examples/jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class ./resources resources/META-INF/jboss-app.xml Ő [ m e[ _ ė Y[àJ # Æ jboss-app.xml `[ [[J [ #Ç resources/*-ds.xml Ő [ m e[ _ ė Y[àJ # Æm e[ e f #ņ _ J ]`Ymė e[ Ç resources/WEB-INF/components.xml ş ^`[ J <transaction:ejb-transaction /> Yņ J f m ė Y [ xm- lns:transaction="http://jboss.com/products/seam/transaction" ş #[ m jndi-pattern java:comp/env/websphere_example/#{ejbName} ş ] managed-persistence-context e m ZY[ [ à <persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/websphere_exampleEntityManagerFactory"/> resources/WEB-INF/web.xml ]`Ym YY Servlet 2.5ņ Ė Servlet 2.4 b m mJ _ B m Y e m web.xml e[ [ö [ö m e[[_J6 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> # _m m jee5/booking ZY[ _ ^ e m _`Z[ *m e Ė m Yà local-home e[J m e ]`Ym Ye m YY `J <ejb-local-ref> <ejb-ref-name>websphere_example/AuthenticatorAction</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.tutorial.websphere.action.Authenticator</local> </ejb-local-ref> ©C© +g |ė ]`Ym <ejb-local-ref> <ejb-ref-name>websphere_example/EjbSynchronizations</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home></local-home> <local>org.jboss.seam.transaction.LocalEjbSynchronizations</local> </ejb-local-ref> 1c[1 AuthenticatorAction ] ] _ ö m ZJ Authenticator ~ Y ^+ e ş I m [ AuthenticatorAction ş # m @Stateless m _ AuthenticatorAction [ ş ¢ e [[ Authenticator _m m AuthenticatorAction Y[ Æ^+ Ė ` mC [ [ e Ç # m e _m @Local ņ J[ m _m J m authenticate AuthenticatorAction @Name("authenticator") @Stateless public class AuthenticatorAction implements Authenticator { @Local public interface Authenticator { public boolean authenticate(); } ) ]ėC [à e m web.xml e[ J J 1c[2 ]Ä x build.xml *m YY[ m [ Ė m jee5/booking ZY[ ş ¢mJ m e[ J archive Æ_ ė JJ C Y[à ]`YmÇ <project name="websphere_example" default="archive" basedir="."> ş ]`Ym [ö e m [ /security.drl e[ m e m war e[ e m e m websphere_example.jar _ mC m build.xml C m [ `[ *m e[[_J ` m Y e m <target name="war" depends="compile" description="Build the distribution .war file"> f J <copy todir="${war.dir}"> <fileset dir="${basedir}/resources" > <include name="*.drl" /> ©C© +h |ė ]`Ym </fileset> </copy> ş ] J m GlassfishDerbyDialect.class YY[ B * m e m jar ö eà m Y e m [ö [ö m6 <target name="jar" depends="compile,copyclasses" description="Build the distribution .jar file"> <copy todir="${jar.dir}"> <fileset dir="${basedir}/resources"> <include name="seam.properties" /> <include name="*.drl" /> <include name="GlassfishDerbyDialect.class" /> </fileset> </copy> ... ş ùZ _ J m jboss-seam.jar m ` e m EAR e[ b Y[à ]`Ym Ė m B ` `m m /lib à m ` e m EAR Ő m e[[_J m archive ö6 <fileset dir="${lib.dir}"> <include name="jboss-seam.jar" /> </fileset> m m _m[ archive ö [ö [ö6 <target name="archive" depends="jar,war,ear" description="Package the archives"> <jar jarfile="${dist.dir}/${project.name}.jar" basedir="${jar.dir}"/> <jar jarfile="${dist.dir}/${project.name}.war" basedir="${war.dir}"/> <jar jarfile="${dist.dir}/${project.name}.ear"> <fileset dir="${ear.dir}"/> <fileset dir="${dist.dir}"> <include name="${project.name}.jar"/> <include name="${project.name}.war"/> </fileset> <fileset dir="${lib.dir}"> <include name="jboss-seam.jar" /> </fileset> </jar> </target> ş ù_ _ J Z B m build.xml ö e m <fileset dir="${basedir}"> e m ö `[_ # m _ [ m ` e m e[ <target name="ear" description="Build the EAR"> <copy todir="${ear.dir}"> <fileset dir="${basedir}/resources"> <include name="*jpdl.xml" /> <include name="*hibernate.cfg.xml" /> <include name="jbpm.cfg.xml" /> </fileset> <fileset dir="${lib.dir}"> <include name="jboss-seam.jar" /> </fileset> <fileset dir="${basedir}"> ©C© +k |ė ]`Ym <include name="lib/jbpm*.jar" /> <include name="lib/jboss-el.jar" /> <include name="lib/drools-*.jar"/> <include name="lib/core.jar"/> <include name="lib/janino*.jar"/> <include name="lib/antlr-*.jar"/> <include name="lib/mvel*.jar"/> <include name="lib/richfaces-api*.jar" /> </fileset> </copy> <copy todir="${ear.dir}/META-INF"> <fileset dir="${basedir}/resources/META-INF"> <include name="application.xml" /> <include name="jboss-app.xml" /> </fileset> </copy> </target> ş ` Y <!-- Hibernate and deps --> <include name="lib/hibernate.jar"/> <include name="lib/hibernate-commons-annotations.jar"/> <include name="lib/hibernate-annotations.jar"/> <include name="lib/hibernate-entitymanager.jar"/> <include name="lib/hibernate-validator.jar"/> <include name="lib/jboss-common-core.jar" /> ş b Ő _[[ $SEAM/examples/jpa/lib à <!-- jsf <include <include <include <include ş Y Yà m el-ri.jar e m libs --> name="lib/jsf-api.jar" /> name="lib/jsf-impl.jar" /> name="lib/el-api.jar" /> name="lib/el-ri.jar"/> *m Yà Y Ő _[[ Yà m jboss-archive-browsing.jar e m $SEAM/examples/jpa/lib à m m YB /lib à Ő _[[ [ Ė m concurrent.jar Y[ m à Ő J m e à B` ` B m e <!-- 3rd party and supporting jars --> <!--<include name="lib/log4j.jar" />--> <include name="lib/javassist.jar"/> <include name="lib/dom4j.jar" /> <include name="lib/jboss-archive-browsing.jar" /> <include name="lib/concurrent.jar" /> <include name="lib/cglib.jar"/> <include name="lib/asm.jar"/> <include name="lib/antlr.jar" /> <include name="lib/commons-logging.jar" /> <include name="lib/commons-collections.jar" /> ş jboss-seam.jar f m `m m ear ` /lib à <!-- seam jar --> <include name="lib/jboss-seam.jar" /> ©C© +)o |ė ]`Ym Ő m[ Y _m mJ [ö6 <fileset dir="${basedir}"> <include name="lib/jbpm*.jar" /> <include name="lib/jboss-el.jar" /> <include name="lib/drools-*.jar"/> <include name="lib/core.jar"/> <include name="lib/janino*.jar"/> <include name="lib/antlr-*.jar"/> <include name="lib/mvel*.jar"/> <include name="lib/richfaces-api*.jar" /> <!-- Hibernate and deps --> <include name="lib/hibernate.jar"/> <include name="lib/hibernate-commons-annotations.jar"/> <include name="lib/hibernate-annotations.jar"/> <include name="lib/hibernate-entitymanager.jar"/> <include name="lib/hibernate-validator.jar"/> <include name="lib/jboss-common-core.jar" /> <!-- jsf <include <include <include <include libs --> name="lib/jsf-api.jar" /> name="lib/jsf-impl.jar" /> name="lib/el-api.jar" /> name="lib/el-ri.jar"/> <!-- 3rd party and supporting jars --> <!--<include name="lib/log4j.jar" />--> <include name="lib/javassist.jar"/> <include name="lib/dom4j.jar" /> <include name="lib/jboss-archive-browsing.jar" /> <include name="lib/concurrent.jar" /> <include name="lib/cglib.jar"/> <include name="lib/asm.jar"/> <include name="lib/antlr.jar" /> <include name="lib/commons-logging.jar" /> <include name="lib/commons-collections.jar" /> <!-- seam jar --> <include name="lib/jboss-seam.jar" /> </fileset> 1c[S ĉ |Ĕ \ ş [ à YY[ `à [[J ant m ` à e à YB ÆZ / home/jbalunas/workspace/websphere_example Ç *m J e m `[ _[[ ` dist/ websphere_example.ear ş * Y[à m YY[ e[[_ m m 6 )h)+ņ ůY[àJ m YY[ ]`YmŰ ` e m YB websphere_example f e jboss-seam-jee5 ş ¢m ö m YY 6 http://localhost:9080/websphere_example/index.html ©C© +) 1f "î3;<% 345VW´¬ŷĆnƾţ&ï,45£´¬Œ}vûŖ´ŗ %ï,45£¯2ƎƏvKHĴ'ǹ´¬Œ}s%ÞŖ´ŗ£´¬ï ,45&ź}ŻŠ ^ +o ƞƟ%dÓñò2°Ŗ´ŗN¥ƍ£&ï,45 f ` [ âF3%dÓñò2°Ŗ´ŗ!¯2n ǯ¼&ï,45EFÕ2ëûnŒòÖ°2Œ&ɽ%ɾǂ¯Ŗ´ŗ ´ƚ2& &ï,45âF3 org.jboss.seam.annotations %dÓñòŖ´ŗ 1f B%TU% aÒ¡"î3;<% ï,45&š0&n ;RSdÓ´¬Ŕ&%´ŗŒò»&ï,45;RSGH-%ľòŖ ´ŗ @Name @Name("componentName") GH-¯2 ;RSÒdÓ¯Ŗ´ŗ &;RSŒ&ï,45sŲų%´ŗ @Scope @Scope(ScopeType.CONVERSATION) ;RS&O¶;,Ã-dÓ¯Ŗ´ŗ ǚǛtuvƜ ScopeType dz˹¡%dÓñò2°Ŗ´6 EVENT, PAGE, CONVERSATION, SESSION, BUSINESS_PROCESS, APPLICATION, STATELESSŗ -;sǂzƓdñò2°v°ŷĆn O¶;RSNM«ûɂv2ÞŖ´ŗ -,D-EF45 &ŷĆn O¶ STATELESS vûŖ´ŗ ?,@,@ ë«ì-,OEF45 v»n O¶ CONVERSATION vûn C &O¶ EVENT vûŖ´ŗ @Role @Role(name="roleName", scope=ScopeType.SESSION) ;RSÔ&;,Ã-ÈM<%Þ¬«"¯Ŗ´ŗ @Name½@Scope ï,45ĐO¶KđdÓ¯Ŗ´ŗ Ś @Role ï,45ĐǣǤKđ&dÓ}vûŖ´ŗ ş name ş scope ő ;,Ã-ÈÒ%´ŗ ő ;,Ã-È-;%´ŗ ©C© -;sǂzƓdñòv°ŷĆn +)) ï,45 O¶$V&}ëû;RSNM«ûɂvûŖ´ŗ @Roles @Roles({ @Role(name="user", scope=ScopeType.CONVERSATION), @Role(name="currentUser", scope=ScopeType.SESSION) }) Ô&ǣǤKƓd´¬Œ}s%Þ¬«"vûŖ´ŗ @BypassInterceptors @BypassInterceptors `[ [[ Y Y [ Y m e Y @JndiName @JndiName("my/jndi/name") s ^ ;RS&FGF£´¬ ù ÒƓd¯Ŗ´ŗ ù ÒsǂzƓdñòv°ŷĆn org.jboss.seam.core.init.jndiPattern %Ɠdñò¬ ù âN£¯Ŗ´ŗ @Conversational @Conversational Y e m C Y Y C[ņ J m mf e m Y à ` [[ [ [JfJ C C @PerNestedConversation @PerNestedConversation m Y e ¢ù^I#*ùf Y Y B m Y C _m m _ *m Y _[[ ` C`[ m[ Cņ _m m _[[ J m _ ]J6 m [[feņ Y[ m Y _[[ ` C`[ e Y e Ė à [ņ C`[ e m m Yf Y[ m eŅ @Startup @Scope(APPLICATION) @Startup(depends="org.jboss.seam.bpm.jbpm") Y e m YY[ Y Y [à [č *m [à e `[f Y m `Y [ f e m ùņ ņ @Scope(SESSION) @Startup ©C© +)+ ï,45 Y e m Y Y [à ş ő Y e m m Y ` eņ e mà [[ depends @Install @Install(false) ;RSsO¶%M-ñò¬Ųsµ¬ºŠ"ºƓd¯Ŗ´ŗ ©[[ ï,45sȳ°ŷĆn;RSM-sŲ%µ¬}°"ƬȘvûŖ´ ŗ @Install(dependencies="org.jboss.seam.bpm.jbpm") ;RSsnĸŋʂ}¯2Ɠdñò¬;RSsM-ñò¬ŷĆ&Ø M-ñò¬Œ}Ɠd¯Ŗ´ŗ @Install(genericDependencies=ManagedQueueSender.class) ;RSsn Ğd&GH-«û'Ɗñò¬;RSsM-ñò¬ŷĆ&ØM-ñ ò¬Œ}Ɠd¯Ŗ´ŗ ĸ´¬;RS&ÒsƄd%µ¬ŷĆưĮ%´ŗ @Install(classDependencies="org.hibernate.Session") ;RSsnƓdñòGH-sGH-â-qµ¬ŷĆ&ØM-ñò¬Œ} Ɠd¯Ŗ´ŗ @Install(precedence=BUILT_IN) !&;RS&ÉÊƂƓd¯Ŗ´ŗ ÍÒ&;RSsÔ¸ǰ´¬ŷĆn «ûƁ°ÉÊƂÕÖ;RSsM-ñòŖ´ŗ dÓñò¬ÉÊƂ&Ɯŧ&}ëû%´ Æ̀ËÇ 6 ş BUILT_IN ő ´ƚ2&×ØÙØ ;RSsÕÖÉÊƂ ş FRAMEWORK ş APPLICATION ş DEPLOYMENT ő ȁȂ´¬ODðG&;RS¯2£´¬ÉÊƂ ő 345;RS&ÉÊƂ ÆO¶&ÉÊƂÇ ő Ğd&KMÂë°2345;RS$ɆÞ´¬;RS ¯2£´¬ÉÊƂ ş MOCK ő ,-%£ñò¬ | ö ĊPG&ÉÊƂ @Synchronized @Synchronized(timeout=1000) ©C© +)Q ï,45 ;RSsÔ&GHM«2ÍÎGE-ñò¬Œ}n G?-4HMƛ´¬Œ}Ɠd¯Ŗ´ŗ G?-sĞd&NMœĈçq;RS%KFGIJǁ%Þv°}èésǶ² ¯Ŗ´ŗ @ReadOnly @ReadOnly C ;RSŖ;RSÂÚF<sƭìƗ¯&Ąľû%ƪƫ&ÔɮŲ}¯v° Œ}Ɠd¯Ŗ´ŗ @AutoCreate @AutoCreate Y e m Y _[[ ` [[à ņ C e m [ Y eà create=true 1f1 ORK;<%¡"î3;<% ŧ& ) Ö&ï,45MPG45Ăă¯Ŗ´ŗ Œò»&ƙĬ;RSM-N-ÈŖKâ,@&GEÂÚF<Ɠd%Þ Ŗ´ŗ @In @In ;RS&ƙĬsŚ;RSƭìƗ¯&ôªÎ;,Ã-Ⱥ»MPG ñò¬Œ}Ɠd¯Ŗ´ŗ ;,Ã-Ès [[ &ŷĆn èésǶ²¯Ŗ´ŗ @In(required=false) ;RS&ƙĬsŚ;RSƭìƗ¯&ôªÎ;,Ã-Ⱥ»MPG ñò¬Œ}Ɠd¯Ŗ´ŗ ;,Ã-È [[ %ŔŞ°ŖĿŻŗ @In(create=true) ;RSƙĬs;RSƭìƗ¯&ôªÎ;,Ã-Ⱥ»MPGñ ò¬Œ}Ɠd¯Ŗ´ŗ @In(value="contextVariableName") ï,45ÝŨ»òM-N-ÈÒ£ĿŴn ;,Ã-ÈÒǂzƓd¯Ŗ´ŗ @In(value="#{customer.addresses['shipping']}") ©C© +)\ ï,45 ;RSƙĬsŚ;RSƭìƗ¯&ôªÎ ¿Ȣȣ´¬Œ}%MPGñò¬Œ}Ɠd¯Ŗ´ŗ ş value ş create b ^ ő ;,Ã-ÈÒƓd¯Ŗ´ŗ O¶;RS&ƙĬÒ%´ŗ µ¬°n #{...} %̀»ò b ^ ¿Ɠd¯Ŗ´ŗ ő ;,Ã-Ès´ƚ2&;,Ã-%dÓñò2°v° Æ[[Ç ŷĆ s;,Ã-È}ÍÒ%;RSM-N-ä´¬Œ}Ɠd¯Ŗ´ŗ O¶ e[ %´ŗ ş ő ;,Ã-Ès´ƚ2&;,Ã-%dÓñò2°v°ŷĆ sèéǶ²ñĿ¬Œ}Ɠd¯Ŗ´ŗ required @Out @Out ;RS%µ¬;RS&ƙĬsƭìƗ¯&Ąľû%!&;,Ã-Èœ PGñò¬Œ}Ɠd¯Ŗ´ŗ ƙĬs [[ &ŷĆn èésǶ²¯Ŗ´ŗ @Out(required=false) ;RS%µ¬;RS&ƙĬsƭìƗ¯&Ąľû%!&;,Ã-Èœ PGñò¬Œ}Ɠd¯Ŗ´ŗ ƙĬ [[ %ŔŞ°ŖĿŻŗ @Out(scope=ScopeType.SESSION) ;RSNM%v°;RS&ƙĬsƭìƗ¯&Ąľû%Ğd-;œ PGñò¬Œ}Ɠd¯Ŗ´ŗ ǂz-;sƓdñò2°v°ŷĆn ƙĬÕÖ;RS¼Ȕ&-;s£ñòŖ´ ÆŖ;RSs-,D-%µòũ EVENTÇ ŗ Ĥľû @Out @Out(value="contextVariableName") ï,45ÝŨ»òM-N-ÈÒ£ĿŴn ;,Ã-ÈÒǂzƓd¯Ŗ´ŗ ş value ő ;,Ã-ÈÒƓd¯Ŗ´ŗ O¶;RS&ƙĬÒ%´ŗ ş required ő œPG45(}Þ;RSƙĬs [[ ŦŷĆn sèéǶ²ñĿ¬Œ}Ɠd¯Ŗ´ŗ Œò»&ï,45ÍÎĮ£ñòŖ´ŗ è6 @In(create=true) @Out private User currentUser; ©C© +)a ï,45 ŧ&ï,45 ¤Sĭ;RS âNR¯Ŗ´ŗ Œ&ï,45nMPGñò¬ĩ&°ţÖº&GH-&M-N-&HMOMG =´¬ ;RS%Į£ñòn;RS& J ÂÚF<ÝʫñòŖ´ŗ @Unwrap @Unwrap Œ&ï,45sÝ°2°¬ J ÂÚF<«ûĺñò¬ĊPGsn;RSM-N-¼Ȕ&ĤľûMP GñòŖ´ŗ *m Z YY m e à Y Yņ _m Y f Y`[ e [čJ m C[ e Z C`[ *m Y [[à e[ e [čJ à e J m Y fe Ė Yf Y Y m @Factory @Factory("processInstance") public void createProcessInstance() { ... } ;,Ã-ÈƜsv°ŷĆn Œ&;RS&ÂÚF<sƓd;,Ã-È&Ɯ&0Ĉä£ñò¬Œ}Ɠd¯ Ŗ´ŗ Œ&-NM void ĺ´ÂÚF<}Ŋ£¯Ŗ´ŗ @Factory("processInstance", scope=CONVERSATION) public ProcessInstance createProcessInstance() { ... } ;,Ã-ÈƜsv°ŷĆn sƓd;,Ã-È&Ɯ&0Ĉ䣴¬ƜŒ&ÂÚF<sĺ´Œ}Ɠd¯Ŗ´ŗ Œ&-NMƜĺ´ÂÚF<}Ŋ£¯Ŗ´ŗ ǂz-;sƓdñò2°v°ŷĆn @Factory ÂÚF<ÕÖ;RS¼Ȕ&-;s£ñòŖ´ Æ!&;RSs-,D-%v°ŷĆŗ ;RSs-,D-%µ¬ŷĆEVENT ;,Ã-s£ñò¬Ç ŗ Log ş value ő ;,Ã-ÈÒƓd¯Ŗ´ŗ ÂÚF<s O¶ C Kâ,@Ò}vûŖ´ŗ ş scope ş autoCreate J ÂÚF<v»n ő sĺñòƜM<´¬Ê&-;Ɠd¯Ŗ´ŗ Ɯĺ´OáGÂÚF<¯2¯ºƬȘsµûŖĿŻŗ ő Y e m m e à m m[ ` [[à [[ _mC m C`[ ö eņ C e © Y eà ̾ MPG´¬ï,456 @Logger @Logger("categoryName") ©C© +)g ï,45 ;RSO@< org.jboss.seam.log.Log &M-N-MPG¯Ŗ´¯Ŗ´ŗ ?,@,@ &ŷĆn Œ&O@< }¯2ƎƏñòvŨòũvûŖĿŻŗ ş value ő KL,̇ÒƓd¯Ŗ´ŗ O¶;RSGH-Ò%´ŗ šŶ&ï,45nG?-âHÂNƜ&MPG6 @RequestParameter @RequestParameter("parameterName") ;RS&ƙĬG?-âHÂNƜMPG¯Ŗ´ŗ Ĝv¼/ôªñòŖ´ŗ ş value ő G?-âHÂNÒƓd¯Ŗ´ŗ O¶;RSƙĬÒ%´ŗ 1f2 B%TU% % .LOQ$OK#¿ÙJC¡"î3;< Œò»&ï,45«ûn ;RSs!&;RS¼Ȕ&HMOMGM¹¯2Dzż´¬Œ}s%Þ ¬«"vûŖ´ŗ Ś;RSGH-Ȧ}!òɇò Ö&ï,45&ØdÓ%ÞŖ´ŗ @Create @Create ;RS&M-N-s «2M-N-äñò}ÞƭìƗñò¬ÂÚF<Ɠd¯Ŗ´ŗ ÂÚF< C ë«ì-,OEF45 ¯2¯ºRñòv°&%ơƬ¯2ţŦñ°ŗ @Destroy @Destroy ;,Ã-sĄą¯n!&;,Ã-ÈsȒȓñò¬}Þ&ƭìƗñò¬ÂÚF<Ɠd ¯Ŗ´ŗ à ÂÚF< C ë«ì-,OEF45 ¯2¯ºRñòv°&%ơƬ¯2ţŦñ°ŗ à ÂÚF<GF&Ø£´¬«"¯2ţŦñ°ŗ ÂÚF<º»ʋʌ´¬èé´ƚ2ÃĭF¯2KƗū¯nέ22¯Ŗ°Ŗ´ŗ à @Observer @Observer("somethingChanged") ©C© +)h ï,45 ƓdñòNM&;RSÑ/M¹sǶ²´¬}nŒ&ÂÚF<sƭìƗñòŖ´ ŗ @Observer(value="somethingChanged",create=false) ƓdñòNM&M¹sǶ²´¬}Œ&ÂÚF<sƭìƗñòŖ´sn M-N-s¸ǰ¯v°ŷĆM-N-p³¯v°Œ}Ɠd¯Ŗ´ŗ M-N-s¸ǰĿŴ s e[ &ŷĆn !&M¹ʦήñòŖĿŻŗ f &O¶Ɯ %´ŗ 1fS B%3À4 ņŇ¡"î3;<% Œò»&ï,45ƎƏ&Ňňcd¯Ŗ´ŗ Œò» ;RS&ÂÚF<$nĻļG45-êÂÚF<ÝʫñòŖ´ŗ ´ƚ2& ]^ G?-!òŋŌ´¬;,Ã-Õ2°Ŗ´ŗ ź}ŻŠ&G?-&Ąą}ÍÎĄą¯Ŗ´ŗ Ô&G?-ľ¬sŲ%µòũn©J ÝŨÂÚF<ƭìƗ´Œ}%n ɐĈ̀ñĿvŨòũvûŖĿŻŗ @Begin @Begin Y e m [JfJ C `J _m m m f[[ _m Z Y @Begin(join=true) ɐĈs´%ôªñò2°¬ŷĆn ;,Ã-sſʋʌñò¬Œ}Ɠd¯Ŗ´ŗ @Begin(nested=true) ɐĈs´%ôªñò2°¬ŷĆn ®S-ñò;,Ã-sôª´¬Œ}Ɠd¯Ŗ´ŗ ŧ& @End sƗǹ¯}ÞS-ñòsĄą¯n éˬ&sƲô¯Ŗ´ŗ Íéˬ&ë°2n Ô&S-ñòsÍθǰ´¬Œ}ŹţƺƻµûŖĿŻŗ @Begin(pageflow="process definition name") Œ&&1&OKdÓ´¬ B~| KE-dÓ&ÒdÓ¯Ŗ´ŗ @Begin(flushMode=FlushModeType.MANUAL) =&ij;,Ã-&OHF4Å<Ɠd¯Ŗ´ŗ flushMode=FlushModeType.MANUAL C R¯Ŗ´ŗ Œ&ŷĆn flush () ÆĻļn ĄąÎƭìƗñò¬Ç &ǂzv;s.Þ¬Ŗ%n ©C© +)k ï,45 ´ƚ2&ɆÞÙØ/p;,Ã-qÃMñòŖ´ŗ ş join ő ɐĈs´%ôªñò2°¬ŷĆ&/pƓd¯Ŗ´ŗ true %µòũn ;,Ã-ʋʌñòŖ´ŗ false %µòũn èésǶ²¯Ŗ´ŗ O¶ false %´ŗ nested=true sƓdñò¬ŷĆn Œ&cdȳɀñòŖ´ŗ ş nested ş flushMode ş pageflow ő ɐĈs´%ôªñò2°¬ŷĆn S-ñòsôªñò¬Œ}Ɠd¯Ŗ´ŗ ő Œ&%p³ñò¬ =& ` EF45nŖ ~# ij;,Ã-&OHF4Å<EF¯Ŗ´ŗ ő org.jboss.seam.core.jbpm.pageflowDefinitions. «2KMñò B~| KE-dÓ&KE-dÓÒ%´ŗ @End @End Œ&ÂÚF<sèéë«ì [[ ɐĈsĄą´¬Œ}Ɠd¯Ŗ´ŗ ş śé& ĺ´ŷĆn ő `à e[ņ m C _[[ [[à ` à [ e à m J beforeRedirect=true Y e m m f C m[ ` à m e m Ėņ m m f _[[ ` Y _ Yà C Z beforeRedirect @StartTask @StartTask B~| N-GĐôªđ¯Ŗ´ŗ Œ&ÂÚF<sèéë«ì [[ śé& ĺ´}Þn ɐĈôª´¬Œ}Ɠd¯Ŗ´ŗ Œ&Ɠd&G?-âHÂNŀ%Ɠdñò¬ B~| N-G}ŋŌ¯2°Ŗ´ŗ Œ&&;,Ã-q%n N-GM-N-&lS-KE-M-N-¯2n lS-KE-;,Ã-ŔdÓñòŖ´ŗ B~| TaskInstance n taskInstance }°"Ò&G?-;,Ã-È}¯2Į£tu}vûŖ´ŗ B~| ProcessInstance n processInstance }°"Ò&G?-;,Ã-È}¯2Į£tu%´ŗ ÆŔnjȅŻnŒò»&ĊPG @In %MPG45stu%´ŗÇ ş taskIdParameter ő N-G& ÕÖG?-âHÂN&Ò%´ŗ O¶ [[÷ö ş ő Œ&%p³ñò¬ =& ` EF45nŖ ~# ij;,Ã-&OHF4Å<EF¯Ŗ´ŗ flushMode @BeginTask ©C© ++o ï,45 @BeginTask Ÿą¯2°v° B~| N-G&Ð=Ʋô¯Ŗ´ŗ Œ&ÂÚF<sèéë«ì [[ śé& ĺ´}Þn ɐĈsôª´¬Œ}Ɠd¯Ŗ´ŗ Œ&Ɠd&G?-âHÂNŀ%Ɠdñò¬ B~| N-G}ŋŌ¯2°Ŗ´ŗ Œ&&;,Ã-q%n N-GM-N-&lS-KE-M-N-¯2n lS-KE-;,Ã-ŔdÓñòŖ´ŗ Ÿą¯2°v° B~| N-G&Ð=Ʋô¯Ŗ´ŗ Œ&ÂÚF<sèéë«ì [[ śé& ĺ´}Þn ɐĈsôª´¬Œ}Ɠd¯Ŗ´ŗ Œ&Ɠd&G?-âHÂNŀ%Ɠdñò¬ B~| N-G}ŋŌ¯2°Ŗ´ŗ Œ&&;,Ã-q%n N-GM-N-&lS-KE-M-N-¯2n lS-KE-;,Ã-ŔdÓñòŖ´ŗ B~| org.jbpm.taskmgmt.exe.TaskInstance n }°"Ò&G?-;,Ã-È}¯2Į£tuvûŖ´ŗ org.jbpm.graph.exe.ProcessInstance n }°"Ò&G?-;,Ã-È}¯2Į£%ÞŖ´ŗ ş taskIdParameter taskInstance B~| processInstance ő N-G& ÕÖG?-âHÂN&Ò%´ŗ O¶ [[÷ö ş ő Œ&%p³ñò¬ =& ` EF45nŖ ~# ij;,Ã-&OHF4Å<EF¯Ŗ´ŗ flushMode @EndTask @EndTask B~| N-GĐĄąđ¯Ŗ´ŗ Œ&ÂÚF<s [[ śé&§¨ĺ´}Þn ɐĈĄą¯n ǹǰ&N-GsŸą´¬Œ}Ɠd¯Ŗ´ŗ B~| H45ȽÞ.Œ¯Ŗ´ŗ 345s transition }ƭũò¬×ÙØ;RS& Transition.setName () ƭŻ%°v°ȃûn ȽÞ.Œñò¬'ę&HF45O¶&H8G45vûŖ´ŗ @EndTask(transition="transitionName") Ɠdñò B~| H45ȽÞ.Œ¯Ŗ´ŗ @EndTask(ifOutcome={"success", "continue"}) Œ&ÂÚF<sƓdñò &°Ŵòºĺ´}ÞnN-GsĄą´¬Œ}Ɠd¯Ŗ´ŗ ş transition ş beforeRedirect ő N-GsĄą´¬}ÞȽÞ.Œñò¬ B~| H45&Ò%´ŗ ȇȈñòŷĆO¶H45}vûŖ´ŗ ©C© ő O¶%n ++ ï,45 vŻ»º&ĕMDGsǶ²´¬Ŗ%'ęȒȓñòŖĿŻŗ beforeRedirect=true }cd´¬}n ǹǰ&G?-&Ąą%sȒȓñòn ĕMDGs®¯°,RH;,Ã-%Ð=ñò¬«"Ɠd´¬Œ}vûŖ ´ŗ @CreateProcess @CreateProcess(definition="process definition name") ÂÚF<sèéë«ì [[ śé& KE-M-N-p³¯Ŗ´ŗ ProcessInstance }°";,Ã-È}¯2£%ÞŖ´ŗ ş ĺ´}Þn ĊPG ®¯° B~| processInstance ő org.jboss.seam.bpm.jbpm.processDefinitions «2KMñò¬ B~| KE-dÓ&Ò%´ŗ definition @ResumeProcess @ResumeProcess(processIdParameter="processId") ÂÚF<sèéŖ [[ śé& ĺ´}Þn ·¸& KE-M-N-&-;ƲƂŪûŖ´ŗ ProcessInstance ĊPG cessInstance }°";,Ã-È%£%ÞŖ´ŗ ş processIdParameter "processId" B~| pro- ő KE- ÕÖG?-âHÂNÒ%´ŗ O¶ %´ŗ @Transition @Transition("cancel") |ö m J[[J m B~| Y _mCf m m f[[ [ 1f[ 1]] ňņ B%TU% '¡±©8."î3;<% Æ YC m [ à e [[` ö e m *# e [ @Transactional @Transactional C ;RSEF45 ;RS&O¶/p}Í«"vH8G45/pÕĿ¬Œ}Ɠd¯Ŗ ´ŗ èýũn ÂÚF<ƭìƗ¯H8G45q%.Œ¬ƚÞ%µûn ÂÚF<sƭìƗñò}ÞH8G45s¸ǰ¯v°ŷĆn ©C© ++) ï,45 H8G45s!&ÂÚF<&1ŦŨôªñòŖ´ŗ Œ&ï,45GH-D¹%ŔÂÚF<D¹%Ŕǃ£tu%´ŗ m ^ +o Yņ @TransactionAttributeŅ @ApplicationException @ApplicationException àà e BCZB`#YY[ ^Z Yņ e Y C ^^ \ C #YY[ Z Y m YY[ Z Y m[ ` Y m [ [àÆņ _YYÇ m ^ +o Yņ @javax.ejb.ApplicationException ş rollback ő `à e[ falseņ e true m Z Y m[ m [[` ö [à ş end ő `à e[ falseņ e true m Z Y m[ m [JfJ C @Interceptors @Interceptors({DVDInterceptor, CDInterceptor}) àà e BCZ Y Yņ e Y C ^^ \ C ù m m à [à ` f [ [ e f Y e [ m m ^ +o Yņ @javax.interceptor.Interceptors *m [à e[ e C Y e à ^ +o f Yņ à m[ m C ^^\ 1f^ æç¡."î3;<% Œò»&ï,45«û ;RSº»ʋʌ´¬èéÐ=´¬ēĔƓd´¬Œ}s%ÞŖ´ŗ @Redirect @Redirect(viewId="error.jsp") Œ&ï,45Ý°2°¬èénƓdñòl Hœ8ĕMDG¯Ŗ´ŗ ş viewId ő ĕMDG´¬ b l %´ŗŒŒ% ^ ŔĮ£tu%´ŗ ©C© +++ ï,45 ş message ş end ő Ěz´¬ÂFE%´ŗ O¶!&èé&ÂFE%´ŗ ő ɐĈsĄą´¬«"Ɠd¯Ŗ´ŗ O¶ false %´ŗ @HttpError @HttpError(errorCode=404) Œ&ï,45sÝ°2°¬èén **~ ?HsɍħñòŖ´ŗ ş errorCode ş message ş end ő **~ ?H;<%´ŗ O¶ 500 %´ŗ ő **~ O¶!&èé&ÂFE%´ŗ ?H%ɍħñò¬ÂFE%´ŗ ő ɐĈsĄą´¬«"Ɠd¯Ŗ´ŗ O¶ false %´ŗ 1fb j¡."î3;<% IJn śŜ&ï,45ÝŨ &KLMNOP-sŲ%´ŗ EF45 @WebRemote @WebRemote(exclude="path.to.exclude") Œ&ï,45ÝÞ&ÂÚF<GHMM<& C Y º»ƭũò¬tuĬsµ¬Œ}z¯2°Ŗ´ŗ exclude Kâ,@Ċ45%n ĊPGs!&§¨&ĊPGHOº»Ƹéñò¬«"´¬Œ}s%ÞŖ´ ÆȨã IJ &ɽȺȻÇ ŗ 1fc O%PI&P¡."î3;<% śŜ&ï,45n MNENGH-%ľòŖ´ŗ ^ MNENdÓŲvï,45ŋ´¬Ȩã ƞƟ&<ÃÂȺȻ¯2ţŦñ°ŗ ^ +o @Interceptor @Interceptor(stateless=true) Œ&MNEN-,D-%µ¬Œ}Ɠd´¬&%n ÔɮÐ=šǃä´¬Œ}s%ÞŖ´ŗ @Interceptor(type=CLIENT) Œ&MNEN ©C© ^ ++Q ï,45 ;,ê«ûƭũò¬ĐGHMM<đMNEN%µ¬Œ}Ɠd¯Ŗ´ŗ @Interceptor(around={SomeInterceptor.class, OtherInterceptor.class}) Œ&MNENĞd&MNEN«û-NFGq%«ûƁ°ÌǞTǞñò¬Œ} Ɠd¯Ŗ´ŗ @Interceptor(within={SomeInterceptor.class, OtherInterceptor.class}) Œ&MNENĞd&MNEN«û-NFGq%«ûș°ÌǞTǞñò¬Œ} Ɠd¯Ŗ´ŗ 1ff ĪÌĄ¡."î3;<% ŧ&ï,45īÍĈÂÚF<&ƎƏ£ñòŖ´ŗ è6 @Asynchronous public void scheduleAlert(Alert alert, @Expiration Date date) { ... } @Asynchronous public Timer scheduleAlerts(Alert alert, @Expiration Date date, @IntervalDuration long interval) { ... } @Asynchronous @Asynchronous ÂÚF<;īÍĈ%Ð=ñò¬Œ}Ɠd¯Ŗ´ŗ @Duration @Duration īÍĈ;&âHÂNsn !&;sÐ=ñò¬Ŗ%&Ĉç%µ¬Œ}Ɠd¯Ŗ´ ÆŖDz̵;&ŷĆ012&Ð=s(ľò¬Ŗ%Ç ŗ @Expiration @Expiration īÍĈ;&âHÂNsn !&;sÐ=ñò¬ ÆŖDz̵;&ŷĆ012&Ð=s(ľò¬Ç ĵÝ}ÎĶ%µ¬Œ}Ɠd¯Ŗ´ŗ @IntervalDuration @IntervalDuration Œ&ï,45sÝ°2°¬ƲίƭìƗ¯("īÍĈÂÚF<;&âHÂNsn ƲίƭìƗ¯ç&Ĉç%µ¬Œ}Ɠd¯Ŗ´ŗ 1fi _ '¡±©8."î3;<% ©C© ++\ ï,45 *m e[[_J ö _öJ _m b @Converter #[[_ Y b C *m [ ` Yņ Y[ javax.faces.convert.Converter ş id ő m b C e[ m Y ş forClass ő e Y eņ J m Y m e[ C e àY @Validator #[[_ Y b C[ *m [ ` Yņ Y[ javax.faces.validator.Validator ş id ő m b C[ e[ m Y 1fi _ dataTable wʼn¡±©"î3;<% śŜ&ï,45-,OEF45 GFL-&'ƊrƱ¯Ŗ´ŗ Œò»&ï,45ƙĬÝʫñòŖ´ŗ @DataModel @DataModel("variableName") B YYà e àY Listņ Mapņ Set Object[] b DataModel m Y e m _J Y Æ m EVENT Y e m _J Y STATELESSÇ m e Mapņ m _ e m DataModel Map.Entry ş value ş scope ő e m C Z C`[ e[ m ` ő e scope=ScopeType.PAGE ZY[ [à Y eņ m DataModel _[[ ` öY m PAGE Z @DataModelSelection @DataModelSelection B m [ C[ e m b DataModel Æm m [ e m [àf J [[ ņ m Y C[Ç e [à @DataModel ` e e Yņ m [ C[ e m DataModel _[[ ` B m_ņ m Y e m @DataModel ` Y e m C[ ` e m @DataModelSelection e PAGE Y Y e m @DataModelņ mņ m |[ [ `J B ņ m |[ _[[ [ ` B ©C© ++a ï,45 m ņ e m YYà _m @DataModel J mņ m m e m YYà [ ` Y e m #~ e m J ¢Y ş ő e m C Z C`[ ù e m Z [à @DataModel m Y value @DataModelSelectionIndex @DataModelSelectionIndex ^ZY m [ Z e m b DataModel ` e m Y Æm m _ ` e m [àJ [[ ņ m Y öàÇ e [à @DataModel ` e e Yņ m [ C[ e m DataModel _[[ ` B m_ņ m Y e m @DataModel ` Y e m C[ ` e m @DataModelSelectionIndex ş ő e m C Z C`[ ù e m Z [à @DataModel m Y value 1f PO%G%¡.¿P"î3;<% Œò»&ÂNï,45nwx}Ɛĩ&N¹-ŞɃ¯2 @DataModelSelection }ÍƟ&ķu&'Ɗtu¯Ŗ´ŗ @DataModel ĝ @DataBinderClass @DataBinderClass(DataModelBinder.class) ï,45sNM@&ï,45%µ¬Œ}Ɠd¯Ŗ´ŗ @DataSelectorClass @DataSelectorClass(DataModelSelector.class) ï,45sNǚǛ&ï,45%µ¬Œ}Ɠd¯Ŗ´ŗ 1f1 àJ:%¡."î3;<% Œ&ï,45n w̪âF3´¬;RSEFŋ´¬ȟȠƎƏ´¬ÂLŎƛƿǀ¯Ŗ´ ŗ Š& C âF3¯2Ŕǃ£%ÞŖ´ŗ @Namespace @Namespace(value="http://jboss.com/products/seam/example/seampay") ǹǰ&âF3µ¬;RSĞd&S--ŋŌÝŨ»ò¬Œ}Ɠd¯ ©C© ++g ï,45 Ŗ´ŗ ƎƏñòS-- components.xml OáMq% å| S--}¯2£´¬Œ}%345&cdſȩä´¬Œ}s%ÞŖ´ŗ @Namespace(value="http://jboss.com/products/seam/core", prefix="org.jboss.seam.core") S--Ğd&âF3ŋŌÝŨ¬«"Ɠd¯Ŗ´ŗ Ŗn ;RSÒ&DO@FG-s å| OáMq%Ɠdñò¬;RSÒǃ£ñò¬«"Ɠd¯Ŗ´ŗ }ýũn Œ&S--ŋŌÝŨ»ò¬ microcontainer }°" å| ?DÂ'ę org.jboss.seam.core.microcontainer }°";RSȺȻ´¬«">ͻñòŖ´ŗ 1f2 $HJ B%3éwŃñ©8."î3;<% *m [[_ à J à Y _m m C[ @Filter A m Y Æ_m m Y[ javax.servlet.FilterÇ _m @Filter C[ e[ _[[ ` Z `à ė e[ ş @Filter(around={"seamComponent", "otherSeamComponent"}) Y e m m e[ Y mJm m ö m m JC e[f ş @Filter(within={"seamComponent", "otherSeamComponent"}) Y e m m e[ Y Y m ö m m JC e[f ©C© ++h 2i Ö×Ø× B%TU% ɽ% &×ØÙØ;RSn !&cdKâ,@Ö°2ɾǂ¯2°ÞŖ´ŗ *m `[f Y _[[ ` C e mà [ à components.xml e[ņ ` e à C e[ YY Y eà m Y e àYņ components.xml 2ǯ¼&GH-%×ØÙØ;RS&ÒƓd´¬}n ×ØÙØ;RSǯ¼&'ƊžſǞÞʺý¬Œ}s%ÞŖ´ŗ @Name Ŗn ×ØÙØ;RS˃˸Ò£¯Ŗ´sn !&ź}ŻŠO¶%ī˃˸Ò?M-ñò2°¬&%ơƬ¯2ţŦñ°ŗ Œ"¯?M- auto-create="true" Ɠd´¬1n ×ØÙØ;RS!&ī˃˸Ò%MPG´¬ŷĆ create=true "ŲµûŖĿŻŗ 2i B%3À4 O%RK;<%.B%TU% š0&×ØÙØ;RSEFn ſȩñŖǾŖvĠΰ$&ĊPG&MPGR´¬1¸ǰ¯2°Ŗ´ŗ }ýũn ŧ&;RSM-N-&ÈMPGñò EF45&;,Ã-ĊPGÕÖŒ}vûŖ´ŗ @In private Context sessionContext; org.jboss.seam.core.contexts ¢Y m YC ¢Z `B ņ e ZY[ org.jboss.seam.core.contexts.sessionContext['user'] org.jboss.seam.core.facesContext ;,Ã-ĊPG &=;RS FacesContext ÆŢŤ ;,Ã-%v°Ç Œò»;RS´ƚ2ļM-ñòŖ´ŗ 2i1 >3G!3GB%TU% Œò»&;RSsǍǎÖķƘµŖûµûŖĿŻŗ org.jboss.seam.faces.facesMessages Hœ8ĕMDGα¯ e ³øÂFE&ʋʌtu¯Ŗ´ŗ ş add(FacesMessage ő̽ e ÂFEǣǤ¯Ŗ´ŗ Œ&ÂFEǹǰ&%Ƕ²´¬ŧ&DĕżΡOPƛŀĚzñòŖ´ŗ ş add(String ©C© facesMessage) messageTemplate) ő̽ ^ ++k ×ØÙØ ;RS ĚǹġŻ%°¬tuĬsµ¬Ğd&ÂFE,Dº»Dĕñò¬ e ÂFEǣǤ¯Ŗ´ŗ ş add(Severity ő̽ ĚǹġŻ%°¬tuĬsµ¬Ğd&ÂFE,Dº»Dĕñò¬ e ÂFEǣǤ¯Ŗ´ŗ ş addFromResourceBundle(String ş addFromResourceBundle(Severity ş clear() severity, String messageTemplate) ^ key) ő̽ Ú-<q%dÓñò¬ÂFE,Dº»Dĕñò¬ ÂFEǣǤ¯Ŗ´ŗ ^ ĚǹġŻ%°¬tuĬsµûŖ´ŗ e ő̽ Ú-<q%dÓñò¬ÂFE,Dº»Dĕñò¬ ÂFEǣǤ¯Ŗ´ŗ ^ ĚǹġŻ%°¬tuĬsµûŖ´ŗ e severity, String key) ő̽ Ź2&ÂFEȊȋ¯Ŗ´ŗ org.jboss.seam.faces.redirect âHÂNÖÞ%ĕMDG("ŷĆưĮv ÆĞFG¤Gtuv¥¦§¨ǽƧvŠǍǎnjŖ´Çŗ ş redirect.viewId ş redirect.conversationPropagationEnabled #~ %´ ő̽ ĕMDGÊ& b l %´ŗ ő̽ ĕMDGŹȔÈʺsʋʌ´¬ºŠ"ºŤd¯Ŗ´ŗ ş redirect.parameters ő̽ Ɯ´¬G?-âHÂNÒ&¤F%´ŗ ĕMDGG?-q%țñòŖ´ŗ ş execute() ş captureCurrentRequest() ő̽ ƣnjĕMDG(°Ŗ´ŗ ő̽ &G?-âHÂN}l ;¯2£¯Ŗ´ŗ ǹǰ& ó^* G?- Ț¯Ŗ´ŗ Æ;,Ã-qÇ Ŷ% execute() org.jboss.seam.faces.httpError **~ ?Hɍħ´¬ŷĆưĮv #~ %´ŗ org.jboss.seam.core.events &ÂÚF<Ŗ components.xml q&ÂÚF<M@ǐȍ%̆ɀ%Þ¬M¹ȽÞ.Œ´ #~ %´ŗ @Observer ş raiseEvent(String ő̽ type) ĞdNM&M¹ȽÞ.Œ¯n ̆ɀ¯2°¬ʥŹβTħ¯Ŗ´ŗ ş raiseAsynchronousEvent(String type) ő̽ NM¤l-«ûīÍĈÐ=ñò¬M¹ȽÞ.Œ¯Ŗ´ŗ ^+ ş raiseTimedEvent(String ő̽ NM¤l-«ûīÍĈÐ=ñò¬M¹-3¯Ŗ´ŗ ^+ ©C© type, ....) +Qo ×ØÙØ ;RS ş addListener(String type, String ő̽ methodBinding) ĞdM¹NM&̆ɀĨǣǤ¯Ŗ´ŗ org.jboss.seam.core.interpolator J b ^ Ěǹ&ƜǴŸ´¬1& #~ %´ŗ ş ő̽ #{...} ¾¿& Ěǹ£&,D-Ãĭ¯n !òȢȣñòƜ}ǞÞʺýŖ´ŗ interpolate(String template) b ^ org.jboss.seam.core.interpolator # #~ e Y[J m C[ e b ^ ZY J ş ő m Y[ e b ^ ZY e m e Y[ m _m m C[ C[ interpolate(String template) #{...} org.jboss.seam.core.expressions Ɯ}ÂÚF<M,@p³´¬1& #~ %´ŗ ş createValueBinding(String expression) ş createMethodBinding(String ő̽ ƜM@ĊPGp³¯Ŗ´ŗ ő̽ expression) ÂÚF<M@ĊPGp³¯Ŗ´ŗ org.jboss.seam.core.pojoCache ¢ m PojoCache M-N-&=;RS%´ŗ ş pojoCache.cfgResourceName ő̽ cdOáM&Ò%´ŗ treecache.xml O¶%cd¯Ŗ´ŗ org.jboss.seam.core.uiComponent ^ º»& % b ǵ&GE-ɋt¯Ŗ´ŗ @In("#{uiComponent['myForm:address'].value}") }VW´¬Œ}s%ÞŖ´ŗ UIComponent }ýũn Œò»;RS´ƚ2ļM-ñòŖ´ŗ 2i2 ėĘâw3¢.B%TU% ŧ&;RS £¯Ęęä78MNOP-&l<rƱ¯Ŗ´ŗ org.jboss.seam.core.locale &K3%´ŗ org.jboss.seam.international.timezone &NMě%´ŗ NMěEF45-;%´ŗ org.jboss.seam.core.resourceBundle Ú-<%´ŗ ©C© Ú-<EF45-;%´ŗ +Q ×ØÙØ ;RS Ú-< C Ú-<&wx%Ã&γ¡¥¦(°Ŗ´ŗ org.jboss.seam.core.resourceLoader *m [ YC YY[ `[ ş ő m e m C `[ m _m m `[ e[ messages resourceLoader.bundleNames org.jboss.seam.international.localeSelector cdÎçŖHNMÎ&78&°Ŵòº%K3ǚǛR¯Ŗ´ŗ ş select() ő ƓdñòK3ǚǛ¯Ŗ´ŗ ş localeSelector.locale ş localeSelector.localeString ş localeSelector.language ş localeSelector.country ő ƓdK3&ĘÒ%´ŗ ş localeSelector.variant ő ƓdK3&%´ŗ ş localeSelector.supportedLocales ő 'ę& java.util.Locale %´ŗ ő K3&ĠdzĚǹ%´ŗ ő ƓdK3&Ə˛%´ŗ ő jsf-config.xml qwxĚzñò¬RK3Ě¯2°¬ SelectItem &wx%´ŗ ş localeSelector.cookieEnabled ő GFÃ%¸jñò¬ƚÞK3ǚǛƓd¯Ŗ´ŗ org.jboss.seam.international.timezoneSelector cdÎçŖHNMÎ&78&°Ŵòº%NMěǚǛR¯Ŗ´ŗ ş select() ő ƓdñòK3ǚǛ¯Ŗ´ŗ ş timezoneSelector.timezone ş timezoneSelector.timeZoneId ş timezoneSelector.cookieEnabled ő 'ę& java.util.TimeZone %´ŗ ő NMě&ĠdzĚǹ%´ŗ ő GFÃ%¸jñò¬ƚÞNMěǚǛƓd¯Ŗ´ŗ org.jboss.seam.international.messages # Y J [č J e J Y[ e m `[ org.jboss.seam.theme.themeSelector cdÎçŖHNMÎ&78&°Ŵòº%,¤ǚǛR¯Ŗ´ŗ ş select() ő Ɠdñò,¤ǚǛ¯Ŗ´ŗ ş theme.availableThemes ş themeSelector.theme ©C© ő dÓñò,¤&wx%´ŗ ő ǚǛñò,¤%´ŗ +Q) ×ØÙØ ;RS ş themeSelector.themes ő dÓñò,¤z¯2°¬ SelectItem &wx%´ŗ ş themeSelector.cookieEnabled ő GFÃ%¸jñò¬ƚÞ,¤ǚǛƓd¯Ŗ´ŗ org.jboss.seam.theme.theme ,¤?ġŻ%°¬¤F%´ŗ org.jboss.seam.theme.theme # Y J m Œò»;RS´ƚ2ļM-ñòŖ´ŗ 2iS 'þÿ±©8.B%TU% ŧ&;RS"}345Ŗ78MNOP-«û &Ăă("Œ}s%Þ¬«"vûŖ´ŗ org.jboss.seam.core.conversation ǹǰ& &ƙĬ345Ăă´¬1& #~ %´ŗ ş getId() ő ǹǰ& ĺ¯Ŗ´ŗ ş isNested() ş isLongRunning() ş getId() ş getParentId() ş getRootId() ş setTimeout(int timeout) ş setViewId(String outcome) ş setDescription(String ş redirect() ő ǹǰ&sS-ñò¬ŷĆ ĺ¯Ŗ´ŗ ő ǹǰ&sɐĈ&&ŷĆ ĺ¯Ŗ´ŗ ő ǹǰ& ĺ¯Ŗ´ŗ ő ˺& ĺ¯Ŗ´ŗ ő & ĺ¯Ŗ´ŗ ő ǹǰ&&NMœcd¯Ŗ´ŗ ő C _ mn C [n ` ` &°Ŵòºº»ǹǰ&úûüý¬ŷĆ£ñò¬l cd¯Ŗ´ŗ ő C _ mn C [n Ŗ ` ` %Ězñò¬ǹǰ&&Ȩãcd¯Ŗ´ŗ ÆKM description) ő Œ&¯2ȨãdÓñòšŶ&lĕMDG¯Ŗ´ (ŶưĮÇŗ ş leave() ő 'ꥹ´¬Œ}vţn Œ&&-;Ąą¯Ŗ´ŗ ş begin() ő ɐĈ&ôª¯Ŗ´ Æ@Begin }ÍɰÇŗ ş beginPageflow(String pageflowName) ő OKÝÞ&ɐĈ&ôª¯Ŗ´ Æ@Begin(pageflow="...") }ÍɰÇŗ ş end() ő ɐĈ&Ąą¯Ŗ´ Æ@End }ÍɰÇŗ ©C© +Q+ ×ØÙØ ;RS ş pop() ő ˺þû-NFGRF¯Ŗ´ŗ ş root() ş changeFlushMode(FlushModeType flushMode) ő -NFG& þûŖ´ŗ ő &OHF4Å<Èĸ¯Ŗ´ŗ org.jboss.seam.core.conversationList wx&=;RS%´ŗ org.jboss.seam.core.conversationStack -NFG&=;RS%´ Æ` `Çŗ org.jboss.seam.faces.switcher C _ m %´ŗ Œò»;RS´ƚ2ļM-ñòŖ´ŗ 2i[ xyz Ŋŋ.B%TU% B~| }Ŋ£´¬;RSvûŖ´ŗ org.jboss.seam.pageflow.pageflow OK& #~ Ăă%´ŗ ş isInProcess() ő ǹǰKE-OKsµ¬ŷĆ true ĺ¯Ŗ´ŗ ş getProcessInstance() ş begin(String pageflowName) ş reposition(String nodeName) ő ǹǰ&OK¯2 B~| ProcessInstance ĺ¯Ŗ´ŗ ő ǹǰ&&;,Ã-%OKôª¯Ŗ´ŗ ő ǹǰ&OKĞd&ï<ƲTǞ¯Ŗ´ŗ org.jboss.seam.core.actor ǹǰ&EF45ŋ´¬ B~| &ƙĬ345Ăă´¬1& #~ %´ŗ ş setId(String actorId) ş getGroupActorIds() ő ǹǰ&78& B~| GN EF¯Ŗ´ŗ ő ǣǤñò¬tuĬ&µ¬ǹǰ&78&´¬ Set ĺ¯Ŗ´ŗ B~| org.jboss.seam.bpm.actor #~ e YY[ [ e ` e m B~| _m m f ş setId(String actorId) ş getGroupActorIds() ő m B~| e m ő Set _m m B~| e m JY à ` org.jboss.seam.bpm.transition ©C© +QQ ×ØÙØ ;RS #~ e YY[ [ e m B~| e m ö ş ő m B~| ` _m m ö C @EndTask setName(String transitionName) org.jboss.seam.bpm.businessProcess #~ e YJ [ e m `_ m C ` Y ş businessProcess.taskId ő m e m ö _m m Cf ş businessProcess.processId ő m e m Y _m m f C ş businessProcess.hasCurrentTask() ő ö _m m Cć ş businessProcess.hasCurrentProcess() ő Y _m m f C ş createProcess(String name) ő e m Y e _m m C ş startTask() ş endTask(String transitionName) ő m ö _m m C ő m ö _m m Cf ş resumeTask(Long id) ő m ö _m m JC _m m Cf ş resumeProcess(Long id) ő m Y _m m JC _m m C ş transition(String transitionName) ő JJ m org.jboss.seam.bpm.taskInstance |J Y e m B~| TaskInstance org.jboss.seam.bpm.processInstance |J Y e m B~| ProcessInstance org.jboss.seam.bpm.jbpmContext |J Y e Cf Y JbpmContext org.jboss.seam.bpm.taskInstanceList |J Y e m B~| ö [ org.jboss.seam.bpm.pooledTaskInstanceList |J Y e m B~| Y[ ö [ org.jboss.seam.bpm.taskInstanceListForType ©C© +Q\ ×ØÙØ ;RS |J Y e m B~| ö [ org.jboss.seam.bpm.pooledTask # m[ e Y[ ö J org.jboss.seam.bpm.processInstanceFinder |J e m Y ö [ org.jboss.seam.bpm.processInstanceList *m Y ö [ #[[ e m Y [[ _mC m Y org.jboss.seam.bpm.jbpm [[ 2i^ IÀ!3GŊŋ.B%TU% Œò»&;RSœPDž&EÃ,@ŋŌ¯2°Ŗ´ŗ org.jboss.seam.web.userPrincipal ǹǰ&78 Principal &=;RS%´ŗ org.jboss.seam.core.isUserInRole ǹǰ& Y Y[ s£%Þ¬Kż2n b s;K&DĕǚǛ%Þ¬«"¯Ŗ´ŗ <h:commandButton value="edit" rendered="#{isUserInRole['admin']}"/> 2ib z Ŋŋ.B%TU% Œò»&;RS=ʎ& }&Ŋ£Ɖ}¯2°Ŗ´ ÆŜVȺȻÇŗ TopicPublisher ë«ì QueueSender org.jboss.seam.jms.queueSession | QueueSession &=;RS%´ŗ org.jboss.seam.jms.topicSession | TopicSession &=;RS%´ŗ 2ic ¿#Ŋŋ.B%TU% & ^[ R}Ŋ£¯2£ñò¬;RS%´ŗ org.jboss.seam.mail.mailSession |J Y e C|[ Session *m ` m [ö Y m ù Z Æ`à J m sessionJndiName YYàÇ e m f eJ Y _m m m host à ©C© +Qa ×ØÙØ ;RS ş org.jboss.seam.mail.mailSession.host ő £´¬ |*~ &-Ò%´ŗ ş org.jboss.seam.mail.mailSession.port ő £´¬ |*~ &R%´ŗ ş org.jboss.seam.mail.mailSession.username ő |*~ ő |*~ ǵ&Ƥj£´¬78Ò%´ŗ ş org.jboss.seam.mail.mailSession.password ǵ&Ƥj£´¬â-ð<%´ŗ ş ő org.jboss.seam.mail.mailSession.debug C|[ &Fíî¯Ŗ´ ÆīļɏɐÇŗ ş org.jboss.seam.mail.mailSession.ssl ő `[ |*~ Æ_[[ e[ Y Qa\Ç org.jboss.seam.mail.mailSession.tls ő `à e[ ņ `[ * YY m [ ş ő _m m BCZ[ ` ù e YY[ņ [[ m YY _[[ ` Jf org.jboss.seam.mail.mailSession.sessionJndiName 2if ěŌwq©B%TU% *m Y YC [ Y[e e Ő [[ Y _m m ė [[ `à e[ `à J install="true" m Y components.xml org.jboss.seam.core.init &0Ĉäcd%´ŗ ļM-ñòŖ´ŗ ş org.jboss.seam.core.init.jndiPattern ő EF45l&FGF£ñò¬ ù âN%´ŗ ş org.jboss.seam.core.init.debug ő FÅ<íî¯Ŗ´ŗ ş org.jboss.seam.core.init.clientSideConversations ő true EF´¬}n ;,Ã-&È qƀ¸ĿŴGHMqƀ¸´¬«"vûŖ´ŗ ş ő *# ĊPGFGF´¬ŷĆ£´¬ ù Ò%´ŗ org.jboss.seam.core.init.userTransactionName HttpSession UserTransaction org.jboss.seam.core.manager ë«ì;,Ã-=£&qĥ;RS%´ŗ ļM-ñòŖ´ŗ ş org.jboss.seam.core.manager.conversationTimeout ©C© ő +Qg ×ØÙØ ;RS ;,Ã-&ĴΙſÌ&NMœ%´ŗ ş ɐĈ&;,Ã-%KFG&IJǁ ş (´¬-DF<´¬šǕȏķÎç%´ŗ org.jboss.seam.core.manager.conversationIdParameter &ʋʌ£ñò¬G?-âHÂN%n cdñòŖ´ŗ ş ő org.jboss.seam.core.manager.concurrentRequestTimeout ő O¶% conversationId ő org.jboss.seam.core.manager.conversationIsLongRunningParameter sɐĈ%µ¬ºŠ"ºŋ´¬ȟȠʋʌ´¬1£ñò¬G?-âHÂN %n O¶% conversationIsLongRunning cdñòŖ´ŗ org.jboss.seam.navigation.pages [ Y e _öY J #[_à [[ ş org.jboss.seam.navigation.pages.noConversationViewId ő J[`[ J e m C_ _m C à e m C ş org.jboss.seam.navigation.pages.loginViewId ş org.jboss.seam.navigation.pages.httpPort ő J[`[ J e m C_ f _m m Y C_ ő J[`[ J e m Y _m m mY m Ė ş org.jboss.seam.navigation.pages.httpsPort ő J[`[ J e m Y _m m mY m Ė ş e pages.xml à[ e[ WEB-INF/pages.xml org.jboss.seam.navigation.pages.resources ő [ m e org.jboss.seam.bpm.jbpm Y JbpmConfiguration [[ [ org.jboss.seam.bpm.Jbpm ş org.jboss.seam.bpm.jbpm.processDefinitions ő [ e e B~ e[ ` e m e ` Y ş org.jboss.seam.bpm.jbpm.pageflowDefinitions ő [ e e B~ e[ ` e m e C YJ e[_ org.jboss.seam.core.conversationEntries [ f Y Y J m C [JfJ C `_ Ė org.jboss.seam.faces.facesPage [ YJf Y Y J m C Z _m YJ org.jboss.seam.persistence.persistenceContexts [ Y J m Y Z _m m _ m C ©C© +Qh ×ØÙØ ;RS org.jboss.seam.jms.queueConnection |J | QueueConnection [[ _mC J J QueueSender f [[ ş org.jboss.seam.jms.queueConnection.queueConnectionFactoryJndiName ő m ù e | QueueConnectionFactory e[ UIL2ConnectionFactory org.jboss.seam.jms.topicConnection |J | TopicConnection [[ _mC J J TopicPublisher f [[ ş org.jboss.seam.jms.topicConnection.topicConnectionFactoryJndiName ő m ù e | TopicConnectionFactory e[ UIL2ConnectionFactory org.jboss.seam.persistence.persistenceProvider #` [à e fč e e ~# YC org.jboss.seam.core.validators ¢ m e ` [ ClassValidator org.jboss.seam.faces.validation #[[_ m YY[ _mm C[ e[ _ e[ org.jboss.seam.debug.introspector YY e m `J ~J org.jboss.seam.debug.contexts YY e m `J ~J org.jboss.seam.exception.exceptions [ Y e Z Y m[J org.jboss.seam.transaction.transaction #~ e [[J ` J m [àJ J Y[ `m *#f Y`[ e org.jboss.seam.faces.safeActions e ZY J AI e *m `à m öJ m m ZY Z m C_ 2ii z *m Y ė e org.jboss.seam.async.dispatcher Y m [ ` e à m m org.jboss.seam.core.image ©C© +Qk ×ØÙØ ;RS J Y[ J org.jboss.seam.core.pojoCache |J Y e ~B¢ m org.jboss.seam.core.uiComponent |J Y e A¢Y öà `à Y 2i ĝĞqB%TU% Ğd&Ğğv ;RSGH- &TŜ%Ôʗ&M-stu%´ŗ èýũn ;RS ) ÖM-¯2cd¯Ŗ´ŗ cdq%Ɠdñò¬ components.xml q&ŧ&( <component name="bookingDatabase" class="org.jboss.seam.persistence.ManagedPersistenceContext"> <property name="persistenceUnitJndiName">java:/comp/emf/bookingPersistence</property> </component> <component name="userDatabase" class="org.jboss.seam.persistence.ManagedPersistenceContext"> <property name="persistenceUnitJndiName">java:/comp/emf/userPersistence</property> </component> ;RSÒ bookingDatabase } userDatabase %´ŗ <entityManager>ņ org.jboss.seam.core.ManagedPersistenceContext ȁȂij;,Ã-ÕÖ-;%=ʎ& &=;RS%´ŗ ş EntityManager ő &M-N-¯2Ȣȣ("ƜM@%´ŗ <entityManager>.entityManagerFactory EntityManagerFactory ő à J e à & ù Ò%´ŗ O¶% java:/<managedPersistenceContext> cd¯Ŗ´ŗ <entityManager>.persistenceUnitJndiName <entityManagerFactory>ņ org.jboss.seam.core.EntityManagerFactory ~# EntityManagerFactory =¯Ŗ´ŗ £´¬ŷĆšǃ}vûŖ´ŗ ş entityManagerFactory.persistenceUnitName ^ +o RʼnŇśé% ~# ő ij7ŎFÒ%´ŗ cdKâ,@&ȨãÖ°2 #~ C ȦxţŦñ°ŗ <session>ņ org.jboss.seam.core.ManagedSession -;%=ʎ& ` Session &=;RS%´ŗ ş ő &M-N-¯2Ȣȣ("ƜM@Ěǹ%´ŗ <session>.sessionFactory ©C© SessionFactory +\o ×ØÙØ ;RS ő e à & ù Ò%´ŗ O¶% cd¯Ŗ´ŗ <session>.sessionFactoryJndiName java:/<managedSession> <sessionFactory>ņ org.jboss.seam.persistence.HibernateSessionFactory ` SessionFactory =¯Ŗ´ŗ ş <sessionFactory>.cfgResourceName ate.cfg.xml ő cdOáMǵ&â-%´ŗ O¶% hibern- cdñòŖ´ŗ cdKâ,@&ȨãÖ°2 #~ C ȦxţŦñ°ŗ <managedQueueSender>ņ org.jboss.seam.jms.ManagedQueueSender M¹-;%=ʎ& | QueueSender &=;RS%´ŗ ş <managedQueueSender>.queueJndiName ő | Ã& ù Ò%´ŗ <managedTopicPublisher>ņ org.jboss.seam.jms.ManagedTopicPublisher M¹-;%=ʎ& | TopicPublisher &=;RS%´ŗ ş <managedTopicPublisher>.topicJndiName ő | ČFG& ù Ò%´ŗ <managedWorkingMemory>ņ org.jboss.seam.drools.ManagedWorkingMemory -;%=ʎ& [ WorkingMemory &=;RS%´ŗ ş <managedWorkingMemory>.ruleBase ő RuleBase &M-N-¯2Ȣȣ("ƜĚǹ%´ŗ <ruleBase>ņ org.jboss.seam.drools.RuleBase 345-;& [ RuleBase &=;RS%´ŗ ®¯°&/M-R¯2°v°1n 'ʯΟ%&£Ŗţʎ}ñò2°v°Œ}ơƬ¯2ţŦñ°ŗ ş <ruleBase>.ruleFiles <ruleBase>.dslFile ő [ &ġŻ%°¬OáM&wx%´ŗ ő [ dÓ%´ŗ <entityHome>ņ org.jboss.seam.framework.EntityHome <hibernateEntityHome>ņ org.jboss.seam.framework.HibernateEntityHome <entityQuery>ņ org.jboss.seam.framework.EntityQuery <hibernateEntityQuery>ņ org.jboss.seam.framework.HibernateEntityQuery ©C© +\ 2 _ B% M# %&pŘưĮv b ;Ks°ţÖºġŖò2°Ŗ´ŗ ×ØÙØ& b ;K&ķuǴŸ}ĩ&<â,@&HMHº»&=Ɖ}¯2°Ŗ´ŗ }Ŋ£´¬ęn I mb n#Y m |àb * NHMH&£ʰʱ¯Ŗ´ŗ *m_ö NHMH&£ëδ1%ÞŖĿŻŗ 2 P Œò»&;K£´¬n S--dÓ¯Ŗ´ Æe [ ǫíÇŗ śŜ&«"£´¬% s <html xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib"> Œ& A %°ţÖº&N&£z¯2°Ŗ´ŗ *`[ + b ;KOáD- <s:button> Ȩã ʋʌ&çn;K«ûG45ƭìƗ¯R´¬ ÿN O¶ĴF¯ŖĿŻŗ ƙĬ ş value ő H¹ ş action ş view ş fragment ő G¯2°¬OH ş disabled ő Gsȳî ć ş propagation ő dÓñòG45-êM<¯ÂÚF< ő G¯2°¬ b C_ ő &ʋʌē¿&Ɠd 6 beginnjoinn nestnnone Ŗ end ş ő ôª´¬OKdÓ Æpropagation="begin" Ŗ propagation="join" &ŷĆ&ØíîÇ pageflow £ēĔ <s:button id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/> n view } action sƓdtu%´ŗ Œ&ŷĆnƓdñòlǵ&ĕMDGsǶ²´¬}G45 sƭũòŖ´ŗ <s:link ©C© /> +\) b ;K <s:cache> Ȩã ¢ m £¯2OHÂDĕ¯ÃĭF4 'ęn<s:cache> n×ØÙØ pojoCache ;RS«2=ñò ¢ m &M-N-£¯2°¬Œ}ƮƬ¯2ţŦñ°ŗ ƙĬ ş key ő m öà m ņ e C[ ZYf b ZY[ņ e _ _ mJ YJ eJ m Y[à ņ _ Jm key="Document-#{document.id}" ş enabled ş region ő C[ ZY m e m m m[ ` ő ¢ m Æee mC ee ZYà Y[ Ç £ēĔ <s:cache key="entry-#{blogEntry.id}" region="pageFragments"> <div class="blogEntry"> <h3>#{blogEntry.title}</h3> <div> <s:formattedText value="#{blogEntry.body}"/> </div> <p> [Posted on  <h:outputText value="#{blogEntry.date}"> <f:convertDateTime timezone="#{blog.timeZone}" locale="#{blog.locale}" type="both"/> </h:outputText>] </p> </div> </s:cache> <s:conversationId> Ȩã b Gµ¬°ÿN ǣǤ¯Ŗ´ Æ è <h:commandLink />n<s:button />Çŗ ƙĬ v¯ <s:conversationPropag Ȩã ation> ;¤<Gµ¬°ÿN Æ µ¬°nb ;K&ˏ Ç &1&ʋʌL-N¤Mƛ¯Ŗ´ŗ b [ &Øíî%´ŗ ƙĬ ©C© +\+ b ;K ş type ő &ʋʌē¿&Ɠd 6 beginnjoinn nestnnone Ŗ end ş pageflow ő ôª´¬dÓ Æpropagation="begin" Ŗ propagation="join" &ŷĆ&ØíîÇ £ēĔ <h:commandButton value="Apply" action="#{personHome.update}"> <s:conversationPropagation type="join" /> </h:commandButton> <s:convertDateTime> Ȩã NMě%&ĵÝnÎç&Èʺ(°Ŗ´ŗ ƙĬ v¯ £ēĔ <h:outputText value="#{item.orderDate}"> <s:convertDateTime type="both" dateStyle="full"/> </h:outputText> <s:convertEntity> Ȩã ?,@,@Èʺǹǰ&;RSĉû 2Ŗ´ŗ ŒòƠHĊÿN}<KFĕœ;Kí£%´ŗ Œ&Èʺ @Id ï,45sÝ°=?,@,@ Æ Y[ %Ŕ;RF%Ŕ Ç %/p¯Ŗ´ŗ ƙĬ v¯ cd <s:convertEntity /> }ƹ =H8G45 Æććć ȺȻ Ç &£sŲų%´ŗ e à |J ~ ¢Z ė [[ entityManagerņ m à YZ[6 <component name="org.jboss.seam.ui.EntityConverter"> <property name="entityManager">#{em}</property> </component> e à J |J ` m à YZ[6 <component name="org.jboss.seam.ui.EntityConverter"> <property name="session">#{hibernateSession}</property> </component> ©C© +\Q b ;K e à _ m à J _m m à Cņ à Yà e m à C e m à J YZ[6 <component name="myEntityConverter" class="org.jboss.seam.ui.converter.EntityC <property name="entityManager">#{em}</property> </component> <h:selectOneMenu value="#{person.continent}"> <s:selectItems value="#{continents.resultList}" var="continent" label="#{continent.name}" /> <f:converter converterId="myEntityConverter" /> </h:selectOneMenu> £ēĔ <h:selectOneMenu value="#{person.continent}" required="true"> <s:selectItems value="#{continents.resultList}" var="continent" label="#{continent.name}" noSelectionLabel="Please Select..."/> <s:convertEntity /> </h:selectOneMenu> <s:convertEnum> Ȩã Èʺǹǰ&;RSĉûÝŨŖ´ŗ ŒòƠHĊÿNĝ<KFĕœ;K%í£%´ŗ ƙĬ v¯ £ēĔ <h:selectOneMenu value="#{person.honorific}"> <s:selectItems value="#{honorifics}" var="honorific" label="#{honorific.label}" noSelectionLabel="Please select" /> <s:convertEnum /> </h:selectOneMenu> <s:decorate> Ȩã 45s̺̻Ŗ required="true" scdñò}Þn b ŪūO@<Ɗ˸ Æ Ç ¯Ŗ´ŗ ƙĬ ş ő ,D template ;RSƊ˸´¬1£´¬ e [ #{required} C[`[ s:decorate̽ #{required} C[ true e à mC m Y Y `J Ėņ #{invalid} C[ true e C[ #{invalid} ©C© +\\ b ;K £ēĔ <s:decorate template="edit.xhtml"> <ui:define name="label">Country:</ui:define> <h:inputText value="#{location.country}" required="true"/> </s:decorate> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib"> <div> <s:label styleClass="#{invalid?'error':''}"> <ui:insert name="label"/> <s:span styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="#{invalid?'error':''}"> <s:validateAll> <ui:insert/> </s:validateAll> </span> <s:message styleClass="error"/> </div> </ui:composition> <s:defaultAction> Ȩã Y eà m e[ _m m e ` f J m öà ¢[à à [à ` ÆJ <h:commandButton />ņ <a:commandButton /> <tr:commandButton />Ç Ő Y eà m Ő [à mC e[ Y e ƙĬ v¯ £ēĔ <h:commandButton id="foo" value="Foo" action="#{manager.foo}"> <s:defaultAction /> </h:commandButton> <s:div> Ȩã *| <div> Dĕ¯Ŗ´ŗ ƙĬ ©C© +\a b ;K v¯ £ēĔ <s:div rendered="#{selectedMember == null}"> Sorry, but this member does not exist. </s:div> <s:enumItem> Ȩã Ɯº» SelectItem ²³¯Ŗ´ŗ ƙĬ ş enumValue ş label ő Ɯ& J Ěǹ ő m [`[ ` _m J m SelectItem £ēĔ <h:selectOneRadio id="radioList" layout="lineDirection" value="#{newPayment.paymentFrequency}"> <s:convertEnum /> <s:enumItem enumValue="ONCE" label="Only Once" /> <s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" /> <s:enumItem enumValue="HOURLY" label="Every Hour" /> <s:enumItem enumValue="DAILY" label="Every Day" /> <s:enumItem enumValue="WEEKLY" label="Every Week" /> </h:selectOneRadio> <s:fileUpload> Ȩã OáMFK<;KDĕ¯Ŗ´ŗ Œ&;K?;@NM multipart/form-data &O¶%£ñòvŨòũvûŖĿŻŗ <h:form enctype="multipart/form-data"> b [Y Ėņ m |[Y C[ e[ [ ` eJ web.xml6 <filter> <filter-name>Seam Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Ȩã *m e[[_J eJ Y e [Y Ė à ` eJ YZ[6 ©C© +\g b ;K ş createTempFiles ő e m Y ņ Y[ e[ Yà e[ e à ş maxRequestSize ő m Z č e e[ Y[ Ėņ `à ė ZY[6 <component class="org.jboss.seam.web.MultipartFilter"> <property name="createTempFiles">true</property> <property name="maxRequestSize">1000000</property> </component> ƙĬ ş data ő m C[ `J C m `à e[ *m CJ e[ m[ ` [ byte[] InputStream ÆĖÇ ş contentType ş fileName ş fileSize ş accept ş style ş styleClass ő m C[ `J C m e[ė àY ÆY[Ç ő m C[ `J C m e[ ÆY[Ç ő ÆY[Ç m C[ `J C m e[ č ő fY [ e àY Yņ à ` YY `à m `_ ^J "images/png,images/jpg"ņ "images/*" ő *m [ė à[ ő *m [ė à[ [ £ēĔ <s:fileUpload id="picture" data="#{register.picture}" accept="image/png" contentType="#{register.pictureContentType}" /> <s:formattedText> Ȩã Y *Zņ m Z öY e[ e `[Jņ _ö m YY[ m Jm m Z m *Z mY e e[[ J ƙĬ ş ©C© ő ^ ZY Y eàJ m m Z öY value +\h b ;K £ēĔ <s:formattedText value="#{blog.text}"/> ^ZY[ <s:fragment> Ȩã # fJ Y e[ e `[J½`[J J e ė m[ ƙĬ v¯ £ēĔ <s:fragment rendered="#{auction.highBidder ne null}"> Current bid: </s:fragment> <s:graphicImage> Ȩã # Z <h:graphicImage> m [[_ m J ` ¢Y̽ em e ` YY[ m f J #[[ ` e <h:graphicImage> YYņ _[[ 6 ƙĬ ş ©C© ő J Y[à ¢ ` Ym String Æ[ e m [YmÇņ byte[]ņ java.io.Fileņ java.io.InputStream java.net.URL ¢[à YY J e image/pngņ value +\k b ;K image/jpeg ş image/gif ő e Y e m C J _[[ mC Jf e[ e à _ à e[ņ à m[ Yf eà m *m m[ ` Ė fileName *e * YY[à e m Jņ à _[ J Y eàf J m e YY[à [à YY m f e6 <s:transformImageSize> ş width ő _ _m e m J ş height ş maintainRatio ş factor ő _ mJm e m J ő e trueņ e width½height Yf eņ m J _[[ ` č _m m Y e `J [ [ m Y ő [ m J `à m JC e <s:transformImageBlur> ş radius ő Ye C[ `[ _m m JC <s:transformImageType> ş contentType jpeg ő [ m àY e m J m image/ image/png ė à à _ e f UIComponent _m m implements org.jboss.seam.ui.graphicImage.ImageTransform f m applyTransform()m image.getBufferedImage() J m J[ J image.setBufferedImage() à f e J *e YY[ m Y e m C_ £ēĔ <s:graphicImage rendered="#{auction.image ne null}" value="#{auction.image.data}"> <s:transformImageSize width="200" maintainRatio="true"/> </s:graphicImage> <s:label> Ȩã b Y e[ _m m [`[ *m [`[ Y[ ©C© +ao b ;K m *| <label> Jņ _m m b Y Y e _m <s:decorate> ƙĬ ş style ő *m [ė à[ ş styleClass ő *m [ė à[ [ £ēĔ <s:label styleClass="label"> Country: </s:label> <h:inputText value="#{location.country}" required="true"/> <s:link> Ȩã # [ö m YY C e _m [ C C YYJ ` m e ƙĬ ş value ő m [`[ ş action ş view ş fragment ő m eJ e [ö ş disabled ő m [ö `[ć ş propagation ş pageflow ő m `J m Y e m [ ő m b C_ [ö ő m C YYJ à[6 beginņ joinņ nestņ none end ő YJe[_ e `J Æ*m [à e[ _m propagation="begin" propagation="join"Ç £ēĔ <s:link id="register" view="/register.xhtml" value="Register New User"/> Ő Y eà `m view action <s:link /> m ņ m _[[ ` [[ m m Y e C_ m <s:message> Ȩã b Y e[ _m m C[ J ƙĬ ©C© +a b ;K v¯ £ēĔ <f:facet name="afterInvalidField"> <s:span>  Error:  <s:message/> </s:span> </f:facet> <s:remote> Ȩã ó m C Y ` Ė IJ ƙĬ ş ő fY [ e m Y Æ e[[à Ė[e [ Ç e _m m J If J C Y ` ¢mY )ņ IJ e f [ include £ēĔ <s:remote include="customerAction,accountAction,com.acme.MyBean"/> <s:selectDate> Ȩã Y A <rich:calendar /> Y[à à Y ö Y m [ e m Y e Y e[ *m `à e m selectDate [ m[ *| [ņ m Z Jņ m YY m [ ö Y[à m Y ö *m Y ö ` à[ J ¢ # ZY[ ¢ e[ ` e m `öJ date.cssņ ` J J fJ *m ¢ à[ [ m YY e m Y ö [ ` `[_ ƙĬ ş for ő *m e m Y e[ m m Y ö _[[ f m [ ş dateFormat ş startYear ő *m e J *m m[ m m e e m Y e[ ő *m YYY à [ J _[[ m à ş ©C© endYear ő *m YYY à [ J _[[ m à +a) b ;K ş ő ¢[ _m m à m e à e m _ö Æo ̾ àņ a ̾ àÇ e m ` ņ m m e à e m _ö _[[ e[ ` m ė [ [ firstDayOfWeek £ēĔ <div class="row"> <h:outputLabel for="dob">Date of birth<em>*</em></h:outputLabel> <h:inputText id="dob" value="#{user.dob}" required="true"> <s:convertDateTime pattern="MM/dd/yyyy"/> </h:inputText> <s:selectDate for="dob" startYear="1910" endYear="2007"> <img src="img/datepicker.png"/> </s:selectDate> <div class="validationError"><h:message for="dob"/></div> </div> ^ZY[ ¢ à[J *m e[[_J [ ` m ¢ [ m [ m à[ e m [ [ ©C© ş seam-date ő *m [ YY[ m div J m YYY [ ÆÇ [ YY[ m table m [ m [à e m [ Æ)Ç ş seam-date-header ş seam-date-header-prevMonth ő *m [ YY[ m [ m `[ _ ÆtrÇ m `[ [[ ÆtdÇ Æ+Ç ő *m [ YY[ m Yf C m `[ [[ņ ÆtdÇņ _m m _m [ ö m [ Y[à m m Y m [à f Y[à ÆQÇ +a+ b ;K ©C© ş seam-date-header-nextMonth ő *m [ YY[ m Z m `[ [[ņ ÆtdÇņ _m m _m [ ö m [f Y[à m m e[[_J m [à f Y[à Æ\Ç ş seam-date-headerDays ş seam-date-footer ş seam-date-inMonth ş seam-date-outMonth ş seam-date-selected ş seam-date-dayOff-inMonth ş seam-date-dayOff-outMonth ş seam-date-hover ş seam-date-monthNames ş seam-date-monthNameLink ş seam-date-years ş seam-date-yearLink ő *m [ YY[ m [ à m _ ÆtrÇņ _m m m e m _ö à ÆaÇ ő *m [ YY[ m [ e _ ÆtrÇņ _m m Y[à m ÆgÇ ő *m [ YY[ m `[ [[ ÆtdÇ [ m _m m m [à Y[à ÆhÇ ő *m [ YY[ m `[ [[ ÆtdÇ [ m e m m f [à Y[à ÆkÇ ő *m [ YY[ m `[ [[ ÆtdÇ [ m m [à [ ÆoÇ ő *m [ YY[ m `[ [[ ÆtdÇ [ m à ee Æ _ö àņ à àÇ _m m [à [ m ÆÇ ő *m [ YY[ m `[ [[ ÆtdÇ [ m à ee Æ _ö àņ à àÇ e m [à [ m Æ)Ç ő *m [ YY[ m `[ [[ ÆtdÇ [ C _m m m mCJ Æ+Ç ő *m [ YY[ m div [ m m YYY m [ ÆQÇ ő *m [ YY[ m m ÆaÇ [ m m YYY m Æ\Ç ő *m [ YY[ m div [ m m YYY à [ ÆaÇ ő *m [ YY[ m m ÆaÇ [ m m YYY à Æ\Ç +aQ b ;K <s:selectItems> Ȩã ¢ List<SelectItem> e ņ ņ |[ #à ƙĬ ş value ő ^ ZY Y eàJ m m ` ö m List<SelectItem> ş var ő e m e m [ [ C`[ m m[ m `B J ş label ş itemValue ş disabled ş noSelectionLabel ş hideNoSelectionLabel ő m [`[ ` _m J m SelectItem ¢ e m var C`[ ő [ m C e m Y f [ Y[ņ `à e[ m var `B ¢ ef m var C`[ ő e m SelectItem _[[ ` `[ ¢ e m var C`[ ő Y e m ÆY[Ç [`[ Y[ m Y e [ Æe required="true" [ Y e m f [ J m C[ _[[ C[ Ç ő e ņ m noSelectionLabel _[[ ` m _m C[ [ £ēĔ <h:selectOneMenu value="#{person.age}" converter="ageConverter"> <s:selectItems value="#{ages}" var="age" label="#{age}" /> </h:selectOneMenu> <s:span> Ȩã I *| <span> ƙĬ v¯ ©C© +a\ b ;K £ēĔ <s:span styleClass="required" rendered="#{required}">*</s:span> <s:taskId> Ȩã # m ö Y [ö Æ [ b [Çņ _m m ö C[`[ C #{task} ƙĬ v¯ <s:validate> Ȩã # fC[ [ņ C[ b Y e[ J m ` YYà J ` [ ƙĬ v¯ £ēĔ <h:inputText id="userName" required="true" value="#{customer.userName}"> <s:validate /> </h:inputText> <h:message for="userName" styleClass="error" /> <s:validateAll> Ȩã # fC[ [ņ C[ [[ m[ b Y e[ J m ` YY J ` [ ƙĬ v¯ £ēĔ <s:validateAll> <div class="entry"> <h:outputLabel for="username">Username:</h:outputLabel> <h:inputText id="username" value="#{user.username}" required="true"/> <h:message for="username" styleClass="error" /> </div> <div class="entry"> <h:outputLabel for="password">Password:</h:outputLabel> <h:inputSecret id="password" value="#{user.password}" required="true"/> <h:message for="password" styleClass="error" /> </div> <div class="entry"> <h:outputLabel for="verify">Verify Password:</h:outputLabel> <h:inputSecret id="verify" value="#{register.verify}" required="true"/> ©C© +aa b ;K <h:message for="verify" styleClass="error" /> </div> </s:validateAll> <s:validateFormattedT Y ext> ¢m ö m m ` C[ C[ *Z #` v¯ 21 "î3;<% [ YC [[_ à Y b C C[6 @Converter @Name("itemConverter") @BypassInterceptors @Converter public class ItemConverter implements Converter { @Transactional public Object getAsObject(FacesContext context, UIComponent cmp, String value) { EntityManager entityManager = (EntityManager) Component.getInstance("entityManager"); entityManager.joinTransaction(); // Do the conversion } public String getAsString(FacesContext context, UIComponent cmp, Object value) { // Do the conversion } } <h:inputText value="#{shop.item}" converter="itemConverter" /> IJ m Y b C m_ m C _m m `[ m ~# ^à|J *# ņ _m CJ m C[ ` ö ė `B Y @Validator @Name("itemValidator") @BypassInterceptors @Validator public class ItemValidator implements Validator { public void validate(FacesContext context, UIComponent cmp, Object value) throws ValidatorException { ItemController ItemController = (ItemController) Component.getInstance("itemController"); return itemController.validate(value); } } ©C© +ag b ;K <h:inputText value="#{shop.item}" validator="itemValidator" /> IJ m Y b C[ m_ m C[ _m m f B m Y̽ m B Y C[ m C[ ©C© +ah 21 ] ^ _m m YC Z m Ae ^ZY f JJ Æ^ Ç ^ YC ` e m m m ZYC Y_ e ^ ZY 21 yĊ ]Ä ^ [[_ à m _m e Y ő e ņ b [ m ÆJ valueChangeListenerÇ ö Y YC `à b ^ C m b ZY[6 <h:commandButton action="#{hotelBooking.bookHotel(hotel)}" value="Book Hotel"/> @Name("hotelBooking") public class HotelBooking { public String bookHotel(Hotel hotel) { // Book the hotel } } 21 ¡Đđ [[ m e Cņ Y `à Ymņ Yf `à 6 <h:commandButton action="#{hotelBooking.bookHotel(hotel, user)}" value="Book Hotel"/> $V&è%âHÂNnhotel } user sƜ¿}¯2Ȣȣñòn ;RS&bookHotel() țñòŖ´ŗ âHÂNnŜ&«"nŠ&«"vƜ¿Ŕ"ɁsƗƦŖ´ŗ <h:commandButton action="#{hotelBooking.bookHotel(hotel.id, user.username)}" value="Book Hotel"/> ė Y e[[à m_ m Z ^ _ö ]m m YJ ņ m Y Æe ZY[ņ hotel.id user.usernameÇņ C[ Æ C[ ZYÇ _m m YJ ` Ő ė Y `B YŅ Ő m m Y C[`[ [à _m m YJ ņ ` [ _m `e m J ` [C _m m YJ ` m m _[[ ` [[ _m null JŅ Ő [ Y [[ J J J[ Ė6 <h:commandLink action="#{printer.println('Hello world!')}" value="Hello"/> ©C© +ak ^ Ae ^ [ YY C[ ZYņ ` e[ ` öJ ` [ ZY C J C ZY J½ Y e b ZY C[ ZY _m [à C[ ÆJÇ ÆJ m rendered f `Ç |à `B ņ m_Cņ ė mC YYY[à YYà f Ė Y ^ C m `à [[_J C[ ` C J m m àZ b ZY[6 <h:outputText value="#{person.name}" rendered="#{person.name.length() > 5}" /> Ő m č e [[ [ 6 #{searchResults.size()} J[ à ZY e m e ͼΪ`BYYàΫ _[ ` [ m ZYf ͼΪ`BJ~YàÆÇΫ ~ [ [[_ *m e[[_J ZY[ [[ m productsByColorMethod _m [[ J J6 #{controller.productsByColor('blue')} 211 ]m J ^ à m[ öY m e[[_J Y 6 ş Y`[à _m ~ ) ő ^ ė [à ` _m ~ ) m Y[ B ZY _m Y ņ e à _ m Z _m b )ņ à _[[ b [ *m Z _ö [à _m ~ )o ş A C Y ő ¢Y [ö <c:forEach /> <ui:repeat />f C àņ ZYJ m m [ Y *m _ö J e à [ J _ J <h:commandButton /> <h:commandLink />6 @Factory("items") public List<Item> getItems() { return entityManager.createQuery("select ...").getResultList(); } <h:dataTable value="#{items}" var="item"> <h:column> <h:commandLink value="Select #{item.name}" action="#{itemSelector.select(item})" /> </h:column> </h:dataTable> _C e à _ <s:link /> <s:button /> à ZY m DataModelņ <dataTable /> Æ ĖC[ e Y [ö <rich:dataTable /> Ç ùm <s:link /> <s:button /> ` m e Æ me Y `öö`[ [öÇ J Y m _m m m [[ *m J Y [à ` _m ©C© +go ^ `[ ` ö `à DataModel ş ¢[[J MethodExpression e C ő ù[[àņ _m MethodExpression f ņ m Y àY Y `à b m e m `Jņ b m m Y Y ]m m Zņ _ ė ö_ m Y àY [ e m ZY m ` C[ *m m _ f Ė 6 ş ]m à Cö MethodExpression C ņ Y à Y à ` J ~ e m ZY _[[ ö Y ş [àņ e [[ methodExpression.getMethodInfo().getParamTypes() à b ZY _m Yņ à e Cö m MethodExpression `e [[J getParamTypes() m e m Z J[à [à YY[à _m à _ Cö m MethodExpression `à m C 211 yx ^ YY [ YB àZ # YB ZY Y `f ZY [fC[ Æ[ņ ņ Ç ZY b ņ m Zf Y6 #{company.departments} Jm [ e Y e à [à [ e Y ņ à [à Y C m [ C m C[ ^ [[_ m _m YB ZY6 #{company.departments.{d|d.name}} *m `ZY [ ` m ZY[ņ m ZY d.name C[f e m Yņ J d [ m Y `B *m [ e m ZY _[[ ` [ e J C[ #à C[ ZY ` ZYņ _[ ` Ye [à C[ _ m e[[_Jņ J à m e m [Jm e [[ m Y Yà6 #{company.departments.{d|d.size()}} ~B ` *m e[[_J ZY m [ e Cà f Y[à Cà Y6 #{company.departments.{d|d.employees.{emp|emp.lastName}}} ù YB ` [Jm[à öàņ m_C *m e[[_J ZY [ö [ö [ e [[ m Y[à [[ m Y6 ©C© +g ^ #{company.departments.{d|d.employees}} _Cņ [[à [ J [ e m Y[à e m Cf [ Y * ` m C[ņ à [Jm[à [J ZYf 6 #{company.departments.{d|d.employees.{e|e}}} Y m m àZ ` Y `à b [ ~ m ` Zm[ ~ e[ ] Y m m YB àZ _[[ mJ e C e ^ ©C© +g) 22 "&!:;<%.34 345&ź}ŻŠnǙvţ}Ŕͤȑˏ&¼/,-sŲ%´ŗ ͗ǔ&;RS,-´¬7ŎF,-}n 345&´ƚ2&CDž Ælśé&Ź2Ç -G%,-´¬ńĆ,-%´ŗ Šnj»&,-Ŕ}2Ŕžſp³%ÞŖ´ŗ 22 B%TU% .>ōJ 34 ´ƚ2&;RS~%´ŗžſ7ŎF,-ª1¬n}2ŔƷ°ʼnŇ% ´ŗ ñ»n;RSç%&ĝûIJûĝ;,Ã-ĸĊPG&GE- MPG45ƾ£¯2°¬&%nĻļ&HNMʼnŇ%vţ2Ŕ }2Ŕžſ;RS,-´¬Œ}s%ÞŖ´ŗ ŧ&«"v;RSǪý2ØŖ¯Ƌ"ŗ @Stateless @Scope(EVENT) @Name("statementOfAccount") public class StatementOfAccount { @In(create=true) EntityManager entityManager private double statementTotal; @In private Customer customer; @Create public void create() { List<Invoice> invoices = entityManager .createQuery("select invoice from Invoice invoice where invoice.customer = :customer") .setParameter("customer", customer) .getResultList(); statementTotal = calculateTotal(invoices); } public double calculateTotal(List<Invoice> invoices) { double total = 0.0; for (Invoice invoice: invoices) { double += invoice.getTotal(); } return total; } // getter and setter for statementTotal } [ [*[ ÂÚF<&7ŎF,-śŜ&«"ɆţŒ}s%ÞŖ´ ;RS&lS-KFG&,- Çŗ Æ public class StatementOfAccountTest { @Test public testCalculateTotal { List<Invoice> invoices = generateTestInvoices(); // A test data generator double statementTotal = new StatementOfAccount().calculateTotal(invoices); ©C© +g+ 345&,- assert statementTotal = 123.45; } } Őė[[ _ ė J CJ e YJ m `̽ _ J à e [à YC `à ] B J m [J e ~ Y ė [[à Y [à Y e ņ J à mŅ _Cņ e à _ m YY[ ņ 221 "&!:;<%.ŃĂ34 ńĆ,-Ŕ"Ǚ¯ŦŨÔƴvûŖ´ŗ ;,ê&MOH-HGĭ,-ʎ&wĥ%µ¬1n ȳɀ´¬Œ}s%Þv°&%´̛ }Əýn¼/,-'(´¬1nľǾľǾ345ǵ345 KM¯ţµûŖĿŻŗ !Œ%nš́ȃŲv;,ê&MOH-HGĭ,-ʼnŇƲǹ¯nĬuǕÞţʁv "Œ}vţŹ2&345'(tu´¬ŲsµûŖ´ŗ sε£´¬Kn;RS&,--Gp³¯n ǯǎ¯;,êʼnŇ Æ } qͣ& ^ ;,ênŦ¯ qͣ& ^ ;,ê ʭ \ sŲų%´snʭ a %/p¯ŖĿŻÇ %'(´¬}Ə"Ŕ&%´ŗ public class RegisterTest extends SeamTest { @Test public void testRegisterComponent() throws Exception { new ComponentTest() { protected void testComponents() throws Exception { setValue("#{user.username}", "1ovthafew"); setValue("#{user.name}", "Gavin King"); setValue("#{user.password}", "secret"); assert invokeMethod("#{register.register}").equals("success"); assert getValue("#{user.username}").equals("1ovthafew"); assert getValue("#{user.name}").equals("Gavin King"); assert getValue("#{user.password}").equals("secret"); } }.run(); } ... } 221 Ė [[àņ _ ` `[ Y[ m Y[ e Y m Y Y _m m C[`[ m J C ©C© +gQ 345&,- b ZY[ņ YY _ mC Y _m m e Yà Yf J à6 @Name("paymentProcessor") public class PaymentProcessor { public boolean processPayment(Payment payment) { .... } } b J ņ _ ö m Y e[[_6 @Name("paymentProcessor") @Install(precedence=MOCK) public class MockPaymentProcessor extends PaymentProcessor { public boolean processPayment(Payment payment) { return true; } } m MOCK Y mJm m m e[ Y e YY[ Yf ņ _[[ [[ m ö Y[ _mC m [Ym ]m f Y[à Y ņ m ö Y[ `ņ m [ Y _[[ ` [[ 222 | # C m Y`[ [J # m Y`[ _m Y e_ö [ m _m[ YY[ `à Y J _m m _` `_ *m e_ö mC m Y[ ņ ` mà YYY e C[Y [ à _ Y ņ [ b C *m [ e Y Y m `_ m C_ m Y m _ņ à J Y à m b Y[Ņ SeamTest Œ&K%lƸţ´ƚ2,-´¬Œ}s%ÞŖ´ŗ ñÞźŠ7ŎF,-¯;RS&n~lǪý2ØŖ¯Ƌ"ŗ <html> <head> <title>Register New User</title> </head> <body> <f:view> <h:form> <table border="0"> <tr> <td>Username</td> <td><h:inputText value="#{user.username}"/></td> </tr> <tr> <td>Real Name</td> <td><h:inputText value="#{user.name}"/></td> </tr> <tr> <td>Password</td> <td><h:inputSecret value="#{user.password}"/></td> ©C© +g\ 345&,- </tr> </table> <h:messages/> <h:commandButton type="submit" value="Register" action="#{register.register}"/> </h:form> </f:view> </body> </html> Œ&345&789:ķu ÆIJ ,-¯Ŗ´ŗ *ùó G?-&HMOMGƲǹ¯2ØŖ¯Ƌ"ŗ ÿNGFG¯}Þ&/pÇ ¼/,-%n b public class RegisterTest extends SeamTest { @Test public void testRegister() throws Exception { new FacesRequest() { @Override protected void processValidations() throws Exception { validateValue("#{user.username}", "1ovthafew"); validateValue("#{user.name}", "Gavin King"); validateValue("#{user.password}", "secret"); assert !isValidationFailure(); } @Override protected void updateModelValues() throws Exception { setValue("#{user.username}", "1ovthafew"); setValue("#{user.name}", "Gavin King"); setValue("#{user.password}", "secret"); } @Override protected void invokeApplication() { assert invokeMethod("#{register.register}").equals("success"); } @Override protected { assert assert assert } void renderResponse() getValue("#{user.username}").equals("1ovthafew"); getValue("#{user.name}").equals("Gavin King"); getValue("#{user.password}").equals("secret"); }.run(); } ... } ;RSʼnŇƿǀ´¬SeamTestɨʐ¯n bG?-&HMOMG?ĴD´¬SeamTest.FacesRequest ɨʐ¯ȳÒGH-,--GɆ°2°¬Œ}ơƉ¯2ţŦñ°ŗ Æó^*G?-,-´¬SeamTest.NonFacesRequest Ŕ£Ƭñò2°Ŗ´ŗÇ ñŖǾŖvbOPƛĚ´Ò&ÂÚF<nb&;RSƭìƗ¯?ĴD´ ©C© +ga 345&,- ¬;<VW¯2°Ŗ´ŗ ñ»nñŖǾŖv45-K¯2°Ŗ´ŗ &345nŔ}Ôƴv3-&ńĆ,-s£Ƭñò2°Ŗ´ŗ #£¯2,-'(´¬ēĔ}n^ [Y&*ùóHM£´¬ēĔsµûŖ´ŗ ©C© +gg 345&,- 222 ©C© +gh 345&,- e à fJ à YB à à _J mf _ àė[[ Y m J C à eC `[ [ ÆJ ņ Cņ [YÇ bņ [ [ö m Y à 6 *`[ ++ óY #e org.jboss.seam.embedded hibernate-all lib/test/hibernate-all.jar org.jboss.seam.embedded jboss-embedded-all lib/ test/jboss-embedded-all.jar org.jboss.seam.embedded thirdparty-all lib/test/thirdparty-all.jar org.jboss.seam.embedded jboss-embedded-api lib/ test/jboss-embedded-api.jar org.jboss.seam jboss-seam lib/jboss-seam.jar org.jboss.el jboss-el lib/jboss-el.jar javax.faces jsf-api lib/jsf-api.jar javax.activation javax.activation lib/activation.jar ė Cà Y à ė Y m Y[ # Y e lib/ ÆJ jboss-system.jarÇ m [Ymņ m _[[ ^` ` ņ B m Y ÆJ [ņ B~|Çà à J Ő [ [ m bootstrap/ à m [Ym̽ bootstrap/ m eJ e ^` #ņ e à Y à `[ YB m [Ym ė eJ Y [[ m eJ e[ e ~# m [Ym _[[ ö ^` Y[à à ÆB àÇ _m m m seam.properties ė *meņ e à ė `[ à m `[ Y[à`[ mC J à `[ YB ņ à Y seam.properties m 2221 ē zĖ } e à [ à ` `e m à ė J _m A * mņ Z A* m m * Ő YC e A6 <dataset> <ARTIST id="1" dtype="Band" ©C© +gk 345&,- name="Pink Floyd" /> <DISC id="1" name="Dark Side of the Moon" artist_id="1" /> </dataset> [[ ` `à CJ prepareDBUnitOperations()6 protected void prepareDBUnitOperations() { beforeTestOperations.add( new DataSetOperation("my/datasets/BaseData.xml") ); } e[ DatabaseOperation.CLEAN_INSERT e m Y Yf e J *m `C ZY[ [ [[ `[ e BaseData.xmlņ m [[ _ [ BaseData.xml `e m @Test m Cö DataSetOperation e à Ė Z [Y e m Z ņ Y afterTestOperations [ Ő [[ A ` m à J `à J *ùó Yf datasourceJndiName6 <parameter name="datasourceJndiName" value="java:/seamdiscsDatasource"/> 2222 z ]JŅ *m e [[ C[Y ė Cà à J à |[6 public class MailTest extends SeamTest { @Test public void testSimpleMessage() throws Exception { new FacesRequest() { @Override protected void updateModelValues() throws Exception { setValue("#{person.firstname}", "Pete"); setValue("#{person.lastname}", "Muir"); setValue("#{person.address}", "[email protected]"); } @Override protected void invokeApplication() throws Exception { MimeMessage renderedMessage = getRenderedMailMessage("/simple.xhtml"); assert renderedMessage.getAllRecipients().length == 1; InternetAddress to = (InternetAddress) renderedMessage.getAllRecipients()[0]; assert to.getAddress().equals("[email protected]"); } }.run(); ©C© +ho 345&,- } } ] _ FacesRequest [ m Cö#YY[ mö _ m J J getRenderedMailMessage(viewId);ņ YJ m C_ e m J *m m m J _m m à à Ő e [ à e m b [e à [ m *m YY e J b Y à ė m `à e m [ J [à ©C© +h 2S Ŏ# 2S xyz ?Oé w g" B~| 8Mê}ln lS-KE-}OK}°"´2ÞvēĔ%n cȸ}ȻƘtu¯Ŗ´ŗ Œ&ưĮvŏ ^ [Y ^&wĥ%nȨã B~| <ÃÂ%ȺȻ%ÞŖ´ŗ ÆmY6½½ B` ½B`Y½C+½JY½Ç 2S gU4&MI4?Oé Œ&ŏ%HO@LvēĔ%lS-KE-cȸ´¬Œ}stu%´ŗ 2S1 ~QMg" Œ&ŏ%OKȁȂ´¬ĥÁcȸ´¬Œ}ĝn !ò»&HO@Lvlp³´¬Œ}s%ÞŖ´ŗ !&§¨nŠ&«"cȸñòºƹí¯ûǢȜ¯ûstu%´ŗ ©C© +h) ŏ ©C© +h+ 2[ Áµī 2[ &MRK Áµī Œ&ɽ;âMÎ}'(Î& &ĸĬ-¯2°Ŗ´ŗ NM}¯2 ear }-ñò2°òũn HMH345& OáM& ½[` @DGǞºòvŨòũvûŖĿŻŗ NM}¯2 war }-ñò2°òũn HMH345& _ OáM& /WEB-INF/lib @DGġŖòvŨòũvûŖĿŻŗ ĸĬ&-; [[ Æ ŹȔ Çn Æ '(Î ÇnYC Æ TUÎÇ %´ Æ # Q) Ö°2 Çŗ <Ú®5&ȟȠġŖò2°ŖĿŻsn |C ~| /build/root.pom.xml %ƿǀñò2°Ŗ´ŗ 2[ B" *`[ +\ Ò -; NM UǪ EÃ,@% J ťƍ£´¬ŷĆŲų%´ŗ [[ ; HMHnļŲų%´ŗ jboss-seam-debug.jar _ ôǶŀ Fķuíî´¬ŷĆ ġŖĿŖ´ŗ jboss-seam-ioc.jar _ % YJ £´¬ŷĆŲų%´ŗ jboss-seam-pdf.jar _ & ~b ķu£´¬ŷĆŲų%´ŗ jboss-seam-remoting.jar _ ÅƭìƗ¯£´¬ŷĆ Ųų%´ŗ jboss-seam-ui.jar _ b ;K£´¬ŷĆŲ ų%´ŗ commons-codec.jar jboss-seam.jar ©C© +hQ ĸĬ Ò -; NM UǪ jsf-api.jar YC b #~ jsf-impl.jar YC b OáD-'Ɗ jsf-facelets.jar _ b [ urlrewrite.jar _ AI HMHMH jcaptcha-all.jar ¢Y m R´¬ŷĆŲų%´ŗ quartz.jar &īÍĈķu% Ēč £¯«"}¯ŷĆŲų% ´ŗ -; NM UǪ [[ I mb £´¬ŷĆŲų%´ŗ 345º»£¯° #~ GH-ƿǀ¯Ŗ´ŗ èýũnŏ&²³vŠ richfaces-impl.jar _ I mb £´¬ŷĆŲų%´ŗ richfaces-ui.jar _ I mb £´¬ŷĆŲų%´ŗ´ƚ 2& A ;RSƿǀ¯Ŗ´ŗ 2[1 j_ *`[ +\) I mb ĸĬ Ò richfaces-api.jar 2[2 ¿# *`[ +\+ ÂĸĬ ©C© +h\ ĸĬ Ò -; NM UǪ activation.jar ģÝR´¬ŷĆŲų% ´ŗ mail.jar ÂɍħR´¬1 Ųų%´ŗ mail-ra.jar Y[ [à ÂĦħR´¬1 Ųų%´ŗ [f '(Î345 KMñò¬ŲsµûŖ ´ŗ _ NM -; itext.jar _ ~b HMH jfreechart.jar _ ̫Ěp³HMH jcommon.jar _ b¢m Ųų%´ŗ jboss-seam-pdf.jar _ ~b ;HMH jboss-seam-mail.jar  2[S y}_ *`[ +\Q ~b ĸĬ Ò UǪ 2[[ j I[ HMH & drools/lib @DGµûŖ´ŗ *`[ +\\ I[ ĸĬ Ò antlr-runtime.jar ©C© -; NM UǪ #ù* I I HMH +ha ĸĬ Ò -; NM core.jar drools-compiler.jar drools-core.jar janino.jar mvel.jar -; NM UǪ ^ [Y * 2[^ yz *`[ +\a ~| ĸĬ Ò jbpm-jpdl.jar UǪ 2[b ò\ 345% óJ[ £¯°ŷĆŒò»&HMHŲų%´ŗ ]` *[ö Æó]*Ç *`[ +\g ó]* ĸĬ Ò gwt-servlet.jar -; NM _ UǪ *m ó]* C[ [` 2[c 345% YJ b_ö £¯°ŷĆŒò»&HMHŲų%´ŗ *`[ +\h YJ b_ö ĸĬ ©C© +hg ĸĬ Ò spring.jar -; NM UǪ *m YJ HMH b_ö 2[f òÆĉ 345% óCà £¯°ŷĆŒò»&HMHŲų%´ŗ *`[ +\k óCà ĸĬ Ò groovy-all.jar -; NM UǪ *m óCà [` 2[1 zÆ '¡¬ÁµīD |C wÎvĸĬ=&Ƽƽ£Ƭ¯2ëûn KPG&ĸĬ&=Į£stu%´ŗ # `[ |C ńĆ´¬1 |C # *ö sĮ£tu%´ŗ ŖnKPG&l<}KM |C Į£tu%´ŗ ŒŒ%˭Ȕ |C &£ēĔɯȎ¯2°¬&%vţn £tuv°ţÖº&Ĝv ~| ɾ¯2°¬ŦŨ%´ŗ -ñò2°¬5& mY6½½YàB`J½C) µûŖ´ŗ êM-êF45F mY6½½YmB`J½C) µûŖ´ŗ ´ƚ2& &,@OáG |C %íî%´ŗ <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam</artifactId> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-ui</artifactId> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-pdf</artifactId> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-remoting</artifactId> </dependency> ©C© +hh ĸĬ <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-ioc</artifactId> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-ioc</artifactId> </dependency> Œ& ~| n~# Æ `'Ɗ Ç !¯2 ` [ ƿǀ¯Ŗ´ŗ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.jboss.seam.example/groupId> <artifactId>my-project</artifactId> <version>1.0</version> <name>My Seam Project</name> <packaging>jar</packaging> <repositories> <repository> <id>repository.jboss.org</id> <name>JBoss Repository</name> <url>http://repository.jboss.org/maven2</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>3.0.0.GA</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.3.0.ga</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.3.1.ga</version> </dependency> <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam</artifactId> <version>2.0.0.GA</version> </dependency> </dependencies> </project> ©C© +hk
© Copyright 2024 Paperzz