2007, Part 2, 123-152, DOI: 10.1007/978-1-4302-0440-4_7

Linking the GUI to a Database

Abstract

Now that you’ve finished creating the GUI pages, it is time to handle the database part. The original Java Pet Store 2.0 sample program uses a Java persistent API (EJB3) to persist the model object. In ZK Pet Shop, I will use the Hibernate persistent layer to do the same thing. The good news is that the persistence mechanisms of EJB3 and Hibernate are almost the same, so the only thing you’ll have to do is replace the EJB3 entity manager with Hibernate’s thread session facility to handle database transactions.

Fulltext Preview

Image of the first page of the fulltext document