[jbossts-issues] [JBoss JIRA] (JBTM-977) Specify the order in which lifecycle methods are invoked when multiple of the same type exist

Paul Robinson (Updated) (JIRA) jira-events at lists.jboss.org
Mon Nov 28 08:35:40 EST 2011


     [ https://issues.jboss.org/browse/JBTM-977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Robinson updated JBTM-977:
-------------------------------

         Labels: TXFramework  (was: )
    Component/s:     (was: TxBridge)

    
> Specify the order in which lifecycle methods are invoked when multiple of the same type exist
> ---------------------------------------------------------------------------------------------
>
>                 Key: JBTM-977
>                 URL: https://issues.jboss.org/browse/JBTM-977
>             Project: JBoss Transaction Manager
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>            Reporter: Paul Robinson
>            Assignee: Paul Robinson
>              Labels: TXFramework
>             Fix For: 5.0.0.M2
>
>
> The 'order' attribute on Lifecycle callback annotations (e.g. @Compensate, @Prepare) can be used to ensure that certain lifecycle callbacks precede others during lifecycle processing.  Normally, callbacks are made in the reverse order to that in which their corresponding service request was made. FIRST indicates that the callback should be executed before other NORMAL callbacks registered for the same lifecycle event. LAST indicates that the callback should be executed after other NORMAL callbacks registered for the same lifecycle event. Multiple FIRST or LAST callbacks are sorted in reverse order of registration.
> Example:
> {code}
> @ServiceRequest()
> public void submitOrder(...)
> {
>   ...
> }
> @Compensate
> public void cancelOrder()
> {
>   //Cancel the order
> }
> @Compensate(order=ExecutionOrder.LAST)
> public void notifyAdmin()
> {
>   //Notify an admin that an order was cancelled. 
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbossts-issues mailing list