On Mon, 7 Jan 2008, Stef wrote:
> I'm using the Connection pool manager of JBoss to control
> the connections to the database. When I restart postgres
> without restarting JBoss as well, I get this error reported in JBoss :
> An I/O error occured while sending to the backend.
>
> The problem is that JBoss never recovers from this , and it's only fixed
> when I restart JBoss. I can understand that this error may happen
> occasionally, but I need to be able to recover from this situation
> without restarting JBoss.
>
JBoss has a check-valid-connection-sql parameter for datasources which
runs every time a connection from a pool is allocated. If this statement
fails, the connection is discarded and a new connection is opened. This
should allow recovery from a disappeared database.
Kris Jurka