1 Reply Latest reply on Oct 28, 2011 10:54 AM by Randall Hauch

    modeshape and postgres

    marcolo Newbie

      Hi everyone,

      I do a project with modeshape. In practice I had access to a database (postgres) and navigate like a repository, but I don't understand how.

      I read the guide and I have to use a connector, but I do not understand how to set up the project.

      Thanks to all

        • 1. Re: modeshape and postgres
          Randall Hauch Master

          You can easily create a JCR repository that uses that PostgreSQL database for persistent storage. Basically, you'll want the basic "modeshape-jcr" library (and its dependencies) and the "modeshape-connector-store-jpa" library (and its dependencies). It's simple if you're using Maven, but a bit more involved if you're using and managing JARs. Configuring a repository to use ModeShape with JPA storage is pretty simple, as seen by this example configuration file (just use PostgreSQL connection parameters).


          The code you write to use ModeShape will depend on whether your application is a web app or a stand-alone app that embeds ModeShape. Take a look at this section for using ModeShape within web applications, and this example project for how to use it within standalone apps.


          Best regards