You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Thomas Werner <tw...@akiva.com> on 2002/04/17 20:21:43 UTC

Custom Store Implementation

I'm attempting to implement a custom implementation of the stores that
Slide 
uses. So far I have written a skeleton store class named
'JSADatabaseStore' 
that implements each of the five store types (ContentStore,
SecurityStore, 
LockStore, RevisionDescriptorsStore, RevisionDescriptorStore). Every
store 
method simply throws a ServiceAccessException when called. I'm trying to
get 
Slide to acknowledge my class and throw an exception on startup so that
I know 
my custom class is being used.

I'm using the Slide binary distribution and I've edited the slide.def
file to
the following:

----------------------------------slide.def-----------------------------
-------
<?xml version="1.0"?>

<namespace>

<!-- ### JDBC Configuration ###
     The following jdbc sample configuration uses the hsql Database
Engine
     a relational database engine written in Java, for more info: 
     http://hsqldb.sourceforge.net/ 
-->
  <definition>
    <store name="jsa_database">
      <nodestore classname="jsa.webdav.store.JSADatabaseStore" />
      <securitystore>
	<reference store="nodestore" />
      </securitystore>
      <lockstore>
        <reference store="nodestore" />
      </lockstore>
      <revisiondescriptorsstore>
        <reference store="nodestore" />
      </revisiondescriptorsstore>
      <revisiondescriptorstore>
        <reference store="nodestore" />
      </revisiondescriptorstore>
      <contentstore>
	<reference store="nodestore" />
      </contentstore>
    </store>
    <scope match="/" store="jsa_database" />
    <logger classname="org.apache.slide.util.logger.SimpleLogger" 
     logger-level="6" />
  </definition>

</namespace>
------------------------------------------------------------------------
-------

This should point Slide to my custom store class and on startup, when
the
objects defined in slide.data file are being created, an Exception
should be
thrown by the method that is called to create these objects. The
slide_ns_slide.2002-04-17.txt file states that it finds my custom class.

----------------------slide_ns_slide.2002-04-17.txt---------------------
-------
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Loading namespace definition
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO - Node
store: jsa.webdav.store.JSADatabaseStore
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Security store references nodestore
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO - Lock
store store references nodestore
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Revision descriptors store references nodestore
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Revision descriptor store references nodestore
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Content store references nodestore
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Registering Store jsa_database of class class
org.apache.slide.store.StandardStore with parameters {} on scope /
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Initializing Store jsa_database(org.apache.slide.store.StandardStore)
17 Apr 2002 10:53:11 - INFO - FileContentStore rootpath:
/mnt/nfs/ss-1-home/tom/jakarta/jakarta-slide-dist/server/.
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Loading namespace slide parameters
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO -
Loading namespace slide base data
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO - Init
namespace slide configuration
17 Apr 2002 10:53:11 - org.apache.slide.common.Namespace - INFO - Import
data into namespace slide
17 Apr 2002 10:53:11 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users/groupA
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users/groupA/john
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users/groupA/root
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users/groupA/singleGroupMember
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users/root
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users/john
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /users/guest
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /actions
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /actions/read
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /actions/write
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /actions/manage
17 Apr 2002 10:53:12 - org.apache.slide.common.XMLUnmarshaller - INFO -
Loading object /files
17 Apr 2002 10:53:12 - org.apache.slide.common.Namespace - INFO - Finish
init namespace slide configuration
17 Apr 2002 10:53:12 - org.apache.slide.common.Namespace - INFO -
Loading namespace slide configuration
------------------------------------------------------------------------
-------

But I also see that FileContentStore is being initialized despite the
fact that
this class is NOT specified in the slide.def file, nor in any other conf
file.
After Slide is started and running, I can access the /slide namespace
with
Windows 2000 and browse around and store files or create directories
just as
though I had never changed the slide.def file to begin with.

Am I missing something in a configuration file? Is there a problem with
the
binary distribution where the JDBCDescriptorStores and FileContentStores
are
hardcoded? I'm going to try to use a source build and see if that helps,
but I
find it odd that Slide is seemingly detecing my custom class and
completely
ignoring it. Thanks in advance for any help!

Tom

Thomas D. Werner (twerner@akiva.com)
Software Developer
Akiva -- Idea Technologies
http://www.akiva.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>