Instances tab component properties

Properties on the Instances tab configure how instances of the component are created and bound to server-side threads and client-side object references. The properties are as follows:

Property

Description

Concurrency

Enabling this option allows multiple method invocations to occur simultaneously. Concurrent access can decrease the response time of client method invocations. Enable this option for any component that is thread safe.

If this option is disabled, EJB Server serializes all method calls to the component.

Concurrency applies to execution of all instances

NoteConcurrency option disabled If the Sharing and Bind Thread options are selected, the Concurrency option is implicitly disabled.

Bind Object

Applies to stateful session Beans only. When this property is enabled, an instance is bound to a client's proxy reference until the client destroys or releases the reference.

If you enable this option, your component must be thread-safe; that is, one instance must be able to execute on multiple threads concurrently. A client may call the proxy from multiple threads, or pass the proxy to another process or component; consequently, there is no guarantee that calls are serialized with Bind Object enabled.

Component instances are destroyed when the client instance reference times out (the time out period is configured on the Instances tab–see “Instances tab component properties”). Instances are not pooled.

Bind Object is most commonly used for storage components, which are used to store a component’s state information in a database. See “Persistence tab component properties” for more information on storage components.

Bind Thread

When this option is enabled, component instances are bound to the creating thread. Enable this option if the component uses thread-local storage.

If the Bind Thread option is selected, multiple instances may still run concurrently on separate threads. To ensure that only one instance is active at a time, make sure that the Concurrency option is not selected.

When Bind Thread is enabled, instances are pooled if the Pooling option is enabled. The thread is pooled with the instance in this case.

Pooling

When this option is enabled, component instances are always pooled after deactivation. If you enable the Pooling option in the Adaptive Server plug-in, your component is always pooled, and these methods are not called.

Sharing

When this option is enabled, a single, shared instance of the component services all client requests.

A shared component can store data in instance variables. However, if the component’s Concurrency option is also selected, you must add code to synchronize access to instance variables.

NoteSharing setting overrides Pooling setting If you select both Sharing and Pooling, Sharing takes precedence.

Stateless

For EJB session Beans, the Stateless option is set correctly when the component type is set, and must not be changed.

Transient

For EJB stateful session Beans, this property must be enabled for the standard EJB passivation and activation to occur. It must be disabled if you want to configure a stateful session Bean to support failover using the Persistence tab properties (see “Persistence tab component properties”).

Reentrant

When this option is enabled, an instance is allowed to participate in loopback call sequences, which are call sequences where one of the Bean’s methods calls another component which in turn calls a method in the calling Bean instance. Most Beans are not implemented to support reentrancy, and you must not enable this option unless the Bean developer has verified that the implementation allows it.