Archive

Archive for December, 2013

@PostConstruct method called twice for the same request

December 17, 2013 Leave a comment

Hi there,

for those of you fighting with CDI and JSF when getting this error:  http://stackoverflow.com/questions/9077966/postconstruct-method-called-twice-for-the-same-request

Be sure that you did not import javax.enterprise.context.SessionScoped instead of javax.faces.bean.SessionScoped.

Both compile, but only the latest is the one you want for dealing with session scope bean in JSF.

cdi

Advertisements
Categories: java, JSF