SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
# 1
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Reliable asynchronous web-services
with Apache CXF
New CXF transport allowing reliable Web Services based on JMS
transport and JTA transaction.
Florent Benoit, BULL/OW2 [ @florentbenoit ]
Guy Vachet, France Telecom [guy.vachet@orange-ftgroup.com]
# 2
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Context / History
# 3
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
France Telecom Orange context
● Large heterogeneous IS
● Over 3000 interconnected applications
● Since 2006, generalized web services usage with SOAP over HTTP,
in order to:
– standardize exchanges between applications
– create facades between the front end and the legacy back-office
● SOAP over HTTP drawbacks
● Tightly-coupled transport
● Services inaccessible when the provider is inactive
● Difficulty to analyze failures (404-type errors)
● Long-lasting back office operations unadapted to real-time front-end
interactions: we need asynchronism!
# 4
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
SOAP over JMS proposal
● Objectives
● Real asynchronous client-server exchange
● Guarantee the reliability of message delivery (no message loss,
no duplicate)
● JTA Transactional features
– client-side: between its resources and the message sent
– server-side: between message reading and its resources
– similarly for responses
● Technical context
● WSDL first
● Based on CXF2.1
● Standard Java EE context: JOnAS (Java EE) and JORAM (JMS)
# 5
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Limitations of the async. CXF proposal
● Current proposal on Apache side for asynchronous transport
seems to present some limitations:
● One thread per request
– scalability?
● Memory-based mechanism
– recovery after crash?
● No transaction support
– message sending/receiving
●
Our objective: define an alternative solution
● respecting our objectives and context
● to be integrated smoothly in CXF
# 6
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
A new proposal
# 7
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Content of the new Proposal
● Based on Apache CXF
● Use benefits of EJB Message Driven Bean instead of
simple « JMS Message Listener»
● JTA Transaction support (Java EE standard)
● Use of a pool of objects for handling requests
● New CXF Transport: named MDB (url = mdb://)
● Based on some parts of the CXF/JMS library (used for some
functions like building a JMS message from a CXF message)
● 3 parts
● Client: sending and receiving
● Server: endpoint
# 8
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Global architecture view
# 9
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Handling errors [1/2]
# 10
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Handling errors [2/2]
● If there is a failure when a Message Driven Bean is
handling a JMS message, new attempts to redeliver the
message will occur (one retry for each failure as per JMS
specification)
● For each failure:
– Transaction rollback
● All database operations (or involving other XA resources)
are canceled
● Upon reaching a specified number of repetitive failures:
→ Sending the fault message to a « Dead Message Queue »
● JMS Persistent messages
● When we restart servers, all persisted messages will be delivered
– No message loss
# 11
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Prerequisites
● Java EE server: (Tested with JOnAS 5.2.0 M3)
● Java EE 5 application server with EJB 3.1 Singleton bean
support
● Java EE 6 App server
● JMS server (Tested with JOnAS/JORAM)
● Spring is used for the Transport configuration
● Spring already used by CXF
# 12
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Availability [1/2]
● Code hosted on OW2 JOnAS forge
● JOnAS subproject:
– Own life-cycle following CXF releases
● Module available through the OW2 maven
repository (and Maven Central repository)
● Metrics
● 2 interfaces (AsyncHandler and ContextInfo)
● 10 new classes
● ≈ 1500 Lines of code (without examples / tests)
# 13
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Availability [2/2]
● Easy to plug:
→ Add a new MDB CXF transport = Adding MDB
transport jar as library in the class-path
● Integrated with:
● CXF 2.2.x (2.2.11)
● CXF 2.3.x (2.3.0)
● Available by default on JOnAS application
server (nothing to do) → JOnAS 5.2.0 M4
SNAPSHOT
● Wish to contribute back this transport to the
Apache CXF community
# 14
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Demo
# 15
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Demo use-case [1/2]
# 16
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Demo use-case [2/2]
● One server with JMS
● JOnAS hosting all JMS Queues (« endpoint »
queue and «client answer» queue
● JMS server used is JORAM
● 3 JOnAS servers
– JOnAS 1: Sending messages from a client
– JOnAS 2: WS Endpoint
– JOnAS 3: Handling response on the client side
● Crash recovery demo for servers JOnAS2 and
JOnAS3
# 17
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Conclusion
# 18
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Conclusion
● France Telecom Orange started to use this transport.
● Some projects are experimenting this.
● Global idea is to contribute back this MDB protocol to
Apache CXF community
● Available on
http://wiki.jonas.ow2.org/xwiki/bin/view/Main/MDB_Transport_CXF
# 19
OW2 Annual Conference 2010, November 24-25, La Cantine, Paris.
www.ow2.org.
Q & A
Florent Benoit, BULL/OW2 [ @florentbenoit ]
Guy Vachet, France Telecom

Contenu connexe

Similaire à Reliable Asynchronous Web Services on Java EE JOnAS server and Apache CXF

Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...
Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...
Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...
Florent BENOIT
 
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, ParisSOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
OW2
 
Service Oriented Applications in the Clouds with OW2 FraSCAti
Service Oriented Applications in the Clouds with OW2 FraSCAtiService Oriented Applications in the Clouds with OW2 FraSCAti
Service Oriented Applications in the Clouds with OW2 FraSCAti
philippe_merle
 
Sofa2 Q-im ress-ow2-conference-nov10
Sofa2 Q-im ress-ow2-conference-nov10Sofa2 Q-im ress-ow2-conference-nov10
Sofa2 Q-im ress-ow2-conference-nov10
OW2
 
Integrating NLP using Linked Data
Integrating NLP using Linked DataIntegrating NLP using Linked Data
Integrating NLP using Linked Data
Sebastian Hellmann
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center Networking
Thomas Graf
 

Similaire à Reliable Asynchronous Web Services on Java EE JOnAS server and Apache CXF (20)

Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...
Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...
Secure your Java EE projects by using JOnAS Java EE server audit & diagnostic...
 
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, ParisSOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
 
Service Oriented Applications in the Clouds with OW2 FraSCAti
Service Oriented Applications in the Clouds with OW2 FraSCAtiService Oriented Applications in the Clouds with OW2 FraSCAti
Service Oriented Applications in the Clouds with OW2 FraSCAti
 
Sofa2 Q-im ress-ow2-conference-nov10
Sofa2 Q-im ress-ow2-conference-nov10Sofa2 Q-im ress-ow2-conference-nov10
Sofa2 Q-im ress-ow2-conference-nov10
 
Enabling 5G through end-to-end wireless and optical orchestration
Enabling 5G through end-to-end wireless and optical orchestrationEnabling 5G through end-to-end wireless and optical orchestration
Enabling 5G through end-to-end wireless and optical orchestration
 
Event Driven Microservices
Event Driven MicroservicesEvent Driven Microservices
Event Driven Microservices
 
Best practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at RenaultBest practices and lessons learnt from Running Apache NiFi at Renault
Best practices and lessons learnt from Running Apache NiFi at Renault
 
Summit 16: How to Compose a New OPNFV Solution Stack?
Summit 16: How to Compose a New OPNFV Solution Stack?Summit 16: How to Compose a New OPNFV Solution Stack?
Summit 16: How to Compose a New OPNFV Solution Stack?
 
Mazda siv - web services
Mazda   siv - web servicesMazda   siv - web services
Mazda siv - web services
 
NFVO based on ManageIQ - OPNFV Summit 2016 Demo
NFVO based on ManageIQ - OPNFV Summit 2016 DemoNFVO based on ManageIQ - OPNFV Summit 2016 Demo
NFVO based on ManageIQ - OPNFV Summit 2016 Demo
 
Summit 16: OpenStack Tacker - Open Platform for NFV Orchestration
Summit 16: OpenStack Tacker - Open Platform for NFV OrchestrationSummit 16: OpenStack Tacker - Open Platform for NFV Orchestration
Summit 16: OpenStack Tacker - Open Platform for NFV Orchestration
 
Angular2 - A story from the trenches
Angular2 - A story from the trenchesAngular2 - A story from the trenches
Angular2 - A story from the trenches
 
Automation, Agility and NFV
Automation, Agility and NFVAutomation, Agility and NFV
Automation, Agility and NFV
 
1st RINASim Webinar
1st RINASim Webinar1st RINASim Webinar
1st RINASim Webinar
 
Integrating NLP using Linked Data
Integrating NLP using Linked DataIntegrating NLP using Linked Data
Integrating NLP using Linked Data
 
1st RINASim webinar
1st RINASim webinar1st RINASim webinar
1st RINASim webinar
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center Networking
 
Network Virtualization & Software-defined Networking
Network Virtualization & Software-defined NetworkingNetwork Virtualization & Software-defined Networking
Network Virtualization & Software-defined Networking
 
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify: Open vCPE Design Concepts and Multi-Cloud OrchestrationCloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
Cloudify: Open vCPE Design Concepts and Multi-Cloud Orchestration
 
A Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersA Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing Clusters
 

Plus de Florent BENOIT

Build an OSGi Web Console with Adobe Flex Technology and OSGi
Build an OSGi Web Console with Adobe Flex Technology and OSGiBuild an OSGi Web Console with Adobe Flex Technology and OSGi
Build an OSGi Web Console with Adobe Flex Technology and OSGi
Florent BENOIT
 

Plus de Florent BENOIT (19)

Code in the cloud with eclipse che and docker / snowcamp.io 2017
Code in the cloud with eclipse che and docker /  snowcamp.io 2017Code in the cloud with eclipse che and docker /  snowcamp.io 2017
Code in the cloud with eclipse che and docker / snowcamp.io 2017
 
Host any project in che with stacks & chefiles
Host any project in che with stacks & chefilesHost any project in che with stacks & chefiles
Host any project in che with stacks & chefiles
 
Extending Eclipse Che to build custom Cloud IDEs
Extending Eclipse Che to build custom Cloud IDEsExtending Eclipse Che to build custom Cloud IDEs
Extending Eclipse Che to build custom Cloud IDEs
 
Extending Eclipse Che to build custom cloud IDEs
Extending Eclipse Che to build custom cloud IDEsExtending Eclipse Che to build custom cloud IDEs
Extending Eclipse Che to build custom cloud IDEs
 
Code in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerCode in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and Docker
 
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
Eclipse Che: The Next-Gen Eclipse IDE - Bordeaux jug 2016
 
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
Code in the cloud with Eclipse Che and Docker - EclipseCon France 2016
 
Eclipse Che and Artik IDE
Eclipse Che and Artik IDEEclipse Che and Artik IDE
Eclipse Che and Artik IDE
 
Poitou-Charentes JUG 2016 Eclipse Che: The Next-Gen Eclipse IDE
Poitou-Charentes JUG 2016 Eclipse Che: The Next-Gen Eclipse IDEPoitou-Charentes JUG 2016 Eclipse Che: The Next-Gen Eclipse IDE
Poitou-Charentes JUG 2016 Eclipse Che: The Next-Gen Eclipse IDE
 
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDENantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
Nantes Jug 2016 Eclipse Che: The Next-Gen Eclipse IDE
 
Extending Eclipse Che to build custom cloud IDEs
Extending Eclipse Che to build custom cloud IDEsExtending Eclipse Che to build custom cloud IDEs
Extending Eclipse Che to build custom cloud IDEs
 
Eclipse Che : ParisJUG
Eclipse Che : ParisJUGEclipse Che : ParisJUG
Eclipse Che : ParisJUG
 
Code in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and DockerCode in the cloud with Eclipse Che and Docker
Code in the cloud with Eclipse Che and Docker
 
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
 
Introduction to Codenvy / JugSummerCamp 2014
Introduction to Codenvy / JugSummerCamp 2014Introduction to Codenvy / JugSummerCamp 2014
Introduction to Codenvy / JugSummerCamp 2014
 
Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014
 
Build an OSGi Web Console with Adobe Flex Technology and OSGi
Build an OSGi Web Console with Adobe Flex Technology and OSGiBuild an OSGi Web Console with Adobe Flex Technology and OSGi
Build an OSGi Web Console with Adobe Flex Technology and OSGi
 
Create Dynamic console with OSGi and Adobe Flex
Create Dynamic console with OSGi and Adobe FlexCreate Dynamic console with OSGi and Adobe Flex
Create Dynamic console with OSGi and Adobe Flex
 
JOnAS Addons and the deployment for PaaS and SaaS applications
JOnAS Addons and the deployment for PaaS and SaaS applicationsJOnAS Addons and the deployment for PaaS and SaaS applications
JOnAS Addons and the deployment for PaaS and SaaS applications
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Reliable Asynchronous Web Services on Java EE JOnAS server and Apache CXF

  • 1. # 1 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Reliable asynchronous web-services with Apache CXF New CXF transport allowing reliable Web Services based on JMS transport and JTA transaction. Florent Benoit, BULL/OW2 [ @florentbenoit ] Guy Vachet, France Telecom [guy.vachet@orange-ftgroup.com]
  • 2. # 2 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Context / History
  • 3. # 3 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. France Telecom Orange context ● Large heterogeneous IS ● Over 3000 interconnected applications ● Since 2006, generalized web services usage with SOAP over HTTP, in order to: – standardize exchanges between applications – create facades between the front end and the legacy back-office ● SOAP over HTTP drawbacks ● Tightly-coupled transport ● Services inaccessible when the provider is inactive ● Difficulty to analyze failures (404-type errors) ● Long-lasting back office operations unadapted to real-time front-end interactions: we need asynchronism!
  • 4. # 4 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. SOAP over JMS proposal ● Objectives ● Real asynchronous client-server exchange ● Guarantee the reliability of message delivery (no message loss, no duplicate) ● JTA Transactional features – client-side: between its resources and the message sent – server-side: between message reading and its resources – similarly for responses ● Technical context ● WSDL first ● Based on CXF2.1 ● Standard Java EE context: JOnAS (Java EE) and JORAM (JMS)
  • 5. # 5 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Limitations of the async. CXF proposal ● Current proposal on Apache side for asynchronous transport seems to present some limitations: ● One thread per request – scalability? ● Memory-based mechanism – recovery after crash? ● No transaction support – message sending/receiving ● Our objective: define an alternative solution ● respecting our objectives and context ● to be integrated smoothly in CXF
  • 6. # 6 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. A new proposal
  • 7. # 7 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Content of the new Proposal ● Based on Apache CXF ● Use benefits of EJB Message Driven Bean instead of simple « JMS Message Listener» ● JTA Transaction support (Java EE standard) ● Use of a pool of objects for handling requests ● New CXF Transport: named MDB (url = mdb://) ● Based on some parts of the CXF/JMS library (used for some functions like building a JMS message from a CXF message) ● 3 parts ● Client: sending and receiving ● Server: endpoint
  • 8. # 8 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Global architecture view
  • 9. # 9 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Handling errors [1/2]
  • 10. # 10 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Handling errors [2/2] ● If there is a failure when a Message Driven Bean is handling a JMS message, new attempts to redeliver the message will occur (one retry for each failure as per JMS specification) ● For each failure: – Transaction rollback ● All database operations (or involving other XA resources) are canceled ● Upon reaching a specified number of repetitive failures: → Sending the fault message to a « Dead Message Queue » ● JMS Persistent messages ● When we restart servers, all persisted messages will be delivered – No message loss
  • 11. # 11 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Prerequisites ● Java EE server: (Tested with JOnAS 5.2.0 M3) ● Java EE 5 application server with EJB 3.1 Singleton bean support ● Java EE 6 App server ● JMS server (Tested with JOnAS/JORAM) ● Spring is used for the Transport configuration ● Spring already used by CXF
  • 12. # 12 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Availability [1/2] ● Code hosted on OW2 JOnAS forge ● JOnAS subproject: – Own life-cycle following CXF releases ● Module available through the OW2 maven repository (and Maven Central repository) ● Metrics ● 2 interfaces (AsyncHandler and ContextInfo) ● 10 new classes ● ≈ 1500 Lines of code (without examples / tests)
  • 13. # 13 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Availability [2/2] ● Easy to plug: → Add a new MDB CXF transport = Adding MDB transport jar as library in the class-path ● Integrated with: ● CXF 2.2.x (2.2.11) ● CXF 2.3.x (2.3.0) ● Available by default on JOnAS application server (nothing to do) → JOnAS 5.2.0 M4 SNAPSHOT ● Wish to contribute back this transport to the Apache CXF community
  • 14. # 14 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Demo
  • 15. # 15 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Demo use-case [1/2]
  • 16. # 16 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Demo use-case [2/2] ● One server with JMS ● JOnAS hosting all JMS Queues (« endpoint » queue and «client answer» queue ● JMS server used is JORAM ● 3 JOnAS servers – JOnAS 1: Sending messages from a client – JOnAS 2: WS Endpoint – JOnAS 3: Handling response on the client side ● Crash recovery demo for servers JOnAS2 and JOnAS3
  • 17. # 17 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Conclusion
  • 18. # 18 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Conclusion ● France Telecom Orange started to use this transport. ● Some projects are experimenting this. ● Global idea is to contribute back this MDB protocol to Apache CXF community ● Available on http://wiki.jonas.ow2.org/xwiki/bin/view/Main/MDB_Transport_CXF
  • 19. # 19 OW2 Annual Conference 2010, November 24-25, La Cantine, Paris. www.ow2.org. Q & A Florent Benoit, BULL/OW2 [ @florentbenoit ] Guy Vachet, France Telecom