Red Hat Bugzilla – Bug 536647
OperationResult should contain an explicit notion of 'isSuccess'/'isFailure'
Last modified: 2009-02-18 12:24:00 EST
We have seen a lot of strange effects / displays around returned operation values.
The OperationResult should get an explicit field denoting if the operation resulted in an error or not.
Currently this is done by throwing an Exception in the plugin.
The 'get*Result()' in OperationResult does not help, as it is free text
See also https://jira.jboss.org/jira/browse/JOPR-47
OperationsResults should add a new "isSuccessful()" method that returns true or false. "setSuccessful(boolean)" will allow the plugin developer to tell the server if this operation failed or succeeded.
The PC now needs to examine isSuccessful() to determine if it needs to call operationSuccess or operationFailure on the server service (the PC's exception handling can remain the same).
The server service impl needs to add a new Configuration results parameter to its operationFailure() method. *This can be null* - if its null, it should be ignored by the server-service impl on the server (this will be null when the failure was detected via an exception being thrown by the plugin or PC).
rev2631 - provide mechanism to allow plugin developers to provide a specific failure message, as opposed to being forced to throw an exception out of the invokeOperation method;
this allows them to fill in additional details into the complexResults object, such as capture stdout/stderr at the time of failure or even error/return codes;
embjopr r113 updates Embedded's OperationServerService impl to conform to the new API.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-976