Hi,
I am creating a web page, that is going to have about 30-50k customer accounts. When I was starting with it, about a year ago I decided to use session-scoped bean to store customer data. It's structure is something like this:
public class CustomerData {
Integer customerId;
String prefix;
String firstName;
String lastName;
Boolean isLogged;
...
[set of getters and setters]
}
It's great solution for me, because I just call method getCustomerData() at each page and I have all neccessary data. But I've started to worry about performance and memory usage. What do you prefer, is it good solution? What can happen when i will have about 20k customers at one time?
What are alternatives? Passing even reduced set of variables via session is quite tough, get context, get session, set attribute, then get context, get session, get attribute...
Thanks for all tips!
Michal