Bug 637

Summary: globus error code not accessible in GramJobListeners when a job fails
Product: CoG jglobus Reporter: thierry ginoux <thierry.ginoux@gridxpert.com>
Component: gramAssignee: Jarek Gawor <gawor@mcs.anl.gov>
Status: RESOLVED FIXED    
Severity: major CC: gregor@mcs.anl.gov
Priority: P2    
Version: 1.0a   
Target Milestone: ---   
Hardware: All   
OS: All   

Description From 2003-01-24 09:31:01
Two bugs prevent job listeners getting the error code of a failed job (with 
getError() of GramJob class):

It is also true for 0.9.13 version...

- in GramJob.java: setError(int code) does not update error member:

  /**
   * Sets the error code of the job.
   * Note: User should not use this method.
   *
   * @param code error code
   */
  protected void setError(int code) {
    this.error = error;
  } 

This works better:

  protected void setError(int code) {
    this.error = code;
  } 

- in CallbackHandler.java, job listeners are notified of the status change 
before error is set:

  job.setStatus( hd.status );
  job.setError( hd.failureCode );


as listeners are called in setStatus...

This works better:

  job.setError( hd.failureCode );
  job.setStatus( hd.status );
------- Comment #1 From 2003-01-24 23:15:31 -------
Thanks for catching this. This is fixed now on the jglobus "jglobus-jgss" 
branch.