Threading is a common issue in most software projects, no matter what language or technology is involved. With regard to enterprise applications, threading is even more important and, sometimes, harder.
A single mistake in a thread can affect the whole system, or even the whole infrastructure. Think about resources that are never released, memory consumption that never stops increasing, and so on.
The Jakarta EE environment has some great features for dealing with these and plenty of other challenges, and this chapter will show you some of them.
This chapter covers the following recipes:
- Building asynchronous tasks with returning results
- Using transactions with asynchronous tasks
- Checking the status of asynchronous tasks
- Building managed threads with returning results
- Scheduling asynchronous tasks with returning results
- Using injected...