Edgewall Software

Changes between Initial Version and Version 1 of Ticket #4984, comment 9


Ignore:
Timestamp:
May 24, 2016, 10:12:37 PM (8 years ago)
Author:
Ryan J Ollos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4984, comment 9

    initial v1  
    1 Agreed, it would be nice to be able to auto-reconnect once before failing. We could create a new connection in the cursor method if an exception is thrown, but currently the PooledConnection does not have any knowledge about what kind of database connection it holds, so it would be necessary to add information about that. Also, we need to make sure not messing up _pool in ConnectionPoolBackend.
     1Agreed, it would be nice to be able to auto-reconnect once before failing. We could create a new connection in the cursor method if an exception is thrown, but currently the `PooledConnection` does not have any knowledge about what kind of database connection it holds, so it would be necessary to add information about that. Also, we need to make sure not messing up `_pool` in `ConnectionPoolBackend`.
    22
    3 Perhaps a cleaner solution is to add another class e.g. ReliableConnection(ConnectionWrapper) encapsulating a PooledConnection. Then everything related to database error handling can be kept inside the ReliableConnection class.
     3Perhaps a cleaner solution is to add another class e.g. `ReliableConnection(ConnectionWrapper)` encapsulating a `PooledConnection`. Then everything related to database error handling can be kept inside the `ReliableConnection` class.