This page last changed on Mar 06, 2007 by dhardiker@adaptavist.com.

When first configuring the Crowd application the build.xml and build.properties file are of primary concern. The build.xml is an ant script that loads properties from the build.properties configuration file. This script can be used to quickly adjust and configure various deployment properties of Crowd and the demo application.

jstepka-osx:~/atlassian-crowd-0.1-SNAPSHOT $ ls -l
total 48
drwxr-xr-x   13 jstepka  jstepka   442 Nov 20 13:57 apache-tomcat-5.5.20
-rw-r--r--    1 jstepka  jstepka   259 Nov 17 14:16 build.bat
-rw-r--r--    1 jstepka  jstepka   559 Nov 17 14:16 build.properties
-rwxr-xr-x    1 jstepka  jstepka   565 Nov 17 14:16 build.sh
-rw-r--r--    1 jstepka  jstepka  1961 Nov 17 14:16 build.xml
drwxr-xr-x    7 jstepka  jstepka   238 Nov 21 12:50 crowd-webapp
drwxr-xr-x    4 jstepka  jstepka   136 Nov 21 12:52 database
drwxr-xr-x    9 jstepka  jstepka   306 Nov 21 12:50 demo-src
drwxr-xr-x   12 jstepka  jstepka   408 Nov 21 12:50 demo-webapp
drwxr-xr-x    5 jstepka  jstepka   170 Nov 21 12:50 etc
-rw-r--r--    1 jstepka  jstepka   274 Nov 17 14:16 start_crowd.bat
-rwxr-xr-x    1 jstepka  jstepka   183 Nov 20 13:34 start_crowd.sh

The default build.properties will look similar to the following:

# Modify the attributes of this file to quickly adjust the deployment values of Crowd.

# The Hibernate database dialect to use. See .\etc\hibernate.properties for a list of supported dialects.
hibernate.dialect=org.hibernate.dialect.HSQLDialect

# The Hibernate transaction factory to use. See .\etc\hibernate.properties for a list of supported dialects.
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory

# Crowd context root
crowd.url=http://localhost:8080/crowd

# Demo context root
crowd.url=http://localhost:8080/demo

Build Properties (build.properties)

Parameter Description
hibernate.dialect This parameter controls the database dialect the Hibernate persistence system will use when executing commands versus your database server.
hibernate.transaction.factory_class This parameter controls the transaction factory to use when executing transactions at run-time:
Hibernate provides two genertic options, additional application server specific options are available:
  • org.hibernate.transaction.JDBCTransactionFactory delegates to database (JDBC) transactions (default).
  • org.hibernate.transaction.JTATransactionFactory delegates to JTA (if an existing transaction is under way, the work performed is done in that context. Otherwise a new transaction is started).
crowd.url The path and port for the root of the Crowd web-application.
demo.url The path and port for the door of the Crowd demo web-application

Hibernate SQL Dialects (hibernate.dialect)

RDBMS Dialect
DB2 org.hibernate.dialect.DB2Dialect
DB2 AS/400 org.hibernate.dialect.DB2400Dialect
DB2 OS390 org.hibernate.dialect.DB2390Dialect
Firebird org.hibernate.dialect.FirebirdDialect
FrontBase org.hibernate.dialect.FrontbaseDialect
HypersonicSQL org.hibernate.dialect.HSQLDialect
Informix org.hibernate.dialect.InformixDialect
Ingres org.hibernate.dialect.IngresDialect
Interbase org.hibernate.dialect.InterbaseDialect
Mckoi SQL org.hibernate.dialect.MckoiDialect
Microsoft SQL Server org.hibernate.dialect.SQLServerDialect
MySQL org.hibernate.dialect.MySQLDialect
MySQL with InnoDB org.hibernate.dialect.MySQLInnoDBDialect
MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDDialect
Oracle (any version) org.hibernate.dialect.OracleDialect
Oracle 9i/10g org.hibernate.dialect.Oracle9Dialect
Pointbase org.hibernate.dialect.PointbaseDialect
PostgreSQL org.hibernate.dialect.PostgreSQLDialect
Progress org.hibernate.dialect.PosgressDialect
SAP DB org.hibernate.dialect.SAPDBDialect
Sybase org.hibernate.dialect.SybaseDialect
Sybase Anywhere org.hibernate.dialect.SybaseAnywhereDialect

Hiberante Transaction Factories (hibernate.transaction.factory_class)

J2EE Server Dialect
Borland ES org.hibernate.transaction.BESTransactionManagerLookup
JBoss org.hibernate.transaction.JBossTransactionManagerLookup
JOnAS org.hibernate.transaction.JOnASTransactionManagerLookup
JOTM org.hibernate.transaction.JOTMTransactionManagerLookup
JRun4 org.hibernate.transaction.JRun4TransactionManagerLookup
Orion org.hibernate.transaction.OrionTransactionManagerLookup
Resin org.hibernate.transaction.ResinTransactionManagerLookup
Weblogic org.hibernate.transaction.WeblogicTransactionManagerLookup
WebSphere org.hibernate.transaction.WebSphereTransactionManagerLookup

If configuring Crowd and/or the demo application to run on a port and context path other than the default, you will then need to run the command ./build.sh verses the build.xml configuration file. This process will then edit all of the necessary Crowd configuration files for your deployment.

jstepka-osx:~/atlassian-crowd-0.1-SNAPSHOT $ ./build.sh
Buildfile: build.xml

init:

assistant:
     [echo] Configuring the Crowd Console
     [echo] Copying crowd.properties to: crowd-webapp/WEB-INF/classes
     [copy] Copying 1 file to /Users/jstepka/Projects/crowd/releases/atlassian-crowd-0.1-SNAPSHOT/crowd-webapp/WEB-INF/classes
     [echo] Configuring the Crowd hibernate configuration
     [echo] Copying hibernate.properties to: crowd-webapp/WEB-INF/classes
     [copy] Copying 1 file to /Users/jstepka/Projects/crowd/releases/atlassian-crowd-0.1-SNAPSHOT/crowd-webapp/WEB-INF/classes
     [echo] Configuring the demo application
     [echo] Renaming and copying demo.properties to: demo-webapp/WEB-INF/classes/crowd.properties
     [copy] Copying 1 file to /Users/jstepka/Projects/crowd/releases/atlassian-crowd-0.1-SNAPSHOT/demo-webapp/WEB-INF/classes

BUILD SUCCESSFUL
Total time: 0 seconds

With the configuration files correctly configured, you may now run the application server.

Tomcat Standalone

The standalone Tomcat distribution uses an in-memory HSQL database engine. This JNDI reference (CrowdDS can be adjusted by editing the crowd.xml deployment description to use your custom database and driver. To start Crowd, perform the following:

  • Unzip the download archive (avoid directories with spaces).
  • Run the start-up script: start_crowd.bat for Windows or start_crowd.sh in a Unix environment.
  • Point a web browser at http://localhost:8095/ where you will see the introduction page for configuring the Crowd security server.

Custom Containers

Configuring the Crowd security server to run with your existing application server is dependent on the deployment process of the chosen server. The web-application is located in the crowd directory of the downloaded archive. Regardless of the application deployment process, a JNDI data-source will need to be configured. The name of the JNDI data-source must be jdbc/CrowdDS.

Document generated by Confluence on Mar 08, 2007 18:49