Class BuyBookPage

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public final class BuyBookPage
    extends javax.swing.JPanel
    A visual page coordinates the following functions of OpenBookService :
  • query for books
  • choose one or more of the selected books
  • add them to Shopping Cart
  • place a purchase order of the books in the shopping cart.

    Each interaction with the underlying service occurs in a background i.e. a non-AWT event dispatching thread. The background threads are used via SwingWorker and hence each persistence operation is can be potentially handled by a different JPA persistence context. This threading model not only adheres to the good practice of responsive graphical user interface design, it exercises the remote nature of JPA service (even within this single process Swing application) where every operation on a persistence context results into a set of detached instances to the remote client.

Author:
Pinaki Poddar
See Also:
Serialized Form