SlideShare a Scribd company logo
1 of 33
Download to read offline
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
OSGi Community Event 2016
co-located at
EclipseCon Europe 2016
Transaction Control – A functional approach to
modular transaction management
Tim Ward
http://www.paremus.com
info@paremus.com
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
•Chief Technology Officer at Paremus

•8 years developing OSGi specifications

•Chair of the OSGi IoT Expert Group

•Interested in Asynchronous Distributed Systems

•Author of Manning’s Enterprise OSGi in Action

•http://www.manning.com/cummins
Who is Tim Ward?
@TimothyWard
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Transactions in Software
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Controlling Software Transactions
Software Transactions have existed since the early 1960s

They exist as a means to ensure data integrity

Early transactions used special operating systems and vendor APIs

Usually these systems performed offline batch reconciliation

Modern transaction processing systems normally provide real-time update

Handling individual updates leads to the concepts behind ACID

Despite the growth of NoSQL datastores, transactions are still a vital tool
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Controlling Software Transactions (2)
Originally transactions were all imperatively controlled

Direct calls to start, stop, and invalidate the transaction

You have to be very careful to handle every return (especially Exceptions)

Managing transactions this way is verbose and error prone

This lead to the development of declarative transactions

Declarative Transactions use metadata to define the transaction boundary

Application code is freed from boilerplate, and mistakes
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Declarative Transactions in Java
Does anyone remember EJB 1/2?

Despite the horror of its XML, transactions were simpler than before

The Spring framework added AOP driven transaction management

and later annotation driven transaction configuration

EJB 3 adopted many of the principals provided by Spring

CDI takes this even further
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Problems with Declarative Transactions
It may seem that we’ve reached the perfect solution

How can this get any simpler?

@Transactional
public void doUpdate(String foo) {
…
}
Annotations are seductively simple but

We’ve traded visible complexity for invisible complexity

It’s better that we aren’t directly driving the transactions

But who is driving, and can we rely on them?
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
How do Declarative Transactions Work?
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Aspect Oriented Programming
Obviously Declarative Transactions must still be started somehow

Some container code must run to manage the transaction lifecycle

Typically transactions are run as intercepting “aspects”

These run before and after every intercepted method call 

Aspects like this run in one of two ways:

The container “weaves” extra bytecode instructions into your class

The container creates a delegating proxy, which wrappers your class
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Aspect Oriented Programming (2)
The two different implementations have different advantages and drawbacks

Proxying works best when you can proxy by interface

Final classes, final methods and private methods cannot be proxied

Casting to instance types does not work

Object identity may be affected

Weaving avoids these drawbacks, but…

It either needs a pre-deployment step, or a custom class loader 

It messes up the Java debugger (there’s a lot of code at line 0)

It provides inconsistent behaviour compared to proxying!
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Enlisting Resources
Starting a Transaction is only one part of the problem

In order to participate in a Transaction a resource must “enlist” in it

This applies to any Database or JMS Connections, and all other resources

All of this happens transparently to the code using the resource

But only if the right resource is used!

This is why you must use JNDI to get resources in your App Server

Even Spring requires you to set up Transactional resources
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
The Proxying problem
Proxying is usually the preferred solution as it is less invasive

But we mentioned that it is inconsistent compared to weaving…

Consider the following object methods:

@Transactional(SUPPORTS)
public void doCheckAndUpdate(String foo) {
// Do some non-transactional work
…
// Do an update
doUpdate(foo);
}
@Transactional(REQUIRED)
public void doUpdate(String foo) {
// There must be a transaction here!
…
}
Does this requirement hold?
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
The Proxying problem (2)
Aspects provided by proxies can only run when the proxy is called

In our method the proxy is not called!

@Transactional(SUPPORTS)
public void doCheckAndUpdate(String foo) {
// Do some non-transactional work
…
// Do an update
doUpdate(foo);
}
As a result the doUpdate method may not always run in a transaction

Switching to weaving will make sure the right boundary is in place

But your application should not need to care about this!
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Rolling back on failure
A vital behaviour for Transactions is rolling back when things go wrong

The most obvious reason for rollback is if the method throws an Exception

