Version 1, last updated by Kamil Ježek at October 03, 2010 12:32 UTC

Development with EFP Registry Server

Overview

The EFP Registry Server

  • is a core application providing EFP data to other systems
  • accesses data or allows to modify data via the Internet providing web-services
  • runs as a java web server

How to use the server

  • the server is situated in the directory {efp-root}/efpRegistryServer/trunk
  • you will need to start the server as a web application
    • the easiest way is to type following maven command
      
      mvn tomcat:run
      
    • the server will start on address
      
       http://localhost:8080/efpRegistryServer
      
    • you may put the address to the browser and see that the server is running
  • a manipulation with data is currently accessible only via web-services.
    • you may list the web-services on the address
      
      http://localhost:8080/efpRegistryServer/ws/
      
  • Important: Each EFP module working with server, however, does not need to call web-services directly
    • Each module contains a dependency to the EFP Registry Client module.
    • This module contains an interface EfpClient with an implementation EfpClientImpl.
    • Each module calls methods of the EfpClient interface to access data.
    • Benefit of this solution is that EfpClient provides directly EfpTypes rather than DTO objects transfered via web-services
    • Note1: the file ws.properties sets the adress of the server – it must be changed in case the server is moved to another location
    • Note2: you may study a set of JUnit test in the EfpClientTest class. It provides you with examples of usage of the EfpClient.

Technical infrastructure

The server

  • uses Spring framework to design the DAO + Services pattern
    • DAO (Data acces objects) are classes in package dao and dao.impl
    • Services (business logic) are classes in package service and service.impl
  • Uses Hibernate to generate database from java classes
    • java classes are stored in package entities
    • the database is generated from these classes
    • currently, for development purposes, we use only in memory database – the database is created on the server start and deleted on the server stop