Using @PostConstruct
is the correct approach.
EJBs are injected after the constructor is invoked on a ManagedBean.
That's why there is a @PostConstruct
annotation.
Here's the first line from the documentation:
The PostConstruct annotation is used on a method that needs to be executed after dependency injection is done to perform any initialization.