You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Ean Schuessler <ea...@brainfood.com> on 2008/07/17 01:54:06 UTC

EmailWorker not threadsafe?

Is anyone using EmailWorker? I notice that it uses a class-wide static private int to keep track of how many attachments the email currently being stored has, which certainly isn't thread-safe and would almost certainly be tickled. It creates CommunicationEvents for me successfully but doesn't seem to create attachments.

Is anyone making use of this code in a production setting?

-- 
Ean Schuessler, CTO Brainfood.com
ean@brainfood.com - http://www.brainfood.com - 214-720-0700 x 315

Re: EmailWorker not threadsafe?

Posted by Tim Ruppert <ti...@hotwaxmedia.com>.
+1

On Jul 18, 2008, at 8:13 PM, Ean Schuessler wrote:

> I can fix the thread problem easily enough, just need to pass the  
> attachment count as a parameter in the method call rather than  
> having a static field. My problem was that it didn't seem to save  
> attachments correctly. I have a rather special case need where I  
> handle nested trees of forwarded mails so I wrote something up from  
> scratch. However, I could take a crack at debugging this. I can at  
> least provide a patch to clear up the thread-safeness.
>
> ----- "BJ Freeman" <bj...@free-man.net> wrote:
>
>> I reported this back last year.
>> glad to know what was causing it.
>>
>> David Jones sent the following on 7/17/2008 12:58 PM:
>>> Actually, my guess is that people are using it in production, and
>> either haven't been hit by the problem yet, or haven't noticed, or
>> having noticed weren't sure what to do about it...
>>>
>>> Do you have a patch for this, or do we need a volunteer to knock
>> this out?
>
> -- 
> Ean Schuessler, CTO Brainfood.com
> ean@brainfood.com - http://www.brainfood.com - 214-720-0700 x 315


Re: EmailWorker not threadsafe?

Posted by Ean Schuessler <ea...@brainfood.com>.
I can fix the thread problem easily enough, just need to pass the attachment count as a parameter in the method call rather than having a static field. My problem was that it didn't seem to save attachments correctly. I have a rather special case need where I handle nested trees of forwarded mails so I wrote something up from scratch. However, I could take a crack at debugging this. I can at least provide a patch to clear up the thread-safeness.

----- "BJ Freeman" <bj...@free-man.net> wrote:

> I reported this back last year.
> glad to know what was causing it.
> 
> David Jones sent the following on 7/17/2008 12:58 PM:
> > Actually, my guess is that people are using it in production, and
> either haven't been hit by the problem yet, or haven't noticed, or
> having noticed weren't sure what to do about it...
> > 
> > Do you have a patch for this, or do we need a volunteer to knock
> this out?

-- 
Ean Schuessler, CTO Brainfood.com
ean@brainfood.com - http://www.brainfood.com - 214-720-0700 x 315

Re: EmailWorker not threadsafe?

Posted by BJ Freeman <bj...@free-man.net>.
I reported this back last year.
glad to know what was causing it.

David Jones sent the following on 7/17/2008 12:58 PM:
> Actually, my guess is that people are using it in production, and either haven't been hit by the problem yet, or haven't noticed, or having noticed weren't sure what to do about it...
> 
> Do you have a patch for this, or do we need a volunteer to knock this out?
> 
> -David
> 
> 
> On Thu, 17 Jul 2008 13:31:34 -0500 (CDT), Ean Schuessler <ea...@brainfood.com> wrote:
>> I'll take that as a "no". :-D
>>
>> ----- "David E Jones" <jo...@hotwaxmedia.com> wrote:
>>
>>> Sounds like a pernicious evil and should be corrected....
>>>
>>> On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:
>>>> Is anyone making use of this code in a production setting?
>> --
>> Ean Schuessler, CTO Brainfood.com
>> ean@brainfood.com - http://www.brainfood.com - 214-720-0700 x 315
> 
> 
> 
> 


Re: EmailWorker not threadsafe?

Posted by David Jones <jo...@hotwaxmedia.com>.
Actually, my guess is that people are using it in production, and either haven't been hit by the problem yet, or haven't noticed, or having noticed weren't sure what to do about it...

Do you have a patch for this, or do we need a volunteer to knock this out?

-David


On Thu, 17 Jul 2008 13:31:34 -0500 (CDT), Ean Schuessler <ea...@brainfood.com> wrote:
> I'll take that as a "no". :-D
> 
> ----- "David E Jones" <jo...@hotwaxmedia.com> wrote:
> 
>> Sounds like a pernicious evil and should be corrected....
>>
>> On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:
>> >
>> > Is anyone making use of this code in a production setting?
> 
> --
> Ean Schuessler, CTO Brainfood.com
> ean@brainfood.com - http://www.brainfood.com - 214-720-0700 x 315


Re: EmailWorker not threadsafe?

Posted by Ean Schuessler <ea...@brainfood.com>.
I'll take that as a "no". :-D

----- "David E Jones" <jo...@hotwaxmedia.com> wrote:

> Sounds like a pernicious evil and should be corrected....
> 
> On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:
> >
> > Is anyone making use of this code in a production setting?

-- 
Ean Schuessler, CTO Brainfood.com
ean@brainfood.com - http://www.brainfood.com - 214-720-0700 x 315

Re: EmailWorker not threadsafe?

Posted by David E Jones <jo...@hotwaxmedia.com>.
Sounds like a pernicious evil and should be corrected....

-David


On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:

> Is anyone using EmailWorker? I notice that it uses a class-wide  
> static private int to keep track of how many attachments the email  
> currently being stored has, which certainly isn't thread-safe and  
> would almost certainly be tickled. It creates CommunicationEvents  
> for me successfully but doesn't seem to create attachments.
>
> Is anyone making use of this code in a production setting?
>
> -- 
> Ean Schuessler, CTO Brainfood.com
> ean@brainfood.com - http://www.brainfood.com - 214-720-0700 x 315