W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1997

Resource Lookup

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Wed, 26 Feb 1997 13:06:12 +0100 (MET)
Message-Id: <199702261206.NAA02972@www43.inria.fr>
To: begall@nads.de
Cc: www-jigsaw@w3.org
Christoph Begall writes:
 > Hi Jigsaw'ers,
 >   I just want to make sure that I got everything right:
 > When I make Jigsaw Resources, I would like to have a references to
 > other Resources. Now I have strange behaviour when I leave the server
 > alone - doing the things he wants to do - for a while and then waking
 > it up again, making HTTP-GET on my Resource. Now in the get() method
 > I want to use my reference to the other resource, to make things as
 > fast as they can be.
 > 1. Can this kind of programming course trouble and if so what kind of
 > trouble ? (I thought that there as long as I have the Java-Object I
 > also have the Resource in memory)

In general, keeping pointers to a resource *requires* that you
implement the ResourceLocker interface. The generic resource editor
does it (it keeps in a hastable a cache of resources that have been
edited until now), you mway want to check how it does it:


 > 2. Would this be the right way: Always lookup a Resource and never use
 > a reference to the resource that I got from an earlier lookup

Thats' one way, slightly less efficient than managing a cache, but way
more simple. I would recommed this approach (there is also a cache
that is managed for you when using that way, in fact)

 > 3. Could this kind of program course
 > java.net.SocketException: Too many open files
 > (I dont think so, but what could lead to such an Exception) ?

- make sure you always close the files you use
- 64 files (default on solaris) is not much, you may want to use
  ulimit to raise to at least 256 (you don't need to be superuser)
- they are known problems with at least CGI scripts (which I am about
  to fix)

Last but not least, if you really have a significant number of
simultaneous connections, then I guess I can't help ;-)

Received on Wednesday, 26 February 1997 07:06:29 UTC

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