On Mi, 2005-12-21 at 22:17 +0100, [EMAIL PROTECTED] wrote: > my mind about sessions is: > I have a global memory in my web-appl-server which is accessable over > all (the session hash (?)). > With Url/hidden field/cookie I can put hint IDs in my application that > identifies items in my global memory (shotcuts to bigger > elements - database handler, file handler, files, whatever..... ). I > can also pass parameters etc. pith url/hfields but thats not the problem.
Basically you have a global session hash ($m->session if you're using MasonX::Request::WithApacheSession) which is available within every mason component. On every request MasonX::Request::WithApacheSession reads the users cookies (or URL if you like) and searches for an active, unique, so-called "session-id". If there is no such session-id, a new is created and stored within a cookie (or the URL). This session-id points to something you called "a global memory". So yes, it's basically only a "shortcut" to more data (you can put nearly everything you like into your session hash) which is stored in your database, the filesystem or whatever Apache::Session storage engine you'd like to use. One thing concerning database handles: AFAIK DBI handles should never be put in your session hash! Instead make your global database handle available via mason's allow_globals parameter. Connect on every request within your mod_perl handler (or the first component which gets called - like your top autohandler) and use Apache::DBI to minimize database connects. HTH, Toby ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users

