[jira] Created: (OFBIZ-156) JavaMailContainer.checkMessages doesn't handle exceptions well

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-156) JavaMailContainer.checkMessages doesn't handle exceptions well

Nicolas Malin (Jira)
JavaMailContainer.checkMessages doesn't handle exceptions well
--------------------------------------------------------------

                 Key: OFBIZ-156
                 URL: http://issues.apache.org/jira/browse/OFBIZ-156
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Scott Gray
            Priority: Minor
         Attachments: JMailException.txt

If an exception is thrown during checkMessages in the JavaMailContainer, the store is not closed which prevents subsequent attempts to connect and ultimately seems to lockup the poller.  The attached patch should be an improvement, but I'm not much of a programmer so it would be great if someone could look it over.

Thanks
Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-156) JavaMailContainer.checkMessages doesn't handle exceptions well

Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-156?page=comments#action_12427778 ]
           
David E. Jones commented on OFBIZ-156:
--------------------------------------

I took a quick peek at this and it looks fine, though I don't know that using the finally block is necessary (it should be okay though).

I don't really have a test scenario for this. Is there anyone who would like to volunteer to test and comment?

> JavaMailContainer.checkMessages doesn't handle exceptions well
> --------------------------------------------------------------
>
>                 Key: OFBIZ-156
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-156
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Scott Gray
>            Priority: Minor
>         Attachments: JMailException.txt
>
>
> If an exception is thrown during checkMessages in the JavaMailContainer, the store is not closed which prevents subsequent attempts to connect and ultimately seems to lockup the poller.  The attached patch should be an improvement, but I'm not much of a programmer so it would be great if someone could look it over.
> Thanks
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-156) JavaMailContainer.checkMessages doesn't handle exceptions well

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-156?page=comments#action_12427820 ]
           
Scott Gray commented on OFBIZ-156:
----------------------------------

I need the finally block to close the connection to the mail store, if an exception occurs while working with the mail folders there is no way to close the connection except using finally.  

The only way i can test it is to wait for an exception to occur, this usually happens while i'm accessing the mail store through a web client at the same time ofbiz is trying to access it, so I'll just have to wait for them to clash again.

> JavaMailContainer.checkMessages doesn't handle exceptions well
> --------------------------------------------------------------
>
>                 Key: OFBIZ-156
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-156
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Scott Gray
>            Priority: Minor
>         Attachments: JMailException.txt
>
>
> If an exception is thrown during checkMessages in the JavaMailContainer, the store is not closed which prevents subsequent attempts to connect and ultimately seems to lockup the poller.  The attached patch should be an improvement, but I'm not much of a programmer so it would be great if someone could look it over.
> Thanks
> Scott

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira