Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transaction ● Goal ● Standards ● Transaction aspect ● How to integrate transaction in BPEL.

Similar presentations


Presentation on theme: "Transaction ● Goal ● Standards ● Transaction aspect ● How to integrate transaction in BPEL."— Presentation transcript:

1 Transaction ● Goal ● Standards ● Transaction aspect ● How to integrate transaction in BPEL

2 Why ● Weak aspect of SOA implementation ● Industry ask for it

3 Goal ● Conceptual model – Transactional requirements – Transactional model ● Tools – Transactional process Conceptual model Infrastructure Tools

4 Standards ● WS-Transaction – Mircosoft, BEA, IBM,... – WS-Atomic Transaction – WS-Business Activity ● Business Transaction Protocol – Oasis – Atom – Cohesion

5 Standards ● WS-Atomic Transaction /BPT-Atom – Extends WS-Coordinator – Highly coupled services – Short in duration – All or nothing – The activity result is visible only after the commit

6 Standards ● WS-Business Activity / BTP Cohesion – Extends WS-Coordinator – Loosely coupled services – Long in duration – The participants can leave the transaction – The activity result is visible – Compensation needed

7 Transaction aspect ● It must identify – Transactional Activity – Transactional Rule – Transactional Model Transactional requirements

8 Transaction aspect ● Transactional Rule – Represents the transactional rule that has to be used in the call req_x() & req_z()

9 Transaction aspect ● Transactional Activity – Represents a transactional activity in the process's business logic

10 Integration of a transaction system with BPEL ● BTP Atomic/Cohesion ● implementation in BPEL ● implementation with a transaction manager

11 BTP ● Le specifiche BTP comprendono in un unico documento la definizione del coordinatore e di due tipologie di transazioni: atomic business transaction (o atom) e cohesive business transaction (o cohesion). ● Le transazioni atomiche permettono a pezzi distribuiti di lavoro di essere raggruppati in una singola unità, in questo modo l’unità viene completata nella sua interezza o viene cancellata nella sua interezza (all-or-nothing). ● Le transazioni coesive prevedono la possibilità che alcuni partecipanti possano non portare a termine il compito assegnatoli. L’insieme dei partecipanti ad una cohesion può cambiare durante la durata della stessa. ● La differenza tra una atom ed una cohesion è che quest’ultima può confermare selettivamente alcuni partecipanti ed annullare il resto.

12 BTP ● BTP specifications are composed by only one document, that includes the definition of the coordinator and two types of transactions: atomic business transaction (or atom) and cohesive business transaction (or cohesion). ● Atomic transactions allow distributed pieces of work to be gathered into a single unit; this unit either completes as a whole, or is cancelled as a whole. In the BTP specification, the coordination of atomic transactions is handled by using the well-known two-phase outcome protocol with presumed abort. ● Cohesive transactions have the possibility that some of the participants might not complete the task that was appointed to them. ● The set of participants in the cohesion can be changed, with participants being added or deleted, to modulate the pool of participants over the lifetime of the cohesion. ● The greater difference between atom and cohesion is that the latter can confirm some of the participants and cancel the others.

13 Cohesion An example Customer coordinator Insurance participant Shipping participant Goods participant Atom

14 Coordinatore AB Participant m m requestContext(TX) CSCS confirm or cancel messaggi di prepare, confirm e cancel confirmed or canceled prepared, not_prepared confirmed and canceled

15

16 coordinator store bank participant user participant

17 inizialize tx [to coordinator] receive context [from coordinator] request, context [to store] request, context [to bank] reply, context_replay [from store] reply, context_replay [from bank] confirm transaction [to coordinator] cancel transaction [to coordinator] result of the transaction [from coordinator] User (initiator)

18 reply, context_replay [to user] request, context [from user] Send context (enrol) [to participant] Bank / Store prepare [from participant] prepared [to participant] not_prepared [to participant] cancel [from participant] cancelled [to participant] cancelled [to participant] cancel [from participant] cancel [from participant] cancelled [to participant] confirm [from participant] confirmed [to participant]

19 context [to user] inizialize_tx [from user] Coordinato r Registrato (enrolled) [to store_p] Registrazione (enroll) [from store_p] Registrazione (enroll) [from bank_p] Registrato (enrolled) [to bank_p] Conferma Transazione [from user] Cancella transazione [from user] prepare [to store_p, bank_p] Response (prepared or not prepared) [from store_p, bank_p] confirm [to store_p, bank_p] confirmed [from store_p, bank_p] Transazione confermata [to user] Transazione cancellata [to user] cancel [to store_p, bank_p] cancelled [from store_p, bank_p]

20 Registrato (enrolled) [from coordinator] Registrazione (enroll) [to coordinator] Participan t Context of the initiator [from bank] prepare [from coordinator] cancel [from coordinator] not_prepared [to coordinator] prepare [to bank] confirm [from coordinator] confirmed [to coordinator] prepared, not_prepared [from bank] confirm [to bank] confirmed [from bank]

21

22

23 Coordinatore BPEL / Java User BEPL Bank BPEL Cohesion Participant BPEL / Java Cohesion 1 23 4 5 6 78 9 1010 11 1212 1313 1414 2 m 2020 1919 1818 1717 1616 1515 2121 m exception s


Download ppt "Transaction ● Goal ● Standards ● Transaction aspect ● How to integrate transaction in BPEL."

Similar presentations


Ads by Google