Session bean assembly properties

A session bean encapsulates transient data that is associated with a particular EJB client. Unlike data in an entity bean, the data in a session bean is not stored in a persistent data source.

EJB name

Specifies a logical name for the enterprise bean. This name must be unique within the EJB module. There is no relationship between this name and the JNDI name.

Display name

Specifies a short name that is intended to be displayed by GUIs.

Description

Contains text that describes the session bean.

EJB class

Specifies the full name of the enterprise bean class (for example, com.ibm.ejs.doc.account.AccountBean).

Remote - Home

Specifies the full name of the enterprise bean's home interface class (for example, com.ibm.ejs.doc.account.AccountHome).

Remote - Interface

Specifies the full name of the enterprise bean's remote interface class (for example, com.ibm.ejs.doc.account.Account).

Local interface - Home

Specifies the full name of the enterprise bean's home interface class (for example, com.ibm.ejs.doc.account.AccountLocalHome).

Local interface - Interface

Specifies the full name of the enterprise bean's local interface class (for example, com.ibm.ejs.doc.account.AccountLocal).

Session type

Specifies whether the enterprise bean maintains a conversational state (is stateful) or does not (is stateless).
Data type String
Range Valid values are Stateful and Stateless

Transaction type

Specifies whether the enterprise bean manages its own transactions or whether the container manages transactions on behalf of the bean.
Data type String
Range Valid values are Container or Bean

Small icon

Specifies the name of a JPEG or GIF file that contains a small image (16x16 pixels). The image is used as an icon to represent the session bean in a GUI.

Large icon

Specifies the name of a JPEG or GIF file that contains a large image (32x32 pixels). The image is used as an icon to represent the session bean in a GUI.

Security identity

Specifies whether a principal's credential properties are to be handled as indicated in the Run-As mode property. If this setting is enabled (that is, set to true), 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 properties according to the Run-As mode setting of the enterprise bean.

Data type Enumerated integer
Range Valid values are Use identity of caller 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 properties.

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.

Timeout

This property applies only to stateful session beans.

This property is an IBM extension to the standard J2EE deployment descriptor.

Data type Integer
Units Seconds

Inheritance root

Specifies whether the enterprise bean is at the root of an inheritance hierarchy.

This property is an IBM extension to the standard J2EE deployment descriptor.

Bean Cache - Activate at

Specifies the point at which an enterprise bean is activated and placed in the cache. Removal from the cache and passivation is also governed by this setting. This setting applies to stateful session beans only (not to stateless beans).

This property is an IBM extension to the standard J2EE deployment descriptor.

Data type String
Default Once
Range Valid values are Once and Transaction

Additional information about valid values follows:

Once

Indicates that the bean is activated when it is first accessed in the server process, and passivated (and removed from the cache) at the discretion of the container, for example, when the cache becomes full.

Transaction

Indicates that the bean is activated at the start of a transaction and passivated (and removed from the cache) at the end of the transaction.

Local Transactions - Unresolved action

Specifies the action that the EJB container must take if resources are uncommitted by an application in a local transaction.

This property is an IBM extension to the standard J2EE deployment descriptor. This setting is applicable only when Resolution control is set to Application. A local transaction context is created when a method runs in what the EJB specification refers to as an unspecified transaction context.

Data type String
Default Rollback
Range Valid values are Commit and Rollback

Additional information about these settings follows:

Commit

At end of the local transaction context, the container instructs all unresolved local transactions to commit.

Rollback

(Default) At end of the local transaction context, the container instructs all unresolved local transactions to roll back.

Local Transactions - Resolution control

Specifies how the local transaction is to be resolved before the local transaction context ends: by the application through user code or by the EJB container.

This property is an IBM extension to the standard J2EE deployment descriptor.

Data type String
Range Valid values are Application and ContainerAtBoundary

Additional information about these settings follows:

Application

When this setting is used, your code must either commit or roll back the local transaction. If this does not occur, the runtime environment logs a warning and automatically commits or rolls back the connection as specified by the Unresolved action setting.

ContainerAtBoundary

When this setting is used, the container takes responsibility for resolving each local transaction. This provides you with a programming model similar to global transactions in which your code simply gets a connection and performs work within it. User code does not have to handle local transactions.

Connections are never committed automatically by the resource adapter when this value is configured for the bean Unresolved action is not used. An application cannot call Connection.LocalTransaction.begin() when using this policy and receives an exception from the resource adapter if it does so.

When using a Resolution control of ContainerAtBoundary, applications must get connection handles after the local transaction context boundary has been started by the container. The application should close the connection before the end of the boundary, although any work performed on the connection is not committed or rolled back until the local transaction context ends. This model of connection usage is sometimes referred to as the "get-use-close" model.

This value is supported only for EJB components that use container-managed transactions. It is not supported for web components or for enterprise beans that use bean-managed transactions.

Local Transactions - Boundary

Specifies the duration of a local transaction context. This property does not apply to stateless session beans.

This property is an IBM extension to the standard J2EE deployment descriptor.

Data type String
Default BeanMethod
Range Valid values are BeanMethod and ActivitySession

Additional information about valid settings follows:

BeanMethod

When this setting is used, the local transaction begins when the method begins and ends when the method ends.

ActivitySession

When this setting is used, the local transaction must be resolved within the scope of any ActivitySession in which it was started or, if no ActivitySession context is present, within the same bean method in which it was started.

This property can be changed on WAS Enterprise only.

JNDI name

Specifies the JNDI name of the bean's home interface. This is the name under which the enterprise bean's home interface is registered and therefore, is the name that must be specified when an EJB client does a lookup of the home interface.