I am working on a web based application and using the servlet session API to manage a class that represents an order. The order class contains several instance variables (beans, string[], and vectors of beans) that are private to the class represent order components. There are also public methods within the class that modify the instance variables. Since I am associating the user to a specific order class via session calls I am concerned about resource usage since the class has become sizeable. I was thinking about moving the public methods to another class that extends the order class, but I'm not sure how this will effect session management. If I simply use the session get and set attribute methods for the subclass as I do for the order class this will not reduce resource usage. I could build a separate class (not a subclass) and pass the instance variables of the order class to the new class for manipulation, but don't see how this will reduce resources either.
Any other ideas?