org.jboss.ha.framework.interfaces
Class GenericClusteringException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.jboss.util.NestedException
              extended by org.jboss.ha.framework.interfaces.GenericClusteringException
All Implemented Interfaces:
Serializable, org.jboss.util.NestedThrowable

public class GenericClusteringException
extends org.jboss.util.NestedException

Generic clustering exception that can be used to replace other exceptions that occur on the server. Thus, only this class is needed on the client side and some specific server side exceptions classes are not needed on the client side (such as JMX exceptions for example). Furthermore, it has support for "COMPLETED" status flag a la IIOP.

When an invocation reaches a node, it may be invoked on the actual target or not (or not completely). If COMPLETED_NO and working in a clustered environment, the client proxy is allowed to invoke the same invocation on a different node. Otherwise, it will depend if the target method is idempotent: this is no more the problem of this class but rather the meta-data of the business environment that can give this information

Version:
$Revision: 74878 $

Revisions:

8 avril 2002 Sacha Labourey:

Author:
Sacha Labourey.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.util.NestedThrowable
org.jboss.util.NestedThrowable.Util
 
Field Summary
 int completed
           
static int COMPLETED_MAYBE
          Means it is unclear whether the invocation that generated this exception was invoked on the server-side target
static int COMPLETED_NO
          Means the invocation that generated this exception was *not* invoked on the server-side target
static int COMPLETED_YES
          Means the invocation that generated this exception was invoked on the server-side target
 boolean isDefinitive
           
 
Fields inherited from class org.jboss.util.NestedException
nested
 
Fields inherited from interface org.jboss.util.NestedThrowable
DETECT_DUPLICATE_NESTING, NESTED_TRACE_ENABLED, PARENT_TRACE_ENABLED
 
Constructor Summary
GenericClusteringException()
           
GenericClusteringException(int CompletionStatus)
           
GenericClusteringException(int CompletionStatus, String s)
           
GenericClusteringException(int CompletionStatus, String s, boolean isDefinitive)
           
GenericClusteringException(int CompletionStatus, Throwable nested)
           
GenericClusteringException(int CompletionStatus, Throwable nested, boolean isDefinitive)
           
 
Method Summary
 int getCompletionStatus()
          Gets whether the invocation that generated this exception was completely invoked on the server side target.
 boolean isDefinitive()
          Indicates if the exception will most probably be repetitive (definitive) or if it is just a temporary failure and new attempts should be tried.
 void setCompletionStatus(int completionStatus)
           
 void setIsDefinitive(boolean definitive)
           
 
Methods inherited from class org.jboss.util.NestedException
getCause, getMessage, getNested, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPLETED_YES

public static final int COMPLETED_YES
Means the invocation that generated this exception was invoked on the server-side target

See Also:
Constant Field Values

COMPLETED_NO

public static final int COMPLETED_NO
Means the invocation that generated this exception was *not* invoked on the server-side target

See Also:
Constant Field Values

COMPLETED_MAYBE

public static final int COMPLETED_MAYBE
Means it is unclear whether the invocation that generated this exception was invoked on the server-side target

See Also:
Constant Field Values

isDefinitive

public boolean isDefinitive

completed

public int completed
Constructor Detail

GenericClusteringException

public GenericClusteringException()

GenericClusteringException

public GenericClusteringException(int CompletionStatus)

GenericClusteringException

public GenericClusteringException(int CompletionStatus,
                                  String s)

GenericClusteringException

public GenericClusteringException(int CompletionStatus,
                                  String s,
                                  boolean isDefinitive)

GenericClusteringException

public GenericClusteringException(int CompletionStatus,
                                  Throwable nested,
                                  boolean isDefinitive)

GenericClusteringException

public GenericClusteringException(int CompletionStatus,
                                  Throwable nested)
Method Detail

getCompletionStatus

public int getCompletionStatus()
Gets whether the invocation that generated this exception was completely invoked on the server side target.

When an invocation reaches a node, it may be invoked on the actual target or not (or not completely). If COMPLETED_NO and working in a clustered environment, the client proxy is allowed to invoke the same invocation on a different node. Otherwise, it will depend if the target method is idempotent: this is not the problem of this class but rather the meta-data of the business environment that can give this information

Returns:
COMPLETED_YES, COMPLETED_NO or COMPLETED_MAYBE.

setCompletionStatus

public void setCompletionStatus(int completionStatus)

isDefinitive

public boolean isDefinitive()
Indicates if the exception will most probably be repetitive (definitive) or if it is just a temporary failure and new attempts should be tried.


setIsDefinitive

public void setIsDefinitive(boolean definitive)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.