Java EE decided to do something very strange (copied by Spring)

Unchecked Exceptions trigger rollback

Checked Exceptions do not trigger rollback

The rationale for this is that a checked Exception is part of the API

This is a horrible thing to do to your users!

Exceptions should never be used as control flow

Also SQLException is a checked Exception…
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
So what can we do?
The use of declarative transactions is not 100% positive

Yes our code is simpler, but it’s still not always correct

We have traded visible complexity for invisible complexity!

In a modular system we must do better

We need to express dependencies on the features we need

We need to be able to rely on consistent behaviours using contracts

We need to be able to cope when no central container exists

Also - let’s fix the crazy transaction behaviour!
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
The OSGi Transaction Control Service
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
The basics of OSGi Transaction Control
The OSGi Transaction Control service has two main goals

Simple, explicit management of transactional work

Modular support for resources with managed lifecycles

What does this mean in practice?

You tell Transaction Control what transaction scope you want

You tell your resources which Transaction Control service to use

From there all the transaction and resource lifecycle is handled for you.
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Using Transaction Control to scope work
Transaction Control uses a functional API 

Your business logic is passed as a function to be run within a “scope”

A scope can be transactional, or non-transactional

Transaction control provides four well-known options for scoping your work

required - ensures that a transactional scope is running

requiresNew - begins a new transactional scope

supports - ensures that a scope (with or without a transaction) is running

notSupported - ensures that a non-transactional scope is running
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Using Transaction Control to scope work (2)
It should be obvious that a scope is more than just a transaction

A scope provides a context for your work

A place to store state

A place to register completion callbacks

An access boundary for your resources

Scopes provide a safe way to access resources without leaks

The resource is lazily retrieved the first time you use it in a scope

The same resource is the available throughout the scope

The resource is automatically released when the scope ends
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Finishing Scopes
A scope ends once the work function has returned

Resource clean up happens regardless of whether the work is successful

The value returned by the work is returned by the scope

Transactional work has additional rules for the transaction lifecycle:

If the scope has been marked for rollback it always rolls back

If the work exits with an Exception then the transaction rolls back

If the work exits with a normal return then the transaction commits

Specific Exception types can be marked not to cause rollback
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Scoped Resources
Transaction Control works best when used with scoped resources

A Scoped Resource is created from a ResourceProvider

ResourceProvider#getResource(TransactionControl)
Typically a more specialised sub-interface provides type-safety

JDBCConnectionProvider -> java.sql.Connection
JPAEntityManagerProvider -> javax.persistence.EntityManager

The returned object is a thread-safe proxy

Just use it in your methods whenever you need it!
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Putting it all together
@Component
public class TxComponent {
@Reference TransactionControl txControl;
@Reference JPAEntityManagerProvider jpa;
EntityManager em;
@Activate
void start() {
em = jpa.getResource(txControl);
}
public void doUpdate(MyEntity foo) {
txControl.required(() -> {
em.persist(foo);
return null;
});
}
}
Inject the services
Create the scoped resource
Use the scoped resource, safe in the
knowledge that it will be committed
and cleaned up
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Advanced features of Transaction Control
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
XA or Resource-Local transactions?
Most resource types have a programatic API for commit/rollback

These only apply to a single resource and so are “Resource Local”

If multiple resources are used in the same transaction then we need more

The XA protocol defines a robust distributed state machine

Transaction Control supports lightweight resource-local transactions

The osgi.xa.enabled property can be used to select an XA implementation

Importantly the client API is the same whichever you use!
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Connection Pooling
Connection Pooling in OSGi can be challenging…

Most pooling implementations try to directly load the driver

The client often ends up coupled to the pooling implementation

The Resource Provider offers an excellent solution

The JDBCConnectionProvider has built-in support for connection pooling

Fully configurable using a standard factory service

Providers can also be defined using Configuration Admin
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
No Rollback for…
When starting a transaction the user can nominate Exception types

These types can explicitly trigger, or not trigger, rollback.

txControl.build()
.noRollbackFor(SocketException.class, RemoteException.class)
.rollbackFor(ConnectException.class)
.required(() -> {
em.persist(foo);
return null;
});
Be careful when using these!
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Nested Scopes
Transaction Control Scopes can be easily nested

