<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Using the JCR import/export feature to make copies of your
    repository works, but is really not the best solution, as you loose
    all repository metadata information such as asset version info,
    discussion comments, etc. <br>
    If you use Jackrabbit as your JCR implementation, drools-ant has a
    migration task (more info and a video here:
    <a class="moz-txt-link-freetext" href="http://blog.athico.com/2011/03/using-drools-ant-to-migrateback-up.html">http://blog.athico.com/2011/03/using-drools-ant-to-migrateback-up.html</a>)
    which allows you to make a complete copy of your JCR repository no
    matter if you use the filesystem or an RDBMS to store the JCR
    repository. In any production environment I would recommend using
    the ant task over the xml-based import/export any day. <br>
    <br>
    When you configure jackrabbit in repository.xml, you will still see
    it create the repository directory. This is because Lucene search
    indexes cannot be persisted to a db. It is safe to delete this
    directory, as it will be re-created on consequent Guvnor restarts. <br>
    <br>
    Modeshape is definitely a possibly alternative to the default
    Jackrabbit jcr implementation that Guvnor uses, however it is still
    in it's early stages, and afaik is not yet ready to be considered a
    viable alternative. This should change in the near future I think.<br>
    <br>
    To the question: Guvnor looks up the location of the repository on
    startup. The location is defined in
    $drools-guvnor-war/WEB-INF/components.xml:<br>
    <br>
    &lt;!-- JackRabbit&nbsp; --&gt;<br>
    <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="properties"&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;key&gt;org.drools.repository.configurator&lt;/key&gt;&lt;value&gt;org.drools.repository.jackrabbit.JackrabbitRepositoryConfigurator&lt;/value&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--&nbsp; the root directory for the repo storage the
    directory must exist. --&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--
    &lt;key&gt;repository.root.directory&lt;/key&gt;&lt;value&gt;/path/to/directory/containing/repositoryconfig&lt;/value&gt;
    --&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property&gt;<br>
    <br>
    By default, if the repository.root.directory is not specified, a
    repository.xml fill be created in your $jboss_as/bin directory on
    first guvnor startup. If one already exists there, Jackrabbit will
    pick it up. Typically in a prod environment you would want to change
    the default location on your repository.xml. In this case, when you
    deploy a new Guvnor war, you need to change the location to your
    repository.xml here again, otherwise your $jboss_as/bin directory
    (default) will be used.<br>
    <br>
    Yes, Jackrabbit will create all tables/indexes/triggers in your
    RDBMS, what you need to make sure however in the repository.xml
    configuration is that the db schema you define exists, and that the
    user you define in the config has read+write permissions onto that
    db schema.<br>
    <br>
    Hope this helps.<br>
    <br>
    On 9/4/11 2:15 PM, Nicolas H&eacute;ron wrote:
    <blockquote
cite="mid:CAAWMVGXm9ctx_eE8Nfj47bRkAiVG0n33jE6Nqcm_M7gjKKKeKg@mail.gmail.com"
      type="cite">Hi,
      <div>Guvnor stores everything in the database.</div>
      <div>The directories workspace and repository are for the lucene
        indexes used by jackrabbit.</div>
      <div>The best thing when you move guvnor from one database to
        another is to use the export/import function that will work even
        if you export from one type of database to another type of
        database. It is how I do in my projects.</div>
      <div>After importing, il may be necessary to delete those two
        directories as sometimes jackrabbit (which is behind guvnor to
        store the assets) does not update the index correctly. Yes it is
        normal and a good practice when you install guvnor to a new
        server.</div>
      <div>Now if you are using jboss 5 or 6, modeshape may be a good
        candidate also in replacement of Jackrabbit. But I have never
        used Modeshape (my customer are using jboss 4 or apache tomcat,
        etc..)</div>
      <div>Now are you using the community version ? The question you
        ask is typically one that you would ask to a professional
        support.</div>
      <div>Regards</div>
      <div>Nicolas Heron<br>
        <br>
        <div class="gmail_quote">2011/9/4 puja nandamuri <span
            dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:med_9501@yahoo.com" target="_blank">med_9501@yahoo.com</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <table border="0" cellpadding="0" cellspacing="0">
              <tbody>
                <tr>
                  <td style="font:inherit" valign="top">Hi All,<br>
                    <br>
                    we are currently using SQLServer as the database
                    repository for&nbsp; Guvnor 5.2.0.CR1<br>
                    <br>
                    Can somone throw some light on how the database is
                    used by Guvnor in the following scenario?<br>
                    <br>
                    the first time we deploy Guvnor,we create an empty
                    database and let Guvnor create the necessary Table
                    and other structures necessary for it to save and
                    load assets .<br>
                    <br>
                    assuming that Guvnor creates the required structures
                    such as Tables etc during the first deploy and may
                    not need to create any further tables , we lock down
                    the database from creating any further tables.
                    Guvnor works fine for all subsequent rules creation
                    and save.<br>
                    <br>
                    we had to redeploy Guvnor a second time without
                    changing anything with respect to the database.we
                    however, had to delete the existing workspace and
                    repository directories created on local file system
                    to let Guvnor create them afresh.<br>
                    <br>
                    &nbsp;the expectation is that Guvnor will read the assets
                    from the existing database and create new repository
                    and workspace directories on file system .<br>
                    <br>
                    <br>
                    Guvnor threw errors saying <br>
                    <br>
                    <p class="MsoNormal">Caused By:
                      java.sql.SQLException: [OWLS][SQLServer JDBC
                      Driver][SQLServer]CREATE TABLE permission denied
                      in database 'GuvnorRules'.</p>
                    <p class="MsoNormal"><br>
                    </p>
                    <p class="MsoNormal">does Guvnor create new Tables
                      everytime we deploy a fresh instance of Guvnor to
                      weblogic ?</p>
                    <p class="MsoNormal"><br>
                    </p>
                    <p class="MsoNormal">or is it the way that I have
                      generated my repository.xml that is causing Guvnor
                      to create new tables to save non asset related
                      data such as indexing etc?</p>
                    <p class="MsoNormal">
                      <br>
                    </p>
                    <p class="MsoNormal">I have attached a sample of my
                      repository.xml for reference.</p>
                    <p class="MsoNormal"><br>
                    </p>
                    <p class="MsoNormal">I appreciate your thoughts and
                      feedback.</p>
                    <p class="MsoNormal"><br>
                    </p>
                    <p class="MsoNormal">
                      Thanks,</p>
                    <p class="MsoNormal"><br>
                    </p>
                    <p class="MsoNormal">Ram<br>
                    </p>
                    <p class="MsoNormal"><br>
                    </p>
                    <p class="MsoNormal"><br>
                    </p>
                    <br>
                    <br>
                    <br>
                  </td>
                </tr>
              </tbody>
            </table>
            <br>
            _______________________________________________<br>
            rules-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
            <a moz-do-not-send="true"
              href="https://lists.jboss.org/mailman/listinfo/rules-users"
              target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>