**Important**, if you download the **ear** from Nexus it will have a name such as `DemographicDataServer-ear-X.X.X.ear`, then be sure to rename it to `DemographicDataServer.ear` otherwise the deployment will fail.
# Installation
This tool is to be installed in a Jboss 7.2 application server and runs with a PosgreSQL database.
If you do not have yet a Jboss installed in your environment, proceed as described in [General consideration page](https://gazelle.ihe.net/gazelle-documentation/General/jboss7.html).
## Database creation
Your database must have a user **gazelle**.
1. Download the SQL scripts archive from [*Nexus Repository Manager*](https://gazelle.ihe.net/nexus/index.html#nexus-search;quick~DemographicDataServer-ear)(search for **DemographicDataServer-ear-X.X.X-sql.zip**).
2. Unzip the archive into a folder `DemographicDataServer-sql`
3. Connect to your database
```bash
psql -U gazelle
```
4. Excute the SQL statement to create the database.
1. Paste the archive **DemographicDataServer.ear** in the JBoss deployment directory `${JBOSS7\_HOME}/standalone/deployments/`
2. Display JBoss server logs, start JBoss and wait for **ear** deployment.
3. The application can be browsed at http://localhost:8080/DDS. *Port could also be different whether you have modified the JBoss configuration*.
4.**WARNING** : From version 4.2.0, datasources have been extracted from the **ear**. The template file can be found in /src/main/application/datasource in the source or in the file DemographicDataServer-X.X.X-datasource.zip from the nexus.
For more informations about how to manage that externalization, please refer to [general considerations for JBoss7](https://gazelle.ihe.net/gazelle-documentation/General/jboss7.html).
Datasource name : DemographicDataServerDS
Database name : demographic-data-server
# Update from a previous version
1. Download the new **ear** and its associated update SQL script from our [*Nexus Repository Manager*](https://gazelle.ihe.net/nexus/index.html#nexus-search;quick~DemographicDataServer-ear)(search for **DemographicDataServer-X.X.X.ear** and **DemographicDataServer-X.X.X-sql.zip**). Not each version has an update sql to execute.
1. Unzip the SQL archive
1. Execute SQL statements. Check that the database is correctly updated.
1. Deploy the new **ear**
**Due to the update mechanism of the database, it is important to not skip any version of the application in an overall update. You cannot go directly from 2.0.0 to 2.3.0, you will have to repeat the process from 2.0.0 to 2.0.1, 2.0.2, 2.0.3 and so on.**
|application_admin_email | An email address. Administrator of the tool might received messages when errors occur in the application such as compilation failure of schematron | - |
|application_admin_name |Application admin name |- |
|application_admin_title | Application admin title |Application Administrator|