Committing a quick status update part way through a batch

Querying for sequence numbers outside the current transaction

Each scope is isolated using separate resource instances

The scopes also have separate contexts and lifecycle callbacks
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Introspecting the Scope
The Transaction Control service can be used to query the current scope

What type of scope is it?

Querying for sequence numbers outside the current transaction

Each scope is isolated using separate resource instances

The scopes also have separate contexts and lifecycle callbacks
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Playing with Transaction Control
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Playing with Transaction Control
Let’s use Transaction Control to build a simple REST microservice

JAX-RS for request mapping

JPA persistence into a database

A simple HTML/JavaScript UI running in the browser
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
•For more about OSGi...

• Specifications at http://www.osgi.org

• Enterprise OSGi in Action

• http://www.manning.com/cummins

•For more about Transaction Control

• http://github.com/osgi/design

• http://aries.apache.org/modules/transactioncontrol.html

Questions?
Thanks!
http://www.paremus.com
info@paremus.com
http://www.manning.com/cummins
Copyright © 2005 - 2016 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
OSGi Community Event Nov 2016
www.paremus.com @Paremus info@paremus.com

More Related Content

What's hot

Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)
Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)
Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)VMware Tanzu
 
Pivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxPivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxSufyaan Kazi
 
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsHow to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsSufyaan Kazi
 
Manchester geek night pcf 101
Manchester geek night   pcf 101Manchester geek night   pcf 101
Manchester geek night pcf 101Sufyaan Kazi
 
GeeCON Microservices 2015 scaling micro services at gilt
GeeCON Microservices 2015   scaling micro services at giltGeeCON Microservices 2015   scaling micro services at gilt
GeeCON Microservices 2015 scaling micro services at giltAdrian Trenaman
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataPace Integration
 
A year with Cloud Foundry and BOSH
A year with Cloud Foundry and BOSHA year with Cloud Foundry and BOSH
A year with Cloud Foundry and BOSHTroy Astle
 
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...VMware Tanzu
 
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D BosschaertLeveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaertmfrancis
 
Lessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web appLessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web appPaul Bakker
 
PaaS and OpenStack
PaaS and OpenStackPaaS and OpenStack
PaaS and OpenStackSeth Fox
 
Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理Kazuchika Sekiya
 
Sdn users group_january_2016v5
Sdn users group_january_2016v5Sdn users group_january_2016v5
Sdn users group_january_2016v5Joel W. King
 
Product Release Webinar- WSO2 Developer Studio 3.5
Product Release Webinar- WSO2 Developer Studio 3.5Product Release Webinar- WSO2 Developer Studio 3.5
Product Release Webinar- WSO2 Developer Studio 3.5WSO2
 
Resilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIsResilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIsVMware Tanzu
 
Getting MongoDB to a Developer Fast - Kubernetes for the Enterprise - London
Getting MongoDB to a Developer Fast - Kubernetes for the Enterprise - LondonGetting MongoDB to a Developer Fast - Kubernetes for the Enterprise - London
Getting MongoDB to a Developer Fast - Kubernetes for the Enterprise - LondonVMware Tanzu
 
Cloud native Microservices using Spring Boot
Cloud native Microservices using Spring BootCloud native Microservices using Spring Boot
Cloud native Microservices using Spring BootSufyaan Kazi
 
Cloud Foundry: Infrastructure Options
Cloud Foundry: Infrastructure OptionsCloud Foundry: Infrastructure Options
Cloud Foundry: Infrastructure OptionsAltoros
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDKPhil Wilkins
 

What's hot (20)

Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)
Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)
Introducing Cloud Foundry Integration for Eclipse (Cloud Foundry Summit 2014)
 
Pivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxPivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptx
 
How to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native ApplicationsHow to Architect and Develop Cloud Native Applications
How to Architect and Develop Cloud Native Applications
 
Manchester geek night pcf 101
Manchester geek night   pcf 101Manchester geek night   pcf 101
Manchester geek night pcf 101
 
