Exclent point, Here is what I need to do, I have a web application which
allows users to interact with a flash object on a web page.  Now for the
problem the flash object writes an XML file to the server (I didn't make
the flash object so I don't have control of this object), so I need to
make sure that only one person has access to the object at any given
moment.  My first thought was to use sessions, but that won't work
across users, so then I thought of just making a lock file and killing
the lokc file when a session dies. But I am not all that thrilled at
changing the behavior of sessions across the entire website for this one
applicaton.  Any thoughts on maintaining user control?

Jose

-----Original Message-----
From: Ben Parker [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2003 12:23 AM
To: [EMAIL PROTECTED]
Subject: RE: [Webware-discuss] At a loss please help with Sessions and
Tasks


Jose, can you be a little more specific as to what you need to do when a
session expires? Then maybe I can give you some ideas.

to answer what you've said so far:

Mixing a class into session during the context __init__ will override
the session for the entire appserver. One way to use session classes on
a context-by-context basis is to override the Page.session() method with
something that wraps the session in another class. That won't help with
the expiration issue directly, but you can use that in combination with
a MixIn to achieve what you need.

For example, you can MixIn a class which overrides Session.expiring()
and performs certain logic depending on what type of session object it
is. This type would be determined by an attribute of the MixIn class.
Then in the
Page.session() method, you can set this new type attribute to identify
the Session. When the expiring functions runs, the appropriate logic
will execute.

Really though, what "file housekeeping" do you need to do at expiration
time? The best scenario is to rearchitect your use of session objects to
eliminate the need for such housekeeping.

Ben

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 8:15 PM
To: [EMAIL PROTECTED]
Subject: [Webware-discuss] At a loss please help with Sessions and Tasks


HI all.

Can someone please tell me how I can access a session variable via a
task? What I need to do is to do some file house keeping once a session
expires. I thought I could do this by using MixIn and simply over riding
the expiring method within a context, but it seems the this over rides
the method for the all contexts (not really what I had in mind). So now
the only thing I can think of is to use Tasks, but I am at a loss as to
how to proceed.  Any and all help would be much appreciated

Thanks

Jose




-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Webware-discuss mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss








-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to