Module CSC5002—ASR6: Middleware and software architecture for distributed applications

Portail informatique

JavaEE Lab 1 — Stateless and Stateful Beans

For this lab, we use the Glassfish JakartaEE reference implementation, provided by the Eclipse Foundation, inside a docker container.

Programming with Session Beans

Get the source code of the examples

Download the examples from during the lecture.

Study the code of the examples

Read carefully the explanations on the different sample versions.

Once a component has been deployed, you can check it is currently available in the list of running components:

$ asadmin list-applications

CALCULATOR application

Based on the given examples, develop a client-server system for a calculator application offering at least 10 different methods. The interface of this calculator should offer both synchronous and asynchronous methods using the Future mechanism.

The implementation has to be done using only session beans on the server side.

Develop a complete working calculator solution following these steps:

  • First write the interface and the implementation of the required EJB components.
  • Then write the code of a client application.
  • Test and validate the behavior of your application.
  • Return your source code (in a zip archive) on Moodle as assignment 1.