cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: transactions in the SQLTransformer
Date Wed, 14 May 2003 11:45:40 GMT
Brian Johnson wrote:

 > It should not be necessary to use the same connection for each query.
 > Even if you are not using a J2EE datasource, Cocoon maintains a pool
 > of database connections, so the connection is not actually closed
 > after each query. Transaction processing does not require a single
 > database connection, the only thing it requires is a single thread.

I have tried this, IIRC it lead to some highly undesirable things like
that an SQLTransformer instance that was serving another users request
got a connection with an opened transaction from the pool and closed it.
As soon as you have more than one user it is very dangerous to return a
connection with an opened transaction to the pool, you might be lucky
and get the same connection when you executes the rest of the queries in
the transaction. But this "luck" is more likely when you as a developer
is the only user.

Anyhow as I wrote earlier in this thread I have written a patch that solve the
problem, and also increase the efficiency of the SQLTransformer, and
that works without any problems in our production systems since a couple
of mounths. I would be very thankful if somebody with commit right could
find the time to apply the patch :)


View raw message