This is a mirror of official site: http://jasper-net.blogspot.com/

Hibernate 3 Annotations Tutorial

| Thursday, June 17, 2010
This tutorial will walk through how to implement a hello world project using Hibernate Annotations and MySQL database.

Requirements

Download and unzip Hibernate Core distribution from the Hibernate website. Hibernate 3.5 and onward contains Hibernate Annotations.
Starting with version 3.5 (currently trunk), Annotations and EntityManager have been merged back into the Hibernate Core codebase as invidual modules.  We will also begin bundling Envers at the same time.  This will significantly help simplify compatibility guidelines.

Download SLF4 lib as well.
Download the database connector. In this example, I’m using MySQL database.

Configuration

First, set up your classpath:

Copy hibernate3.jar and the required 3rd party libraries available in lib/required.
Copy lib/jpa/hibernate-jpa-2.0-api-1.0.0.Final.jar to your classpath as well.
Also copy slf4j-simple-1.5.8.jar from SLF4 (I’ve got an exception without this lbi in my classpath)

Read more: DZone

Posted via email from .NET Info

0 comments: