JBoss Community

Deploying services and error handling

reply from Alexey Loubyansky in JBoss AS7 Development - View the full discussion

I've created the main task for deployment error handling https://jira.jboss.org/browse/JBAS-8334 (which is assigned to me for now) and subtasks to make sure it's properly done

A deployment can fail validation on the domain controller.  In this event, the deployment is not added to the domain and an error is thrown from the deployer API, so this does not impact the server.

https://jira.jboss.org/browse/JBAS-8336 (unassigned for now)

A deployment can fail to be added to the MSC batch.  For example, a service may be attempted to be defined which already exists in the batch (in fact, at present this is the only possible error outside of outright code bugs).  In this event, the correct thing to do is to log the error and continue.

https://jira.jboss.org/browse/JBAS-8335 (unassigned at the moment)

A failure can happen at batch resolve time.  This is currently a problem case.  In this case the entire batch is undone.  Types of failures here include: duplicate service definition (i.e. a service was defined that already exists in the container), missing required dependency (i.e. a service was defined that depends on something that isn't there), circular dependency (i.e. two or more service definitions represent circularity in terms of their dependency links).  Right now this erases the entire batch, which means that the server cannot start if any of these errors occur.  I think that circularity is quite unlikely but the other two errors are not uncommon, and should not prevent the server from starting up.  The correct behavior is, in my opinion, to log each error and continue, possibly yielding a report of problem services after the batch is resolved (it is likely, however, that one failure will lead to others).

https://jira.jboss.org/browse/JBAS-8337 (assigned to me)

A failure can happen during service start.  In this case, the exception is logged, and all the service's dependents will be trapped in a waiting state.  This type of error will typically be due to transient conditions, like an incorrectly configured IP address, disk space issues, and so on.  The correct behavior here is to log the error and let the user decide (based on the GUI or perhaps by deployment plan policy) whether to fix the issue and retry the failed service, let the error stand, or pull out the deployment unit.

    https://jira.jboss.org/browse/JBAS-8338 (unassigned at the moment)

    Reply to this message by going to Community

    Start a new discussion in JBoss AS7 Development at Community