Method extensions are IBM extensions to the standard J2EE deployment
descriptors for Enterprise JavaBeans (EJB) Version 1.x-compliant beans. Method
extension settings define transaction isolation levels for methods and control
the delegation of a principal's credentials.
- Method type
- Specifies the type of the enterprise bean method.
Data type |
String |
Range |
Valid values are Home, Remote, and Unspecified. |
- Name
- Specifies the name of an enterprise bean method, or the asterisk
character (*). The asterisk is used to denote all methods of an enterprise
bean's remote and home interfaces.
- Parameters
- Contains a list of fully qualified Java type names of the method
parameters. Used to identify a single method among multiple methods with an
overloaded method name.
- Isolation level attributes
- The transaction isolation level determines how isolated one transaction
is from another. This can be set for individual methods in an enterprise bean
or for all methods in the enterprise bean. An asterisk is used to indicate
all methods in the bean. This setting is not applicable for EJB 2.x-compliant
beans.
Within a transactional context, the isolation level associated with the
first method call becomes the required isolation level for all methods called
within that transaction. If a method is called with a different isolation
level from that of the first method, the java.rmi.RemoteException exception
is thrown.
- Isolation level
- Specifies the level of transactional isolation.
The container uses the transaction isolation level attribute as follows:
- Session beans and entity beans with bean-managed persistence (BMP): For
each database connection used by the bean, the container sets the transaction
isolation level at the start of each transaction unless the bean explicitly
sets the isolation level on the connection.
- Entity beans with container-managed persistence (CMP): The container generates
database access code that implements the specified isolation level.
Data type |
String |
Range |
Valid values are Serializable, Repeatable read, Read
committed, and Read uncommitted |
- Serializable
- This level prohibits the following types of reads:
- Dirty reads, in which a transaction reads a database row containing
uncommitted changes from a second transaction.
- Nonrepeatable reads, in which one transaction reads a row, a second
transaction changes the same row, and the first transaction rereads the row
and gets a different value.
- Phantom reads, in which one transaction reads all rows that satisfy
an SQL WHERE condition, a second transaction inserts a row that also satisfies
the WHERE condition, and the first transaction applies the same WHERE condition
and gets the row inserted by the second transaction.
- Repeatable read
- This level prohibits dirty reads and nonrepeatable reads, but it allows
phantom reads.
- Read committed
- This level prohibits dirty reads but allows nonrepeatable reads and phantom
reads.
- Read uncommitted
- This level allows dirty reads, nonrepeatable reads, and phantom reads.
- Access intent - Intent type
- Specifies whether to load the enterprise bean as read-only or for
update. This setting is applicable only for EJB 1.x-compliant beans.
This setting is applicable for the following types of beans:
- EJB 1.x-compliant entity beans
- Enterprise beans with CMP version 1.x that are packaged in EJB 2.x-compliant
modules
To specify the access intent for EJB 2.x-compliant beans, select an access
intent policy.
Data type |
String |
Range |
Valid values are Read or Update |
- Finder descriptor - User
- Specifies that the user has provided a finder helper class in the
entity bean's home interface. The class contains specialized finder methods.
This setting is applicable only for EJB 1.x-compliant entity beans.
- Finder descriptor - EJB QL
- Describes the semantics of a finder method that uses EJB QL (Enterprise
JavaBeans query language). This setting is applicable only for EJB 1.x-compliant
entity beans.
EJB QL is a declarative, SQL-like language that is intended to be compiled
to the target language of the persistent datastore used by a persistence manager.
The language is independent of the bean's mapping to a relational datastore
and is therefore portable. The EJB query specifies a search based on the persistent
attributes and relationships of the bean. An EJB query can contain the following
clauses:
- SELECT (optional), which specifies the EJB objects to return
- FROM (required), which specifies the collections of objects to which the
query is to be applied
- WHERE (optional), which contains search predicates over the collections
- ORDER BY (optional), which specifies the ordering of the resulting collection
- Finder descriptor - Full SELECT
- Describes the semantics of a finder method that uses an SQL SELECT
clause. For information on restrictions, see the documentation for the Deployment
Tool for Enterprise JavaBeans.
- Finder descriptor - WHERE clause
- Describes the semantics of a finder method that uses an SQL WHERE
clause. This clause restricts the results that are returned by the query.
For information on restrictions, see the documentation for the Deployment
Tool for Enterprise JavaBeans.
- Security identity
- Specifies whether a principal's credential settings are to be handled
as indicated in the Run-As mode setting. If this is enabled, the Run-As
mode setting can be edited.
- Description
- Contains further information about the security instructions.
- Run-As mode
- Specifies the credential information to be used by the security
service to determine the permissions that a principal has on various resources.
At appropriate points, the security service determines whether the principal
is authorized to use a particular resource based on the principal's permissions.
If the method call is authorized, the security service acts on the principal's
credential settings according to the Run-As mode setting of the enterprise
bean.
Data type |
Enumerated integer |
Range |
Valid values are Use identity of caller, Use identity
of EJB server, and Use identity assigned to specified role |
Additional information about valid values for this setting follows:
- Use identity of caller
- The security service makes no changes to the principal's credential settings.
- Use identity of EJB server
- The security service alters the principal's credential settings to match
the credential settings associated with the EJB server.
- Use identity assigned to specified role
- A principal that has been assigned to the specified security role is used
for the execution of the bean's methods. This association is part of the application
binding in which the role is associated with a user ID and password of a user
who is granted that role.
- Role name
- Specifies the name of a security role. If Run-As mode is
set to Use identity assigned to specified role, a principal that
has been granted this role is used.
- Description
- Contains further information about the security role.