
Updates the project’s build-path to include the installed Hibernate libraries. Installs the Hibernate libraries (JARs) to the project if you chose to copy the libraries into your project. Please be patient and wait for it to complete before taking any further actions.Ĭompleting the wizard performs the following actions: If you chose to copy libraries to your project, during the completion process, the wizard could appear inactive for up to 30 seconds as it copies libraries and updates various project resources. Note: The Session Factory can also be created at a later point by using selecting File>New>Other, expanding MyEclipse>Hibernate, and selecting Hibernate Session Factory. The data source configuration performed above can be skipped now and carried out later using the Hibernate Configuration editor. In this case, you have to make sure you copy the JDBC driver JAR files to your project after the wizard completes. Note: A profile is not necessary at this stage you can manually fill the remaining details as shown on this page without selecting a profile.
You can add libraries by clicking Next, or click Finish to accept the default libraries. From the DB Driver drop-down, select the Oracle profile you created in Connecting to a Database in MyEclipse. This automatically populates the remaining fields. Click Next, and leave the Specify database connection details checkbox selected. Type as the package name, and click Finish. Click New beside the Java Package field to create a new package for the session factory class. It is necessary if you are going to use annotated POJOs instead of Hibernate mapping files. Annotations support creates an AnnotationConfiguration instead of a regular Configuration in your SessionFactory class.
Hibernate 4.x includes annotations support automatically. Note: The Enable Hibernate Annotations Support is available only for Hibernate 3.2 and 3.3.
Select MyEclipse Generic Java Runtime from the Target Runtime drop-down, and click Next. Right-click HibernateDemo, and select MyEclipse>Project Facets>Install Hibernate Facet. Type HibernateDemo in the Project name field, and click Finish.