Join Ketkee Aryamane for an in-depth discussion in this video Create a custom thread factory, part of Java EE: Concurrency and Multithreading.
- [Instructor] Now let's take a look…at the ThreadFactory API demo.…The steps are ready here, the first one…is you to create a custom class,…which implements the ThreadFactory interface.…So let's head back to the IDE,…and I want to create a totally different package…for any kind of custom implementations that I want…for my application.…Okay, and under this package I'll create a class,…and I will say CustomThreadFactory.…Okay, and this should basically implement the…ThreadFactory interface. Okay?…Next is you to provide custom logic…to decide the names or priorities.…
So the custom logic will be provided by the…implementation of that abstract method.…Okay. Let's get rid of the default implementation;…we don't want that.…And inside this, let's create an instance of Thread.…And choose the construct to which sticks a Runnable argument…so this task will be passed to it.…And then, now is the chance to set your own name…custom names, or maybe your own priorities,…or even set the Daemon Thread status.…
So you can take the instance and call any of these methods…
- 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 Advanced
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.