ConnectionPool and SimpleDataSource are marked Serializable, but their
Kris Jurka <books@ejurka.com>
ConnectionPool and SimpleDataSource are marked Serializable, but their superclass (which contains a number of state variables) is not. To correctly serialize these objects we need to manually implement writeObject and readObject. Per report from R. Lemos
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/jdbc/org/postgresql/jdbc2/optional/BaseDataSource.java | modified | +24 −2 |
| src/interfaces/jdbc/org/postgresql/jdbc2/optional/ConnectionPool.java | modified | +15 −1 |
| src/interfaces/jdbc/org/postgresql/jdbc2/optional/SimpleDataSource.java | modified | +14 −1 |
| src/interfaces/jdbc/org/postgresql/test/jdbc2/optional/ConnectionPoolTest.java | modified | +29 −1 |