Last active
August 29, 2015 14:25
-
-
Save maxant/03a4f6545640e8d66e1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Resource UserTransaction ut; | |
@Override | |
protected void doGet(HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { | |
ut.begin(); | |
... | |
CompletableFuture<String> cf = new CompletableFuture<>(); | |
service.foo(cf, pw); | |
... | |
cf.whenCompleteAsync((s, t)->{ | |
... | |
ut.commit(); // => exception: "BaseTransaction.commit - ARJUNA016074: no transaction!" | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment