It sounds like you should look at the Transaction Control specification in the 
OSGi Release 7 specification draft 
(https://osgi.org/download/osgi.cmpn-7.0.0-earlydraft1.pdf 
<https://osgi.org/download/osgi.cmpn-7.0.0-earlydraft1.pdf>)

There’s already a prototype implementation in Apache Aries which supports Local 
transactions, XA transactions, JDBC and JPA. 
(http://aries.apache.org/modules/transactioncontrol.html 
<http://aries.apache.org/modules/transactioncontrol.html>). It sounds as though 
it will do exactly what you want.

Regards,

Tim

> On 18 Oct 2016, at 09:16, cniehues <christian.nieh...@its-telco.de> wrote:
> 
> Is there a way to get context specific service instances in karaf? For
> example if I process SOAP-Messages concurrently I want to ensure that the
> underlying DAO services will use the same EntityManager for each specific
> request.
> 
> 
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Best-practice-for-context-specific-service-instances-tp4048410.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to