done task 5

This commit is contained in:
2026-01-26 22:15:05 +01:00
parent 100dec28bc
commit b7a3190bff
49 changed files with 97 additions and 27 deletions

View File

@@ -0,0 +1,40 @@
## Start Glass fish
```bash
# 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](http://localhost:8080/shop-1.0-SNAPSHOT/api/items)
## Start client
```bash
# 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
```bash
# 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