ejb.transactionRetry

Globally enables or disables automatic retry of container-managed transactions for components in the module. If automatic retry is enabled, the transaction manager may automatically retry transactions that are rolled back for any reason, including use of the setRollbackOnly API.

To override this setting for individual components or methods, create a <setProperties> command in your user configuration that runs the <transaction> subcommand and sets the retry, retryCount, and retryDelay attributes. For example:

<target name="configure-user">
  <setProperties component="ejb.components.example.MyCompRemote">
    <!-- enable retry for sell transactions, with a retry count of 2
         and a retry delay of 2 seconds (2000 milliseconds). -->
    <transaction method="sell(int, java.lang.String)"
                 type="Required" 
                 retry="true" 
                 retryCount="2" 
                 retryDelay="2000"/>
    <!-- Disable transaction retry for other methods. -->
    <transaction type="Required" 
                 retry="false" />
  </setProperties>
</target>

NoteThe <transaction> type attribute specifies the transaction attribute from the EJB deployment descriptor. Copy the value from the default configuration so as not to change the transactional behavior of the application.