db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <kristian.waa...@oracle.com>
Subject Re: Derby, JTA on GlassFish and very strange behavior
Date Mon, 18 Feb 2013 14:54:45 GMT
On 18.02.2013 15:15,  Wujek Srujek wrote:
> What I don't understand:
> 1. how is it possible that the insertion is visible in the next 
> select? there is no transaction, autoCommit is explicitly set to 
> false, there is no caching like EntityManager cache - or is there?


Because you're in the same local transaction and you haven't yet rolled 
back what you have done so far?

> 2. how is it possible that the insertion is made persistent after the 
> code executes, without the transaction ever being committed (either 
> local or global) - I can see in a db viewer that the row has been 
> added? the close() in finally seems to be doing magic things

That I do not know (I've only looked at the code in your email).
You could try to enable client side tracing on the Derby network driver 
to see what's going on [1]. Could it be that your application server / 
container is issuing a commit when it reclaims the connection?

I have not verified that Derby doesn't do the above for XA, but normally 
Derby throws an exception if close is called and there is an active 


[1] See 

. The simpler server side tracing may also be to some help: 

View raw message