Join Ketkee Aryamane for an in-depth discussion in this video Write the UserProcessor callable implementation, part of Java EE: Concurrency and Multithreading.
- [Instructor] Now the next step is to define a class…UserProcessor which will implement the callable or runnable.…So the job of the thread now, right,…that's the big step that we have to do.…We have to create this class UserProcessor,…which will implement either of the interfaces,…callable or runnable, and the job of this task will be…to process every user record, and call the dao…to insert the record in the database.…So, let's go to the IDE, and let's create…a class and the runnables folder.…Let's call it UserProcessor.…
Now the naming convention could be of your choice,…you can either call it UserProcessor, or UserTask, or…UserRunnable, any which way, so let's click on Finish,…and let's make this implement the callable interface.…And let's return a value of the integer type.…So in the previous demo, we had returned the number of rows…that got inserted into the database, we'll return…that same integer back from the processor as well, OK?…Now what we need to do in this class,…we actually need a couple of things.…
- What is concurrency?
- Processes and threads in Java SE
- Java EE concurrency APIs
- Working with the ManagedExecutorService, ManagedScheduledExecutorService, ManagedThreadFactory, and ContextService APIs
- Defining data access object (DAO) classes
- Adding methods to DAO classes
- Writing REST classes
- Creating custom thread factories
- Creating contextual proxies
- JTA transactions and concurrency
Skill Level Intermediate
Java EE: Contexts and Dependency Injectionwith Alex Theedom1h 43m Intermediate
Java EE: Design Patterns and Architecturewith Alex Theedom2h 44m Intermediate
Java EE: Servlets and JavaServer Pages (JSP)with Ketkee Aryamane6h 14m Intermediate
1. Overview and Setup
2. Processes and Threads
3. Executor API
4. Java EE Concurrency APIs
5. Concurrency and Transactions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.