Skip to content

Conversation

lutovich
Copy link
Contributor

@lutovich lutovich commented Mar 8, 2017

No description provided.

lutovich added 2 commits March 8, 2017 00:44
Added dedicated functional interface `TransactionWork` to be used in
`Session#readTransaction()` and `Session#writeTransaction()` methods.
It does not change how code looks for Java 8 lambdas but looks better with
Java 7 where users do not need to implement `Function<T,U>` where first
generic type parameter is always `Transaction`.
This commit makes `Session#readTransaction()` and `Session#writeTransaction()`
automatically commit when transaction was not marked as failure and no
exception was thrown. This effectively removes the need to call `tx.success()`
as the last statement in a transaction.
@zhenlineo
Copy link
Contributor

LG

@technige technige merged commit 41dc339 into 1.2 Mar 8, 2017
@technige technige deleted the 1.2-small-api-updates branch March 8, 2017 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants