Hi,

http://bugs.mysql.com/bug.php?id=50174

This MySQL bug is quite annoying :
Under certain CPU load level (witch is unknown) under *nix (any unix 
apparently), the connection to the DB failed.
This bug is tagged by MySQL as low priority because there is a workaround.
The only workaround is to try again was was done during that specific 
communication error.

This might be fine when dealing directly with the database, even with OpenJPA 
code, because we can try/catch that specific exception and retry 
(com.mysql.jdbc.exceptions.jdbc4.CommunicationsException).

The problem I have is when I'm using some OpenJPA ant task like 
org.apache.openjpa.jdbc.meta.MappingTool.
I can't try/catch.

The more general problem I have is that my code will become full of that MySQL 
specific error while I'm using OpenJPA not to have any database specific code...

Should I wrap that ant task in a custom one where I would try/catch ?
Should we take care of that MySQL specific bug in OpenJPA so we still 
"encapsulate" MySQL for OpenJPA users ?
Did we encountered that kind of situation before ?

I found the hard way that it was a MySQL known bug, I also hope that email may 
help others to save time :-)

JBB.

Reply via email to