Package org.apache.sandesha2.util

Examples of org.apache.sandesha2.util.FaultManager


     
      //setting a dummy property been to stop Sandesha2 from throwing exceptions.
      SandeshaPolicyBean policyBean = new SandeshaPolicyBean ();
      axisConfiguration.addParameter(new Parameter (Sandesha2Constants.SANDESHA_PROPERTY_BEAN,policyBean));
     
      InMemoryStorageManager storageManager = new InMemoryStorageManager (configurationContext);
     
      Transaction transaction = storageManager.getTransaction();
     
      RMSBeanMgr rmsBeanMgr = storageManager.getRMSBeanMgr();
     
      RMSBean rmsBean = new RMSBean ();
      RMSBean duplicateRMSBean = new RMSBean ();
     
      rmsBean.setCreateSeqMsgID(SandeshaUtil.getUUID());
View Full Code Here


    }
   
    Iterator ackRangeIterator = sequenceAck.getAcknowledgementRanges().iterator();
    Iterator nackIterator = sequenceAck.getNackList().iterator();

    FaultManager faultManager = new FaultManager();
    SandeshaException fault = faultManager
        .checkForUnknownSequence(rmMsgCtx, outSequenceId, storageManager);
    if(fault == null) {
      fault = faultManager.checkForInvalidAcknowledgement(rmMsgCtx, storageManager);
    }
    if (fault != null) {
      throw fault;
    }
View Full Code Here

    }

    ConfigurationContext context = createSeqMsg.getConfigurationContext();
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context, context.getAxisConfiguration());

    FaultManager faultManager = new FaultManager();
    SandeshaException fault = faultManager.checkForCreateSequenceRefused(createSeqMsg, storageManager);
    if (fault != null) {
      throw fault;
    }
   
    // If the inbound CreateSequence includes a SecurityTokenReference then
View Full Code Here

      OMElement body = msgCtx.getEnvelope().getBody();
      SecurityToken token = secManager.recoverSecurityToken(tokenBean.getValue());
      secManager.checkProofOfPossession(token, body, msgCtx);
    }

    FaultManager faultManager = new FaultManager();
    SandeshaException fault = faultManager.checkForUnknownSequence(rmMsgCtx, sequenceId, storageManager);
    if (fault != null) {
      throw fault;
    }

    SequencePropertyBean sequenceClosedBean = new SequencePropertyBean();
View Full Code Here

      String message = "Invalid sequence id";
      log.debug(message);
      throw new SandeshaException (message);
    }
   
    FaultManager faultManager = new FaultManager();
    RMMsgContext faultMessageContext = faultManager.checkForUnknownSequence(terminateSeqRMMsg,sequenceId);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = terminateSeqMsg.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
View Full Code Here

      String message = "No create sequence part is present in the create sequence message";
      log.debug(message);
      throw new SandeshaException(message);
    }

    FaultManager faultManager = new FaultManager();
    RMMsgContext faultMessageContext = faultManager.checkForCreateSequenceRefused(createSeqMsg);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = createSeqMsg.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
View Full Code Here

   
    MessageContext msgCtx = rmMsgCtx.getMessageContext();
   
    String sequenceID = closeSequence.getIdentifier().getIdentifier();
   
    FaultManager faultManager = new FaultManager();
    RMMsgContext faultMessageContext = faultManager.checkForUnknownSequence(rmMsgCtx,sequenceID);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = msgCtx.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
View Full Code Here

        .getSandeshaStorageManager(rmMsgCtx.getMessageContext()
            .getConfigurationContext());



    FaultManager faultManager = new FaultManager();
    RMMsgContext faultMessageContext = faultManager.checkForLastMsgNumberExceeded(rmMsgCtx);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = msgCtx.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
        engine.sendFault(faultMessageContext.getMessageContext());
      } catch (AxisFault e) {
        throw new SandeshaException ("Could not send the fault message",e);
      }
     
      return;
    }
   
    SequencePropertyBeanMgr seqPropMgr = storageManager.getSequencePropretyBeanMgr();
   
    //setting acked msg no range
    Sequence sequence = (Sequence) rmMsgCtx
        .getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
    String sequenceId = sequence.getIdentifier().getIdentifier();
    ConfigurationContext configCtx = rmMsgCtx.getMessageContext()
        .getConfigurationContext();
    if (configCtx == null) {
      String message = "Configuration Context is null";
      log.debug(message);
      throw new SandeshaException(message);
    }

    faultMessageContext = faultManager.checkForUnknownSequence(rmMsgCtx,sequenceId);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = msgCtx.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
        engine.send(faultMessageContext.getMessageContext());
      } catch (AxisFault e) {
        throw new SandeshaException ("Could not send the fault message",e);
      }
     
      return;
    }
   
    //setting mustUnderstand to false.
    sequence.setMustUnderstand(false);
    rmMsgCtx.addSOAPEnvelope();
   
    //throwing a fault if the sequence is closed.
    faultMessageContext = faultManager. checkForSequenceClosed(rmMsgCtx,sequenceId);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = msgCtx.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
View Full Code Here

      String message = "OutSequenceId is null";
      log.debug(message);
      throw new SandeshaException(message);
    }

    FaultManager faultManager = new FaultManager();
    RMMsgContext faultMessageContext = faultManager.checkForUnknownSequence(rmMsgCtx,outSequenceId);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = msgCtx.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
        engine.sendFault(faultMessageContext.getMessageContext());
      } catch (AxisFault e) {
        throw new SandeshaException ("Could not send the fault message",e);
      }
     
      return;
    }
   
    faultMessageContext = faultManager.checkForInvalidAcknowledgement(rmMsgCtx);
    if (faultMessageContext != null) {
      ConfigurationContext configurationContext = msgCtx.getConfigurationContext();
      AxisEngine engine = new AxisEngine(configurationContext);
     
      try {
View Full Code Here

    String DONE = (String) msgCtx
        .getProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE);
    if (null != DONE && "true".equals(DONE))
      return;

    FaultManager faultManager = new FaultManager();
    RMMsgContext faultMessageContext = faultManager
        .checkForPossibleFaults(msgCtx);
    if (faultMessageContext != null) {
      AxisEngine engine = new AxisEngine(context);
      engine.send(faultMessageContext.getMessageContext());
      return;
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.util.FaultManager

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.