Hi,
Do you have the managed bean in faces-config.xml defined oder via
spring configuration file?
MyFaces should not be responsible for injecting a spring bean. This is
done when using Spring beans only.
I would suggest to define it directly in Spring an use Spring`s
init-method approach.
cheers,
Gerald
On Jan 17, 2008 10:11 PM, Zheng, Xiahong <[EMAIL PROTECTED]> wrote:
>
>
>
> In my managed bean, I have a service bean configured and injected by spring
> as in the following,
>
> private DataService dataService;
>
> @PostConstruct
> public void retrieveData() {
> dataService.retrieveData();
> }
>
> Public void setDataService(DataService dataService) {
> this.dataService = dataService;
> }
>
> Using RI, dataService is already injected before retrieveData method is
> called. However, this is not the case with myfaces. It seems that spring
> injection happens much later resulting in NPE thrown in the method. Is this
> expected with myfaces inplementation or a bug?
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces