Hi,

I have a question about the BaseX server. We're using it from a J2EE application (which is the client), and so we've implemented a connection pool in the style done by many other database drivers.

We are getting Broken Pipe errors, indicating that a connection has been disconnected. My question: when does BaseX disconnect, and is there a way for a client to learn this?  For instance, if there's a syntax error in a XQUERY, should BaseX disconnect?  If a BaseXException is thrown by the Java driver?
Currently, we mark the connection as dead when an IOException or EOF occurs during the handling of one request, but we keep it alive when a BaseXException occurs, such as when we submit an ill-formed XQUERY.

We could avoid pooling, connecting and disconnecting for every query, but obviously that would be expensive. Or we could "ping" the server before issueing the actual query, but that's awkward, too.

How do others handle this problem?

 - Godmar