/** * Complete the activity with the current completion status. * * @exception InvalidActivityException * Thrown if the current activity is not known about by the * activity system. * @exception WrongStateException * Thrown if the current activity is not in a state that * allows it to be completed. * @exception ProtocolViolationException * Thrown if the a violation of the activity service or HLS * protocol occurs. * @exception NoPermissionException * Thrown if the invoking thread does not have permission to * terminate the transaction. * @exception SystemException * Thrown if some other error occurred. * * @return the result of completing the activity. Null is valid and must be * interpreted within the context of any HLS that may exist. * * @see com.arjuna.mw.wsas.Outcome */ public Outcome end () throws InvalidActivityException, WrongStateException, ProtocolViolationException, NoPermissionException, SystemException { return end(_completionStatus); }
/** * Although users won't typically care what the underlying implementation * of a context is, they will need to do comparisons. * So, although this method is provided by Java.Object we have it here * to ensure that we don't forget to implement it! * * Two instances are equal if the refer to the same transaction. */ public boolean equals (Object obj) { if (obj != null) { if (obj == this) return true; else { if (obj instanceof ActivityHandleImple) { if (_theActivity.equals(obj)) return true; } } } return false; }
/** */ public boolean equals (Object obj) { if (obj != null) { if (obj != this) { if (obj instanceof ActivityImple) { if (((ActivityImple) obj).getGlobalId().equals(getGlobalId())) return true; } else return true; } } return false; }
if (activeChildren()) setCompletionStatus(cs); result = hls.complete(getCompletionStatus()); } else { result = new OutcomeImple(Failure.instance()); _parent.removeChild(this); _parent = null;
String serviceType = currentActivity.serviceType(); res = currentActivity.end(cs); } catch (Exception ex) { wsasLogger.i18NLogger.warn_UserActivityImple_2(ex);
ActivityImple currentActivity = new ActivityImple(current(), serviceType); currentActivity.start(timeout);
_parent.addChild(this); setCompletionStatus(FailureOnly.instance());
public int getTimeout () { try { return _theActivity.getTimeout(); } catch (Exception ex) { ex.printStackTrace(); return -1; } }
/** * Get the completion status currently associated with the activity. * * @exception NoActivityException Thrown if there is no activity * associated with the current thread. * @exception SystemException Thrown if any other error occurs. * * @return the termination status for the current activity, if any. */ public CompletionStatus getCompletionStatus () throws NoActivityException, SystemException { ActivityImple curr = current(); if (curr == null) throw new NoActivityException(); else return curr.getCompletionStatus(); }
/** * What is the name of the current activity? Use only for * debugging purposes! * * @exception NoActivityException Thrown if there is no activity * associated with the invoking thread. * @exception SystemException Thrown if any other error occurs. * * @return the name of the activity. */ public String activityName () throws NoActivityException, SystemException { ActivityImple curr = current(); if (curr == null) throw new NoActivityException(); // or return null? else return curr.activityName(); }
if (activeChildren()) setCompletionStatus(cs); result = hls.complete(getCompletionStatus()); } else { result = new OutcomeImple(Failure.instance()); _parent.removeChild(this); _parent = null;
String serviceType = currentActivity.serviceType(); res = currentActivity.end(); } catch (Exception ex) { wsasLogger.i18NLogger.warn_UserActivityImple_1(ex);
ActivityImple currentActivity = new ActivityImple(current(), serviceType); currentActivity.start(timeout);
_parent.addChild(this); setCompletionStatus(FailureOnly.instance());
public int getTimeout () { try { return _theActivity.getTimeout(); } catch (Exception ex) { ex.printStackTrace(); return -1; } }
/** * Get the completion status currently associated with the activity. * * @exception NoActivityException Thrown if there is no activity * associated with the current thread. * @exception SystemException Thrown if any other error occurs. * * @return the termination status for the current activity, if any. */ public CompletionStatus getCompletionStatus () throws NoActivityException, SystemException { ActivityImple curr = current(); if (curr == null) throw new NoActivityException(); else return curr.getCompletionStatus(); }
/** * What is the name of the current activity? Use only for * debugging purposes! * * @exception NoActivityException Thrown if there is no activity * associated with the invoking thread. * @exception SystemException Thrown if any other error occurs. * * @return the name of the activity. */ public String activityName () throws NoActivityException, SystemException { ActivityImple curr = current(); if (curr == null) throw new NoActivityException(); // or return null? else return curr.activityName(); }
if (activeChildren()) setCompletionStatus(cs); result = hls.complete(getCompletionStatus()); } else { result = new OutcomeImple(Failure.instance()); _parent.removeChild(this); _parent = null;