You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Leon (JIRA)" <ji...@apache.org> on 2012/08/13 18:12:38 UTC

[jira] [Updated] (OFBIZ-5007) how about add a default implementation for deQueue() in AbstractJob?

     [ https://issues.apache.org/jira/browse/OFBIZ-5007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leon updated OFBIZ-5007:
------------------------

    Attachment: OFBIZ-5007.patch
    
> how about add a default implementation for deQueue() in AbstractJob?
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-5007
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5007
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Leon
>            Priority: Trivial
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-5007.patch
>
>
> Although I do not use "workflow" component and no ant build error there since it's comment out as default, there're some kind of java error in eclipse build. It is because org.ofbiz.workflow.client.StartActivityJob and org.ofbiz.workflow.WorkflowRunner extend AbstractJob but do not implement Job interface method - deQueue which is added recently.
> Is it better to add following code to Abstract.java or to implement deQueue in each concrete class?
> {code:java}
>     @Override
>     public void deQueue() throws InvalidJobException {
>         if (currentState != State.QUEUED) {
>             throw new InvalidJobException("Illegal state change");
>         }
>         this.currentState = State.CREATED;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira