bestcourses is supported by learners. When you buy through links on our website, we may earn an affiliate commission. Learn more

An introduction to JDBC, JNDI and Spring JDBC with Tomcat

Spring JDBC Support

5 / 5.0
14 students3 hours 32 minutes

Created by Nicolaas Kock, offered on Udemy

bestcourses score™

Student feedback

4.3/10

To make sure that we score courses properly, we pay a lot of attention to the reviews students leave on courses and how many students are taking a course in the first place. This course has a total of 14 students which left 3 reviews at an average rating of 5, which is below the average.

Course length

9/10

We analyze course length to see if courses cover all important aspects of a topic, taking into account how long the course is compared to the category average. This course has a length of 3 hours 32 minutes, which is pretty short. This might not be a bad thing, but we've found that longer courses are often more detailed & comprehensive. The average course length for this entire category is 4 hours 58 minutes.

Overall score

4.9/10

This course currently has a bestcourses score of 4.9/10, which makes it an average course. Overall, there are probably better courses available for this topic on our platform.

Description

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



What you will 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

Requirements

  • Be familiar with Java Software Development
  • Be familiar with modern Java IDE's such as IntelliJ
  • Be familiar with the concept of a Relational Database
  • A basic understanding of the Maven build tool
  • A basic understanding of Git source control and how to use Github
Udemy logo
Available on

Udemy

With almost 200,000 courses and close to 50 million students, Udemy is one of the most visited online learning platforms. Popular topics include software development, the digital economy, but also more traditional topics like cooking and music.

Frequently asked questions

  • Price: $59.99
  • Platform: Udemy
  • Language: English
  • 3 hours 32 minutes
An introduction to JDBC, JNDI and Spring JDBC with Tomcat thumbnail

bestcourses score: 4.9/10

There might be better courses available for this topic.