Create data source
-
In Project Management, click on the Icon
-
In the following dialog you can choose between MicroStream and JPA. There click JPA and press Next >.
Proceed with Connect existing data source or Create new data source
Connect existing data source
-
At Persistence Unit select the desired Persistence Unit.
-
At Data Source select the sample database H2 Northwind.
-
Click Finish.
Create new data source
-
Make sure that your database server is running.
-
Click New > Connection Profile to create a new data source.
-
In the following dialog select your database, e.g. MySQL, and click Next >
-
Click Create Driver in the following dialog to load the JDBC driver for your database.
-
Enter the connection data to your database at Properties.
-
Click Test Connection to test the connection.
-
Click Next > and finally click Finish.
-
Select the correct Hibernate dialect for your database at Dialect and click Finish.
Result
The new data source is created in the Eclipse Data Source Explorer and added to your project.
You can also create new data sources directly in the Data Source Explorer. |