(Sorry, I posted the same thing on github, but probably that's not the right place to ask, so I closed it and came here.)
I'm trying to port some code from v2 to v3.
I basically do
final String dimension = Jdbi.create(new UXConnectionFactory()).withHandle(h ->
h.createQuery("select DIMENSIE from ordrgl where syscode = :syscode")
.bind("syscode", pos.getPrimaryKey())
.mapTo(String.class)
.findFirst().orElse(""));
where UXConnectionFactory returns a managed connection from my Wildfly instance.
The equivalent code with a try-resource on Handle in v2 gave no problem.
Now I get:
org.jdbi.v3.core.transaction.TransactionException: Rollback called, this runtime exception thrown to halt the transaction
at org.jdbi.v3.core.transaction.CMTTransactionHandler.rollback(CMTTransactionHandler.java:53)
at org.jdbi.v3.core.Handle.rollback(Handle.java:288)
at org.jdbi.v3.core.Handle.close(Handle.java:123)
at org.jdbi.v3.core.Jdbi.withHandle(Jdbi.java:341)
so it seems I'm doing something stupid, but I have no idea what. I tried using a CMTTransactionHandler, but I only a different exception, a bit earlier.
Help ^^
if (!this.closed) {
boolean wasInTransaction = this.isInTransaction();
if (wasInTransaction) {
this.rollback();
}
--
You received this message because you are subscribed to the Google Groups "jDBI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdbi+unsubscribe@googlegroups.com.