SlideShare a Scribd company logo
1 of 23
TRANSACTION MIDDLEWARE
2.0 Development
Transactions Advanced
Transactions Advanced
• This lesson gives you some more detailed understand about the
transaction-processing.
• After completing this lesson, you should be able to:
• Desribe the concept of TXM‘s multi-channel-architecture
• Describe the the role of a client-connector and it‘s main tasks
• Objectives
PC/E Architecture
Client
Connector
EIS Protocol
Handler
Session Bean
EIS Logics
EIS Logics
Transactions
BusinessLogic
Journal Bean
Journal
Journal Transformer
Channel Bean
Standard
Develop
Configure
EIS Connector
Card Handling
Bean
Channel Bean
What is the Channel-Bean?
The (SelfService) ChannelBean …
 abstracts the channel-specific concerns (e.g. card-handling)
 is the main entry point to start transactions for client connectors
 creates “Proxy-Objects“ for the transaction EJBs
 is a registry for all supported transactions (transactions are registered via binding-
annotation)
 journalizes transactions automatically (on the way back to include responses)
 allows intercepting all transactions
Transaction-Binding
• Transactions are bound to the Channel-Bean via a binding-annotation
• same concept as binding an EIS-logic to the EIS-ProtocolHandler
@Singleton
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
@TransactionManagement(TransactionManagementType.BEAN)
@Local({IPCELoadPrepaidLogic.class})
@PCEBusinessLogic(channelId=PCEChannelConstant.CHANNEL_CONSTANT_SELFSERVICE_ID)
@Specializes
public class TRLoadPrepaidBean extends PCELoadPrepaidBean {...}
Channel-Bean as a Transaction-Proxy
TXM‘s multi-channel architecture
• When talking about „the channel-bean“, we
usually refer to the Self-Service Business
Channel-Bean (server-sb.jar).
• But there are other channels:
• POS Channel
• Mobile Channel
• Network Channel
• Service Channel
• What channels do exist?
Client-Connector Basics
Client Connectors
EIS Protocol
Handler
Session Bean
EIS Logics
EIS Logics
Transactions
BusinessLogic
Journal Bean
Journal
Journal Transformer
Channel Bean
EIS Connector
Card Handling
Bean
Fat-Client
Connector
NDC
Connector
PCE Connect
Issuer
Connector
SmartClient
Connector
WebService
ClientConnector
What is the Client-Connector?
The Client-Connector abstracts the client-specific concerns like
 converting between client-protocol and server business-objects and APIs
 transactions
 commands
 events
Additionally, performs tasks that need to stay close to the entry-point of the server like
 transaction-number counting
 session- and transaction-consistency
 session- and transaction-persistence
 marking of sensitive data (masked in logs and traces)
 Detecting stale threads
