Download presentation
Presentation is loading. Please wait.
Published byDamian Shelton Modified over 8 years ago
1
IBM Software Group ® WebSphere ® Support Technical Exchange Transactions in WebSphere Process Server Lalitha Chandran
2
IBM Software Group WebSphere ® Support Technical Exchange 2 of 34 Agenda Module A Module B Same Transaction
3
IBM Software Group WebSphere ® Support Technical Exchange 3 of 34 Agenda Transactions Invocation Styles Qualifiers Asynchronous behaviors affecting Transaction boundary Examples References Q&A 1
4
IBM Software Group WebSphere ® Support Technical Exchange 4 of 34 Transactions What is transaction? Motivation behind transactions Real-world Example: Transfer of Money Begin Debit Account A Credit Account B Update history log End 2
5
IBM Software Group WebSphere ® Support Technical Exchange 5 of 34 Terminology Global transaction and Local transaction Transaction Boundary Commit/Rollback Container Managed Transaction (CMT) Bean Managed Transaction (BMT)
6
IBM Software Group WebSphere ® Support Technical Exchange 6 of 34 IQA
7
IBM Software Group WebSphere ® Support Technical Exchange 7 of 34 Invocation Styles What is invocation style? Invocation Style Synchronous Asynchronous Effect on transactions Component A Component B
8
IBM Software Group WebSphere ® Support Technical Exchange 8 of 34 Invocation Styles Synchronous invocation The source and the target are executed in the same thread No further processing in caller Asynchronous invocation The source and the target are executed in the different thread Further processing occurs Component A Component B Component A Component B Request Response Request Response
9
IBM Software Group WebSphere ® Support Technical Exchange 9 of 34 Asynchronous Invocation Asynchronous invocation is like snail mail, they are delivered and the sender can continue with other jobs. Once the receiver receives the mail, it is processed. If required, the response is sent later. Component A Component B TX 1TX 2 The message in the queue is not visible unless the transaction within which it was “put” is committed. 3
10
IBM Software Group WebSphere ® Support Technical Exchange 10 of 34 Expected Behavior Parameters affecting invocation style Preferred Interaction Style Request response or one-way operations Target and Source component API Calls How the Source target in invoked 4
11
IBM Software Group WebSphere ® Support Technical Exchange 11 of 34 Examples: Microflow Invocation Styles
12
IBM Software Group WebSphere ® Support Technical Exchange 12 of 34 Actual Behavior Turn on the trace SCA.*=fine Execute the invocation Search in the trace file for "Processing interaction: " Synchronous: Processing interaction: [invoke,getAccount] {MyModule}MyServiceRequestor.component#MyServiceInterfacePartner => {MyModule}MyServiceProvider.component Asychronous: Processing interaction: [invokeAsync,getAccount] {MyModule}MyServiceRequestor.component#MyServiceInterfacePartner => {MyModule}MyServiceProvider.component
13
IBM Software Group WebSphere ® Support Technical Exchange 13 of 34 IQAIQA
14
IBM Software Group WebSphere ® Support Technical Exchange 14 of 34 Qualifiers Types of qualifiers Implementation Qualifiers Interface Qualifiers Reference Qualifiers 5
15
IBM Software Group WebSphere ® Support Technical Exchange 15 of 34 Transaction qualifiers Four Transaction related Qualifiers Transaction (global) Component AComponent B TX Suspend Transaction (false) Join Transaction (true)
16
IBM Software Group WebSphere ® Support Technical Exchange 16 of 34 Transaction qualifiers Asynchronous Invocation (commit|call) Component A Component B TX 1TX 2
17
IBM Software Group WebSphere ® Support Technical Exchange 17 of 34 Transaction qualifiers Asynchronous Invocation (commit|call) Component A Component B TX 1TX 2 Asynchronous Invocation = Commit
18
IBM Software Group WebSphere ® Support Technical Exchange 18 of 34 Transaction qualifiers Asynchronous Invocation (commit|call) Component A Component B TX 1TX 2 Asynchronous Invocation = Call
19
IBM Software Group WebSphere ® Support Technical Exchange 19 of 34 IQA
20
IBM Software Group WebSphere ® Support Technical Exchange 20 of 34 Asynchronous implementations Java™ Component (POJO) that implements the ServiceAsyncImpl interface Long running business process Human tasks JMS import MQ import
21
IBM Software Group WebSphere ® Support Technical Exchange 21 of 34 Sync-over-Async switch When an asynchronous invocation is invoked synchronously, a transaction boundary is introduced Component A Component B TX 1 TX 2 Request Response 6
22
IBM Software Group WebSphere ® Support Technical Exchange 22 of 34 Asynchronous hop reduction An asynchronous import binding is invoked asynchronously An asynchronous export invokes another component asynchronously Component A MQ Export MQ Import When invoking a component asynchronously it is expected for a message to be placed in a queue and a transaction boundary to be introduced. For performance optimization reasons, this asynchronous hop is eliminated. This would change the nature of the invocation to a synchronous one. Eliminating the transaction boundaries. Now the import or the export will execute in the same transaction as Component A. 6
23
IBM Software Group WebSphere ® Support Technical Exchange 23 of 34 Example: MQ Import Scenario POJO invokes MQ import Requirement Import and POJO should execute in the same transaction Reminder: MQ Import is an asynchronous implementation
24
IBM Software Group WebSphere ® Support Technical Exchange 24 of 34 Example: MQ Import POJO MQ Import Synchronous Synch-over-Asynch Swith Since both the POJO and MQ import need to be part of same transaction, POJO would need to invoke the MQ import synchronously. But since MQ Import is an asynchronous implementation, the call will not remain a synchronous one Instead the synch-over-asynch switch will trigger and create a transaction boundary TX 1 TX 2
25
IBM Software Group WebSphere ® Support Technical Exchange 25 of 34 Example: MQ Import POJO MQ Import Asynchronous Synchronous Lets try invoking the MQ import in an asynchronous manner. But due to the asynchronous hop reduction, the call does not remain an asynchronous one The asynchronous hop would eliminate a would be transaction boundary. The POJO and MQ import execute in the same transaction as required.
26
IBM Software Group WebSphere ® Support Technical Exchange 26 of 34 Example: Deadlock Asynchronous Deferred Response Component A Component B Response Request
27
IBM Software Group WebSphere ® Support Technical Exchange 27 of 34 Example: Deadlock Scenario: Request and response are located within the same transaction Asynchronous Invocation = Commit Component A Component B Response Request Transaction boundary 1 Put of the message 3 Commit of transaction 2 Receive a response 1 is waiting for 3 3 is waiting for 2 2 is waiting for 1 6
28
IBM Software Group WebSphere ® Support Technical Exchange 28 of 34 Example: Deadlock Asynchronous Invocation = Call, but this can cause an issue with duplicate messages. Review the article (6) in the references section for correct usage of this invocation style.
29
IBM Software Group WebSphere ® Support Technical Exchange 29 of 34 Example: CICS Global Transaction, Local Transaction Containment (LTC) and Resource Manager Local Transaction GT1GT2GT3 LTC RMLT1 LTC Enterprise Information Systems, Relation databases or JMS queues/topics
30
IBM Software Group WebSphere ® Support Technical Exchange 30 of 34 Example: CICS Requirement: No active J2EE transaction while the Java EE Connector Architecture (JCA) Adapter for CICS is called Set the Resolver attribute to Application in the Enterprise JavaBeans (EJB) deployment descriptor CICS Import Join Transaction (false) 7 8
31
IBM Software Group WebSphere ® Support Technical Exchange 31 of 34 Summary IQA
32
IBM Software Group WebSphere ® Support Technical Exchange 32 of 34 References 1 TransactionsTransactions 2 An introduction to transactionsAn introduction to transactions 3 SCA asynchronous invocation patterns in depthSCA asynchronous invocation patterns in depth 4 Invocation StylesInvocation Styles 5 QualifiersQualifiers 6 Asynchronous processing in WebSphere Process ServerAsynchronous processing in WebSphere Process Server 7 ECI_EXTEND_MODE in JCA Adapter for CICSECI_EXTEND_MODE in JCA Adapter for CICS 8 WebSphere and CICSWebSphere and CICS
33
IBM Software Group WebSphere ® Support Technical Exchange 33 of 34 Additional WebSphere Product Resources Discover the latest trends in WebSphere Technology and implementation, participate in technically-focused briefings, webcasts and podcasts at: http://www.ibm.com/developerworks/websphere/community/ http://www.ibm.com/developerworks/websphere/community/ Learn about other upcoming webcasts, conferences and events: http://www.ibm.com/software/websphere/events_1.html http://www.ibm.com/software/websphere/events_1.html Join the Global WebSphere User Group Community: http://www.websphere.orghttp://www.websphere.org Access key product show-me demos and tutorials by visiting IBM® Education Assistant: http://www.ibm.com/software/info/education/assistant http://www.ibm.com/software/info/education/assistant View a webcast replay with step-by-step instructions for using the Service Request (SR) tool for submitting problems electronically: http://www.ibm.com/software/websphere/support/d2w.html http://www.ibm.com/software/websphere/support/d2w.html Sign up to receive weekly technical My Notifications emails: http://www.ibm.com/software/support/einfo.html http://www.ibm.com/software/support/einfo.html
34
IBM Software Group WebSphere ® Support Technical Exchange 34 of 34 Questions and Answers
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.