# @ejbgen:remote-home-method Annotation

This tag defines the entity methods for an entity bean's remote home interface.

## Scope

Method tag on an entity bean's home method.

## Syntax

@ejbgen:remote-home-method

[is-idempotent="True/False"]

[ordering-number="Number"]

[roles="RolesList"]

[transaction-attribute="TransactionOption"]

## Attributes

is-idempotent

Optional. Specifies whether this method is idempotent. Valid values are True and False. An idempotent method does not alter the state of the system, that is, produces the same results on subsequent invocations if the same arguments are provided.

ordering-number

Optional. Specify a number to enforce in what order this home method will be defined, relative to the other home methods, in the auto-generated remote home interface. Valid values are 0...n. In order for this ordering to work, all remote-home-method tags used in this EJB must have this attribute set with a distinct numeric value. If the ordering-number attribute is not used, the home methods will be defined in alphabetical order. The definition of the home methods always follows the definition of the findByPrimaryKey and create methods. For more information on interface generation, see ejbgen:file-generation Annotation.

roles

Optional. Defines a comma-separated list of EJB-scoped security roles that are allowed to invoke this method. If not specified, the roles specified by an ejbgen:method-permission-pattern Annotation might apply. These EJB-scoped security roles must be defined using the @ejbgen:role-mapping Annotation. For more information, see Role-Based Security.

transaction-attribute

Optional. Specifies the transaction attribute for this remote home method. Valid values are NotSupported, Supports, Required, RequiresNew, Mandatory, and Never. If not specified, the default transaction of the session or entity bean will be used. For more information, see EJBs and Transactions.

## Remarks

The following rules apply to this tag's use:

- Home methods can be defined in the local and/or the remote home interfaces. In Design View you can easily create these definitions by right-clicking the diamond on the arrow to the left of the method name, and selecting the desired interface option.

- When building an EJB, the ejbgen:file-generation tag specifies whether the remote home business interface will be generated. If so, the home methods with an ejbgen:remote-home-method tag will be defined in this interface.

Related Topics

@ejbgen:file-generation Annotation

@ejbgen:remote-method Annotation

@ejbgen:local-home-method Annotation

How Do I: Add a Home Method to an Entity Bean?

Home Methods Sample