geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: transaction behaviour
Date Fri, 20 Jan 2006 17:54:07 GMT

On Jan 20, 2006, at 2:22 AM, Ueberbach, Michael wrote:

> hello matt,
> It seems so as if I have found a solution to the problem. I  
> undeployed the used connection pool for the Oracle database and  
> deployed it again this time not using the console but the command  
> line tool.
> In the deployment plan I explicitly set the option  
> CommitBeforeAutocommit to true (which seems not to be the default  
> using the console). Using this connection pool new created entities  
> will be persisted at once (as happens when using the pool for MySQL).

I am continually amazed at the oracle drivers.
> The documentation says about this the following:
> "If the JDBC driver does not commit pending work when setAutoCommit 
> (true) is called, then this should be set to true to work around  
> that. It's always safest to set it
> to true, but the performance is better for JDBC-compliant drivers  
> when this is set to false"
> Are there any concrete experiences referring to the last point  
> (performance) ?

It's based on theory, which may be flawed: it's possible my analysis  
is wrong:

if setAutoCommit(true) results in a commit in the db, it must have  
sent a message to the db.  Commit also has to send a message to the  
db.  So, for a compliant driver, commit followed by setAutoCommit 
(true) is 2 messages rather than the one for setAutoCommit(true).

I suppose it's possible that the client side of the driver could  
track that no work happened between the commit and the setAutoCommit  
call and not send a message on setAutoCommit(true).

> By the way: as far as I can see geronimo works very fine and fast.  
> (creating 1000 entities consumes about 2200 ms using connection to  
> MySQL, against Oracle the time is varying between 3500 and 10000  
> ms, but that may be blamed on the network)

Always nice to hear good things!

david jencks

> regards
> michael

View raw message