> From: Joel R. Cochran
>
> I already rely heavily on HttpSession, placing numerous objects in the
> session and pulling them into variables. In your storage class, do you
> create individual variables with their own getter and setter
> mehods for each
> variable you want to track or do you use something like a HashMap with
> simple get() and set() wrappers?  It would seem that the HasMap
> approach is
> more scalable but I don't know if there are more concerns with
> that approach
> that I should be aware of, maybe performance wise?

AFAIK, the session uses a Hashtable to store the values.  And that is indeed
more "scalable", in that you don't have to add new methods whenever you add
a new attribute.  On the other hand, adding a new attribute and its
corresponding setter and getter isn't a lot of work either.  I use VAJ, and
VAJ builds them for you if you ask it nicely, so I like to use setters and
getters in my working storage class.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.