GeeCON Microservices 2015 scaling micro services at gilt
GeeCON Microservices 2015   scaling micro services at giltGeeCON Microservices 2015   scaling micro services at gilt
GeeCON Microservices 2015 scaling micro services at gilt
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and OData
 
A year with Cloud Foundry and BOSH
A year with Cloud Foundry and BOSHA year with Cloud Foundry and BOSH
A year with Cloud Foundry and BOSH
 
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
 
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D BosschaertLeveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert
 
Lessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web appLessons learned from a large scale OSGi web app
Lessons learned from a large scale OSGi web app
 
PaaS and OpenStack
PaaS and OpenStackPaaS and OpenStack
PaaS and OpenStack
 
Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理
 
X by orange; una telco en la nube
X by orange;   una telco en la nubeX by orange;   una telco en la nube
X by orange; una telco en la nube
 
Sdn users group_january_2016v5
Sdn users group_january_2016v5Sdn users group_january_2016v5
Sdn users group_january_2016v5
 
Product Release Webinar- WSO2 Developer Studio 3.5
Product Release Webinar- WSO2 Developer Studio 3.5Product Release Webinar- WSO2 Developer Studio 3.5
Product Release Webinar- WSO2 Developer Studio 3.5
 
Resilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIsResilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIs
 
Getting MongoDB to a Developer Fast - Kubernetes for the Enterprise - London
Getting MongoDB to a Developer Fast - Kubernetes for the Enterprise - LondonGetting MongoDB to a Developer Fast - Kubernetes for the Enterprise - London
Getting MongoDB to a Developer Fast - Kubernetes for the Enterprise - London
 
Cloud native Microservices using Spring Boot
Cloud native Microservices using Spring BootCloud native Microservices using Spring Boot
Cloud native Microservices using Spring Boot
 
Cloud Foundry: Infrastructure Options
Cloud Foundry: Infrastructure OptionsCloud Foundry: Infrastructure Options
Cloud Foundry: Infrastructure Options
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDK
 

Viewers also liked

Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...mfrancis
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application DevelopmentChristian Baranowski
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchevmfrancis
 
OSGi Remote Services With Sca
OSGi Remote Services With ScaOSGi Remote Services With Sca
OSGi Remote Services With Scamfrancis
 
OSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon KaegiOSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon Kaegimfrancis
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Makmfrancis
 
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs ZsoldosAvoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldosmfrancis
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankovmfrancis
 
5 young entrepreneurs and their successful start ups
5 young entrepreneurs and their successful start ups5 young entrepreneurs and their successful start ups
5 young entrepreneurs and their successful start upsSaransh Arora
 
Kiran Mazumdar Shaw
Kiran Mazumdar ShawKiran Mazumdar Shaw
Kiran Mazumdar ShawRamki M
 
Young Indian Entrepreneurship
Young Indian EntrepreneurshipYoung Indian Entrepreneurship
Young Indian Entrepreneurshipkarishma shah
 
Kiran mazumdar shaw
Kiran mazumdar shawKiran mazumdar shaw
Kiran mazumdar shawowais23
 
OSGi for European and Japanese smart cities - experiences and lessons learnt ...
OSGi for European and Japanese smart cities - experiences and lessons learnt ...OSGi for European and Japanese smart cities - experiences and lessons learnt ...
OSGi for European and Japanese smart cities - experiences and lessons learnt ...mfrancis
 
Foreign Currency Transactions
Foreign Currency TransactionsForeign Currency Transactions
Foreign Currency TransactionsRavi Subramaniam
 
Recording Transactions
Recording TransactionsRecording Transactions
Recording TransactionsAlamgir Alwani
 
Successful Entrepreneur of india
Successful Entrepreneur of indiaSuccessful Entrepreneur of india
Successful Entrepreneur of indiaguptakshitij
 
Top 20 Entrpreneurs in India
Top 20 Entrpreneurs in IndiaTop 20 Entrpreneurs in India
Top 20 Entrpreneurs in IndiaSandra4Smiley
 

Viewers also liked (18)

Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
 
OSGi and Spring Data for simple (Web) Application Development
OSGi and Spring Data  for simple (Web) Application DevelopmentOSGi and Spring Data  for simple (Web) Application Development
OSGi and Spring Data for simple (Web) Application Development
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
 
