O'Reilly logo

Learning Google Guice by Hussain Pithawala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

FlightSearch application with JPA 2 and Hibernate 3

We will retrofit the application to run in two different modes. First in a standalone mode, we will use the Client as our pivot. Later, we will refactor and use it for a web application.

Persistence.xml

Persistence.xml contains the declaration for a persistence-unit. The following code shows that:

<persistence-unit name="flight" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>org.packt.supplier.SearchResponse</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/> <property name="hibernate.connection.driver" value="com.mysql.jdbc.Driver"/> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required