13.2. JDO and Servlets

Applications with a Web-based presentation layer can use JDO in at least two different ways:

  • Integration of JDO with an EJB service-oriented architecture and Data Transfer (Value) objects was discussed in depth in an earlier chapter. Such an approach could use a Web UI without JDO access from the presentation layer.

  • In another architecture, the JDO API could be used directly in the Servlet layer, including JSP pages as views. This approach is discussed briefly here.

The second architecture is straightforward: The business logic is in plain old Java objects (POJO) co-located to the presentation tier. The business logic and the presentation layer (Servlets and JSP) can use the JDO API directly.

In a Model-View-Controller (MVC) ...

Get Core 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.