– Whether or not the target object implements
CosTransactions::TransactionalObject.
v Whether or not the client has an OTS transaction when it issues the
method request; and, if so, whether it has issued a previous method
request to the same target object within the scope of the same OTS
transaction.
The routing program is not invoked for route selection when the requested method
of the target object is to run under an existing OTS transaction. (See our definition
of what constitutes a “existing” OTS transaction, in the “Important” labeled box
above.) There are two reasons for a method to be associated with an existing OTS
transaction:
1. A client makes a second or subsequent method call to the same server object
within the scope of the same client OTS transaction, and the called methods
support an external transaction coordinator. For example, a client calls a series
of methods with transaction attribute 'Supports' on a single enterprise bean
instance under a single OTS transaction. The method request carries a
transaction service context containing the OTS transaction ID (TID).
2. A client makes a method call to a stateful session bean object that has started
an OTS transaction in a previous method and not yet committed or rolled back
the transaction.
Thus, to be eligible for to be eligible for dynamic routing:
1. A request must not be for a method that is to run under an existing OTS
transaction.
2. The transaction associated with the method request—that is, the transaction
specified on the REQUESTMODEL definition—must specify DYNAMIC(YES).
“Daisy-chaining” is not supported. That is, once a method request has been routed
to a target region it cannot be re-routed from the target to a third region.
When the distributed routing program is invoked
For method requests for enterprise beans and CORBA stateless objects, where the
method is to run under a new OTS transaction or under no OTS transaction, CICS
invokes the distributed routing program at the following points:
On the routing region:
1. Either of the following:
v For route selection. This occurs when the transaction associated with the
method request—that is, the transaction specified on the
REQUESTMODEL definition—is defined as DYNAMIC(YES).
v For notification of a statically-routed request. This occurs when the
transaction associated with the request is defined as DYNAMIC(NO). The
routing program is not able to route the request. It could, however, do
other things.
2. If an error occurs in route selection—for example, if the target region
returned by the routing program on the route selection call is unavailable.
This gives the routing program the opportunity to specify an alternate target.
This process iterates until the routing program selects a target that is
available or sets a non-zero return code.
3. After CICS has tried (successfully or unsuccessfully) to route the request to
the target region.
632 Customization Guide