This content has been marked as final.
Show 3 replies
-
1. Re: Injecting EJB in JSF Beans
jaikiran Apr 27, 2009 5:41 AM (in response to dimar1975)The injected resource (ejb) is null in the constructor but in other methods is correctly injected.
The injection is guaranteed to have happened when the @PostConstruct (i guess there's some similar annotation for JSF beans) is invoked, but not when the constructor is called. So you can't rely on the injected bean in the constructor. -
2. Re: Injecting EJB in JSF Beans
dimar1975 Apr 28, 2009 1:49 AM (in response to dimar1975)thank you very much. With @PostConstruct it works!
-
3. Re: Injecting EJB in JSF Beans
maxlamenax Jun 9, 2009 4:23 AM (in response to dimar1975)Hello,
I am on this problem too, and in another discussion i show they speak about "@PostConstruct"...
But at the moment i don't arrived to inject muy facade/session bean CRUD in a JSF bean ...
Can you post a simple example, which work good with a JBoss 5.0, please ?
With a source of a simple entity, a simple session, a simple controller, the JSF page code, and the manage bean configuration in the face-config.xml ?
it makes somes times i try to make this run... and i need help !
Thanks a lot in advance !