Book contents
- Frontmatter
- Contents
- INTRODUCTION
- GETTING STARTED WITH JAVA
- MIGRATING TO JAVA
- TECHNIQUES 101
- MODELING AND PATTERNS
- JAVA IN A DISTRIBUTED WORLD
- THREADS
- EFFECTIVE MULTITHREADING
- MULTITHREADED ASSIGNMENT SURPRISES
- MULTITHREADED EXCEPTION HANDLING IN JAVA
- WRITING MORE COMPLEX SYNCHRONIZATION IN JAVA
- USER INTERFACES
- SECURITY
- TESTING
- PERFORMANCE
- REALITY CHECK
- INDEX
MULTITHREADED EXCEPTION HANDLING IN JAVA
Published online by Cambridge University Press: 06 July 2010
- Frontmatter
- Contents
- INTRODUCTION
- GETTING STARTED WITH JAVA
- MIGRATING TO JAVA
- TECHNIQUES 101
- MODELING AND PATTERNS
- JAVA IN A DISTRIBUTED WORLD
- THREADS
- EFFECTIVE MULTITHREADING
- MULTITHREADED ASSIGNMENT SURPRISES
- MULTITHREADED EXCEPTION HANDLING IN JAVA
- WRITING MORE COMPLEX SYNCHRONIZATION IN JAVA
- USER INTERFACES
- SECURITY
- TESTING
- PERFORMANCE
- REALITY CHECK
- INDEX
Summary
Multithreaded programming has been with us for many years and is considered to be a feature that many robust applications utilize. Exception handling is another feature of many languages considered to be necessary for proper and complete error handling. Each of these technologies stands very well on their own. In fact, you cannot pick up a book about Java programming without finding a chapter devoted to each of these topics. Many of these books do a good job defining and describing how to use them properly in your programs. What is missing is the information on how to use these two technologies together effectively. After all, how effective is writing a multithreaded Java program if it is incapable of properly handling exceptions occurring on secondary threads? We will present a solution for effectively dealing with this problem.
To solve this problem, we introduce two new classes and two new interfaces to be used when writing multithreaded Java programs. These classes are small, easy to use and understand, and effectively enable you to handle exceptions occurring on secondary threads.
Writing robust code implies many things. One of them is the proper and effective way in which your program deals with error situations. The approach you take can vary from doing nothing to handling any and all problems. The approach you choose is more than likely dictated by the type of application you are writing.
- Type
- Chapter
- Information
- More Java Gems , pp. 223 - 240Publisher: Cambridge University PressPrint publication year: 2000