Hi Christina
We just used PostgreSQL as a default database for us.
This is for testing purpose and integration testing purpose only.
In the future we plan to replace postgres with an in-memory database (like HSQLDB) for testing.
If you want to use another database that very easy to do. E.g. have a look at:
http://svn.herasaf.org/herasaf-xacml/trunk/herasaf-xacml-integrationtests/src/test/resources/config/TestXMLPersistenceManager.xmlYou can simply reconfigure:
<sb:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<sb:property name="driverClassName" value="org.postgresql.Driver" />
<sb:property name="url" value="jdbc:postgresql://localhost:5432/xacmltest" />
<sb:property name="username" value="xacml" />
<sb:property name="password" value="xacml" />
</sb:bean>
and the statements in:
<persistenceManager id="persistenceManager">
<dataSource>dataSource</dataSource>
<evaluatables>
<selectAllStatement>SELECT evaluatable FROM evaluatables;</selectAllStatement>
<selectStatement>
SELECT evaluatable FROM evaluatables WHERE evaluatableId
= :id;
</selectStatement>
Create a database with a table like:
CREATE TABLE evaluatables (
evaluatableId VARCHAR(255) PRIMARY KEY,
evaluatableVersion VARCHAR(255) NOT NULL,
evaluatable BYTEA NOT NULL
);
CREATE INDEX evaluatableIdIndex ON evaluatables (evaluatableId);
CREATE INDEX versionIndex ON evaluatables (evaluatableversion);
Just provide the JDBC driver in your maven pom files and everything should be up and running.
I hope this helps you.
Regards,
René