Udemyallen

An introduction to JDBC, JNDI and Spring JDBC with Tomcat

Learn Spring JDBC for simplified database interactions. Master data access with Spring's powerful and easy-to-use JDBC support. Build robust Java applications.

4.8(4)
1,047students
3h 31m
Certificate
Nicolaas Kock
Nicolaas KockSenior Software Engineer

Course Content

An introduction to JDBC, JNDI and Spring JDBC with Tomcat is an all-levels Udemy course taught by Nicolaas Kock. It runs 3h 31m, is taught in English, and includes a certificate of completion. Learners rate it 4.8 out of 5 from 4 reviews, with 1,047 students enrolled. It is a paid course, first published December 2021.

Data Access with Spring JDBC & JNDI in Embedded Tomcat

Course Introduction: JDBC Fundamentals & Real-World Applications

This course dives into data access using Spring JDBC, a powerful framework for simplifying database interactions in Java applications. We'll start with a brief history of JDBC (Java Database Connectivity) and explore a practical user story to understand the benefits of using Spring JDBC. Learn how to build robust applications that connect to databases efficiently.

Setting Up Your Spring JDBC Development Environment

We'll guide you through setting up your development environment for Spring JDBC. This includes configuring your project and understanding the core components needed for effective database connectivity.

Spring JDBC Development: Traditional vs. Template Approaches

Explore the differences between using traditional JDBC with Spring and leveraging the convenience of Spring JDBC Template. Discover how Spring JDBC Template offers a "quick win" when working with existing JDBC code and simplifies common database operations.

Full CRUD Operations with Spring JDBC Template

Master CRUD (Create, Read, Update, Delete) operations with Spring JDBC Template. We'll provide a practical example demonstrating how to perform these fundamental database tasks with ease.

Why Choose Spring JDBC?

Spring JDBC is a widely adopted and actively maintained framework used by large companies globally. Its popularity stems from its ability to streamline database interactions, especially when dealing with legacy JDBC code. Benefit from over 20 years of development and a thriving community.

Sample User Story: Charity Database Application

This course will walk you through a practical example: building an application to access a database of charities. You'll learn to:

  • Retrieve charities based on Tax ID.
  • Search charities by category (e.g., Environment, Education).
  • Filter charities by program types.

Connecting to MariaDB with JDBC & Spring

This section focuses on connecting to a MariaDB database using both standard JDBC and Spring's data access capabilities.

Establishing a Connection with JDBC

  • Using the DriverManager class to establish a database connection.
  • Specifying database connection URLs for MariaDB.

Connecting to MariaDB with Spring Data Access

  • Defining a Spring DataSource Bean for database connection management.
  • Configuring database properties in application.xml.
  • Utilizing the MariaDB DataSource Bean Class.

Connecting to MariaDB with JNDI DataSource Objects

  • Registering DataSource Objects with the JNDI (Java Naming and Directory Interface) naming service.
  • Creating instances of the DataSource Class and setting its properties.
  • Leveraging Deployed DataSource Objects for simplified connection management.

Embedded Tomcat Integration

Learn how to integrate your Spring JDBC application with an embedded Tomcat server for easy deployment and testing.

Launching Embedded Tomcat with Maven

  • Using the Maven Plugin to launch an embedded Tomcat server.
  • Registering the DataSource Object with JNDI API.
  • Running the application with the embedded server.

Using Spring App Context with Embedded Tomcat

  • Defining the DataSource in Spring application.xml.
  • Adding a context listener to web.xml.
  • Retrieving the Spring Data Source bean in the Servlet.

Using Spring Annotation Config with Embedded Tomcat

  • Defining the DataSource in a Spring Config Class.
  • Retrieving the Spring DataSource bean in the Servlet.

This comprehensive guide empowers you to build robust and scalable Java applications with efficient data access using Spring JDBC and JNDI within an embedded Tomcat environment.

$ whoami — the devs behind tutorialsearch.io

Need a web app built? Hire the team behind TutorialSearch.io

We ship fast, production-grade full-stack apps (Next.js, React, edge infra) — the same stack that powers this site.