Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 960 Bytes

README.md

File metadata and controls

35 lines (25 loc) · 960 Bytes

resource-pool-example

A simple example to get started with database connection pools and thread pools in Java. Whatch the video tutorial:

Database connection and thread pools

Prerequisites

  • Maven
  • Java 17+
  • A MariaDB database running on your machine or an instance in SkySQL.

Setup

Configure the database connection URL, username, and password in the constructor of the VotingService. class. The app requires the following table in the database:

CREATE TABLE programming_language
(
    name  VARCHAR(50) NOT NULL UNIQUE,
    votes INT         NULL
);

Running the app

Execute the following in the command line:

git clone git@github.com:Programming-Brain/resource-pool-example.git
cd resource-pool-example
mvn package
java -jar target/resource-pool-example-1.0-SNAPSHOT.jar