JAVA JPA WITH HIBERNATE AND H2 Tutorial
JAVA JPA WITH HIBERNATE AND H2 Tutorial Setting the environment: Download and install H2 Database http://www.h2database.com/html/download.html Create a connection to the database, in my case I am using Netbeans. Creation of a new Database Connection can be done from the Services Tab, Databases node: Have in mind that it is not possible to test the connection before the JDBC URL has been written into. Select the PUBLIC schema when asked. And put a name onto it, I decided to name it as "Hibernate 101 on H2" Download Hibernate http://sourceforge.net/projects/hibernate/files/hibernate3/ JPA with Hibernate: For the shake of portability and standarization we will be using JPA. Natively speaking, Hibernate relies onto a context configuration file - hibernate.cfg - and a single or many persistence configuration files - hibernate.hbm.xml - . On the other hand JPA configuration is based on just one file: persistence.xml. ...