You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Eclipse GlassFish](https://glassfish.org/download.html) 7.0.9 or later
74
+
- MariaDB server ([Enterprise](https://mariadb.com/products/enterprise/) or [Community](https://mariadb.com/products/community-server/))
75
+
-[MariaDB Connector/J](https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector) 3.2.0 or later
76
+
- An SQL client tool like [Mariadb Shell](https://mariadb.com/downloads/tools/), DBeaver, or an [SQL integration](https://www.youtube.com/watch?v=rJYUTxD-2-M) for your IDE
77
77
78
-
## Running the app
78
+
## Preparing the database
79
79
80
-
Prepare the database:
80
+
If you don't have a MariaDB server running, you can easily run using [Docker](https://hub.docker.com/u/mariadb):
81
+
82
+
```shell
83
+
docker run --name mariadb -d -p 3306:3306 -e MARIADB_ROOT_PASSWORD='RootPassword123!' mariadb
84
+
```
85
+
86
+
Alternatively, you can [Download](https://mariadb.com/downloads/) and install the server directly on your OS.
[Download MariaDB Connector/J](https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector) (select Java8+ connector) and place the JAR in the **lib** directory of the fault GlassFish domain:
111
+
## Building and deploying the application
112
+
113
+
[Download MariaDB Connector/J](https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector) (select Java8+ connector) and place the JAR in the **lib** directory of the fault GlassFish domain (replace `[GLASSFISH_HOME]` with the directory in which your GlassFish installation resides):
@@ -105,7 +122,7 @@ Start the GlassFish application server:
105
122
[GLASSFISH_HOME]/bin/asadmin start-domain
106
123
```
107
124
108
-
Configure the database connection pool using the [Administration Console](https://glassfish.org/docs/latest/administration-guide/overview.html#GSADG00698) by going to **Resources > JDBC > JDBC Connection Pools**. Click **New** and fill in the following details:
125
+
Configure the database connection pool using the [Administration Console](https://glassfish.org/docs/latest/administration-guide.html#administration-console) (http://localhost:4848) by going to **Resources > JDBC > JDBC Connection Pools**. Click **New** and fill in the following details:
109
126
110
127
***Pool Name**: `MariaDB`
111
128
***Resource Type**: `java.sql.Driver`
@@ -116,29 +133,45 @@ Click **Next** and fill in the following details:
116
133
117
134
Click **Finish**.
118
135
119
-
In the JDBC Connection Pool list, click the newly created pool, select the **Additional Properties** tab, and add the following properties using the **Add Property** button:
136
+
In the JDBC Connection Pool list, click on **MariaDB**, select the **Additional Properties** tab, and add the following properties using the **Add Property** button:
> If you are using [MariaDB SkySQL](https://mariadb.com/products/skysql/), enable SSL and specify the path to the CA chain file that you can download from the [SkySQL Portal](https://cloud.mariadb.com):
Deploy the WAR file to GlassFish using the Administration Console. Go to **Applications** and click te button next to the **Location** field, select the WAR file (**java-quickstart/jakarta-ee/target/jakarta-ee-1.0-SNAPSHOT.war**), and click **Ok**.
161
+
To deploy the WAR file to GlassFish using the Administration Console, go to **Applications** and click the **Deploy** button. Click on the button next to **Location** and select the WAR file (**java-quickstart/jakarta-ee/target/jakarta-ee-1.0-SNAPSHOT.war**). Click **Ok**.
162
+
163
+
## Check the output
164
+
165
+
Go to **Monitoring Data > server** and click either the **View Log Files** or **View Raw Log** button. You should be able to see log messages confirming that data was deleted, created, and read. You can also connect to the database and see the data in the `programming_language` table.
166
+
167
+
Connect to the database:
143
168
144
-
You should be able to see new rows in the `programming_language` table in the database as well as log messages confirming that data was deleted, created, and read. Go to **Monitoring Data > server** and click the **View Log Files** button.
0 commit comments