I've just uploaded an *experimental* release of BoneCP that adds a replay feature.
This means that the connection pool will save all method calls from begin transaction till commit/rollback/close and if the database or network goes down for any reason (or a Lock Wait timeout / deadlock is detected), a new connection is fetched and the whole transaction played back again automatically without the application caring about it.
If you want to try it out:
Source: http://github.com/wwadge/bonecp/tree/replayLog
Binary: http://jolbox.com/bonecp/downloads/maven/com/jolbox/bonecp/0.6.5-replaylog-SNAPSHOT/
New config options:
config.setTransactionRecoveryEnabled(...) must be set to true to enable the feature
config.setAcquireRetryAttempts(...) number of times to keep trying to connect in case of a failure (default 5)
config.setAcquireRetryDelay(...) number of milliseconds to wait between each attempt (default 7 sec)
Basically:
1. Grab the code
2. Switch on transactionRecoveryEnabled
3. Play around as usual while killing off and restarting database connections or the entire database.
I would appreciate some feedback on how it goes in your environment
Regards,
Wallace
