RE: Bug 23906 - Large emails throw OutOfMemoryError

2003-10-21 Thread Noel J. Bergman
Some good questions. > If a database is used as a repository this problem is only prolonged, cause > storing or retrieving mails to or from the the database currently loads the > entire Mail into a ByteArrayStream. > Actually im wondering why JDBCMailRepository.store(MailImpl mc) isnt using > the

Re: Bug 23906 - Large emails throw OutOfMemoryError

2003-10-21 Thread Mark Daring
Richard, the code you supplied does pretty much the same as MimeMessageWrapper is doing. If a database is used as a repository this problem is only prolonged, cause storing or retrieving mails to or from the the database currently loads the entire Mail into a ByteArrayStream. Actually im wondering

RE: MailetException vs MessagingException

2003-10-21 Thread Danny Angus
> I'd expect something like: > throw new TransientMailetException > (TransientMailetException.DBCONNECTFAILED,"A message",ex); > It would then be the job of the catcher for TransientMailetException to > respool or whatever > Or in the case of a MessagingException > throw new PermanentMail

RE: MailetException vs MessagingException

2003-10-21 Thread Jason Webb
> -Original Message- > From: Danny Angus [mailto:[EMAIL PROTECTED] > Sent: 21 October 2003 11:14 > To: 'James Developers List' > Subject: RE: MailetException vs MessagingException > > > > > > > > > You would also need to > > add attributes to give more meaningful error messages >

RE: MailetException vs MessagingException

2003-10-21 Thread Danny Angus
> You would also need to > add attributes to give more meaningful error messages (either to the > user or in the log). > For example: > -99 (database connection failed, will retry) > -101 (please wait, resource locked/busy) Perhaps this is the answer to the original question then, change

RE: MailetException vs MessagingException

2003-10-21 Thread Jason Webb
> -Original Message- > From: Danny Angus [mailto:[EMAIL PROTECTED] > Sent: 21 October 2003 10:43 > To: 'James Developers List' > Subject: RE: MailetException vs MessagingException > > > > > > > > Jason > > > In my way of thinking a MailetException ("there was a > problem")would

RE: MailetException vs MessagingException

2003-10-21 Thread Danny Angus
Jason wrote: > The trouble is, I think this should be done on a case-by-case basis :( > I do like the idea though. It would make catching common errors very > easy, by just binding a default handler to most containers. Yeah, I think JavaMail intends this to be used case-by-case to notify the

RE: MailetException vs MessagingException

2003-10-21 Thread Danny Angus
Jason > In my way of thinking a MailetException ("there was a problem")would be > (mostly) classed as transient, whereas a MessagingException ("this > message cannot be processed/delivered due a problem in it") would be > permanent > Just my 2p worth... Ha! I had it exactly the other way rou

RE: MailetException vs MessagingException

2003-10-21 Thread Jason Webb
> -Original Message- > From: Danny Angus [mailto:[EMAIL PROTECTED] > Sent: 21 October 2003 09:47 > To: James Developers List > Subject: Re: MailetException vs MessagingException > > > > > > > OTOH I suspect we should consider implementing listeners to > handle transient and asynch

Re: MailetException vs MessagingException

2003-10-21 Thread Danny Angus
OTOH I suspect we should consider implementing listeners to handle transient and asynchronous failure of transport and store, and keep exceptions for irrecoverable internal failures. If we're bound to JavaMail (which we are) specialising messaging exception to MailetException makes little sens

Re: MailetException vs MessagingException

2003-10-21 Thread Danny Angus
Serge, Danny Angus wrote: >>>Maybe given that we have to catch Exception in the mailet container no >>>matter what (you can't have runtime exceptions breaking processors), we >>>should remove MailetException and change the API to "throws Exception". >> >> IMO we do want to distingush between