I think one workable solution could be to have SocketTimeout. If
transport.connect()
takes too long, then, InterruptedIOException, would be logged and
RemoteDelivery thread will go onto the next email, till the next
RemoteDelivery thread kicks in.

By code inspection, adding this line
props.put("mail.timeout", 10*1000+"");
will cause the underlying Socket SO_TIMOUT to be set. A configurable
property would be nicer and easy to add if this works.
I haven't tested this, but if someone could verify it would be a good
improvement to make. Otherwise I can put it on my todo list.

Harmeet

----- Original Message -----
From: "Serge Knystautas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 5:37 AM
Subject: Re: Blocked thread in RemoteDelivery


> Scott,
>
> I've seen this happen on rare occasion, but have never been able to
pinpoint
> what happens to that delivery thread.  I haven't been able to catch any
> exception or been able to reproduce the problem when I want.  So for now I
> similarly start multiple delivery threads.
>
> If you can reproduce the problem so that I can see it and create a fix, I
> would be most appreciative.  Thanks.
>
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
> ----- Original Message -----
> From: "scott werden" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 12, 2001 1:32 AM
> Subject: Blocked thread in RemoteDelivery
>
>
> >
> > Outgoing mail stopped being delivered today by my James server and I
took
> a
> > look at log files and code to see what was going on. What I discovered
is
> > that it appears the one and only delivery thread (created in
> > RemoteDelivery.java) got blocked within RemoteDelivery.deliver(). In the
> > code, a message gets logged (line 109) saying: "attempting delivery of
> XXX",
> > and another at line 130 that should report the message was successfully
> > sent. I never saw the 2nd message in the log file (although I saw the
1st)
> > after James hung, nor was there a message for any exceptions. Seems like
> > something hung in transport.connect() or transport.sendMessage(). I
> > restarted James and all the backed-up messages got sent and it is again
> > working OK. I did up the threads but this is just a delay tactic and not
a
> > fix.
> >
> > Anybody got any ideas? Has this bug been fixed? I have release 1.2.1.
> >
> > Thanks,
> > Scott W.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to