/* **************************************************************************************** */ Mock up : InriaHL7MessageProfileRepository This application is an example showing how works a Gazelle application using several modules/projects. /* **************************************************************************************** */ Welcome to this mock up. This read-me file will resume all the important things to know. This application uses the following modules : - InriaHL7MessageProfileRepository-ejb : Generate a JAR file ready to be loaded in our application. - InriaHL7MessageProfileRepository-ear : This module will build our application using others modules. This application will be represent as a EAR file, generated by this module. - InriaHL7MessageProfileRepository-ui : Web part of our application. It generates a WAR file ready to be loaded in our application. - InriaHL7MessageProfileRepository-persistence: This module corresponds to our persistence layer. It's used by all modules. This helps our projects to represent them as one application, using one database. Generate a JAR file ready to be loaded in our application. You will also need those ones: - Data : contains all the message profiles and message tables needed by the application - HL7-Parser : contains a script to import the data in the database and associate each profile/table with an OID Here are the important steps to perform : @1.You need to check out from the forge all those modules to test and try this InriaHL7MessageProfileRepository application. @2. In the InriaHL7MessageProfileRepository-ear project, you need to update the "build.properties" file with your right system's configuration. To do that, in the root directory of the ProductRegistry-ear project, copy the file "build.properties.template" to "build.properties" , and configure in this file the home paths of your JBoss applications. @3. Run your JBoss AS. @4. As this module uses a database, we need to create the corresponding database (in our example, the database is 'inria-hl7-messageprofilerepository'). This database is owned by the 'gazelle' user (no password). In a console, launch the following command : # createdb -U gazelle inria-hl7-messageprofilerepository Note1 : If the 'gazelle' user does not exist, create it that way : # createuser gazelle , allowed to create a database, and allowed to create users. Note2 : JDBC driver used is org.postgresql.Driver , defined in your JDBC library (eg. postgresql-8.1-409.jdbc3.jar) If it does not exist, add it in your ${JBOSS_HOME}/server/default/lib/ @5. Then, you need to build the application using Ant. A Master script will generate all the application using Ant child scripts (existing in each module). To execute this Ant master script, please launch the master script in your ear project, or the associated target in this script. Example : launch in your directory ~/workspace/InriaHL7MessageProfileRepository-ear/ # ant -Dapplication=InriaHL7MessageProfileRepository-ear -Dprofile=dev -Dtarget=clean # ant -Dapplication=InriaHL7MessageProfileRepository-ear -Dprofile=dev -Dtarget=all NB. use -Dprofile=prod if you rather want to do a production version of the project @6. During the Ant execution, check your Ant console logs. At the end of execution, you should look : datasource: [echo] Deploy XML datasource file into JBoss environment... [copy] Copying 1 file to ${JBOSS_HOME}/server/default/deploy deploy-ear-archive-in-jboss: [echo] Deploy the EAR archive into JBoss environment... [copy] Copying 59 files to ${JBOSS_HOME}/server/default/deploy all: [echo] The EAR archive (with all modules) has been created and deployed. Check on your JBoss console. BUILD SUCCESSFUL @7. If you do not get these results, check the errors and your configuration. @8. Check in the JBoss console, that your application is successfully deployed in your JBoss environment. You should look a log : INFO [EARDeployer] Started J2EE application: file: ${JBOSS_HOME}/server/default/deploy/InriaHL7MessageProfileRepository-ear.ear/ @9. Following the previous step, the wsdl file of your InriaHL7MessageProfileRepository application is now reachable on your Web browser, from the address : http://localhost:8080/InriaHL7MessageProfileRepository-ear-InriaHL7MessageProfileRepository-ejb/InriaHL7MessageProfileRepositoryWS?wsdl (if your JBoss AS uses the 8080 port). Your 'inria-hl7-messageprofilerepository' database has been normally created with many tables, you now have to populate it using the different files from project Data. Launch in your directory HL7-Parser the command: python import.py ProfileTables Profiles You will be asked the IP address of your database host (usually 127.0.0.1) and the name and password of the database user (gazelle in our example). Then wait a while during the operation and check that your database have been properly filled. @10. Note : If the project from the Forge deploys and works, we need to make it safe before working. Because many files are generated and can not be allowed in a commit, because they could make troubles for other people in the development team. For that, in the Eclipse environment, select the projects. Then, in the “Java” perspective (or "Synchronize with the repository" perspective), add to the SVN:ignore (files/directories out of commit procedures) : - '/dist' directory - '/exploded-archives' directory - '/build.properties' file 11. Congratulations, installation is successfully done. For more details, take a look in the document : - Gazelle Starters Guide (on DMS : Gazelle / Development / Engineering How To ).