Cluster-wide transaction-state synchronization via
Database
• Datastorage component handles cluster-wide synchronization of the
consumer-session (PCESessionContext) and thus also of the
transaction-state.
• Triggered by the client-connector
• The state is sychronized via the database.
Client
Connector Channel Bean
DATASTORAGE
After: Serialize & Write
SessionContext
Before: Read &
Deserialize
SessionContext
Don‘t put too much data (binary data; e.g. check images) into you objects/mixins.
It gets setrialized and will put pressure on the database.
Session-Context Update
• public class PCELoadPrepaidBean extends PCEBusinessLogicBase implements IPCELoadPrepaidLogic
• {
• public PCELoadPrepaidAuthorizeResponse authorize (PCELoadPrepaid loadprepaid, PCELoadPrepaidAuthorizeRequest request)
• throws PCEException {
• // Initial phase
• loadprepaid.setAuthorizeRequest(request);
• // Business Logic…
• // EISProtocolHandler call always even if there is a response already
• response = createEisProtocolHandler().authorize(loadprepaid, request);
• loadprepaid.setAuthorizeResponse(response);
• // return phase:
• return loadprepaid.getAuthorizeResponse();
• }
• It is the job of the business-logic to update the session/transaction-context.
The Datastorage
• Serialization is done via kryo (github.com/EsotericSoftware/kryo).
• UKA used in the past.
• Serialization method
1
Do you see data in the DATASTORAGE table after executing LoadPrepaid.groovy?
If not, why?
Datastorage
• How to delete the session-state aka „Restart Data“?
TRANSACTIONS ADVANCED
This lesson gave you some more detailed
understand about the transaction-processing.
In this lesson you should have learned to:
• Desribe the concept of TXM‘s multi-channel-
architecture
• Describe the the role of a client-connector and
it‘s main tasks
• Summary
Advanced Concepts
Advanced Transaction Processing
• How to implement cross-cutting logic for multiple transactions?
• How to implelement logic that does not contribute to the transaction-
response?
• E.g. Notifications-style calls, fire-and-forget, …
• How to implement logic that can run asynchroneous?
• Some of the tools you have:
• Channel Interceptors (synchroneous)
• Journal Appenders (synchroneous & asynchroneous)
• Reprocessor
• Async Transaction-Invocation
• Motivation
Channel Interceptor
• API to attach cross-cutting logic to the transaction-pipeline at the channel-
bean.
• e.g. logic that needs to be invoked for multiple/all transactions
• Examples from product
• Counter-Service
• Journal-Service
• Accounting-Periods
• Fee-Service
Details in programmers-manual section „The PCEChannelInterceptor”:
ProgrammerManual_PCESRV_Howto_007_Comment.pdf
Asynchroneous transactions
• Requirement: For doing withdrawal transactions against the host, a
customer-specific ID is needed. This ID can be retrieved from a system by
the bank via a SOAP-call. Providing the card‘s track2-data will return the
ID. Unfortunately, the SLA for the system allows it to take 3 seconds to
process. The customer does not want us to block the ATM-facing
transactions for the duration of this call.
• Idea:
• → Spawn an asynchroneous call during login (we have the track2-data at
this point in time already)
• → Fetch the result in the Withdrawal.authorize
• Example
Async Transaction-Invocation
• Invoke business transactions asynchroneusly…
• via channel-bean
• directly via business-logic
• via EIS Protocol Handler only
• Backed by Hystrix Thread-Pools.
Details in programmer‘s manual. See section „Using asynchronous processing with PC/E”:
ProgrammerManual_PCESRV_Howto_007_Comment.pdf
Async Transaction-Invocation
• // create a reference to execute an AccountSelection asynchronous via the self
• // service channel bean
• private static IPCEAccountSelectionLogic asyncChannel =
PCEAsynchLogicFactory.getAsynchBusinessLogicViaChannel(IPCEAccountSelectionLogic.class,
PCEServerSBChannelConstant.SELFSERVICE_BUSINESS);
• // create a reference to execute an AccountSelection asynchronous without to
• // invoke a channel bean
• private static IPCEAccountSelectionLogic asyncDirect =
PCEAsynchLogicFactory.getAsynchBusinessLogicDirect(IPCEAccountSelectionLogic.class);
• // create a reference to execute an AccountSelection asynchronous without to
• // invoke a business logic
• private static IPCEAccountSelectionLogic asyncEISPHSTP =
PCEAsynchLogicFactory.getAsynchEisPhLogic(IPCEAccountSelectionLogic.class,PCESTPComponentConstant.EIS_STP);
• API – getting the transaction-proxy
Async Transaction-Invocation
• // 1. invoke asynchroneously
• PCEAccountSelectionResponse response =
asyncAccessObject.selectSource(accountSelectionTransaction,
• accountSelectionSelectSourceRequest);
• // 2. check for a result but do not wait/block
• response = response.getResponseFuture(PCEAccountSelectionResponse.
• class).get(0);
• System.out.println(response);
• // 3. check for a result and wait the maximum configured asynchronous
processing time
• response = response.getResponseFuture(PCEAccountSelectionResponse.
• class).get();
• System.out.println(asyncResponse);
• API – getting a response

More Related Content

Similar to transactions-advanced for automatic payment.pptx

BEA_eworld_2001_jta.ppt
BEA_eworld_2001_jta.pptBEA_eworld_2001_jta.ppt
BEA_eworld_2001_jta.pptssuser670564
 
8 application servers_v2
8 application servers_v28 application servers_v2
8 application servers_v2ashish61_scs
 
Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahuDr. Prakash Sahu
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleC2B2 Consulting
 
Building Complex Business Processes 3.7
Building Complex Business Processes 3.7Building Complex Business Processes 3.7
Building Complex Business Processes 3.7StephenKardian
 
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 BostonScaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 Bostonbenbrowning
 
The End of a Myth: Ultra-Scalable Transactional Management
The End of a Myth: Ultra-Scalable Transactional ManagementThe End of a Myth: Ultra-Scalable Transactional Management
The End of a Myth: Ultra-Scalable Transactional ManagementRicardo Jimenez-Peris
 
Introduction to Business Processes 3.7
Introduction to Business Processes 3.7Introduction to Business Processes 3.7
Introduction to Business Processes 3.7StephenKardian
 
AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7WASdev Community
 
AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7Kevin Sutter
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and PracticesLaunchAny
 
Multi-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocketMulti-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocketStéphane Maldini
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS BackendLaurent Cerveau
 
The server side story: Parallel and Asynchronous programming in .NET - ITPro...
The server side story:  Parallel and Asynchronous programming in .NET - ITPro...The server side story:  Parallel and Asynchronous programming in .NET - ITPro...
The server side story: Parallel and Asynchronous programming in .NET - ITPro...Panagiotis Kanavos
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.Renzo Tomà
 
Hyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveHyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveDan Selman
 
Gib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorGib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorDaniel Toomey
 
Kafka and event driven architecture -og yatra20
Kafka and event driven architecture -og yatra20Kafka and event driven architecture -og yatra20
Kafka and event driven architecture -og yatra20Vinay Kumar
 

Similar to transactions-advanced for automatic payment.pptx (20)

BEA_eworld_2001_jta.ppt
BEA_eworld_2001_jta.pptBEA_eworld_2001_jta.ppt
BEA_eworld_2001_jta.ppt
 
8 application servers_v2
8 application servers_v28 application servers_v2
8 application servers_v2
 
Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahu
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
 
Building Complex Business Processes 3.7
Building Complex Business Processes 3.7Building Complex Business Processes 3.7
Building Complex Business Processes 3.7
 
Release it! - Takeaways
Release it! - TakeawaysRelease it! - Takeaways
Release it! - Takeaways
 
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 BostonScaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
 
The End of a Myth: Ultra-Scalable Transactional Management
The End of a Myth: Ultra-Scalable Transactional ManagementThe End of a Myth: Ultra-Scalable Transactional Management
The End of a Myth: Ultra-Scalable Transactional Management
 
Introduction to Business Processes 3.7
Introduction to Business Processes 3.7Introduction to Business Processes 3.7
Introduction to Business Processes 3.7
 
AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7
 
AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7AAI 1713-Introduction to Java EE 7
AAI 1713-Introduction to Java EE 7
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
 
4aa4 5484enw
4aa4 5484enw4aa4 5484enw
4aa4 5484enw
 
Multi-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocketMulti-service reactive streams using Spring, Reactor, RSocket
Multi-service reactive streams using Spring, Reactor, RSocket
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS Backend
 
The server side story: Parallel and Asynchronous programming in .NET - ITPro...
The server side story:  Parallel and Asynchronous programming in .NET - ITPro...The server side story:  Parallel and Asynchronous programming in .NET - ITPro...
The server side story: Parallel and Asynchronous programming in .NET - ITPro...
 
How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.How bol.com makes sense of its logs, using the Elastic technology stack.
How bol.com makes sense of its logs, using the Elastic technology stack.
 
Hyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep DiveHyperleger Composer Architecure Deep Dive
Hyperleger Composer Architecure Deep Dive
 
Gib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk MigratorGib 2021 - Intro to BizTalk Migrator
Gib 2021 - Intro to BizTalk Migrator
 
Kafka and event driven architecture -og yatra20
Kafka and event driven architecture -og yatra20Kafka and event driven architecture -og yatra20
Kafka and event driven architecture -og yatra20
 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Recently uploaded (20)

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 

transactions-advanced for automatic payment.pptx

  • 2. Transactions Advanced • This lesson gives you some more detailed understand about the transaction-processing. • After completing this lesson, you should be able to: • Desribe the concept of TXM‘s multi-channel-architecture • Describe the the role of a client-connector and it‘s main tasks • Objectives
  • 3. PC/E Architecture Client Connector EIS Protocol Handler Session Bean EIS Logics EIS Logics Transactions BusinessLogic Journal Bean Journal Journal Transformer Channel Bean Standard Develop Configure EIS Connector Card Handling Bean
  • 5. What is the Channel-Bean? The (SelfService) ChannelBean …  abstracts the channel-specific concerns (e.g. card-handling)  is the main entry point to start transactions for client connectors  creates “Proxy-Objects“ for the transaction EJBs  is a registry for all supported transactions (transactions are registered via binding- annotation)  journalizes transactions automatically (on the way back to include responses)  allows intercepting all transactions
  • 6. Transaction-Binding • Transactions are bound to the Channel-Bean via a binding-annotation • same concept as binding an EIS-logic to the EIS-ProtocolHandler @Singleton @ConcurrencyManagement(ConcurrencyManagementType.BEAN) @TransactionManagement(TransactionManagementType.BEAN) @Local({IPCELoadPrepaidLogic.class}) @PCEBusinessLogic(channelId=PCEChannelConstant.CHANNEL_CONSTANT_SELFSERVICE_ID) @Specializes public class TRLoadPrepaidBean extends PCELoadPrepaidBean {...}
  • 7. Channel-Bean as a Transaction-Proxy
  • 8. TXM‘s multi-channel architecture • When talking about „the channel-bean“, we usually refer to the Self-Service Business Channel-Bean (server-sb.jar). • But there are other channels: • POS Channel • Mobile Channel • Network Channel • Service Channel • What channels do exist?
  • 10. Client Connectors EIS Protocol Handler Session Bean EIS Logics EIS Logics Transactions BusinessLogic Journal Bean Journal Journal Transformer Channel Bean EIS Connector Card Handling Bean Fat-Client Connector NDC Connector PCE Connect Issuer Connector SmartClient Connector WebService ClientConnector
  • 11. What is the Client-Connector? The Client-Connector abstracts the client-specific concerns like  converting between client-protocol and server business-objects and APIs  transactions  commands  events Additionally, performs tasks that need to stay close to the entry-point of the server like  transaction-number counting  session- and transaction-consistency  session- and transaction-persistence  marking of sensitive data (masked in logs and traces)  Detecting stale threads
  • 12. Cluster-wide transaction-state synchronization via Database • Datastorage component handles cluster-wide synchronization of the consumer-session (PCESessionContext) and thus also of the transaction-state. • Triggered by the client-connector • The state is sychronized via the database. Client Connector Channel Bean DATASTORAGE After: Serialize & Write SessionContext Before: Read & Deserialize SessionContext Don‘t put too much data (binary data; e.g. check images) into you objects/mixins. It gets setrialized and will put pressure on the database.
  • 13. Session-Context Update • public class PCELoadPrepaidBean extends PCEBusinessLogicBase implements IPCELoadPrepaidLogic • { • public PCELoadPrepaidAuthorizeResponse authorize (PCELoadPrepaid loadprepaid, PCELoadPrepaidAuthorizeRequest request) • throws PCEException { • // Initial phase • loadprepaid.setAuthorizeRequest(request); • // Business Logic… • // EISProtocolHandler call always even if there is a response already • response = createEisProtocolHandler().authorize(loadprepaid, request); • loadprepaid.setAuthorizeResponse(response); • // return phase: • return loadprepaid.getAuthorizeResponse(); • } • It is the job of the business-logic to update the session/transaction-context.
  • 14. The Datastorage • Serialization is done via kryo (github.com/EsotericSoftware/kryo). • UKA used in the past. • Serialization method 1 Do you see data in the DATASTORAGE table after executing LoadPrepaid.groovy? If not, why?
  • 15. Datastorage • How to delete the session-state aka „Restart Data“?
  • 16. TRANSACTIONS ADVANCED This lesson gave you some more detailed understand about the transaction-processing. In this lesson you should have learned to: • Desribe the concept of TXM‘s multi-channel- architecture • Describe the the role of a client-connector and it‘s main tasks • Summary
  • 18. Advanced Transaction Processing • How to implement cross-cutting logic for multiple transactions? • How to implelement logic that does not contribute to the transaction- response? • E.g. Notifications-style calls, fire-and-forget, … • How to implement logic that can run asynchroneous? • Some of the tools you have: • Channel Interceptors (synchroneous) • Journal Appenders (synchroneous & asynchroneous) • Reprocessor • Async Transaction-Invocation • Motivation
  • 19. Channel Interceptor • API to attach cross-cutting logic to the transaction-pipeline at the channel- bean. • e.g. logic that needs to be invoked for multiple/all transactions • Examples from product • Counter-Service • Journal-Service • Accounting-Periods • Fee-Service Details in programmers-manual section „The PCEChannelInterceptor”: ProgrammerManual_PCESRV_Howto_007_Comment.pdf
  • 20. Asynchroneous transactions • Requirement: For doing withdrawal transactions against the host, a customer-specific ID is needed. This ID can be retrieved from a system by the bank via a SOAP-call. Providing the card‘s track2-data will return the ID. Unfortunately, the SLA for the system allows it to take 3 seconds to process. The customer does not want us to block the ATM-facing transactions for the duration of this call. • Idea: • → Spawn an asynchroneous call during login (we have the track2-data at this point in time already) • → Fetch the result in the Withdrawal.authorize • Example
  • 21. Async Transaction-Invocation • Invoke business transactions asynchroneusly… • via channel-bean • directly via business-logic • via EIS Protocol Handler only • Backed by Hystrix Thread-Pools. Details in programmer‘s manual. See section „Using asynchronous processing with PC/E”: ProgrammerManual_PCESRV_Howto_007_Comment.pdf
  • 22. Async Transaction-Invocation • // create a reference to execute an AccountSelection asynchronous via the self • // service channel bean • private static IPCEAccountSelectionLogic asyncChannel = PCEAsynchLogicFactory.getAsynchBusinessLogicViaChannel(IPCEAccountSelectionLogic.class, PCEServerSBChannelConstant.SELFSERVICE_BUSINESS); • // create a reference to execute an AccountSelection asynchronous without to • // invoke a channel bean • private static IPCEAccountSelectionLogic asyncDirect = PCEAsynchLogicFactory.getAsynchBusinessLogicDirect(IPCEAccountSelectionLogic.class); • // create a reference to execute an AccountSelection asynchronous without to • // invoke a business logic • private static IPCEAccountSelectionLogic asyncEISPHSTP = PCEAsynchLogicFactory.getAsynchEisPhLogic(IPCEAccountSelectionLogic.class,PCESTPComponentConstant.EIS_STP); • API – getting the transaction-proxy
  • 23. Async Transaction-Invocation • // 1. invoke asynchroneously • PCEAccountSelectionResponse response = asyncAccessObject.selectSource(accountSelectionTransaction, • accountSelectionSelectSourceRequest); • // 2. check for a result but do not wait/block • response = response.getResponseFuture(PCEAccountSelectionResponse. • class).get(0); • System.out.println(response); • // 3. check for a result and wait the maximum configured asynchronous processing time • response = response.getResponseFuture(PCEAccountSelectionResponse. • class).get(); • System.out.println(asyncResponse); • API – getting a response

Editor's Notes

  1. Everything behind behind the clientconnector should be independent of the particular client Everything behind the channel should be independent of the particular channel. E.g. a transfer transaction might be invoked by the ATM channel or the online-banking channel The main processing chain works as follows: Basically the Client Connector generic method “invoke” is called from the Web Container supplying the request data. For consumer session handling some additional public methods like “login”, “logout” are provided by the Client Connector calling the Session Bean and the CardHandling Bean. Additionally the server based restart handling is done by the Client Connector. The relevant Channel Bean (like Self Service or POS) basically is a common entry point (factory) that fetches the requested transaction bean with “createBusinessLogic” and routes the special business methods (authorize, finalize, etc.) to the generic method “invoke”. Before that call the channel specific method “preInvoke” is called supporting some services like accounting and other transaction independent tasks via registered channel interceptors. When the transaction call returns the methods “postInvoke” and “journalize” are called. The last one calls the Journal Bean that writes the transaction data to the database table “Journal” using Transformers to fetch the relevant data from the transaction. All the different Transaction EJBs are normally (but not urgently) calling the EISPH Dispatcher via its generic method “invoke”. (Because of the common interface you may simply change the deployment descriptor to call another Transaction EJB instead, if meaningful.) The EISPH Dispatcher is a factory selecting the relevant EIS Protocol Handler dependent on the supplied data before calling it via the generic method “invoke”. Each EIS Protocol Handler (EISPH) represents an Enterprise Information System (EIS) like a host and is responsible for converting the PC/E data to the EIS specific representation and vice versa. Corresponding to each different transaction an EISLogic Bean is registered at the EISLogic Factory. The EISPH calls the relevant EISLogic Bean via the Factory to perform the transaction specific conversions. Typically (but not urgently) an EISPH is connected to a JCA Resource Adapter providing a connection pool to the EIS called EISConnector. Additionally the EISPH prepares some services to be used by the EISLogic Beans. The protocol specific EISConnector sends the prepared request data to the EIS and reads the response read from the EIS using its specific protocol. The received data is returned to the EISPH that converts it back to the PC/E data representation.
  2. Remark that response codes are very important ClientConnectorBase checkSession checks for pending transactions resp. sequence of authorize  finalize
  3. Answer: The Groovy-based Server-Simulator is no full/real client. That‘s why it is so important to also do testing with the real ATM/client-connector.
  4. channel-interceptor first because journal service is based on intercetor mechanism? is it?