Adi wrote:
> 
> Is it possible to access data from an arbitrary $Session object from the
> $Application object.  For example, say for each Session opened, I store the
> username in $Session->{'user'}.  Can I get a list of all the users currently
> connected to the server?  What about arbitrary data currently stored in the
> Session object?
> 

Check out the online demo at:
  http://www.nodeworks.com/asp/eg/global_asa_demo.asp

or just site/eg/global_asa_demo.asp in the asp distribution
for an example of this kind of user tracking in $Application.

You end up having to add the information that you want
to $Application yourself, and cleaning that up in 
Session_OnEnd.

Remember that if you are using SDBM_File databases
for $Application & $Session, default, you only have
1024 bytes to store the key and value, so you can't
store a lot of user data like:

  $Application->{users} = \%users;

you have do do more like:

  $Application->{user1} = name;
  $Application->{user2} = name;

Or you could switch to DB_File for larger amounts
of data stored in one hash key.

-- Joshua
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NODEWORKS >> free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Reply via email to