Files
2026-01-26 22:22:13 +01:00
..
2026-01-26 22:22:13 +01:00
2026-01-26 22:15:05 +01:00
2026-01-26 22:15:05 +01:00
2026-01-26 22:15:05 +01:00
2026-01-26 22:15:05 +01:00

Start Glass fish

# start glassfish server
glassfish7/bin/asadmin start-domain

# deploy app on it
glassfish7/bin/asadmin deploy target/shop-1.0-SNAPSHOT.war

we can browse server at http://localhost:8080/shop-1.0-SNAPSHOT/api/items

Start client

# cd to clients project directory
cd client

# compile and run project
mvn clean compile exec:java

The client class handles HTTP operations, while the Delegator class handles user interaction, input validation, and adapts the input into the correct format. Delegator then calls the appropriate Client methods, acting as a proxy in a liberal sense.

Ending the program

Clent program can be ended by typing done or exit in the interactive terminal

Glassfish can be stoped using the following command in terminal

# first check which domains are running
glassfish7/bin/asadmin list-domains
# you will get somehing like the below lines
#      domain1 running
#      Command list-domains executed successfully.
# we have domain1 running. so we stop it with
glassfish7/bin/asadmin stop-domain domain1

DONE