You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (JIRA)" <ji...@apache.org> on 2009/11/04 00:58:32 UTC

[jira] Created: (OPENEJB-1101) Cleaner undeploy for failed deployments

Cleaner undeploy for failed deployments
---------------------------------------

                 Key: OPENEJB-1101
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1101
             Project: OpenEJB
          Issue Type: Improvement
          Components: deployment
            Reporter: David Blevins
             Fix For: 3.1.x


When an application fails to deploy, we don't really know how much work we've done in the assembler.creatApplication phase, so as a result we try and undo everything.  That of course results in a lot of exceptions saying that we couldn't cleanly undeploy the application. 

We could do something simple and put an object on the thread in the createApplication method that records the steps we've taken; maybe stuff it full of enum values -- or even better, just remember the last enum value as there is an order to them and we could assume all previous steps were done.  Then in destroyApplication we can check for it and use it to only know how far to go in our destroy logic.

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


[jira] Commented: (OPENEJB-1101) Cleaner undeploy for failed deployments

Posted by "Jacek Laskowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773407#action_12773407 ] 

Jacek Laskowski commented on OPENEJB-1101:
------------------------------------------

Do you mean a kind of a compensation handler which would revert all the changes made so far in the deployment process? Would it boil down to split assembler.createApplication into a set of actions and create UNactions (don't know how to call them though)? Nice idea.

> Cleaner undeploy for failed deployments
> ---------------------------------------
>
>                 Key: OPENEJB-1101
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1101
>             Project: OpenEJB
>          Issue Type: Improvement
>          Components: deployment
>            Reporter: David Blevins
>             Fix For: 3.1.x
>
>
> When an application fails to deploy, we don't really know how much work we've done in the assembler.creatApplication phase, so as a result we try and undo everything.  That of course results in a lot of exceptions saying that we couldn't cleanly undeploy the application. 
> We could do something simple and put an object on the thread in the createApplication method that records the steps we've taken; maybe stuff it full of enum values -- or even better, just remember the last enum value as there is an order to them and we could assume all previous steps were done.  Then in destroyApplication we can check for it and use it to only know how far to go in our destroy logic.

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