Package org.apache.sandesha2

Examples of org.apache.sandesha2.SandeshaException


      httpServer.stop();

    try {
      Thread.sleep(300);
    } catch (InterruptedException e) {
      throw new SandeshaException("sleep interupted");
    }
  }
View Full Code Here


        return maximumRetransmissionCount;
      } else if (parent!=null) {
        return parent.getMaximumRetransmissionCount();
      } else {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyHasNotBeenSet, Sandesha2Constants.Assertions.ELEM_MAX_RETRANS_COUNT);
        throw new SandeshaException (message);
      }
     
    }
View Full Code Here

        return exponentialBackoff;
      } else if (parent!=null) {
        return parent.isExponentialBackoff ();
      } else {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyHasNotBeenSet, Sandesha2Constants.Assertions.ELEM_EXP_BACKOFF);
        throw new SandeshaException (message);
      }
    }
View Full Code Here

        return retransmissionInterval;
      } else if (parent!=null) {
        return parent.getRetransmissionInterval();
      } else {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyHasNotBeenSet, Sandesha2Constants.Assertions.ELEM_RETRANS_INTERVAL);
        throw new SandeshaException (message);
      }
    }
View Full Code Here

        return acknowledgementInterval;
      } else if (parent!=null) {
        return parent.getAcknowledgementInterval();
      } else {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyHasNotBeenSet, Sandesha2Constants.Assertions.ELEM_ACK_INTERVAL);
        throw new SandeshaException (message);
      }
    }
View Full Code Here

        return useMessageSerialization;
      } else if (parent!=null) {
        return parent.isUseMessageSerialization();
      } else {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyHasNotBeenSet, Sandesha2Constants.Assertions.ELEM_USE_SERIALIZATION);
        throw new SandeshaException (message);
      }
  }
View Full Code Here

        return enforceRM;
      } else if (parent!=null) {
        return parent.isEnforceRM();
      } else {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyHasNotBeenSet, Sandesha2Constants.Assertions.ELEM_ENFORCE_RM);
        throw new SandeshaException (message);
      }
  }
View Full Code Here

    String internalSequenceID = getInternalSequenceIdFromServiceClient(serviceClient);

    ServiceContext serviceContext = serviceClient.getServiceContext();
    if (serviceContext == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.serviceContextNotSet));

    ConfigurationContext configurationContext = serviceContext.getConfigurationContext();

    SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
    if (sequenceReport == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.cannotFindReportForGivenData, serviceClient.toString()));

    if (sequenceReport.getSequenceStatus() != SequenceReport.SEQUENCE_STATUS_ESTABLISHED) {
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.noSequenceEstablished,
          internalSequenceID));
    }

    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());

    // Get a transaction to retrieve the properties
    Transaction transaction = null;
    String sequenceID = null;
   
    try
    {
      transaction = storageManager.getTransaction();
      sequenceID = SandeshaUtil.getSequenceIDFromInternalSequenceID(internalSequenceID, storageManager);   
    }
    finally
    {
      // Commit the transaction as it was only a retrieve
      if(transaction != null) transaction.commit();
    }
   
    if (sequenceID == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.sequenceIdBeanNotSet));

    return sequenceID;
  }
View Full Code Here

  private SOAPFactory defaultFactory;
  private String namespaceValue = null;
 
  public UsesSequenceSTR(SOAPFactory factory,String namespaceValue) throws SandeshaException {
    if (!isNamespaceSupported(namespaceValue))
      throw new SandeshaException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.unknownSpec,
          namespaceValue));
   
    this.namespaceValue = namespaceValue;
    this.defaultFactory = factory;
View Full Code Here

 
  private static SOAPEnvelope configureAckRequest(Options options, ConfigurationContext configurationContext)
 
  throws SandeshaException, MissingResourceException {
    if (options == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.optionsObjectNotSet));

    EndpointReference epr = options.getTo();
    if (epr == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.toEPRNotValid, null));

    //first see if the cliet has told us which sequence to terminate
    String internalSequenceID =
      (String)options.getProperty(SandeshaClientConstants.INTERNAL_SEQUENCE_ID);
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.SandeshaException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.