You have to enable connection validation to help the datasource to recover. The following configuration changes would help you to weed out stale connections from the managed connection pool and to the achieve said goal.
- <validate-on-match> - whether to validate the connection when the JCA layer matches a managed connection (i.e. when the connection is checked out of the pool). With the addition of <background-validation> this is not necessarily required. Note: Specifying "true" for <validate-on-match> is typically not done in conjunction with specifying "true" for <background-validation> as this would be overkill in most scenarios. Default is true.
- <valid-connection-checker-class-name> - a class that can check whether a connection is valid using a vendor specific mechanism.
Hope it helps..
Thanks! I'm not sure if it was the Valid Connection Checker class or the 'Validate on Match' but that has resolved the issue.