Java Reference
In-Depth Information
Chapter 2. New Specifications
This chapter will only talk about new specifications that have been added in Java EE
7. In concrete terms, we will present and show how to use the following APIs:
• Concurrency Utilities for Java EE 1.0
• Batch Applications for Java Platform 1.0
• Java API for JSON Processing 1.0
• Java API for WebSocket 1.0
Concurrency Utilities for Java EE 1.0
Concurrency Utilities for Java EE 1.0 was developed under JSR 236. This section
gives you only an overview of the API. The complete document specification (for more
information) can be downloaded from http://jcp.org/aboutJava/communityprocess/fi-
nal/jsr236/index.html .
Why concurrency?
In computer science, concurrency is the ability of an application or a system to ex-
ecute many tasks in parallel. Before the advent of multitasking system, computers
could only run one process at a time. At that time, the programs were not only difficult
to design, but they were also executed sequentially from beginning to end and when
the machine was running a program that had access to a peripheral device, the run-
ning program was first interrupted to allow the reading of the peripheral.
Benefits of concurrency
The development of multitasking operating systems enabled the simultaneous execu-
tion of many processes (instances of running programs) within a machine and many
threads (also called lightweight processes; they are subsets of a process that can be
run concurrently with each other) within a process. Due to this progress, it has be-
come possible to run multiple applications at the same time, for example, listening to
music and downloading a document while writing a text document.
In enterprise applications, concurrency can increase the interactivity of your program
by running heavy processing asynchronously in a thread. It can also be used to im-
Search WWH ::




Custom Search