From the course: Java EE: Concurrency and Multithreading
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Write REST class for injecting MES objects
From the course: Java EE: Concurrency and Multithreading
Write REST class for injecting MES objects
- [Narrator] Now let's create the RESTful bean Report Resource. So, let's go to the IDE, and under the rest package, that's the one. We want to create a class and call it 'ReportsResource'. I have not named it right, so I'm going to correct the spelling right away. I'm going to say, 'Resource'. Okay, now this has to be, of course, given the 'Path' annotation to specify that you are right for this RESTful bean. So, let's say, 'reports. That's the URA. Let's see the next step. Inject the ManagedExecutorService object in the Resource class through the Resource annotation. So we know that, if you want to get ahold of the managed executor, or managing tool executor, or manage the factory, or contact service. Any of these contact IPAs. You can have a GNDA look-up, or you can inject them while you do the resource annotation. So I'm going to show you both the ways right now. Let's go there and, let's see, you have a instructor of this class, ReportResource. So, how do you do a JNDI lookup?…
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
-
-
-