0
votes

I am trying to use an application-scoped bean but every time I call the lazily initialized getter methods, it initializes the values again. I've used the debugger to confirm that the values are null again on every new call (even by the same session). Am I using the application-scope wrong?

<managed-bean>
    <managed-bean-name>locationBean</managed-bean-name>
    <managed-bean-class>com.model.LocationBean</managed-bean-class>
    <managed-bean-scope>application</managed-bean-scope>
</managed-bean>
1
That's general JSF spec version. I was asking for impl/version. What JSF implementation are you using? E.g. Mojarra or MyFaces? And then what version? E.g. Mojarra 1.2_15 or MyFaces 1.2.10? - BalusC
OK, thanks. I've added the myfaces tag so that the right folks are now attracted. Sorry, no answer from me as I don't use MyFaces. I could at highest suggest to try Mojarra instead. If it also fails with Mojarra, then your problem is likely caused by a bug/mistake in your own code or a generic misconfiguration of your project. - BalusC
Thanks for the tips. I'll investigate these suggestions. - NewToThis
I found the problem - I'm calling the bean improperly. I'll answer the question in 6 hours when I am able but feel free to delete this question. - NewToThis

1 Answers

0
votes

I was not calling the bean properly. After fixing that, it worked properly. Sorry for wasting your time and feel free to delete this question.