james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danny Angus" <da...@apache.org>
Subject RE: SQL DOWN; MAIL LOST?
Date Fri, 06 Dec 2002 10:09:31 GMT
Alan,

Looking at this again I think I know what you're seeing, it looks like James connection pool
is not capable of recognising that the db has gone away, and that the connections all have
to be re-made.

a brief test has confirmed this, the answer is that if you re-start the db you must also re-start
James.
On the plus side Serge is intending to replace this code in the next cycle.

As far as missing messages are concerned the following transcript shows that James behaves
acceptably (after a bad start!) in this circumstance and replies to the sender, with a 4xx
code, that the service is temporarily unavailable. The sender is then responsible for re-trying
later.

A slightly better solution would be to catch the SQLException and return a more meaningful
message, the whole answer is to catch the exception, test the connection, and replace it with
a fresh one if possible.


<< 220 killerbees.co.uk SMTP Server (JAMES SMTP Server 2.1a1-cvs) ready Fri, 6 Dec 2002
10:05:44 +0000 (GMT)
>> MAIL FROM:<danny>
<< 250 Sender <danny@localhost> OK
>> rcpt to:<danny>
<< 250 Recipient <danny@localhost> OK
>> DATA
<< 354 Ok Send data ending with <CRLF>.<CRLF>
>> testdata
>> .
<< 451 Error processing message: 
<< Exception spooling message: 
<< Exception caught while storing mail Container: 
<< java.sql.SQLException: 
<< Communication link failure: 
<< java.net.SocketException; nested exception is:
<< java.lang.RuntimeException: 
<< Exception caught while storing mail Container: 
<< java.sql.SQLException: Communication link failure: java.net.SocketException
>> quit
<< 221 killerbees.co.uk Service closing transmission channel

d.


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message