09-20-2012 09:45 AM
Automatic reconnect
WARNING: DO NOT ENABLE AUTO RECONNECT IF YOU ARE USING MANAGED TRANSACTIONS
The auto reconnect does not preserve transaction state in the database.
It is ok if you are ALWAYS using auto-commit=true.
09-20-2012 10:44 AM
09-21-2012 08:47 AM
Equally alfresco does not run with auto commit = trueDo you mean that Alfresco in configured with auto commit = false ? Or do you mean that it really will not support auto-commit= true (that is what I understand and what I was believing).
Failover Support
MySQL Connector/J has failover support. This enables the driver to fail over to any number of slave hosts and still perform read-only queries. Failover only happens when the connection is in an autoCommit(true) state, because failover cannot happen reliably when a transaction is in progress. Most application servers and connection pools set autoCommit to true at the end of every transaction/connection use.
The failover functionality has the following behavior:
If the URL property autoReconnect is false: Failover only happens at connection initialization, and failback occurs when the driver determines that the first host has become available again.
If the URL property autoReconnect is true: Failover happens when the driver determines that the connection has failed (checked before every query), and falls back to the first host when it determines that the host has become available again (after queriesBeforeRetryMaster queries have been issued).
In either case, whenever you are connected to a “failed-over” server, the connection is set to read-only state, so queries that attempt to modify data will throw exceptions (the query will never be processed by the MySQL server).
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.