OSGi Remote Services With Sca
OSGi Remote Services With ScaOSGi Remote Services With Sca
OSGi Remote Services With Sca
 
OSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon KaegiOSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon Kaegi
 
Resume
ResumeResume
Resume
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Mak
 
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs ZsoldosAvoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
Avoid the chaos - Handling 100+ OSGi Components - Balázs Zsoldos
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankov
 
5 young entrepreneurs and their successful start ups
5 young entrepreneurs and their successful start ups5 young entrepreneurs and their successful start ups
5 young entrepreneurs and their successful start ups
 
Kiran Mazumdar Shaw
Kiran Mazumdar ShawKiran Mazumdar Shaw
Kiran Mazumdar Shaw
 
Young Indian Entrepreneurship
Young Indian EntrepreneurshipYoung Indian Entrepreneurship
Young Indian Entrepreneurship
 
Kiran mazumdar shaw
Kiran mazumdar shawKiran mazumdar shaw
Kiran mazumdar shaw
 
OSGi for European and Japanese smart cities - experiences and lessons learnt ...
OSGi for European and Japanese smart cities - experiences and lessons learnt ...OSGi for European and Japanese smart cities - experiences and lessons learnt ...
OSGi for European and Japanese smart cities - experiences and lessons learnt ...
 
Foreign Currency Transactions
Foreign Currency TransactionsForeign Currency Transactions
Foreign Currency Transactions
 
Recording Transactions
Recording TransactionsRecording Transactions
Recording Transactions
 
Successful Entrepreneur of india
Successful Entrepreneur of indiaSuccessful Entrepreneur of india
Successful Entrepreneur of india
 
Top 20 Entrpreneurs in India
Top 20 Entrpreneurs in IndiaTop 20 Entrpreneurs in India
Top 20 Entrpreneurs in India
 

Similar to Transaction Control – a Functional Approach to Modular Transaction Management - Tim Ward

MuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led ConnectivityMuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led ConnectivityJitendra Bafna
 
MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020Ieva Navickaite
 
What's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim WardWhat's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim Wardmfrancis
 
Oracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heavenOracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heavenluisw19
 
JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?Steve Poole
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache CamelKnoldus Inc.
 
London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!Apigee | Google Cloud
 
UKOUG - Implementing Enterprise API Management in the Oracle Cloud
UKOUG - Implementing Enterprise API Management in the Oracle CloudUKOUG - Implementing Enterprise API Management in the Oracle Cloud
UKOUG - Implementing Enterprise API Management in the Oracle Cloudluisw19
 
How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...
How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...
How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...Capgemini
 
Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022Ravi Tamada
 
Oracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons LearntOracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons Learntluisw19
 
API Platform Cloud Service best practice - OOW17
API Platform Cloud Service best practice - OOW17API Platform Cloud Service best practice - OOW17
API Platform Cloud Service best practice - OOW17Phil Wilkins
 
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP SystemsExploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP SystemsOnapsis Inc.
 
Implementing Enterprise API Management in Oracle Cloud
Implementing Enterprise API Management in Oracle CloudImplementing Enterprise API Management in Oracle Cloud
Implementing Enterprise API Management in Oracle CloudCapgemini
 
Asynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T WardAsynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T Wardmfrancis
 
Case study - Using OSGi within the salesforce.com Data Center Automation Init...
Case study - Using OSGi within the salesforce.com Data Center Automation Init...Case study - Using OSGi within the salesforce.com Data Center Automation Init...
Case study - Using OSGi within the salesforce.com Data Center Automation Init...mfrancis
 
Unleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTNaresh Jain
 
Oracle Code Beijing/Sydney APIM & Microservices: A Match Made in Heaven
Oracle Code Beijing/Sydney   APIM & Microservices: A Match Made in HeavenOracle Code Beijing/Sydney   APIM & Microservices: A Match Made in Heaven
Oracle Code Beijing/Sydney APIM & Microservices: A Match Made in HeavenCapgemini
 

