In my current app (JSF2, Spring 3, Richfaces 4, WebFlow 2.x) have a string which I need session scoped(so each user has their own copy).
My question is how much overhead is involved in creating and maintaining a spring/JSF2 bean in a spring managed container? Should I make a bean just for this string? or should I include this string in an already existing bean? (the user bean in my case). Right now I have the string contained in its own wrapped bean class. My initial thought was that if I included it the string in the User bean, then I would be including a bunch of extra stuff(everything else in the user bean) each time something needs the aforementioned string. eg. it seems to make more sense to just wire up a bean containing just the needed string as apposed to wiring a bean that contains a bunch of extra stuff that never gets used. Anyone have any experience/thoughts on this?