Use to create a persistence unit for your project. In this panel you supply the information that will be used to enable the persistence of your entity classes. The properties of the persistence unit are stored in persistence.xml
.
After persistence.xml
is created, you can open the file by double-clicking persistence.xml
in the Projects window. In a web or enterprise application, persistence.xml is located under the Configuration Files node in the Projects window (src/conf
directory in the Files window).
You see this panel when you open the New File wizard and select the Persistence category and then select Persistence Unit.
In the New Persistence Unit wizard, you specify the following:
Element | Description |
---|---|
Persistence Unit Name |
Specifies the name for the persistence unit. |
Persistence Provider |
Specifies the persistence provider supplies the functionality for managing entities. The IDE comes bundled with the EclipseLink persistence provider. Choose New Persistence Library to specify a different persistence provider. |
Data Source |
Specifies the data source specifies the connection information for your database. |
Use Java Transaction APIs |
Specifies the transaction type. If selected, the transactions involving the entity manager are set to JTA and managed by the container. If not selected, the transaction type is set to resource-local and managed by the application. |
Table Generation Strategy |
Specifies the type of table generation for your database. |
Related Topics
Developing Applications with NetBeans IDE,
Developing Applications with NetBeans IDE,
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |