An introduction to JDBC, JNDI and Spring JDBC with Tomcat

- 82%

0
Certificate

Paid

Language

Level

Beginner

Last updated on March 20, 2025 8:36 pm

Learn how to connect to a database using JDBC and Spring JDBC. This course covers everything from setting up a JDBC datasource connection to using the Spring JDBC template. Perfect for Java developers looking to streamline their database access.

Add your review

What you’ll learn

  • What is JDBC – Java Database Connectivity
  • What is the difference between regular Java JDBC and Spring JDBC
  • What is a JDBC Connection and an overview of the different types
  • How to set up a JDBC Datasource Connection
  • How to use the Spring JDBC Template to access a relational database
  • Understand JNDI and defining a DB Connection
  • Use Spring Boot to put together an Embedded Tomcat JDBC CRUD Application

Data Access with Spring JDBC Support using JNDI in an embedded Tomcat Server .

Course Modules :

  • Course Introduction – JDBC History & Sample User Story

  • Our Spring JDBC Development Environment

  • Connecting to the Database

  • DAO with Traditional JDBC vs Spring JDBC

  • Full CRUD with Spring JDBC Template example

Why learn Spring JDBC ?

  • JDBC use is widespread in large companies worldwide

  • Actively maintained for 20+ years and counting

  • Spring JDBC gives you a “quick win” when dealing with legacy JDBC code

Spring JDBC – Sample User Story

  • As an expatriate living abroad I want access to an online database of all charities (non-profits) that operate in my “home country”.

    • I want to be able to find Charities by their Tax Id

    • I want to be able to search by Charity Category such as Environment or Education

    • I want to be able to search by Charity Program Types

Connecting to the MariaDB with JDBC

Establishing a Connection

  • Using the DriverManager Class

  • Specify the database Connection URLs

Connecting to the MariaDB with Spring:

Define Spring DataSource Bean to get a DB Connection

  • Specify the database properties in application.xml

  • Using the MariaDB DataSource Bean Class

Connecting to the MariaDB :

Using JNDI DataSource Objects to Get a Connection

  • Registering DataSource Object with Naming Service That Uses JNDI API

  • Creating Instance of DataSource Class and Setting its Properties

  • Using Deployed DataSource Object

Connecting to the MariaDB :

Using JNDI to Get a JDBC Connection in Embedded Tomcat

  • Java Main Method to launch Embedded Tomcat

  • Registering DataSource Object with JNDI API

  • Using the registered JNDI DataSource Object

  • Running the JAR with Maven Plugin

Connecting to the MariaDB :

Using Spring App Context to Get a JDBC Connection Tomcat

  • Java Main Method to launch Embedded Tomcat

  • Defining the DataSource in Spring application.xml

  • Adding a context listener to web.xml

  • Retrieve the Spring Data Source bean in the Servlet

Connecting to the MariaDB :

Using Spring Annotation Config in Embedded Tomcat

  • Java Main Method to launch Embedded Tomcat

  • Defining the DataSource in Spring Config Class

  • Retrieve the Spring DataSource bean in the Servlet

Who this course is for:

  • Java Developers who have to write code to access a relational database
  • Java Developers who want to use Spring JDBC for streamlining database access to a relational database

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “An introduction to JDBC, JNDI and Spring JDBC with Tomcat”

×

    Your Email (required)

    Report this page
    An introduction to JDBC, JNDI and Spring JDBC with Tomcat
    An introduction to JDBC, JNDI and Spring JDBC with Tomcat
    LiveTalent.org
    Logo
    LiveTalent.org
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.