Skip to content

Programming-Brain/resource-pool-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Thread and DB connection pool example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages