jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: MySql 5.0 & JackRabbit: Connection issues
Date Fri, 13 Jul 2007 11:26:15 GMT
Hi,

> Using auto reconnect can be dangerous with mysql (imagine what happens
> with an open TX, and a reconnect is performed).

Yes, with many applications, it is a problem. The main problem is that
if the application sets autocommit to false. But (as far as I know and
read on the source code) autocommit is set to (left at) true in the
MySqlPersistenceManager. And Jackrabbit does not use long running
transactions. So this shouldn't be a problem.

But I didn't think about PreparedStatements, those probably (not sure)
become invalid on connection timeout... MySqlPersistenceManager uses
quite a few, and keeps them, so I think it will not work. I need to
take back my suggestion to use autoReconnect=true.

> BTW, the automatic connection closing is configurable on the mysql
> server, so you could inc. the timeout to prevent
> over the night/over the weekend timouts caused by inactivity.

So it sounds like this would be the better solution. Or, write a tool
that writes something to the repository each hours.

Thomas

Mime
View raw message