The strolch-persistence-postgresql module provides a PostgreSQL-based persistence implementation for the Strolch framework.
To use PostgreSQL persistence, configure the PersistenceHandler in StrolchConfiguration.xml.
<Component>
<name>PersistenceHandler</name>
<api>li.strolch.persistence.api.PersistenceHandler</api>
<impl>li.strolch.persistence.postgresql.PostgreSqlPersistenceHandler</impl>
<Properties>
<db.url>jdbc:postgresql://localhost/strolchdb</db.url>
<db.username>strolch</db.username>
<db.password>password</db.password>
</Properties>
</Component>
For multi-realm configurations, properties can be specified per realm:
<db.url.myrealm>jdbc:postgresql://localhost/myrealmdb</db.url.myrealm>
The PostgreSqlPersistenceHandler can automatically create and update the database schema.
allowSchemaCreation: (Boolean) If true, the schema is created if it does not exist.allowSchemaDrop: (Boolean) If true, allows dropping the schema (use with caution!).