Created
June 5, 2012 12:58
-
-
Save paulrobinson/2874820 to your computer and use it in GitHub Desktop.
@CompensatedBy discussion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @AT | |
| class MyService | |
| { | |
| @ServiceRequest | |
| @ATTriggers({ @ATTrigger(lifecycleEvent=ATLifecycleEvent.PRPEARE, | |
| methodName="prpeareBooking") | |
| @ATTrigger(lifecycleEvent=ATLifecycleEvent.COMMIT, | |
| methodName="commitBooking") | |
| @ATTrigger(lifecycleEvent=ATLifecycleEvent.ROLLBACK, | |
| methodName="rollbackBooking") }) | |
| int bookTicket(Customer customer, CreditCard card) | |
| void prpeareBooking() {...} | |
| void commitBooking() {...} | |
| void rollbackBooking() {...} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @AT | |
| class MyService | |
| { | |
| @ServiceRequest | |
| int bookTicket(Customer customer, CreditCard card) | |
| @Prepare void prpeareBooking() {...} | |
| @Commit void commitBooking() {...} | |
| @Rollback void rollbackBooking() {...} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @AT | |
| class MyService | |
| { | |
| @ServiceRequest | |
| @ATTriggers({ @ATTrigger(lifecycleEvent=ATLifecycleEvent.PRPEARE, | |
| methodName="prpeareBooking") | |
| @ATTrigger(lifecycleEvent=ATLifecycleEvent.COMMIT, | |
| methodName="commitBooking") | |
| @ATTrigger(lifecycleEvent=ATLifecycleEvent.ROLLBACK, | |
| methodName="rollbackBooking") }) | |
| int bookTicket(Customer customer, CreditCard card) | |
| void prpeareBooking() {...} | |
| void commitBooking() {...} | |
| void rollbackBooking() {...} | |
| @ServiceRequest | |
| @JTATriggers({ @JTATrigger(lifecycleEvent=ATLifecycleEvent.PRPEARE, | |
| methodName="prpeareCancelation") | |
| @JTATrigger(lifecycleEvent=ATLifecycleEvent.COMMIT, | |
| methodName="commitCancelation") | |
| @JTATrigger(lifecycleEvent=ATLifecycleEvent.ROLLBACK, | |
| methodName="rollbackCancelation) }) | |
| int cancelTicket(Customer customer, CreditCard card) | |
| void prpeareCancelation() {...} | |
| void commitCancelation() {...} | |
| void rollbackCancelation() {...} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @AT | |
| class MyService | |
| { | |
| @ServiceRequest | |
| int bookTicket(Customer customer, CreditCard card) | |
| @Prepare(method="bookTicket") void prpeareBooking() {...} | |
| @Commit(method="bookTicket") void commitBooking() {...} | |
| @Rollback(method="bookTicket") void rollbackBooking() {...} | |
| @ServiceRequest | |
| int cancelTicket(Customer customer, CreditCard card) | |
| @Prepare(method="cancelTicket") void prpeareCancelation() {...} | |
| @Commit(method="cancelTicket") void commitCancelation() {...} | |
| @Rollback(method="cancelTicket") void rollbackCancelation() {...} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @BA | |
| class MyService | |
| { | |
| @ServiceRequest | |
| int bookTicket(Customer customer, CreditCard card) | |
| @Compensate(method="bookTicket") void cancelTicket(Customer customer, CreditCard card) {...} | |
| @ServiceRequest | |
| int bookFood(Customer customer, CreditCard card) | |
| @Compensate(method="bookFood") void cancelFood(Customer customer, CreditCard card) {...} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @BA | |
| class MyService | |
| { | |
| @ServiceRequest | |
| int bookTicket(Customer customer, CreditCard card) | |
| @Compensate(method="bookTicket") void cancelTicket(Customer customer, CreditCard card) {...} | |
| @ConfirmCompleted(method="bookTicket") void confirmTicket(boolean confirmed) {...} | |
| @ServiceRequest | |
| int bookFood(Customer customer, CreditCard card) | |
| @Compensate(method="bookFood") void cancelFood(Customer customer, CreditCard card) {...} | |
| @ConfirmCompleted(method="bookFood") void confirmFood(boolean confirmed) {...} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @BA | |
| class MyService | |
| { | |
| @ServiceRequest | |
| @CompensatedBy(method="cancelTicket") | |
| int bookTicket(Customer customer, CreditCard card) | |
| void cancelTicket(Customer customer, CreditCard card) {...} | |
| @ServiceRequest | |
| @CompensatedBy(method="cancelFood") | |
| int bookFood(Customer customer, CreditCard card) | |
| void cancelFood(Customer customer, CreditCard card) {...} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @BA | |
| class MyService | |
| { | |
| @ServiceRequest | |
| @CompensatedBy(method="cancelTicket") | |
| @ConfirmedBy(method="confirmTicket") | |
| int bookTicket(Customer customer, CreditCard card) | |
| void cancelTicket(Customer customer, CreditCard card) {...} | |
| void confirmTicket(boolean confirmed) {...} | |
| @ServiceRequest | |
| @CompensatedBy(method="cancelFood") | |
| @ConfirmedBy(method="confirmFood") | |
| int bookFood(Customer customer, CreditCard card) | |
| void cancelFood(Customer customer, CreditCard card) {...} | |
| void confirmFood(boolean confirmed) {...} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment