System Architectures with a JDO Application

Now we’ll examine where JDO objects and application logic can be placed relative to an application’s overall system architecture, including both managed and nonmanaged environments. In the remaining examples in this chapter, we don’t show the details of how the JDO implementation manages the storage for the persistent instances.

JDO Rich Client with Local Datastore

The simplest form of system architecture is a one- or two-tier application that may be executed from the command line, from a shell script, or via a graphical user interface. We refer to the application as a rich client to distinguish it from a browser that simply displays HTML and executes applets. The application uses local filesystem and JDO persistent services directly.

JDO Applications in a Web Server

Figure 3-9 illustrates how an application can use JDO to provide persistent services to the implementation of a web servlet or JavaServer Pages (JSP). When using JSP pages, the application typically will use JDO in one of two ways: by calling JDO’s APIs directly in Java, or using a JSP tag library to abstract the JDO API (similar to the way the JSP Standard Tag Library abstracts the JDBC API).

JDO application running in a web server

Figure 3-9. JDO application running in a web server

With this architecture, the servlet/JSP page gets data from the browser in the form of strings from an HTTP doGet( ) or doPost( ) request ...

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.