W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 1996

How does DirectoryResource keeps its listing?

From: Anselm Baird-Smith <abaird@w3.org>
Date: Fri, 21 Jun 1996 19:20:51 +0500
Message-Id: <9606212320.AA06196@www18.w3.org>
To: alex@access.com.au (Alexandre Rafalovitch)
Cc: www-jigsaw@w3.org
Alexandre Rafalovitch writes:
 > Hi,
 > I was looking through the code of DirectoryResource and one small bit
 > striked me as extremely strange. Directory resource has a variable listing,
 > which is not an attribute. It is never saved anywhere and it is
 > recalculated only when underlining data is modified or when it is null. (I
 > assume on first reference for the directory listing).

Correct, it is computed when it is null, wich typically means right
after the directory resource is instantiated (provided a request hits it).

 > The problem is, I always assumed that I have a single instance of each
 > resource and when it is accessed it has its parameters set before and saved
 > after. If I am right, that under some circumstances a Directory resource
 > should show for new directory listing of old directory.

*Only* registered attributes of resources are made persistent. In the
case of the DirectoryResource this means all the one that are
registered in the static block of the class.

 > On another hand if I am wrong, then when do new instances of a resource get
 > created, by whom, and when are they released?

They gets created /released by Jigsaw runtime, according to some
policy defined by the 'ResourceStoreManager'

 > Please resolve that mistery for me, because I don't know how much I can
 > relly on non attribute variables.

Non attribute values (ie instance variables) are never saved; that's a
feature ;-)

Received on Friday, 21 June 1996 19:20:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:29 UTC