▁If ▁method ▁foo () ▁is ▁first ▁called ▁on ▁a ▁managed ▁instance ▁of ▁Example Bean ▁and ▁then ▁subsequently ▁method ▁bar () ▁is ▁called , ▁the ▁number ▁printed ▁will ▁be ▁ 0 ▁and ▁not ▁ 1 . ▁This ▁is ▁because ▁each ▁method ▁had ▁its ▁own ▁transaction ▁and ▁therefore ▁its ▁own ▁instance ▁of ▁T x Sc oped Bean . ▁The ▁number ▁ 1 ▁that ▁was ▁set ▁during ▁the ▁call ▁to ▁foo () ▁will ▁therefore ▁not ▁be ▁seen ▁during ▁the ▁call ▁to ▁bar (). ▁ ▁User Transaction ▁support ▁in ▁E JB ▁server ▁E JB ▁servers ▁are ▁required ▁to ▁support ▁the ▁User Transaction ▁interface ▁for ▁use ▁by ▁E JB ▁be ans ▁with ▁the ▁BE AN ▁value ▁in ▁the ▁▁ ▁annotation ▁( this ▁is ▁called ▁bean - managed ▁transactions ▁or ▁B MT ). ▁The ▁User Transaction ▁interface ▁is ▁exposed ▁to ▁E JB ▁components ▁through ▁either ▁the ▁E JB Context ▁interface ▁using ▁the ▁get User Transaction ▁method , ▁or ▁directly ▁via ▁injection ▁using ▁the ▁general ▁@ Resource ▁annotation . ▁Thus , ▁an ▁E JB ▁application ▁does ▁not ▁interface ▁with ▁the ▁Trans action ▁Manager ▁directly ▁for ▁transaction ▁dem arc ation ; ▁instead , ▁the ▁E JB ▁bean ▁re lies ▁on ▁the ▁E JB ▁server ▁to ▁provide ▁support ▁for ▁all ▁of ▁its ▁transaction ▁work ▁as ▁defined ▁in ▁the ▁Enter prise ▁Java Be ans ▁Spec ification . ▁( The ▁underlying ▁interaction ▁between ▁the ▁E JB ▁Server ▁and ▁the ▁T M ▁is ▁transparent ▁to ▁the ▁application ; ▁the ▁bur den ▁of ▁implementing ▁transaction ▁management ▁is ▁on ▁the ▁E JB ▁container ▁and ▁server ▁provider .)