12 messages in org.apache.jackrabbit.usersRe: MySql 5.0 & JackRabbit: Connectio...
FromSent OnAttachments
sbarribaJul 13, 2007 1:41 am 
Thomas MuellerJul 13, 2007 2:54 am 
Marcel MayJul 13, 2007 3:43 am 
Thomas MuellerJul 13, 2007 4:25 am 
sbarribaJul 15, 2007 9:32 am 
Stefan GuggisbergJul 16, 2007 2:17 am 
sbarribaOct 10, 2007 9:23 am 
Jukka ZittingOct 11, 2007 1:05 am 
sbarribaOct 12, 2007 7:30 am 
Jukka ZittingOct 12, 2007 8:33 am 
sbarribaJan 5, 2008 7:45 am 
Jukka ZittingJan 5, 2008 1:29 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: MySql 5.0 & JackRabbit: Connection issuesActions...
From:Thomas Mueller (thom@gmail.com)
Date:Jul 13, 2007 4:25:52 am
List:org.apache.jackrabbit.users

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