Distributed Transactions from the Scala SDK
- how-to
Distributed ACID Transactions with JVM SDKs
Distributed ACID Transactions are implemented in the Java SDK, and simple to integrate into your Scala client code.
Java Transactions from the Scala SDK
Just create a com.couchbase.client.java.Cluster
in your Scala app with the normal Java calls (Cluster.connect(…))
, and then do transactions on it as normal, e.g.:
javaCluster.transactions().run(ctx => { /* your transaction logic here */ })
So in your app you have both a com.couchbase.client.java.Cluster
and a com.couchbase.client.scala.Cluster
, which are independent connections.