Similar to Transaction Control – a Functional Approach to Modular Transaction Management - Tim Ward (20)

Oracle SOA Tips & Tricks
Oracle SOA Tips & TricksOracle SOA Tips & Tricks
Oracle SOA Tips & Tricks
 
MuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led ConnectivityMuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
MuleSoft Surat Meetup#39 - Pragmatic API Led Connectivity
 
MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020MuleSoft Madrid Meetup #3 slides 2nd July 2020
MuleSoft Madrid Meetup #3 slides 2nd July 2020
 
What's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim WardWhat's happening in the OSGi IoT Expert Group? - Tim Ward
What's happening in the OSGi IoT Expert Group? - Tim Ward
 
Oracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heavenOracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heaven
 
WoMakersCode 2016 - Shit Happens
WoMakersCode 2016 -  Shit HappensWoMakersCode 2016 -  Shit Happens
WoMakersCode 2016 - Shit Happens
 
JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?JVMCON Java in the 21st Century: are you thinking far enough ahead?
JVMCON Java in the 21st Century: are you thinking far enough ahead?
 
Introduction To Apache Camel
Introduction To Apache CamelIntroduction To Apache Camel
Introduction To Apache Camel
 
London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!
 
UKOUG - Implementing Enterprise API Management in the Oracle Cloud
UKOUG - Implementing Enterprise API Management in the Oracle CloudUKOUG - Implementing Enterprise API Management in the Oracle Cloud
UKOUG - Implementing Enterprise API Management in the Oracle Cloud
 
How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...
How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...
How Capgemini Built a Pan-European Tax Messaging System Using Oracle Fusion M...
 
Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022Vizag Virtual Meetup #7: Trending API Topics for 2022
Vizag Virtual Meetup #7: Trending API Topics for 2022
 
Oracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons LearntOracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons Learnt
 
API Platform Cloud Service best practice - OOW17
API Platform Cloud Service best practice - OOW17API Platform Cloud Service best practice - OOW17
API Platform Cloud Service best practice - OOW17
 
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP SystemsExploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
 
Implementing Enterprise API Management in Oracle Cloud
Implementing Enterprise API Management in Oracle CloudImplementing Enterprise API Management in Oracle Cloud
Implementing Enterprise API Management in Oracle Cloud
 
Asynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T WardAsynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T Ward
 
Case study - Using OSGi within the salesforce.com Data Center Automation Init...
Case study - Using OSGi within the salesforce.com Data Center Automation Init...Case study - Using OSGi within the salesforce.com Data Center Automation Init...
Case study - Using OSGi within the salesforce.com Data Center Automation Init...
 
Unleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDT
 
Oracle Code Beijing/Sydney APIM & Microservices: A Match Made in Heaven
Oracle Code Beijing/Sydney   APIM & Microservices: A Match Made in HeavenOracle Code Beijing/Sydney   APIM & Microservices: A Match Made in Heaven
Oracle Code Beijing/Sydney APIM & Microservices: A Match Made in Heaven
 

