From the course: Java EE: Concurrency and Multithreading
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Define UserDao and user beans
From the course: Java EE: Concurrency and Multithreading
Define UserDao and user beans
- [Narrator] Here we have the list of the steps that we want to execute as a part of the demo. We'll follow each of the steps one by one and simultaneously of course we've called for it. So the first step is you have to define a user bean to store all user information. So let's go on to the beans folder. And create a Java class, let's call it user. And let's give it attributes. We've already seen the files. So we know that there's an ID, email and a name. So int id string name string email address and we'll immediately insert the code for get her sitters, because we have to stick to the encapsulation concept of object oriented programming. So that's the first step. Next is you have to define a class user dao for all the database operations and define a method in it to insert user records in database. So we said that we'll have a different class for database interactions. So let's go to the dao package and create a class called user dao. And this is going to have a method public, let's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Features of the Executor framework and thread pools4m 35s
-
(Locked)
Callables and futures2m 16s
-
(Locked)
Executor and ExecutorService3m 58s
-
(Locked)
ExecutorService overview3m 3s
-
(Locked)
Define UserDao and user beans6m 50s
-
(Locked)
Write the UserProcessor callable implementation5m 31s
-
(Locked)
Write a test class and run the application10m 48s
-
(Locked)
Different thread pools5m 20s
-
(Locked)
ExecutorService: invokeAny and invokeAll7m 18s
-
(Locked)
ExecutorService shutdown5m 18s
-
(Locked)
ScheduledExecutorService overview2m 7s
-
(Locked)
The schedule method5m 16s
-
(Locked)
scheduleAtFixedRate and scheduleWithFixedDelay6m 42s
-
(Locked)
ThreadFactory API2m 34s
-
(Locked)
Create a custom thread factory5m 26s
-
-
-
-