| 57 | === Testing === |
| 58 | |
| 59 | In config.xml, set the maxIdle connection parameter to 0 to force the pool to request new connection: |
| 60 | {{{ |
| 61 | <minIdle>0</minIdle> |
| 62 | <maxIdle>0</maxIdle> |
| 63 | }}} |
| 64 | |
| 65 | Change the DB read/write mode using: |
| 66 | {{{ |
| 67 | -- For postgres |
| 68 | ALTER DATABASE eea_catalogue SET default_transaction_read_only = true; |
| 69 | }}} |
| 70 | |
| 71 | The DBHeartBeat status will change in the log: |
| 72 | {{{ |
| 73 | |
| 74 | 2013-01-25 18:10:21,122 WARN [jeeves.apphand] - DBHeartBeat SQLException: ERROR: cannot execute INSERT in a read-only transaction |
| 75 | 2013-01-25 18:10:21,123 INFO [jeeves.apphand] - GeoNetwork remains in read-only mode |
| 76 | 2013-01-25 18:10:41,123 INFO [jeeves.apphand] - DBHeartBeat: GN is read-only ? true |
| 77 | 2013-01-25 18:10:41,141 WARN [jeeves.apphand] - GeoNetwork can write to the database, switching to read-write mode |
| 78 | |
| 79 | }}} |
| 80 | |
| 81 | |