This content has been marked as final.
Show 4 replies
-
1. Re: 5.1.0.GA: PostConstruct is not called for JSF managed beans
emuckenhuber Jan 12, 2010 4:25 AM (in response to nbelaevski)You would need to use an EE5 web deployment descriptor instead of the <!DOCTYPE .... otherwise annotations like @PostConstruct will be ignored:
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
Can you give it a try, then the @PostConstruct as well as other injections should work.
-
2. Re: 5.1.0.GA: PostConstruct is not called for JSF managed beans
ppitonak Jan 12, 2010 5:39 AM (in response to emuckenhuber)Thank you, this helped. -
3. Re: 5.1.0.GA: PostConstruct is not called for JSF managed beans
ganesh_p Apr 14, 2010 5:42 PM (in response to nbelaevski)Hi,
My web.xml and faces-config.xml have 2.5 and 1.2 versions correctly. But, still, PostConstruct is not called. I am using JBoss 5.1.0 with JSF 1.2 RI. Even, I tried placing the JBossInjectionProvider and JBossDelegatingInjectionProvider also in my context-param but didnt work. Please let me know if I am missing anything. What configuations have to be done to make it work?
Thanks,
Ganesh
-
4. Re: 5.1.0.GA: PostConstruct is not called for JSF managed beans
ssilvert Apr 15, 2010 10:17 AM (in response to ganesh_p)Hi Ganesh,
This question is being discussed in the JSF forum @PostConstruct annotation not called jboss5.1.
Stan