Thanks Marco.

Yes, I've been using jsf-spring-2.7.1 since April, and this is how
I've handled InitializingBean up to this point.   However, it's
inefficient and introduces unnecessary bugs to use the full Spring
framework when all I really want to do is have my
InitializingBean.afterSetProperties() method called.   JSF managed
beans provides all of the other bean management that an average user
needs, but somehow this particular functionality was overlooked in the
design, and it should be corrected.

Also, jsf-spring only works for spring 1.2RC2 and older.  Maybe
that'll change at some point with a stable 3.0.0 release, but so far
3.0.0 is unusable due to the lack of backward compatiblity and the
lack of documentation.  So that makes upgrading Spring to fix bugs
difficult.

On 10/26/05, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> Hello Mike,
>   sorry for previous post...i pressed 'send' by mistake
> dunno if you know it already, but have you checked the jsf-spring project
> @sourceforge?
>
> it integrates Spring & JSF perfectly and i am sure it does what you
> want..
>
> thanks and regards
>  marco
>
>
> On 10/26/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> > I've been reviewing open issues with my current application, and some
> > of them seem to deal with using Spring.  This is kind of frustrating
> > because I'm finding that JSF managed beans do ALMOST everything I want
> > without Spring, except for providing a
> > InitializingBean.afterPropertiesSet() method call after a
> new bean's
> > properties have been set.
> >
> > So after pondering it for a bit, it occurred to me that there's no
> > reason why support for this interface (repackaged for MyFaces) can't
> > be added to the
> org.apache.myfaces.el.VariableResolverImpl or to the
> > org.apache.myfaces.config.ManagedBeanBuilder class.
> >
> > It seems to me that modifying one of the above classes to call the
> > below code would provide this functionality in a backward-compatible
> > way that does not affect the TCK.
> >
> > if (newBean instanceof InitializingBean)
> > ((InitializingBean)newBean).afterPropertiesSet();
> >
> > This could be done either as the last line in
> > ManagedBeanBuilder.buildManagedBean() or right after the
> call to
> > buildManagedBean() in
> VariableResolverImpl.resolveVariable .
> >
> > Unfortunately, I can't see a way to adding this functionality cleanly
> > as a generic JSF tomahawk extension, so it would have to remain a
> > MyFaces-only feature.
> >
> > Thoughts?
> >
>
>

Reply via email to