
Documentation for Crowd 1.0. Documentation for other versions of Crowd is available too.
To connect Crowd to PostgreSQL,
<Context path="/crowd" docBase="../../crowd-webapp" debug="0">
<Resource name="jdbc/CrowdDS" auth="Container" type="javax.sql.DataSource"
username="[enter db username here]"
password="[enter db password here]"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://host:port/database" [ see also http://jdbc.postgresql.org/doc.html) ]"
[ delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive params here ]
/>
<Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
</Context>
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
If you do not wish to edit this file and run the build script, you can edit the jdbc.properties (which the above script modifies) directly. The jdbc.properties file is located here: crowd-webapp\WEB-INF\classes\jdbc.properties, modify the file to the following:
# - Crowd Configuration Options hibernate.connection.datasource=java\:comp/env/jdbc/CrowdDS hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory ...
You should now have an application server configured to connect to a database, and Crowd configured to use the correct database. Now start up Crowd and watch the logs for any errors.
2 Comments
BrianY
Feb 28, 2007The hibernate.properties file does not exist in version 0.4.5. Are the changes still required?
JustinK
Mar 01, 2007Yes (these changes are still required), since 0.4.5 we have changed the way Hibernate is configured slightly. We are now using a file called jdbc.properties. I have updated the above documentation to reflect this. Thanks for pointing this out.