Creating a Data Source
- In the menu, select File > New > Other... .
- Select Datasource in the following dialog and click Next >.
Adding existing data sources
- Select your persistence unit in Persistence Unit.
- Click Data Source and select the sample database H2 Northwind
- Click Finish.
Creating a new data source
- Ensure that your database server is running.
- Click New > Connection Profile to create a new data source.
- Select your database in the following dialog, e.g. MySQL, then click Next >.
- Click Create Driver in the following dialog to load the JDBC driver for your database.
Enter the data required to connect with your database in Properties.
- Click Test Connection to test the connection.
Click Next> and then click Finish.
- Select the correct Hibernate dialect for your database in Dialect and click Finish.
Result:
The new data source is created in the Eclipse Data Source Explorer and is added to your project.
Note:
You can also create new data sources directly in the Data Source Explorer.
XDEV Software Corp. - One Embarcadero Center, San Francisco, CA 94111, US
Copyright © 2015. XDEV Software Corp. All rights reserved.