dev@javaserverfaces.java.net

Re: Review: Fix for JSf RI 153 (Resouce Injection)

From: Ed Burns <ed.burns_at_sun.com>
Date: Fri, 29 Jul 2005 10:14:08 -0700

>>>>> On Thu, 28 Jul 2005 16:19:13 -0700, Jayashri Visvanathan <Jayashri.Visvanathan_at_Sun.COM> said:

JV> A src/com/sun/faces/config/FacesInjectionManager.java
JV> Injects resources via reflection. Delegates to InjectionManager
JV> API in GlassFish/SJSAS 9.0

Please provide class comments that describe the cardinality of instances
of this class and who maintans references to this class. This one seems
to be a singleton, so please state so in the docs.

Otherwise, looks good.

JV> M src/com/sun/faces/config/ManagedBeanFactory.java
JV> inject any resources after the bean instance is created.

+ FacesInjectionManager.getInjectionManager().injectInstance(bean);

Do this instead to futureproof if someone changes the instantiation
contract.

FacesInjectionManager manager =
FacesInjectionManager.getInjectionManager();

if (null != manager) {
  manager.injectInstance(bean);
}

JV> M systest/build-tests.xml
JV> add a test target for resource injection.

JV> M systest/build.xml
JV> remove source attribute passed to javac target.


JV> A systest/src/com/sun/faces/systest/model/ResourceInjectionBean.java

Looks good.

JV> A systest/web/resourceInjection01.jsp

Not sure if this title pertinent to this testcase?

    <title>Property that violates scope rules</title>

r=edburns

--
| ed.burns_at_sun.com | {home: 407 869 9587, office: 408 884 9519 OR x31640}
| homepage: | http://purl.oclc.org/NET/edburns/
| aim: edburns0sunw | iim: ed.burns_at_sun.com