1) I can store reference of list of books and customer separately in session or
2) Have the reference of list of books in customer and store single reference of customer in session.
I feel the second would be better. As server does not need to maintain so many instances in its memory.
Recall that storing a reference in session does not create a new object, only a new reference - the same reference that would be stored in a customer object.
Stop Worrying about minor differences in memory use -
Instead worry about clarity and ease of maintaining the code. See my original post - what are the management requirements for these objects?
Bill
[ March 28, 2006: Message edited by: William Brogden ]