EAServer can automatically retry transactions that are rolled back—method calls back to the last transaction boundary are retried by the stub code. This feature is useful for EJB CMP entity beans that use optimistic concurrency control.
Auto-retry is not appropriate for all applications. For example, an end user may want to cancel a purchase if the item price has risen. If auto-retry is disabled, clients must be coded to retry or abort transactions that fail because of stale data. The exception thrown is CORBA::TRANSIENT (for EJB clients, this exception is the root cause of the java.rmi.RemoteException thrown by the EJB stub).
Auto-retry must be enabled for the component that initiates the transaction, which is typically a session bean in EJB applications.
To configure automatic retry globally for beans in an EJB module, set the ejb.transactionRetry Ant property to true in the user configuration script. To configure this setting for individual components, set the <transaction> command in a <setProperties> task that configures the component’s remote or local interface, or a specific method in that interface (whichever is used in the call sequence that initiates the container-managed transaction). For details, see the description of the ejb.transactionRetry Ant property in “Commonly configured properties” in Chapter 2, “Deploying and Configuring EJB Components,” of the Enterprise JavaBean User’s Guide.