Last commit adds the following features:
<WF>/domain/configuration/domain.xml is stripped from profiles other than "ha". Other profiles (full, full-ha, default) have either too many or too few options enabled for our needs.
The "ha" profile was customised with logging, DB connection, security domain, Hibernate cache and servlet settings to reflect changes in standalone.xml.
The remaining options are left unchanged. The profile was not optimised in any manner.
Along with host.xml they create a server group named "lams-server-group". It runs on "ha" profile. It consists of two localhost servers. One should run on port 8080 and the other one on 8230, i.e. 8080 + 150 as defined in the configuration.
Till now LAMS standard build has been removing a library which enables distributed sessions in WildFly. It was due to
Now LAMS standard build backs up this library before removing it.
LAMS cluster build puts back this library to its previous place. It also marks LAMS sessions as distributable by adding a tag in lams-central.war/WEB-INF/web.xml.
The above should enable session sharing between WildFly nodes.
Unfortunately, there are WF 8 bugs which makes this feature unusable.
Some explanation is available here
It seems that only WF 10 has them fixed.
Further LAMS code changes may also be needed.
ThemeDTO had to be marked as serialisable in order to put into a shared session.
Basically any object put into session needs to be serialisable and may be a subject to other requirements.
To run the test environment full (non-slimmed) version of WildFly is required.
To use it:
1. (only once) Run add-user.bat from bin dir of WF installation. If it does not run, you have got a wrong OS.
It will allow domain management console access.
2. Build LAMS using lams-cruise plus any optional customisations
3. Run "deploy-cluster" target from lams_build Ant file.
4. Run domain app from bin dir of WF installation.
5. Go to
and enter credentials set up in #1
6. In the console go to Deployments -> Add
which was placed there by Ant run.
Do not change the name or runtime.
7. Assign the deployment to "lams-sever-group".
8. Go to
and observe sessions sharing
It seems to work better if server 8230 is used to log in.
There is also a good tutorial about WF session failover here