Probably my question is a trivial one, but I never used an application scope bean before. I need the application bean because I have to do time consuming transactions on the dat
Since I had the same problem, and I used @BalusC code to solve it, I feel there is maybe just something to add here.
Question author stated that:
After I read that if I want to inject the application bean into another bean I have to use @PostConstuct annotation
This was exactly my problem. I did everything like BalusC did in his answer, except I didn't have Application Bean used in any manner in Session Bean's init() method. So, I added
@ManagedBean
@SessionScoped
public class TestsBean implements Serializable {
@PostConstruct
init(){
....
System.out.println("appbean session init size" + appbean.getPinovi().size());
....
}
This is what I had to do to get it working, just put appBean into use somehow. It looks like hack, though...