@ejbgen:local-home-method Annotation

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

Scope

Method tag on an entity bean's home method.

Syntax

@ejbgen:local-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 local home interface. Valid values are 0...n. In order for this ordering to work, all local-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 local home method. Valid values are NotSupported, Supports, Required, RequiresNew, Mandatory, and Never. If not specified, the default transaction of the entity bean will be used. For more information, see EJBs and Transactions.

Remarks

The following rules apply to this tag's use:

Related Topics

@ejbgen:file-generation Annotation

@ejbgen:local-method Annotation

@ejbgen:remote-home-method Annotation

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

Home Methods Sample