jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: [jira] Commented: (JCR-940) add db connection autoConnect for BundleDbPersistenceManager.
Date Thu, 20 Sep 2007 12:08:41 GMT
Hi,

> I think that besides the BundleDbPM.store method
> the ConnectionrecoveryManager.execute* methods
> also need to be wrapped by a retry-loop.

I think you are right, those methods should loop as well (except when
autoReconnect is false).

> I've patched this locally and want to execute the unit tests using the MSSQL bundle PM.
I'm not familiar with the test harness...how should I do this? Some initial attempts to alter
the repository.xml and workspace.xmls in the jackrabbit-core\applications\test directory failed.

It's a bit tricky: you need to change repository.xml (2 places) and in
both workspace.xml files (1 place each). I have used:

repository.xml / Workspace

        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
          <param name="url" value="jdbc:postgresql://localhost/test"/>
          <param name="blockOnConnectionLoss" value="true"/>
          <param name="schemaObjectPrefix" value="${wsp.name}_"/>
          <param name="user" value="..."/>
          <param name="password" value="..."/>
        </PersistenceManager>

repository.xml / Versioning

        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
          <param name="url" value="jdbc:postgresql://localhost/test"/>
          <param name="blockOnConnectionLoss" value="true"/>
          <param name="schemaObjectPrefix" value="version_"/>
          <param name="user" value="..."/>
          <param name="password" value="..."/>
        </PersistenceManager>

workspaces/*/workspace.xml:

        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
          <param name="url" value="jdbc:postgresql://localhost/test"/>
          <param name="blockOnConnectionLoss" value="true"/>
     <param name="schemaObjectPrefix" value="${wsp.name}_"/>
          <param name="user" value="..."/>
          <param name="password" value="..."/>
  </PersistenceManager>

I have multiple configurations (copies of the applications/test
directory). Before running the build I just replace the files with the
configuration (simple db, bundle db, data store) I want to test. I
think it would be great if the unit test could be run against each
configurations one after the other - but I don't know how this can be
automated using JUnit / Maven.

Thomas

>
> > add db connection autoConnect for BundleDbPersistenceManager.
> > -------------------------------------------------------------
> >
> >                 Key: JCR-940
> >                 URL: https://issues.apache.org/jira/browse/JCR-940
> >             Project: Jackrabbit
> >          Issue Type: Improvement
> >          Components: core
> >    Affects Versions: 1.3
> >            Reporter: Xiaohua Lu
> >         Attachments: JCR-940-v2.patch, JCR-940-v3.patch, JCR-940.patch
> >
> >
> > Since bundled db pm doesn't inherited from database pm, it can't reconnect once
database is bounced. it would be nice to add this feature.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Mime
View raw message