# @ejbgen:jndi-name Annotation

This tag specifies the local and remote JNDI names of an EJB, that is, the JNDI names associated with the local and remote interfaces of an EJB. You can set this tag's attributes either directly in Source View or in the Naming Section of the Property Editor.

## Scope

Class tag on an entity or session bean.

## Syntax

@ejbgen:jndi-name

[local="LocalJNDIName"]

[remote="RemoteJNDIName"]

## Attributes

local

Optional. Specifies the local JNDI name of the EJB.

remote

Optional. Specifies the remote JNDI name of the EJB.

## Remarks

The local or remote JNDI name of an EJB is typically used to reference the local or remote interface of an EJB, for instance by an EJB Control, or by other EJBs using a (remote) @ejbgen:ejb-ref or (local) @ejbgen:ejb-local-ref tag, although it is possible in the latter case to reference an EJB without using its JNDI name. For more information, see the description of these two ejbgen tags.

When you create a new entity or session bean, JNDI names and related EJB interfaces are set by default. For more default, see @ejbgen:file-generation.

Related Topics

@ejbgen:file-generation Annotation

@ejbgen:ejb-ref Annotation

@ejbgen:ejb-local-ref Annotation