Have a question?
Message sent Close
5
3 reviews

An introduction to JDBC, JNDI and Spring JDBC with Tomcat

Spring JDBC Support
Instructor
Nicolaas Kock
487 Students enrolled
  • Description
  • Curriculum
  • FAQ
  • Reviews

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

 

 

Connecting to the Database with JDBC
Comparing traditional JDBC with Spring JDBC
Closing Section
How long do I have access to the course materials?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Can I take my courses with me wherever I go?
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
5.0
3 reviews
Stars 5
3
Stars 4
0
Stars 3
0
Stars 2
0
Stars 1
0
37888
Share
Course details
Video 4 hours
Certificate of Completion
Full lifetime access
Access on mobile and TV

External Links May Contain Affiliate Links read more

Join our Telegram Channel To Get Latest Notification & Course Updates!
Join Our Telegram For FREE Courses & Canva PremiumJOIN NOW