Transactions in the compatibility layer behave differently than standard Jedis. After calling multi(), you must use the returned Transaction object to queue commands. Calling methods directly on the Jedis instance will not queue them to the transaction.
Using the Transaction Object
Transaction t = jedis.multi();
Response<String> r1 = t.set("key", "value");
Response<String> r2 = t.get("key");
List<Object> results = t.exec();
String value = r2.get(); // retrieve after exec()
Using the Native GLIDE Batch API
For commands not exposed on the Transaction object, or for non-atomic pipelining, use the native GLIDE Batch API with a GlideClient instance:
Batch batch = new Batch(true) // true = atomic transaction
.set("key1", "value1")
.get("key1");
Object[] results = glideClient.exec(batch, false).get();