Project goal is to observe core Java EE technologies in the sample CRUD application.
- Download Wildfly at http://wildfly.org/downloads/Sample. This samples use version 10.1.0.Final.
- Unpack the Wildfly archive.
- Set the
WILDFLY_HOME
environment variable to point to the Wildfly installation directory.
- Download PostgreSQL at https://www.postgresql.org/download/
- Connect to PostgreSQL, i.e. using psql or pgAdmin.
- Execute the following SQL commands:
DROP DATABASE IF EXISTS jee;
CREATE DATABASE jee;
DROP USER IF EXISTS jee;
CREATE USER jee WITH PASSWORD 'jee';
GRANT ALL PRIVILEGES ON DATABASE jee to jee;
Using command shell navigate to current folder.
Execute following commands:
start %WILDFLY_HOME%\bin\standalone.bat
%WILDFLY_HOME%\bin\jboss-cli.bat --connect
These commands should be executed in jboss-cli
module add --name=org.postgres --resources=.\lib\postgresql-9.4.1211.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
data-source add --name=JavaEEDS --jndi-name=java:jboss/datasources/JavaEEDS --driver-name=postgres --connection-url=jdbc:postgresql://localhost:5432/jee --user-name=jee --password=jee
- Launch Wildfly
For Windows execute following command:
start %WILDFLY_HOME%\bin\standalone.bat
For Unix-based execute following command:
%WILDFLY_HOME%/bin/standalone.sh &
- From the command shell navigate to the latest sample, fro example:
jee-4-jsf
and execute command:
mvn wildfly:deploy
- Launch Postgres
For Windows start the Service with name PostgreSQL 9.6 Server
or similar for other PostgreSQL versions.
- Launch Wildfly
For Windows execute following command:
start %WILDFLY_HOME%\bin\standalone.bat
For Unix-based execute following command:
%WILDFLY_HOME%/bin/standalone.sh &
- From the command shell navigate to the latest sample, fro example:
jee-4-jsf
and execute command:
mvn wildfly:deploy