Digest for jooq-user@googlegroups.com - 1 update in 1 topic

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Digest for jooq-user@googlegroups.com - 1 update in 1 topic

http://groups.google.com/group/jooq-user/topics mailing list
"Victor Noël" <[hidden email]>: Oct 18 02:54AM -0700

Hi,
 
I was playing with transaction support in jOOQ and faced the following
situation that surprised me (this is pseudo-code and very simplifying to
illustrate the heart of the question):
 
var leaked = DSL
.using(datasource, SQLDialect.POSTGRES)
.transactionResult(conf -> {
var tx = DSL.using(conf);
tx.select(...).fetch();
return tx;
});
 
leaked.select(...).fetch();
 
I would have expected the first select to succeed and the second one to
fail, because I leaked the context out of the transaction and used it after
it was closed.
 
But maybe I'm making incorrect assumptions?
 
What happens in this case, the leaked select will just be executed outside
of any transaction?
 
Thanks
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].