O'Reilly logo

Harnessing Hibernate by James Elliott, Ryan Fowler, Timothy M. O'Brien

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

Creating a Hibernate Console Configuration

With the project selected in the Project Explorer, choose FileNewOther, expand the Hibernate section that was added by the tools (Figure 11-12), and select Hibernate Console Configuration. (This is where you’ll also be able to choose to create a new configuration file, or XML mapping, as well as reverse engineering configuration files, which we won’t cover in this book.) Click Next to proceed with setting up the tools for your project.

New Eclipse wizards offered by the Hibernate Tools

Figure 11-12. New Eclipse wizards offered by the Hibernate Tools

Note

If you’re still using old-school properties files to configure Hibernate, you’d use the “Property file” field, found above the one we used in this example.

The Hibernate Console Configuration window appears (Figure 11-13). Tell the tools how to find your Hibernate configuration file by clicking on the corresponding Browse button, and locating the file within the project. (This is automatically set up for you when you use the configuration file wizard to create it in the first place, and the latest version of the tools seems to be smart enough to find it automatically in the project structure we’ve been using for the code examples in this book.)

Setting up a Hibernate Console configuration

Figure 11-13. Setting up a Hibernate Console configuration

The rest of the settings on this tab can be ...

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