throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "This application does not accept remote calls any more"); throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "Container is shuting down on this node (timeout)"); throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "Container is shuting down on this node"); gce.setCompletionStatus (gce.COMPLETED_MAYBE); throw gce; throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "Container is not allowing invocations as it failed to start or is shutting down");
private boolean handleGenericClusteringException(Invocation invocation, int failoverCounter, boolean definitivlyRemoveNodeOnFailure, GenericClusteringException gce) throws ServerException { // this is a generic clustering exception that contain the // completion status: usefull to determine if we are authorized // to re-issue a query to another node // if( gce.getCompletionStatus() == GenericClusteringException.COMPLETED_NO ) { // we don't want to remove the node from the list of targets // UNLESS there is a risk to loop if (totalNumberOfTargets() >= failoverCounter) { if( gce.isDefinitive() == false ) definitivlyRemoveNodeOnFailure = false; } } else { invocationHasReachedAServer(invocation); throw new ServerException("Clustering error", gce); } return definitivlyRemoveNodeOnFailure; }
protected void checkFailoverNeed (Invocation mi) throws GenericClusteringException { Object data = mi.getValue ("DO_FAIL_DURING_NEXT_CALL"); if (data != null && data instanceof java.lang.Boolean && data.equals (java.lang.Boolean.TRUE)) { // we now determine if we have already failed // Object alreadyDone = mi.getValue ("FAILOVER_COUNTER"); if (alreadyDone != null && alreadyDone instanceof java.lang.Integer && ((java.lang.Integer)alreadyDone).intValue () == 0) { // we do fail // this.log.debug ("WE FAILOVER IN SERVER INTERCEPTOR (explicit failover asked by client interceptor)!"); throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "Test failover from server interceptor", false); } } }
e = new GenericClusteringException (GenericClusteringException.COMPLETED_NO, e.getMessage());
if(gcex.getCompletionStatus() == GenericClusteringException.COMPLETED_NO) if(!gcex.isDefinitive()) if(gcex.getCompletionStatus() == GenericClusteringException.COMPLETED_NO) if(!gcex.isDefinitive())
throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "This application does not accept remote calls any more"); throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "Container is shuting down on this node (timeout)"); throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "Container is shuting down on this node"); gce.setCompletionStatus (gce.COMPLETED_MAYBE); throw gce; throw new GenericClusteringException (GenericClusteringException.COMPLETED_NO, "Container is not allowing invocations as it failed to start or is shutting down");
throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, "target is not/no more registered on this node"); throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, "invocations are currently not allowed on this target"); throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e); throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e);
throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, "target is not/no more registered on this node"); throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, "invocations are currently not allowed on this target"); throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e); throw new GenericClusteringException(GenericClusteringException.COMPLETED_NO, e);