Chapter 9. JDO exceptions

JDO defines a number of exceptions to represent error conditions that might arise in the various layers of an implementation. These are all defined to be runtime exceptions. Since the compiler does not check such exceptions, the application is free to catch only those exceptions that warrant a particular response. This philosophy allows JDO to be more transparently applied to existing domain models and application components than would have been the case if checked exceptions were employed.

In this chapter we look at the JDO exception hierarchy, examine the base class exceptions and their subclass exceptions, and look at a selection of situations that might give rise to them.

Why runtime and not checked exceptions? ...

Get Java™ Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.