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

ResourceStoreManager question

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Tue, 10 Jun 1997 11:44:20 +0200 (MET DST)
Message-Id: <199706100944.LAA10109@www43.inria.fr>
To: Evan Coyne Maloney <emaloney@pencom.com>
Cc: www-jigsaw@w3.org
Evan Coyne Maloney writes:
 > Hi,
 > 
 > I'm working with Dave Makower on the MetaMagic project. We were recently
 > reviewing ways to optimize our code, and one possibility that came up was
 > using the jdbmResourceStore object to handle persistence instead of
 > SimpleResourceStore.
 > 
 > After looking around in the Jigsaw source, we noticed that the
 > ResourceStoreManager has a getStore() method that returns a ResourceStore.
 > Inside that method, a call to 'new SimpleResourceStore()' is issued if
 > manager hasn't yet created a ResourceStore. My questions are as follows:
 > 
 > 1. Would changing the call from 'new SimpleResourceStore()' to 'new
 > jdbmResourceStore()' be all that is required to have the jdbmResourceStore
 > handle persistence?

The idea was - intially - to have the first bytes of every store be
the class name of the manager for that store. The SimpleResourceStore
conforms to that since 1.0alpha5, however, I was stuck with jdbm
because it has its own file header, and I wasn't willing to modify it
just for the sake of jigsaw.
The solution (which we are trying in 2.0) is to have the configuration
of a store managed externally through a std property file.

You can go for your suggestion, but be aware that every store will be
'jdbm' based, also you may have troubles bootstraping the config (if
you hit that one let me know, I'll explain how Jigsaw is bootstrapped)

 > 2. If so, I'd prefer to subclass ResourceStoreManager to do this rather
 > than editing the Jigsaw source and having a version that will be
 > out-of-sync with the official version of Jigsaw. If I write my own
 > ResourceStoreManager, is there a way to install my own subclassed
 > ResourceStoreManager to be used by the server? (I notice a
 > getResourceStoreManager() method on the httpd object, but no
 > setResourceStoreManager().)

Correct, the ResourceStoreManager wasn't meant to be sub-class (it's
amazing how many classes I thought would never be sub-classed, that in
fact people want to sub-class - HttpManager was the one last week,
etc)

 > 3. If the answer to question 1 is no, what would be required in using the
 > jdbmResourceStore for persistence?

I guess answer to 1 is yes...

Anselm.
Received on Tuesday, 10 June 1997 05:46:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT