X

How to Configure Hibernate in Eclipse Juno

In this article we will tell you how to configure hibernate in eclipse juno in easy steps. Here are the complete details about the procedure.

Hibernate is known as the object relational mapping library for Java and is used for providing a framework for mapping of object oriented domain to a conventional relational database. In simple terms, one would use the Hibernate feature in Java when you built an application that needs to store data. For example, if you have built an application for the business use and you need to track user data and accounts, you can install the hibernate feature. But the thing is to configure hibernate in eclipse juno properly.

Hibernate tools are for the java developers what amplifiers are to a musician. Developers need these tools for fine tuning hibernate code with relative ease. Reverse engineering is commonly used in this process to generate hibernate model class, annotation code from database tables or hbm mapping file. Hibernate tools are bundled as the most important component of the JBOSS tools. After installing the JBOSS tools, you will have automatically installed hibernate tools as well.

The steps to install & configure hibernate in eclipse Juno are mentioned below:

1. Be aware of the Eclipse and JBOSS tools version: Before you start the configuration process, know the correct version of hibernate for your Eclipse Juno.

2. Go to JBOSS tool download webpage: You can either use the eclipse update site for an automatic download or simply copy paste the downloaded zip file to the eclipse plugin folder. If you go with the first option, you are likely to download too many other things that are not required. Preferably go for the downloaded zip file instead.

3. Download Hibernate tools: Go to the JBOSS version that you are looking for and download hibernate tools corresponding to it. Now extract it using the favour zip tool.

4. Copy to Eclipse Plugin: Once the plugin and feature folders have been extracted, copy them to the eclipse plugin and feature folders.

5. Restart: Once all the features have been plugged in and copied, restart to check if it is done.

After the completion of this process, you can check if hibernate has been successfully installed. When you check Hibernate perspective in WindowsàOpen Perspectiveàothers, hibernate icon should be listed there. You can also test the functionality of the tool in the perspective window if it is not working as you thought it should. In order to make the tool work properly, the match between hibernate tools and eclipse Juno should be correct.

Hibernate tools come in handy as an editor for Hibernate XML mapping files which supports auto completion and highlighting of the syntax. With the help of eclipse, Hibernate gets a console view in addition to the tree overview which helps in getting interactive view of the persistent classes and their relationships. With the help of console, one can execute the XML queries against the database and view results directly in Eclipse.

There are also many wizards that are provided with the eclipse tool. These wizards allow in creating hibernate configuration files or one can even reverse engineer an existing database schema. The best thing about reverse engineering wizard is that it supports customizable templates.

TechPluto Staff:
Related Post