This package contains a web application base on JDO facilities ; This application is named "J2EEDO". It's a sample of a Web application to be depoyed on a J2EE server.

Package description

This package contains two JUnit test case classes:

The J2EEDO application

Introduction

It's a sample of a Web application to be depoyed on a J2EE server.

Application's description

This application provides with 16 types of action:
Action Description
ping Returns a fixed string to ensure the j2ee application is started.
newDept Creates a new department and some new employees (random number defined between 10 and 70).
newProj Creates a new project and affect few employees (random number defined between 5 and 20).
newEmp Selects one of the known departments and creates a new employee.
setDeptBoss Selects one of the known departments and sets the manager for the department's employees.
delEmployee Removes an employee.
delProject Removes a project.
splitProject Selects one of the known departments, creates a new project and duplicates the member list from the former project.
splitDepartment Selects one of the known departments, creates a new department and affect the 50% of the former employees and project to the latter department.
mergeDept Removes a department and adds all projects and employees to an other project.
incSalary Increase an employee's salary.
getDepartment Gets a department by id.
getProject Gets a project by id.
getEmployee Gets an employee by id.
queryEmployees Performs one of the four queries:
  • Get employee by its id,
  • Get employees between min and max,
  • Get employees having the same manager,
  • Get employees member of a project.
queryProjects Performs one of the two queries:
  • Get project by it's id,
  • Get projects by members.

All those actions can be called directly form a batch file or through an HTTP call to a servlet.

The called servlets (see Servlet detail), depending of HTTP parameters, can directly call the requested action, or call it using a Session bean container.

J2EEDO Application implementation

Database modele overview

This application implements the following data model built on 4 tables:

  • Department
  • Employee
  • Address
  • Project
Here is a visual representation of the j2eedo database schema.

Packages content

The application is made of 7 main java packages: