[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Apache::Session getting DESTROYed in wrong order
From:       "Ken Williams" <ken () mathforum ! org>
Date:       2001-12-31 23:13:33
[Download RAW message or body]

Hey,

I'm having problems with Apache::Session, the symptom is that none of my 
data is getting written to the database.  It's not the nested-data 
problem, since I'm not using any nested data structures.

After some investigation, I've discovered that the 
Apache::Session::Store::MySQL::DESTROY routine is getting called before 
the Apache::Session::MySQL::DESTROY routine, so when the latter is 
called it doesn't have any way to write to the database.

I think Perl is supposed to guarantee that the outer object's DESTROY is 
called before the inner object's, but I think maybe this guarantee 
doesn't extend to the "global destruction" phase.  So I'm wondering why 
the session is getting cleaned up in global destruction rather than 
refcount destruction.  I've declared %session as a locally-scoped 
variable, so it should evaporate before global destruction, unless it's 
got circular data structures or something.  Anyone know what might be 
going on?

This is Apache::Session version 1.53.

Note: this problem isn't related to mod_perl, but IIRC this list is the 
proper place for discussing Apache::Session.

  -Ken

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic