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.
Defining the URLProcessor for the thread's job
From the course: Java EE: Concurrency and Multithreading
Defining the URLProcessor for the thread's job
- [Narrator] Let's go ahead with the Managed Scheduled Executor Service demo. So the steps are listed on the slide. Of course, it's the use case for the health check of the app. So the first step is add a REST class in the project and assign path annnotation to it. So let's go to IDE, and in this, I'm going to create a class under the com.app.rest and I'm going to label this URL "HealthResource" let's say. And let's add the path annotation to it. And let's give it a value. So let's say we're going to call this "urlCheck." What's the next step? Inject the Managed Scheduled Executor Service object by the resource annotation and the REST will be. So we have our server, and we have the Concurrent Resources. Let's go to Concurrent Resources and Managed Scheduled Executor Service. So the default object that the container anyway provides you, the GlassFish server. It's available to you right there. So I'm gonna take that JNDI name, copy it, and come back to the IDE. And inside this, I'm…
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
-
-
-
-
-
-
Need for Java EE concurrency4m 14s
-
(Locked)
Java EE concurrency APIs3m 52s
-
(Locked)
Set up a Java EE RESTful application8m 4s
-
(Locked)
Running and testing the Java EE RESTful application4m 47s
-
(Locked)
Important Java EE terms4m 4s
-
(Locked)
ManagedExecutorService (MES) overview3m 20s
-
(Locked)
Define the bank account related beans and DAO class3m 28s
-
(Locked)
Add methods in the DAO class10m 30s
-
(Locked)
Define ReportProcessor7m 42s
-
(Locked)
Write REST class for injecting MES objects6m 51s
-
(Locked)
Verify code and add the REST method8m 42s
-
(Locked)
Run and test the ManagedExecutorService application2m 59s
-
(Locked)
ManagedScheduledExecutorService overview2m 22s
-
(Locked)
Defining the URLProcessor for the thread's job6m 47s
-
(Locked)
Add a REST method to call the URLProcessor5m 20s
-
(Locked)
Important pointers and API overview6m 22s
-
(Locked)
ManagedThreadFactory API1m 26s
-
(Locked)
Create a single thread with ManagedThreadFactory6m 7s
-
(Locked)
ManagedThreadFactory with ThreadPoolExecutor7m 2s
-
(Locked)
ContextService API3m 7s
-
(Locked)
Create a contextual proxy9m 15s
-
-
-