Quelques éléments pour le TP JEE avec WILDFLY

by Olivier Barais     teaching   istic   m2   french  

Posted 2014.09.29 — Rennes, France

Hello très chers étudiants,

Pour ce dernier TP de TAA sur la partie JEE, nous allons intégrer notre TP avec le serveur d'application wildfly , nous utiliserons wildfly version 8.1 final.

Etape 0: Installation de wildfly

  1. Get the latest stable version of the WildFly Application Server (8.1.0.Final) from http://wildfly.org/downloads/ (wildfly-8.0.0.Final.zip).
  2. Extract the tgz archive to a directory on your computer, e.g. /opt. The path must not contain any spaces. A new directory, e.g. /opt/wildfly-8.1.0.Final/, containing the WildFly files will be created.
  3. Use the script ./bin/standalone.sh to start the WildFly server and check the installation. After startup, you should be able to access the web server at http://localhost:9990
  4. Add a user ./bin/add-user.sh
  5. After creating a user revisit the Administration Console. http://localhost:9990
  6. Go to Manage Deployments and click Add Content to upload hsqldb.jar. Make sure that the deployed file is enabled.
  7. Go to Profile -> Connector -> Datasources and click Add. Use the following information to create a datasource: Name: DefaultDS JNDI Name: java:/DefaultDS Choose hsqldb.jar as driver Connection URL: jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB;shutdown=true username: sa In order to stop the server, press CTRL-C in the console window that was opened during step 3.

You app server is ready. <!--more-->

Etape 1: Jeu avec les exemples.

Récupérez les exemples fournis ici

Déployez votre premier bean. 1. Go to ejb-in-war 2. Deploy the bean

mvn clean package wildfly:deploy

Allez voir la console d'administration

Deployez un bean avec persitence. 1. Go to quickstart/cmt 2. Adapt the bean 3. Deploy the bean

mvn clean package wildfly:deploy

Etape 2: Adaptez votre application pour la déployer sur wildfly.

Let us go ;)