SlideShare a Scribd company logo
1 of 15
Transactional OSGi applications done right 				    & Karl Pauls Clement Escoffier      		, akquinet
Outline Transactions ??? OSGi Transaction Service (RFC-98) Transaction & Dynamism … From “Hell” to the “EJB3-paradise” 2 Transactional OSGi applications done right
Transactions ??? Transactions are a mechanism that allows endowing a sequence of actions with the properties of a single atomic (indivisible) action. 3 Transactional OSGi applications done right
Transactions ??? Properties (Failure) Atomicity : the action is performed either entirely or not at all Consistency : from a consistent state to another consistent state Isolation: no intermediate states are visible to any concurrently executing action. Durability: after a transaction has committed, the changes that it made are immune to failures (catastrophes excluded). Transactions are a mechanism that allows endowing a sequence of actions with the properties of a single atomic (indivisible) action. 4 Transactional OSGi applications done right
Transactions ?? Transaction Engine commit begin Sequence of actions rollback 5 Transactional OSGi applications done right Uses Resources
Why an OSGi Transaction Service ? A lot of OSGi applications deals with Devices Database Remote resources and services => Need transactions to ensure the system consistency 6 Transactional OSGi applications done right
OSGi Transaction Service Based on Java Transaction API XA resources Transaction-aware “critical” resources JTA common interfaces are provided as OSGi services User Transaction: programmatic transactions Transaction Synchronization Registry: used by server components such as persistence managers to register synchronization object Transaction Manager:  allows the server to control transaction boundaries on behalf of the application being managed.  7 Transactional OSGi applications done right
OSGi Transaction Service ServiceReferencetxRef =      bundleContext.getServiceReference("javax.transaction.UserTransaction");  UserTransactiontx = (UserTransaction)bundleContext.getService(txRef);           // begin transaction  tx.begin();      // perform some operations in the context of the transaction      try {        // Create a transactional resource  ConfigResourceconfig = ...;        // Perform some transactional work        Configuration x = config.createConfiguration("abc");  tx.commit(); // make changes persistent      } catch (Throwableth) {  tx.rollback(); // rollback changes.       }  8 Transactional OSGi applications done right
Great … but 9 Transactional OSGi applications done right
Dynamism impact … How to automate transaction management ? What happens when a transaction “thread” accesses a service leaving before the end of the transaction ? How to support dynamism with XA resources and volatile resources ? The OSGi Transaction service provides everything to go further !    10 Transactional OSGi applications done right
The “EJB dream” Avoid the developer to manage transactions manually Transaction demarcation:method Transactional method declares the transaction propagation REQUIRED, REQUIRES_NEW, SUPPORTS, NOT_SUPPORTED,   MANDATORY, NEVER The transaction management is made by the container @TransactionAttribute(REQUIRES_NEW) 		public void firstMethod() {...} 		@TransactionAttribute(REQUIRED) 		public void secondMethod() {...} 11 Transactional OSGi applications done right
iPOJO Transaction Supports iPOJO Transaction handler Automates transaction management Allows using transaction just like with EJB @Transaction public class MyClass { 	@Requires 	public FooServicefoo; 	@Transactionnal(propagation="requiresnew") 	public void firstMethod () { // ... foo.foo(); // Invoke a service //... 	} 		  @Transactionnal (propagation=“required”) 		  public void secondMethod() {...} 	          // …    } 12 Transactional OSGi applications done right
iPOJO Transaction and dynamism How to automate transaction management ? The transaction management is made by the container Flexible  Allows injecting the current Transaction inside a field Can notify the POJO of the current transaction progress What happens when a transaction “thread” accesses a service leaving before the end of the transaction ? The transaction is roll backed as soon as an instance becomes invalid How to support dynamism inside XA resources and volatile resources ?    The Transactional Service Providing handler emulates XA Resources or Volatile resources Experimental… 13 Transactional OSGi applications done right
Conclusion Transactions are becoming more and more important inside OSGi applications The Transaction Service is definitely Welcome THANKS ! However, we’ve to take care to avoid the Transaction Nightmare iPOJO proposes EJB-like transaction management reducing the pain ! 14 Transactional OSGi applications done right
Questions ? Transactional OSGi applications done right 15 Karl Paulskarl.pauls@akquinet.de Bülowstraße 66, 10783 Berlin+49 151 226 49 845 Dr.  Clement Escoffierclement.escoffier@akquinet.de Bülowstraße 66, 10783 Berlin+49 175 246 77 17

More Related Content

What's hot

Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafIoan Eugen Stan
 
Apache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEApache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEmahrwald
 
How to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS LambdaHow to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS LambdaVery
 
Application Rollout - Istio
Application Rollout - Istio Application Rollout - Istio
Application Rollout - Istio Mandar Jog
 
Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...Lucas Jellema
 
Modern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.xModern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.xThomas Segismont
 
Introduction to Kong API Gateway
Introduction to Kong API GatewayIntroduction to Kong API Gateway
Introduction to Kong API GatewayYohann Ciurlik
 
New in Spring Framework 5.0: Functional Web Framework
New in Spring Framework 5.0: Functional Web FrameworkNew in Spring Framework 5.0: Functional Web Framework
New in Spring Framework 5.0: Functional Web FrameworkVMware Tanzu
 
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...ScyllaDB
 
Introduction to Istio Service Mesh
Introduction to Istio Service MeshIntroduction to Istio Service Mesh
Introduction to Istio Service MeshGeorgios Andrianakis
 
Kong API Gateway
Kong API Gateway Kong API Gateway
Kong API Gateway Chris Mague
 
Migrating our micro services from Java to Kotlin (Code.Talks 2018)
Migrating our micro services from Java to Kotlin (Code.Talks 2018)Migrating our micro services from Java to Kotlin (Code.Talks 2018)
Migrating our micro services from Java to Kotlin (Code.Talks 2018)Björn Wendland
 
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulService Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulFrank Lyaruu
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...Frank Lyaruu
 
Kuberntes Ingress with Kong
Kuberntes Ingress with KongKuberntes Ingress with Kong
Kuberntes Ingress with KongNebulaworks
 
REAL Expert Alliance OCI series part 4 - OKE
REAL Expert Alliance OCI series part 4 - OKEREAL Expert Alliance OCI series part 4 - OKE
REAL Expert Alliance OCI series part 4 - OKERolando Carrasco
 
Scripting Languages in OSGi
Scripting Languages in OSGiScripting Languages in OSGi
Scripting Languages in OSGiFrank Lyaruu
 
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Lucas Jellema
 
Agile Development with OSGi
Agile Development with OSGiAgile Development with OSGi
Agile Development with OSGiMatt Stine
 
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo RulliOSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rullimfrancis
 

What's hot (20)

Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache Karaf
 
Apache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEApache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEE
 
How to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS LambdaHow to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS Lambda
 
Application Rollout - Istio
Application Rollout - Istio Application Rollout - Istio
Application Rollout - Istio
 
Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 3 of the REAL Webinars on Oracle Cloud Native Application Development (J...
 
Modern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.xModern app programming with RxJava and Eclipse Vert.x
Modern app programming with RxJava and Eclipse Vert.x
 
Introduction to Kong API Gateway
Introduction to Kong API GatewayIntroduction to Kong API Gateway
Introduction to Kong API Gateway
 
New in Spring Framework 5.0: Functional Web Framework
New in Spring Framework 5.0: Functional Web FrameworkNew in Spring Framework 5.0: Functional Web Framework
New in Spring Framework 5.0: Functional Web Framework
 
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
 
Introduction to Istio Service Mesh
Introduction to Istio Service MeshIntroduction to Istio Service Mesh
Introduction to Istio Service Mesh
 
Kong API Gateway
Kong API Gateway Kong API Gateway
Kong API Gateway
 
Migrating our micro services from Java to Kotlin (Code.Talks 2018)
Migrating our micro services from Java to Kotlin (Code.Talks 2018)Migrating our micro services from Java to Kotlin (Code.Talks 2018)
Migrating our micro services from Java to Kotlin (Code.Talks 2018)
 
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulService Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
Kuberntes Ingress with Kong
Kuberntes Ingress with KongKuberntes Ingress with Kong
Kuberntes Ingress with Kong
 
REAL Expert Alliance OCI series part 4 - OKE
REAL Expert Alliance OCI series part 4 - OKEREAL Expert Alliance OCI series part 4 - OKE
REAL Expert Alliance OCI series part 4 - OKE
 
Scripting Languages in OSGi
Scripting Languages in OSGiScripting Languages in OSGi
Scripting Languages in OSGi
 
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
 
Agile Development with OSGi
Agile Development with OSGiAgile Development with OSGi
Agile Development with OSGi
 
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo RulliOSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rulli
 

Viewers also liked

Modular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim WardModular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim Wardmfrancis
 
Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...
Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...
Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...mfrancis
 
Chapter 10 - Added Values
Chapter 10 - Added ValuesChapter 10 - Added Values
Chapter 10 - Added Valueswenchein huang
 
Castello Normanno Di Adrano
Castello Normanno Di AdranoCastello Normanno Di Adrano
Castello Normanno Di AdranoYvonne Sgroi
 
Know Your Enemy
Know Your EnemyKnow Your Enemy
Know Your Enemytlineshill
 
Dm95 slide presentasi_maskot_ponxix_hanum_sujana
Dm95 slide presentasi_maskot_ponxix_hanum_sujanaDm95 slide presentasi_maskot_ponxix_hanum_sujana
Dm95 slide presentasi_maskot_ponxix_hanum_sujanaHanum Sujana
 
Fantastic Photography
Fantastic  PhotographyFantastic  Photography
Fantastic Photographylewisj2111
 
Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...
Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...
Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...Circles of San Antonio Community Coalition
 
BEACON 101: Sequencing tech
BEACON 101: Sequencing techBEACON 101: Sequencing tech
BEACON 101: Sequencing techc.titus.brown
 
Understanding Facebook Places
Understanding Facebook PlacesUnderstanding Facebook Places
Understanding Facebook PlacesMarco Pacifico
 
Turning event attendees into active active participants
Turning event attendees into active active participantsTurning event attendees into active active participants
Turning event attendees into active active participantsLive Union
 
Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012c.titus.brown
 
Vrouwen In Het Management
Vrouwen In Het ManagementVrouwen In Het Management
Vrouwen In Het ManagementAydin Kintziger
 
Ondernemen in de toekomst
Ondernemen in de toekomstOndernemen in de toekomst
Ondernemen in de toekomstPiet van Vugt
 
The Power of Section 1031 for Accounting Professionals
The Power of Section 1031 for Accounting ProfessionalsThe Power of Section 1031 for Accounting Professionals
The Power of Section 1031 for Accounting ProfessionalsEdmund_Wheeler
 
Intellisoft introduction @ Recruitment Camp L131229
Intellisoft introduction @ Recruitment Camp L131229Intellisoft introduction @ Recruitment Camp L131229
Intellisoft introduction @ Recruitment Camp L131229Sham Yemul
 

Viewers also liked (20)

Modular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim WardModular EJBs in OSGi - Tim Ward
Modular EJBs in OSGi - Tim Ward
 
Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...
Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...
Keynote - Integrating the OSGi Service-Oriented Architecture into the Enterpr...
 
Cope Manifesto
Cope ManifestoCope Manifesto
Cope Manifesto
 
Chapter 10 - Added Values
Chapter 10 - Added ValuesChapter 10 - Added Values
Chapter 10 - Added Values
 
Castello Normanno Di Adrano
Castello Normanno Di AdranoCastello Normanno Di Adrano
Castello Normanno Di Adrano
 
Know Your Enemy
Know Your EnemyKnow Your Enemy
Know Your Enemy
 
Dm95 slide presentasi_maskot_ponxix_hanum_sujana
Dm95 slide presentasi_maskot_ponxix_hanum_sujanaDm95 slide presentasi_maskot_ponxix_hanum_sujana
Dm95 slide presentasi_maskot_ponxix_hanum_sujana
 
Langkah Membuat Blogspot
Langkah Membuat BlogspotLangkah Membuat Blogspot
Langkah Membuat Blogspot
 
Fantastic Photography
Fantastic  PhotographyFantastic  Photography
Fantastic Photography
 
Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...
Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...
Circles of San Antonio Community Coalition and Bexar County DWI Task Force Ho...
 
BEACON 101: Sequencing tech
BEACON 101: Sequencing techBEACON 101: Sequencing tech
BEACON 101: Sequencing tech
 
Understanding Facebook Places
Understanding Facebook PlacesUnderstanding Facebook Places
Understanding Facebook Places
 
Turning event attendees into active active participants
Turning event attendees into active active participantsTurning event attendees into active active participants
Turning event attendees into active active participants
 
2015 pag-chicken
2015 pag-chicken2015 pag-chicken
2015 pag-chicken
 
Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012Talk at Bioinformatics Open Source Conference, 2012
Talk at Bioinformatics Open Source Conference, 2012
 
Vrouwen In Het Management
Vrouwen In Het ManagementVrouwen In Het Management
Vrouwen In Het Management
 
About BMC
About BMCAbout BMC
About BMC
 
Ondernemen in de toekomst
Ondernemen in de toekomstOndernemen in de toekomst
Ondernemen in de toekomst
 
The Power of Section 1031 for Accounting Professionals
The Power of Section 1031 for Accounting ProfessionalsThe Power of Section 1031 for Accounting Professionals
The Power of Section 1031 for Accounting Professionals
 
Intellisoft introduction @ Recruitment Camp L131229
Intellisoft introduction @ Recruitment Camp L131229Intellisoft introduction @ Recruitment Camp L131229
Intellisoft introduction @ Recruitment Camp L131229
 

Similar to Transactional OSGi Apps Done Right With iPOJO Transactions

Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction HandlingGaurav Arora
 
Session 9 Tp9
Session 9 Tp9Session 9 Tp9
Session 9 Tp9phanleson
 
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...AFAS Software
 
Effective Spring Transaction Management
Effective Spring Transaction ManagementEffective Spring Transaction Management
Effective Spring Transaction ManagementUMA MAHESWARI
 
Spring Transaction Management
Spring Transaction ManagementSpring Transaction Management
Spring Transaction ManagementYe Win
 
Transaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in JavaTransaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in JavaErsen Öztoprak
 
Service oriented component model
Service oriented component modelService oriented component model
Service oriented component modelravindrareddy
 
Windows Server 2008 for Developers - Part 2
Windows Server 2008 for Developers - Part 2Windows Server 2008 for Developers - Part 2
Windows Server 2008 for Developers - Part 2ukdpe
 
Ui path certificate question set 1
Ui path certificate question set 1Ui path certificate question set 1
Ui path certificate question set 1Majid Hashmi
 
Devops presentation
Devops presentationDevops presentation
Devops presentationk9ert
 
Ruslan Platonov - Transactions
Ruslan Platonov - TransactionsRuslan Platonov - Transactions
Ruslan Platonov - TransactionsDmitry Buzdin
 
The dude's guide to database consistency
The dude's guide to database consistencyThe dude's guide to database consistency
The dude's guide to database consistencyTilak Patidar
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleSudhir Tonse
 
Foomo / Zugspitze Presentation
Foomo / Zugspitze PresentationFoomo / Zugspitze Presentation
Foomo / Zugspitze Presentationweareinteractive
 
Run OSGi on your robot and teach it new tricks - T Verbelen
Run OSGi on your robot and teach it new tricks - T VerbelenRun OSGi on your robot and teach it new tricks - T Verbelen
Run OSGi on your robot and teach it new tricks - T Verbelenmfrancis
 

Similar to Transactional OSGi Apps Done Right With iPOJO Transactions (20)

Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
 
Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction Handling
 
Session 9 Tp9
Session 9 Tp9Session 9 Tp9
Session 9 Tp9
 
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
 
Effective Spring Transaction Management
Effective Spring Transaction ManagementEffective Spring Transaction Management
Effective Spring Transaction Management
 
Spring Transaction Management
Spring Transaction ManagementSpring Transaction Management
Spring Transaction Management
 
Ho20
Ho20Ho20
Ho20
 
Transaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in JavaTransaction and concurrency pitfalls in Java
Transaction and concurrency pitfalls in Java
 
Service oriented component model
Service oriented component modelService oriented component model
Service oriented component model
 
05 Transactions
05 Transactions05 Transactions
05 Transactions
 
Windows Server 2008 for Developers - Part 2
Windows Server 2008 for Developers - Part 2Windows Server 2008 for Developers - Part 2
Windows Server 2008 for Developers - Part 2
 
Windows Workflow Foundation
Windows Workflow FoundationWindows Workflow Foundation
Windows Workflow Foundation
 
Ui path certificate question set 1
Ui path certificate question set 1Ui path certificate question set 1
Ui path certificate question set 1
 
Devops presentation
Devops presentationDevops presentation
Devops presentation
 
Ruslan Platonov - Transactions
Ruslan Platonov - TransactionsRuslan Platonov - Transactions
Ruslan Platonov - Transactions
 
The dude's guide to database consistency
The dude's guide to database consistencyThe dude's guide to database consistency
The dude's guide to database consistency
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scale
 
Dbms module iii
Dbms module iiiDbms module iii
Dbms module iii
 
Foomo / Zugspitze Presentation
Foomo / Zugspitze PresentationFoomo / Zugspitze Presentation
Foomo / Zugspitze Presentation
 
Run OSGi on your robot and teach it new tricks - T Verbelen
Run OSGi on your robot and teach it new tricks - T VerbelenRun OSGi on your robot and teach it new tricks - T Verbelen
Run OSGi on your robot and teach it new tricks - T Verbelen
 

More from Clément Escoffier

Devoxx France 2023 - 1,2,3 Quarkus.pdf
Devoxx France 2023 - 1,2,3 Quarkus.pdfDevoxx France 2023 - 1,2,3 Quarkus.pdf
Devoxx France 2023 - 1,2,3 Quarkus.pdfClément Escoffier
 
vert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in Javavert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in JavaClément Escoffier
 
Modularity and Dynamism - The tale of two sisters
Modularity and Dynamism - The tale of two sistersModularity and Dynamism - The tale of two sisters
Modularity and Dynamism - The tale of two sistersClément Escoffier
 
h-ubu - An industrial-strength service-oriented component model for JavaScrip...
h-ubu - An industrial-strength service-oriented component model for JavaScrip...h-ubu - An industrial-strength service-oriented component model for JavaScrip...
h-ubu - An industrial-strength service-oriented component model for JavaScrip...Clément Escoffier
 
iPOJO 2.x - a tale about dynamism
iPOJO 2.x - a tale about dynamismiPOJO 2.x - a tale about dynamism
iPOJO 2.x - a tale about dynamismClément Escoffier
 
Everest - Everything is a resource
Everest - Everything is a resourceEverest - Everything is a resource
Everest - Everything is a resourceClément Escoffier
 
Linuxtag 2012 - continuous delivery - dream to reality
Linuxtag 2012  - continuous delivery - dream to realityLinuxtag 2012  - continuous delivery - dream to reality
Linuxtag 2012 - continuous delivery - dream to realityClément Escoffier
 
The OSGi Framework Multiplication
The OSGi Framework MultiplicationThe OSGi Framework Multiplication
The OSGi Framework MultiplicationClément Escoffier
 
Android : a linux-based mobile operating system
Android : a linux-based mobile operating systemAndroid : a linux-based mobile operating system
Android : a linux-based mobile operating systemClément Escoffier
 
Experimenting with the OSGi platform in the Aspire RFID middleware
Experimenting with the OSGi platform in the Aspire RFID middlewareExperimenting with the OSGi platform in the Aspire RFID middleware
Experimenting with the OSGi platform in the Aspire RFID middlewareClément Escoffier
 

More from Clément Escoffier (15)

Devoxx France 2023 - 1,2,3 Quarkus.pdf
Devoxx France 2023 - 1,2,3 Quarkus.pdfDevoxx France 2023 - 1,2,3 Quarkus.pdf
Devoxx France 2023 - 1,2,3 Quarkus.pdf
 
vert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in Javavert.x 3.1 - be reactive on the JVM but not only in Java
vert.x 3.1 - be reactive on the JVM but not only in Java
 
Modularity and Dynamism - The tale of two sisters
Modularity and Dynamism - The tale of two sistersModularity and Dynamism - The tale of two sisters
Modularity and Dynamism - The tale of two sisters
 
h-ubu - An industrial-strength service-oriented component model for JavaScrip...
h-ubu - An industrial-strength service-oriented component model for JavaScrip...h-ubu - An industrial-strength service-oriented component model for JavaScrip...
h-ubu - An industrial-strength service-oriented component model for JavaScrip...
 
OW2 Nanoko
OW2 NanokoOW2 Nanoko
OW2 Nanoko
 
iPOJO 2.x - a tale about dynamism
iPOJO 2.x - a tale about dynamismiPOJO 2.x - a tale about dynamism
iPOJO 2.x - a tale about dynamism
 
Everest - Everything is a resource
Everest - Everything is a resourceEverest - Everything is a resource
Everest - Everything is a resource
 
h-ubu - CDI in JavaScript
h-ubu - CDI in JavaScripth-ubu - CDI in JavaScript
h-ubu - CDI in JavaScript
 
h-ubu : CDI in JavaScript
h-ubu : CDI in JavaScripth-ubu : CDI in JavaScript
h-ubu : CDI in JavaScript
 
Linuxtag 2012 - continuous delivery - dream to reality
Linuxtag 2012  - continuous delivery - dream to realityLinuxtag 2012  - continuous delivery - dream to reality
Linuxtag 2012 - continuous delivery - dream to reality
 
OSGi - beyond the myth
OSGi -  beyond the mythOSGi -  beyond the myth
OSGi - beyond the myth
 
One year-with-chameleon
One year-with-chameleonOne year-with-chameleon
One year-with-chameleon
 
The OSGi Framework Multiplication
The OSGi Framework MultiplicationThe OSGi Framework Multiplication
The OSGi Framework Multiplication
 
Android : a linux-based mobile operating system
Android : a linux-based mobile operating systemAndroid : a linux-based mobile operating system
Android : a linux-based mobile operating system
 
Experimenting with the OSGi platform in the Aspire RFID middleware
Experimenting with the OSGi platform in the Aspire RFID middlewareExperimenting with the OSGi platform in the Aspire RFID middleware
Experimenting with the OSGi platform in the Aspire RFID middleware
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Transactional OSGi Apps Done Right With iPOJO Transactions

  • 1. Transactional OSGi applications done right & Karl Pauls Clement Escoffier , akquinet
  • 2. Outline Transactions ??? OSGi Transaction Service (RFC-98) Transaction & Dynamism … From “Hell” to the “EJB3-paradise” 2 Transactional OSGi applications done right
  • 3. Transactions ??? Transactions are a mechanism that allows endowing a sequence of actions with the properties of a single atomic (indivisible) action. 3 Transactional OSGi applications done right
  • 4. Transactions ??? Properties (Failure) Atomicity : the action is performed either entirely or not at all Consistency : from a consistent state to another consistent state Isolation: no intermediate states are visible to any concurrently executing action. Durability: after a transaction has committed, the changes that it made are immune to failures (catastrophes excluded). Transactions are a mechanism that allows endowing a sequence of actions with the properties of a single atomic (indivisible) action. 4 Transactional OSGi applications done right
  • 5. Transactions ?? Transaction Engine commit begin Sequence of actions rollback 5 Transactional OSGi applications done right Uses Resources
  • 6. Why an OSGi Transaction Service ? A lot of OSGi applications deals with Devices Database Remote resources and services => Need transactions to ensure the system consistency 6 Transactional OSGi applications done right
  • 7. OSGi Transaction Service Based on Java Transaction API XA resources Transaction-aware “critical” resources JTA common interfaces are provided as OSGi services User Transaction: programmatic transactions Transaction Synchronization Registry: used by server components such as persistence managers to register synchronization object Transaction Manager: allows the server to control transaction boundaries on behalf of the application being managed. 7 Transactional OSGi applications done right
  • 8. OSGi Transaction Service ServiceReferencetxRef = bundleContext.getServiceReference("javax.transaction.UserTransaction"); UserTransactiontx = (UserTransaction)bundleContext.getService(txRef); // begin transaction tx.begin(); // perform some operations in the context of the transaction try { // Create a transactional resource ConfigResourceconfig = ...; // Perform some transactional work Configuration x = config.createConfiguration("abc"); tx.commit(); // make changes persistent } catch (Throwableth) { tx.rollback(); // rollback changes. } 8 Transactional OSGi applications done right
  • 9. Great … but 9 Transactional OSGi applications done right
  • 10. Dynamism impact … How to automate transaction management ? What happens when a transaction “thread” accesses a service leaving before the end of the transaction ? How to support dynamism with XA resources and volatile resources ? The OSGi Transaction service provides everything to go further ! 10 Transactional OSGi applications done right
  • 11. The “EJB dream” Avoid the developer to manage transactions manually Transaction demarcation:method Transactional method declares the transaction propagation REQUIRED, REQUIRES_NEW, SUPPORTS, NOT_SUPPORTED, MANDATORY, NEVER The transaction management is made by the container @TransactionAttribute(REQUIRES_NEW) public void firstMethod() {...} @TransactionAttribute(REQUIRED) public void secondMethod() {...} 11 Transactional OSGi applications done right
  • 12. iPOJO Transaction Supports iPOJO Transaction handler Automates transaction management Allows using transaction just like with EJB @Transaction public class MyClass { @Requires public FooServicefoo; @Transactionnal(propagation="requiresnew") public void firstMethod () { // ... foo.foo(); // Invoke a service //... } @Transactionnal (propagation=“required”) public void secondMethod() {...} // … } 12 Transactional OSGi applications done right
  • 13. iPOJO Transaction and dynamism How to automate transaction management ? The transaction management is made by the container Flexible Allows injecting the current Transaction inside a field Can notify the POJO of the current transaction progress What happens when a transaction “thread” accesses a service leaving before the end of the transaction ? The transaction is roll backed as soon as an instance becomes invalid How to support dynamism inside XA resources and volatile resources ? The Transactional Service Providing handler emulates XA Resources or Volatile resources Experimental… 13 Transactional OSGi applications done right
  • 14. Conclusion Transactions are becoming more and more important inside OSGi applications The Transaction Service is definitely Welcome THANKS ! However, we’ve to take care to avoid the Transaction Nightmare iPOJO proposes EJB-like transaction management reducing the pain ! 14 Transactional OSGi applications done right
  • 15. Questions ? Transactional OSGi applications done right 15 Karl Paulskarl.pauls@akquinet.de Bülowstraße 66, 10783 Berlin+49 151 226 49 845 Dr. Clement Escoffierclement.escoffier@akquinet.de Bülowstraße 66, 10783 Berlin+49 175 246 77 17

Editor's Notes

  1. Pretty important for all concurrent system dealing with critical and shared resources (database, devices … )
  2. Atomicity : all or nothingConsistency : the system goes from a consistent state to another consistent stateIsolation : the transaction execution is not impacted by any other “Threads”Durability: once completed, can no more be altered
  3. Transaction are generally attached to a Thread