|
From: David H. <dh...@ob...> - 2005-09-21 15:07:15
|
Bing, What's=20wrong=20with=20using=20a=20standard=20FactoryBean=20to=20do=20thi= s?=20Your=20(non-singleton)=20FactoryBean=20could=20take=20the=20value-bin= ding=20expression=20parameter,=20evaluate=20it=20when=20getObject()=20is=20= called=20and=20the=20result=20would=20then=20be=20injected=20into=20your=20= property=20as=20normal. Its=20less=20terse,=20but=20is=20there=20any=20reason=20why=20this=20would= n't=20work? Dave=20Hewitt >=20-----Original=20Message----- >=20From:=20s...@li... >=20[mailto:spr...@li...]=20On=20= Behalf >=20Of=20Bing=20Ran >=20Sent:=2021=20September=202005=2013:08 >=20To:=20s...@li... >=20Subject:=20Re:=20[Springframework-developer]=20customized=20BeanFactor= y >=20 >=20Thanks=20Steve.=20Unfortunately=20the=20way=20that=20the >=20PropertyPlaceHolderBeanfactory >=20Works=20does=20not=20meet=20my=20need.=20What=20I'd=20like=20to=20have= =20is=20a=20repeatable >=20interpretation=20of=20an=20injected=20value=20each=20time=20the=20bean= =20(a=20prototype)=20is >=20created,=20rather=20than=20the=20one-time=20post-processing.=20What=20= I'm=20doing=20is >=20actually=20part=20of=20my=20effort=20to=20replace=20the=20bean=20manag= ement=20facility=20of=20JSF >=20with=20what=20I'm=20doing=20on=20top=20of=20Spring=20(see=20http://jac= n.sf.net).=20I=20need=20the >=20ability=20to=20re-evaluate=20a=20JSF=20value-binding=20expression=20su= ch=20as >=20#{param.user_name},=20which=20binds=20to=20a=20parameter=20in=20the=20= http=20request,=20which >=20of >=20course=20is=20different=20every=20time=20a=20new=20request=20comes=20i= n. >=20 >=20Any=20insight=20into=20this? >=20 >=20Bing >=20 >=20 >=20-----=D3=CA=BC=FE=D4=AD=BC=FE----- >=20=B7=A2=BC=FE=C8=CB:=20s...@li...= e.net >=20[mailto:spr...@li...]=20=B4=FA= =B1=ED=20Steven >=20Devijver >=20=B7=A2=CB=CD=CA=B1=BC=E4:=202005=C4=EA9=D4=C221=C8=D5=2017:47 >=20=CA=D5=BC=FE=C8=CB:=20s...@li... >=20=D6=F7=CC=E2:=20Re:=20[Springframework-developer]=20customized=20BeanF= actory >=20 >=20Bing, >=20 >=20You=20can=20implement=20a=20BeanFactoryPostProcessor=20to=20do=20that.= =20Have=20a=20look >=20at=20the=20code=20of=20PropertyPlaceholderConfigurer.=20This=20class=20= inspects >=20bean=20definitions=20and=20replaces=20${key}=20with=20property=20value= s=20loaded=20from >=20property=20files.=20BeanFactoryPostProcessors=20are=20recognized=20by=20= the=20bean >=20factory=20and=20applied=20automatically. >=20 >=20Steven=20Devijver >=20Senior=20consultant >=20@=20Interface21 >=20s...@in... >=20 >=20 >=20 >=20On=2021=20Sep=202005,=20at=2004:20,=20Bing=20Ran=20wrote: >=20 >=20 >=20>=20I'm=20implementing=20my=20own=20BeanFactory=20as=20a=20subclass=20= of >=20>=20DefaultListableBeanFactory.=20What=20I=20want=20to=20do=20is=20to=20= reinterpret >=20>=20injected >=20>=20values=20on=20a=20bean,=20such=20as=20the=20<value>#{param.userNam= e}</value>=20part >=20>=20in=20the >=20>=20bean=20definition: >=20> >=20>=20<bean=20...> >=20>=20=20=20<property=20name=3D"a">=20<value>#{param.userName}</value></= property> >=20>=20</bean> >=20> >=20>=20I'd=20like=20to=20set=20the=20value=20from=20another=20source=20(s= uch=20as=20in=20JSF >=20>=20context)=20at >=20>=20the=20time=20the=20bean=20is=20instantiated.=20Any=20tips=20how=20= my=20code=20can=20get=20a >=20>=20chance=20to >=20>=20re-interpret=20the=20dependency? >=20> >=20>=20Thanks! >=20> >=20>=20Bing=20Ran >=20> >=20> >=20> >=20> >=20>=20------------------------------------------------------- >=20>=20SF.Net=20email=20is=20sponsored=20by: >=20>=20Tame=20your=20development=20challenges=20with=20Apache's=20Geronim= o=20App=20Server. >=20>=20Download >=20>=20it=20for=20free=20-=20-and=20be=20entered=20to=20win=20a=2042"=20p= lasma=20tv=20or=20your=20very=20own >=20>=20Sony(tm)PSP.=20=20Click=20here=20to=20play:=20http://sourceforge.n= et/geronimo.php >=20>=20_______________________________________________ >=20>=20Springframework-developer=20mailing=20list >=20>=20S...@li... >=20>=20https://lists.sourceforge.net/lists/listinfo/springframework-devel= oper >=20> >=20> >=20> >=20 >=20 >=20 >=20 >=20------------------------------------------------------- >=20SF.Net=20email=20is=20sponsored=20by: >=20Tame=20your=20development=20challenges=20with=20Apache's=20Geronimo=20= App=20Server. >=20Download >=20it=20for=20free=20-=20-and=20be=20entered=20to=20win=20a=2042"=20plasm= a=20tv=20or=20your=20very=20own >=20Sony(tm)PSP.=20=20Click=20here=20to=20play:=20http://sourceforge.net/g= eronimo.php >=20_______________________________________________ >=20Springframework-developer=20mailing=20list >=20S...@li... >=20https://lists.sourceforge.net/lists/listinfo/springframework-developer= >=20 >=20 >=20 >=20------------------------------------------------------- >=20SF.Net=20email=20is=20sponsored=20by: >=20Tame=20your=20development=20challenges=20with=20Apache's=20Geronimo=20= App=20Server. >=20Download >=20it=20for=20free=20-=20-and=20be=20entered=20to=20win=20a=2042"=20plasm= a=20tv=20or=20your=20very=20own >=20Sony(tm)PSP.=20=20Click=20here=20to=20play:=20http://sourceforge.net/g= eronimo.php >=20_______________________________________________ >=20Springframework-developer=20mailing=20list >=20S...@li... >=20https://lists.sourceforge.net/lists/listinfo/springframework-developer= >=20 >=20______________________________________________________________________= __ >=20This=20e-mail=20has=20been=20scanned=20for=20all=20viruses=20by=20Star= .=20The >=20service=20is=20powered=20by=20MessageLabs.=20For=20more=20information=20= on=20a=20proactive >=20anti-virus=20service=20working=20around=20the=20clock,=20around=20the=20= globe,=20visit: >=20http://www.star.net.uk >=20______________________________________________________________________= __ ________________________________________________________________________ This=20e-mail=20has=20been=20scanned=20for=20all=20viruses=20by=20Star.=20= The service=20is=20powered=20by=20MessageLabs.=20For=20more=20information=20on= =20a=20proactive anti-virus=20service=20working=20around=20the=20clock,=20around=20the=20gl= obe,=20visit: http://www.star.net.uk ________________________________________________________________________ |