You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Burn Lewis (JIRA)" <ui...@incubator.apache.org> on 2008/12/16 18:02:44 UTC

[jira] Created: (UIMA-1251) If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate

If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate
-------------------------------------------------------------------------------------------------------------------------

                 Key: UIMA-1251
                 URL: https://issues.apache.org/jira/browse/UIMA-1251
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
    Affects Versions: 2.2.2
            Reporter: Burn Lewis


When initialization of an aggregate fails we need to give the successful delegates the opportunity to release their resources.  Critical for JMS service adapters as they create a thread that waits on replies from the remote service.  Reported as a runAE hang by Jerry Quinn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-1251) If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate

Posted by "Burn Lewis (JIRA)" <ui...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657416#action_12657416 ] 

Burn Lewis commented on UIMA-1251:
----------------------------------

The "When called" section could be updated, but the "Requirements" say destroy should release resources to get ready for another initialize which implies that it should undo the effect of any previous initialize, even if partial ... but it wouldn't hurt to clarify that.  Meanwhile we should try to ensure the framework classes follow a similar contract where appropriate, and Marshall has found a problem with my patch as it exposes a bug in the FlowControllerContainer's destroy method after partial initialization.

> If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1251
>                 URL: https://issues.apache.org/jira/browse/UIMA-1251
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>         Attachments: UIMA-1251.patch
>
>
> When initialization of an aggregate fails we need to give the successful delegates the opportunity to release their resources.  Critical for JMS service adapters as they create a thread that waits on replies from the remote service.  Reported as a runAE hang by Jerry Quinn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (UIMA-1251) If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate

Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor reassigned UIMA-1251:
------------------------------------

    Assignee: Marshall Schor

> If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1251
>                 URL: https://issues.apache.org/jira/browse/UIMA-1251
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>         Attachments: UIMA-1251.patch
>
>
> When initialization of an aggregate fails we need to give the successful delegates the opportunity to release their resources.  Critical for JMS service adapters as they create a thread that waits on replies from the remote service.  Reported as a runAE hang by Jerry Quinn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (UIMA-1251) If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate

Posted by "Burn Lewis (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Burn Lewis updated UIMA-1251:
-----------------------------

    Attachment: UIMA-1251.patch

This patch catches the exception, calls destroy on the aggregate, and rethrows the exception.

> If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1251
>                 URL: https://issues.apache.org/jira/browse/UIMA-1251
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Burn Lewis
>         Attachments: UIMA-1251.patch
>
>
> When initialization of an aggregate fails we need to give the successful delegates the opportunity to release their resources.  Critical for JMS service adapters as they create a thread that waits on replies from the remote service.  Reported as a runAE hang by Jerry Quinn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-1251) If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate

Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657386#action_12657386 ] 

Marshall Schor commented on UIMA-1251:
--------------------------------------

This raises a more general question.  Consider an aggregate with several delegates, and a flow controller.  At initialization time, the {{initialize}} methods are run, in some sequence, on these delegates + flow controller.  Exceptions could occur at many points along the way.

If a component, itself, (e.g., a delegate) has an exception in its {{initialize}} method, it should catch this in a try - finally block if it is   necessary to do any "cleanup" that it would need to do for proper termination.

If one component fails to initialize, the current design terminates the entire running, in base UIMA.  In UIMA-AS, if initialization of a component fails, the only allowed actions are retry (which either succeeds or fails eventually), disable or terminate.  

If termination happens, there may be components which have been initialized, as well as components which have not yet been initialized.  For base UIMA, the ones which have been initialized need to have their destroy() method called, as suggested above.  

This is a new contract for destroy().  The previous contract, see: http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.aae.additional_topics , omits this case of calling destroy().  So that documentation will need to be updated.

> If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1251
>                 URL: https://issues.apache.org/jira/browse/UIMA-1251
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>         Attachments: UIMA-1251.patch
>
>
> When initialization of an aggregate fails we need to give the successful delegates the opportunity to release their resources.  Critical for JMS service adapters as they create a thread that waits on replies from the remote service.  Reported as a runAE hang by Jerry Quinn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (UIMA-1251) If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate

Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor closed UIMA-1251.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3

Closing at this point with no further testing or investigation, so we can include in the release.

> If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1251
>                 URL: https://issues.apache.org/jira/browse/UIMA-1251
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>             Fix For: 2.3
>
>         Attachments: UIMA-1251.patch
>
>
> When initialization of an aggregate fails we need to give the successful delegates the opportunity to release their resources.  Critical for JMS service adapters as they create a thread that waits on replies from the remote service.  Reported as a runAE hang by Jerry Quinn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (UIMA-1251) If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate

Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657519#action_12657519 ] 

Marshall Schor commented on UIMA-1251:
--------------------------------------

The main part of this fix is committed.  Left to do: verify that destroy() is called for partial initializations in the CPE, and for UIMA-AS.

> If one delegate in an aggregate uses a JMS service descriptor and another fails to initialize, the JVM fails to terminate
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-1251
>                 URL: https://issues.apache.org/jira/browse/UIMA-1251
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>         Attachments: UIMA-1251.patch
>
>
> When initialization of an aggregate fails we need to give the successful delegates the opportunity to release their resources.  Critical for JMS service adapters as they create a thread that waits on replies from the remote service.  Reported as a runAE hang by Jerry Quinn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.