Hi, the scenario is as following :
I have a
JSF app in which when the user is logged in an object it queried from the db, this object will be access from many others Managed beans during the user presence in the web app, right now im sharing this object among the managed beans in the following way:
Right after im queering the object from the db , im storing it into the session , and whenever i need the object i grab it from the session , manipulating it and putting back to session
This way seems to me a bit wrong... "grab from session put it back into the session..."
Isnt it better to create a handler class that will be singleton and put the object into this class, and from each managed bean get the class instance and from that instance get the object
The questions are:
1) This handler class, in what scope will it be placed? cause its a simple POJO
2) Which way is better
3) Are there any other ways to achieve this object access from different managed beans in the web app?
Thanks ahead!
Daniel