Geoffrey Talvola wrote:

Yes, that is definitely a problem.  You are using class variables instead of
instance variables.  Class variables are shared among all instances, and
this would explain why you are seeing the data shared across sessions.  Put
your initialization into the __init__ instead.  In other words, instead of:

class Cart:
     customer = Customer()

You should use:

class Cart:
    def __init__(self):
        self.customer = Customer()


Isn't the instance variable problematic as well (to a lesser degree)?
AFAIK, WebKit shares servlet instances, so it's quite possible that the same Cart() instance could be used to process requests from the different (user) sessions?


Correct me if I'm wrong, please.


------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to