Dear Slide community,

my employer "C1 Financial Services GmbH" has donated a transactional
file store to the Slide project. It should be in the CVS by now and be
scheduled for the 2.0 release. It is based on the reference
implementation slidestore.file.XMLFileDescriptorsStore and
slidestore.reference.FileContentStore. The replacements for theses
stores are org.apache.slide.store.txfile.TxXMLFileDescriptorsStore for
the descriptors and org.apache.slide.store.txfile.TxFileContentStore for
the content.

Its application includes development and out-of-the-box releases.

To achieve transactional support all changes are done to a working
directory first. Upon rollback, this directory will simply be deleted.
Upon commit it will be relinked or copied to the main store directory
using a mechanism that guarantees atomicy. That's why besides the main
store directory as known from XMLFileDescriptorsStore and
FileContentStore you will have to specify a working directory as well.
Be sure to have it located in the same filesystem as the main directory.
This allows for relinks instead of slower and more error-prone copies.

As an example, the definition part in Domain.xml may look similar to this:

<definition>
  <store name="tx">
    <nodestore
classname="org.apache.slide.store.txfile.TxXMLFileDescriptorsStore">
    <!--nodestore classname="slidestore.file.XMLFileDescriptorsStore"-->
      <parameter name="rootpath">E:/tmp/test/store/node</parameter>
      <parameter name="workpath">E:/tmp/test/work/node</parameter>
      <parameter name="encoding">UTF-8</parameter>
    </nodestore>
    <securitystore>
      <reference store="nodestore"/>
    </securitystore>
    <lockstore>
      <reference store="nodestore"/>
    </lockstore>
    <revisiondescriptorsstore>
      <reference store="nodestore"/>
    </revisiondescriptorsstore>
    <revisiondescriptorstore>
      <reference store="nodestore"/>
    </revisiondescriptorstore>
    <contentstore
classname="org.apache.slide.store.txfile.TxFileContentStore">
    <!--contentstore classname="slidestore.reference.FileContentStore"-->
      <parameter name="rootpath">E:/tmp/test/store/content</parameter>
      <parameter name="workpath">E:/tmp/test/work/content</parameter>
    </contentstore>
  </store>
  <scope match="/" store="tx"/>
</definition>

There still seem to be some bugs left, presumably mainly taken over from
the reference implementation. We will do our best to further analyze and
fix them.

Regards,

Oliver








--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to