I discussed cleaning up scoping with JSF and Spring. The ugliness of having a jsf:scope attribute added via schema, and generated files is no more.
Spring 2.0 supports richer scopes, including web based ones (http session, request, etc) ThreadLocal, webflow conversations, and others. Being able to set the scope to these high level abstractions is needed.
I run into, and need to use custom code for this one all the time. I want to inject a lot of the objects that I work with. One of the issues is that you want Spring to be in charge of the objects that you with to inject.
A common area in which this isn’t the case is when you get objects from your persistence store (e.g. hibernate). Having to have routines takes these objects and inject them is a pain, as we want this code hidden.
This is where Spring 2.0 comes into play. It allows you, via AOP, to go into these domain objects and wire them up correctly.
I think the simplified XML configuration is also significant. It will noticeably increase the readability and manageability. The old syntax is verbose and the configuration file can become unwieldy when many beans are defined.
Looking forward to Spring 2, of course, for the time until its release I recommend to have a look at JSF-Spring (http://jsf-spring.sourceforge.net/) in its latest incarnation. It allows easy scoping of Spring-managed beans and some other wicked stuff.