Linking the GUI to a Database

Apress eBooks · 2007

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. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Read the paper · More papers on PaperTik