More from mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Transaction Control – a Functional Approach to Modular Transaction Management - Tim Ward

  • 1. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 OSGi Community Event 2016 co-located at EclipseCon Europe 2016 Transaction Control – A functional approach to modular transaction management Tim Ward http://www.paremus.com info@paremus.com
  • 2. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 •Chief Technology Officer at Paremus •8 years developing OSGi specifications •Chair of the OSGi IoT Expert Group •Interested in Asynchronous Distributed Systems •Author of Manning’s Enterprise OSGi in Action •http://www.manning.com/cummins Who is Tim Ward? @TimothyWard
  • 3. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Transactions in Software
  • 4. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Controlling Software Transactions Software Transactions have existed since the early 1960s They exist as a means to ensure data integrity Early transactions used special operating systems and vendor APIs Usually these systems performed offline batch reconciliation Modern transaction processing systems normally provide real-time update Handling individual updates leads to the concepts behind ACID Despite the growth of NoSQL datastores, transactions are still a vital tool
  • 5. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Controlling Software Transactions (2) Originally transactions were all imperatively controlled Direct calls to start, stop, and invalidate the transaction You have to be very careful to handle every return (especially Exceptions) Managing transactions this way is verbose and error prone This lead to the development of declarative transactions Declarative Transactions use metadata to define the transaction boundary Application code is freed from boilerplate, and mistakes
  • 6. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Declarative Transactions in Java Does anyone remember EJB 1/2? Despite the horror of its XML, transactions were simpler than before The Spring framework added AOP driven transaction management and later annotation driven transaction configuration EJB 3 adopted many of the principals provided by Spring CDI takes this even further
  • 7. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Problems with Declarative Transactions It may seem that we’ve reached the perfect solution How can this get any simpler? @Transactional public void doUpdate(String foo) { … } Annotations are seductively simple but We’ve traded visible complexity for invisible complexity It’s better that we aren’t directly driving the transactions But who is driving, and can we rely on them?
  • 8. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 How do Declarative Transactions Work?
  • 9. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Aspect Oriented Programming Obviously Declarative Transactions must still be started somehow Some container code must run to manage the transaction lifecycle Typically transactions are run as intercepting “aspects” These run before and after every intercepted method call Aspects like this run in one of two ways: The container “weaves” extra bytecode instructions into your class The container creates a delegating proxy, which wrappers your class
  • 10. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Aspect Oriented Programming (2) The two different implementations have different advantages and drawbacks Proxying works best when you can proxy by interface Final classes, final methods and private methods cannot be proxied Casting to instance types does not work Object identity may be affected Weaving avoids these drawbacks, but… It either needs a pre-deployment step, or a custom class loader It messes up the Java debugger (there’s a lot of code at line 0) It provides inconsistent behaviour compared to proxying!
  • 11. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Enlisting Resources Starting a Transaction is only one part of the problem In order to participate in a Transaction a resource must “enlist” in it This applies to any Database or JMS Connections, and all other resources All of this happens transparently to the code using the resource But only if the right resource is used! This is why you must use JNDI to get resources in your App Server Even Spring requires you to set up Transactional resources
  • 12. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 The Proxying problem Proxying is usually the preferred solution as it is less invasive But we mentioned that it is inconsistent compared to weaving… Consider the following object methods: @Transactional(SUPPORTS) public void doCheckAndUpdate(String foo) { // Do some non-transactional work … // Do an update doUpdate(foo); } @Transactional(REQUIRED) public void doUpdate(String foo) { // There must be a transaction here! … } Does this requirement hold?
  • 13. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 The Proxying problem (2) Aspects provided by proxies can only run when the proxy is called In our method the proxy is not called! @Transactional(SUPPORTS) public void doCheckAndUpdate(String foo) { // Do some non-transactional work … // Do an update doUpdate(foo); } As a result the doUpdate method may not always run in a transaction Switching to weaving will make sure the right boundary is in place But your application should not need to care about this!
  • 14. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Rolling back on failure A vital behaviour for Transactions is rolling back when things go wrong The most obvious reason for rollback is if the method throws an Exception Java EE decided to do something very strange (copied by Spring) Unchecked Exceptions trigger rollback Checked Exceptions do not trigger rollback The rationale for this is that a checked Exception is part of the API This is a horrible thing to do to your users! Exceptions should never be used as control flow Also SQLException is a checked Exception…
  • 15. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 So what can we do? The use of declarative transactions is not 100% positive Yes our code is simpler, but it’s still not always correct We have traded visible complexity for invisible complexity! In a modular system we must do better We need to express dependencies on the features we need We need to be able to rely on consistent behaviours using contracts We need to be able to cope when no central container exists Also - let’s fix the crazy transaction behaviour!
  • 16. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 The OSGi Transaction Control Service
  • 17. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 The basics of OSGi Transaction Control The OSGi Transaction Control service has two main goals Simple, explicit management of transactional work Modular support for resources with managed lifecycles What does this mean in practice? You tell Transaction Control what transaction scope you want You tell your resources which Transaction Control service to use From there all the transaction and resource lifecycle is handled for you.
  • 18. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Using Transaction Control to scope work Transaction Control uses a functional API Your business logic is passed as a function to be run within a “scope” A scope can be transactional, or non-transactional Transaction control provides four well-known options for scoping your work required - ensures that a transactional scope is running requiresNew - begins a new transactional scope supports - ensures that a scope (with or without a transaction) is running notSupported - ensures that a non-transactional scope is running
  • 19. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Using Transaction Control to scope work (2) It should be obvious that a scope is more than just a transaction A scope provides a context for your work A place to store state A place to register completion callbacks An access boundary for your resources Scopes provide a safe way to access resources without leaks The resource is lazily retrieved the first time you use it in a scope The same resource is the available throughout the scope The resource is automatically released when the scope ends
  • 20. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Finishing Scopes A scope ends once the work function has returned Resource clean up happens regardless of whether the work is successful The value returned by the work is returned by the scope Transactional work has additional rules for the transaction lifecycle: If the scope has been marked for rollback it always rolls back If the work exits with an Exception then the transaction rolls back If the work exits with a normal return then the transaction commits Specific Exception types can be marked not to cause rollback
  • 21. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Scoped Resources Transaction Control works best when used with scoped resources A Scoped Resource is created from a ResourceProvider ResourceProvider#getResource(TransactionControl) Typically a more specialised sub-interface provides type-safety JDBCConnectionProvider -> java.sql.Connection JPAEntityManagerProvider -> javax.persistence.EntityManager The returned object is a thread-safe proxy Just use it in your methods whenever you need it!
  • 22. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Putting it all together @Component public class TxComponent { @Reference TransactionControl txControl; @Reference JPAEntityManagerProvider jpa; EntityManager em; @Activate void start() { em = jpa.getResource(txControl); } public void doUpdate(MyEntity foo) { txControl.required(() -> { em.persist(foo); return null; }); } } Inject the services Create the scoped resource Use the scoped resource, safe in the knowledge that it will be committed and cleaned up
  • 23. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Advanced features of Transaction Control
  • 24. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 XA or Resource-Local transactions? Most resource types have a programatic API for commit/rollback These only apply to a single resource and so are “Resource Local” If multiple resources are used in the same transaction then we need more The XA protocol defines a robust distributed state machine Transaction Control supports lightweight resource-local transactions The osgi.xa.enabled property can be used to select an XA implementation Importantly the client API is the same whichever you use!
  • 25. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Connection Pooling Connection Pooling in OSGi can be challenging… Most pooling implementations try to directly load the driver The client often ends up coupled to the pooling implementation The Resource Provider offers an excellent solution The JDBCConnectionProvider has built-in support for connection pooling Fully configurable using a standard factory service Providers can also be defined using Configuration Admin
  • 26. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 No Rollback for… When starting a transaction the user can nominate Exception types These types can explicitly trigger, or not trigger, rollback. txControl.build() .noRollbackFor(SocketException.class, RemoteException.class) .rollbackFor(ConnectException.class) .required(() -> { em.persist(foo); return null; }); Be careful when using these!
  • 27. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Nested Scopes Transaction Control Scopes can be easily nested Committing a quick status update part way through a batch Querying for sequence numbers outside the current transaction Each scope is isolated using separate resource instances The scopes also have separate contexts and lifecycle callbacks
  • 28. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Introspecting the Scope The Transaction Control service can be used to query the current scope What type of scope is it? Querying for sequence numbers outside the current transaction Each scope is isolated using separate resource instances The scopes also have separate contexts and lifecycle callbacks
  • 29. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Playing with Transaction Control
  • 30. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 Playing with Transaction Control Let’s use Transaction Control to build a simple REST microservice JAX-RS for request mapping JPA persistence into a database A simple HTML/JavaScript UI running in the browser
  • 31. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016
  • 32. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 •For more about OSGi... • Specifications at http://www.osgi.org • Enterprise OSGi in Action • http://www.manning.com/cummins •For more about Transaction Control • http://github.com/osgi/design • http://aries.apache.org/modules/transactioncontrol.html Questions? Thanks! http://www.paremus.com info@paremus.com http://www.manning.com/cummins
  • 33. Copyright © 2005 - 2016 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. OSGi Community Event Nov 2016 www.paremus.com @Paremus info@paremus.com