# New Entity Bean Wizard

This wizard creates a new entity bean in an EJB module project.

You set the following information in the wizard:

Element | Description
--- | ---
EJB Name | Set the name of the bean in the deployment descriptors and is the basis for the bean's class and interface names.
Location | Select the source folder where you want to create the bean files.
Package | Select an existing package or type the name of a new package.
Primary Key Class | The type of the object that maps to the database table's primary key.
Persistence Type | Specify how to manage persistence for your bean:
Container | The application server manages the persistence for your bean. You do not have to write methods that access the database. You only need to specify the queries in the module's deployment descriptors using finder methods and select methods.
Bean | The bean manages all persistence on its own. You have to code all the database methods.
Create Interface | Specify which interfaces to create for the bean:
Remote | Allow your entity bean to be accessed from remote clients using remote method calls. This usually means clients that are running on a different JVM and not running on the bean's application server.
Local | Allow your bean to be accessed from clients that are running in the same Java virtual machine. Note: Generally, your entity beans should not have remote interfaces. It is better practice to only allow remote access to your entity beans through a session bean.

Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.