|
|
|
# JBoss/Wildfly Application Server
|
|
|
|
|
|
|
|
The installation of the application server should be done according to your system requirements and the instructions manual of the product. The webregistration has been tested and deployed in an standalone and domain mode environment and works in a cluster. The "standalone-full-ha" profile is needed for the application.
|
|
|
|
|
|
|
|
It is advisable to not directly expose the application server. Consider the use of an Apache HTTPD or something similar as a reverse proxy.
|
|
|
|
|
|
|
|
**Attention:** Please keep in mind, that the application will not deploy without the configuration elements below, even if they are not needed. The application deployment will fail with messages that don't point to the problem directly.
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
|
|
|
There are some configurations, that have to be done on the application server. Wildfly offers multiple ways to change the configuration. For initial configuration you can edit the standalone-full-ha.xml file directly. If you want to make configurational changes while the application server is running, you will need to use JBoss CLI or the Webinterface.
|
|
|
|
|
|
|
|
## Database
|
|
|
|
|
|
|
|
The reg-app has been used and tested with PostgreSQL and MS SQL until now. It should also work with any other JPA compliant database, which Hibernate can use.
|
|
|
|
|
|
|
|
Please create an empty database for the product you will use. For PostgreSQL this can be achieved by:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
su postgres
|
|
|
|
createuser -P bwidm-user
|
|
|
|
createdb -O bwidm-user bwidm
|
|
|
|
exit
|
|
|
|
```
|
|
|
|
|
|
|
|
Edit your pg_hba.conf file to allow authentication via md5 for bwidm-user from your host, which is running the application.
|
|
|
|
|
|
|
|
## Datasource
|
|
|
|
|
|
|
|
The reg-app needs a datasource to function. You can easily deploy a JDBC4 compliant driver via jar deployment on CLI for example like this:
|
|
|
|
|
|
|
|
```
|
|
|
|
/opt/wildfly/bin/jboss-cli.sh --connect
|
|
|
|
[standalone@localhost:9999 /] deploy /usr/share/java/postgresql-jdbc4.jar
|
|
|
|
quit
|
|
|
|
```
|
|
|
|
|
|
|
|
After the deployment of a suitable jdbc driver, you have to add the datasource. An simple example for PostgreSQL in the standalone-full-ha.xml is:
|
|
|
|
|
|
|
|
```xml
|
|
|
|
<subsystem xmlns="urn:jboss:domain:datasources:2.0">
|
|
|
|
<datasources>
|
|
|
|
...
|
|
|
|
<datasource jndi-name="java:/ds/bwidmDS" pool-name="bwidmDS" enabled="true" use-java-context="true">
|
|
|
|
<connection-url>jdbc:postgresql://##db-host##:5432/bwidm</connection-url>
|
|
|
|
<driver>postgresql-jdbc4.jar</driver>
|
|
|
|
<security>
|
|
|
|
<user-name>bwidm-user</user-name>
|
|
|
|
<password>XXXXXXXX</password>
|
|
|
|
</security>
|
|
|
|
</datasource>
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
You should consider to enable pool constraints and checking mechanisms. More detailed instructions on datasources can be found on the Wildfly homepage: [DataSource configuration](https://docs.jboss.org/author/display/WFLY8/DataSource+configuration)
|
|
|
|
|
|
|
|
## E-Mail Server
|
|
|
|
|
|
|
|
It is necessary to configure a connection to an email server. The email property must be bound to the JNDI name `java:/mail/bwIdmMail`. To use localhost as mail relay in standalone-full-ha.xml for example:
|
|
|
|
|
|
|
|
```xml
|
|
|
|
<subsystem xmlns="urn:jboss:domain:mail:1.1">
|
|
|
|
...
|
|
|
|
<mail-session jndi-name="java:/mail/bwIdmMail" name="bwidm">
|
|
|
|
<smtp-server outbound-socket-binding-ref="mail-smtp-bwidm"/>
|
|
|
|
</mail-session>
|
|
|
|
...
|
|
|
|
</subsystem>
|
|
|
|
...
|
|
|
|
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
|
|
|
|
...
|
|
|
|
<outbound-socket-binding name="mail-smtp-bwidm">
|
|
|
|
<remote-destination host="localhost" port="25"/>
|
|
|
|
</outbound-socket-binding>
|
|
|
|
...
|
|
|
|
</socket-binding-group>
|
|
|
|
```
|
|
|
|
|
|
|
|
For more information visit the JBoss documentation for the [mail subsystem](https://docs.jboss.org/author/display/AS71/Mail+Subsystem?_sscc=t).
|
|
|
|
|
|
|
|
## JMS
|
|
|
|
|
|
|
|
The java messaging subsystem of the reg-app needs two queues to process jobs. If you have a cluster, these queues are also used to distribute async jobs to other cluster members. The queues have to be named
|
|
|
|
|
|
|
|
```xml
|
|
|
|
<subsystem xmlns="urn:jboss:domain:messaging:1.3">
|
|
|
|
<hornetq-server>
|
|
|
|
...
|
|
|
|
<jms-destinations>
|
|
|
|
<jms-queue name="bwIdmMailQueue">
|
|
|
|
<entry name="queue/bwIdmMailQueue"/>
|
|
|
|
<entry name="java:jboss/exported/jms/queue/bwIdmMailQueue"/>
|
|
|
|
</jms-queue>
|
|
|
|
<jms-queue name="bwIdmAsyncJobQueue">
|
|
|
|
<entry name="queue/bwIdmAsyncJobQueue"/>
|
|
|
|
<entry name="java:jboss/exported/jms/queue/bwIdmAsyncJobQueue"/>
|
|
|
|
</jms-queue>
|
|
|
|
</jms-destinations>
|
|
|
|
...
|
|
|
|
</hornetq-server>
|
|
|
|
</subsystem>
|
|
|
|
```
|
|
|
|
|
|
|
|
For the extensive configuration possibilities of the messaging subsystem see the Wildfly configuration Guide: [Messaging configuration](https://docs.jboss.org/author/display/WFLY8/Messaging+configuration)
|
|
|
|
|
|
|
|
## TLS LDAP connections
|
|
|
|
|
|
|
|
It seems that in some Wildfly/JBoss versions there is a missing path entry in the module.xml for the JDK. This prevents LDAP connections, that are secured via TLS. In order to circumvent this problem please add the following path to `modules/system/layers/base/sun/jdk/main/module.xml` in your Wildfly directory:
|
|
|
|
|
|
|
|
```xml
|
|
|
|
<path name="com/sun/jndi/ldap/ext" />
|
|
|
|
```
|
|
|
|
|
|
|
|
# Finalisation
|
|
|
|
|
|
|
|
Now start your Wildfly installation and look into the logfile for errors. There should be no errors at this point. If there are errors, the cause has to be removed, otherwise the reg-app application will not run. If wildfly starts without errors, you can [build and deploy the application](https://git.scc.kit.edu/simon/reg-app/wikis/installation#building-the-application).
|
|
|
|
|
|
|
|
Consider installing Wildfly Application server as a service, which ist started at system runtime, depending on your needs. Also consider running Wildfly as a clustered installation in domain mode. |
|
|
|
\ No newline at end of file |