Forums de discussion

Does @PostConstruct annotation should work properly?

PortletFaces Community Member, modifié il y a 12 années.

Does @PostConstruct annotation should work properly?

Regular Member Publications: 199 Date d'inscription: 03/04/12 Publications récentes
I see that you use @PostConstruct annotation in chat and document sample.
But I see that it doesn't work in my own HelloWorld sample. Should it work properly?
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: Does @PostConstruct annotation should work properly?

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Yes Mojarra should automatically call any @PostConstruct annotated methods on managed-beans it creates. But some versions of Mojarra have bugs regarding this. See: http://stackoverflow.com/questions/7234141/postconstruct-didnt-get-called-by-jsf-if-managedbean-is-inside-jar-library