Examples of SandeshaThread


Examples of org.apache.sandesha2.workers.SandeshaThread

      }
    }
   
    // If the storage manager has an invoker, then they may be implementing inOrder, or
    // transactional delivery. Either way, if they have one we should use it.
    SandeshaThread invoker = storageManager.getInvoker();
    if (invoker != null) {
      // Whatever the MEP, we stop processing here and the invoker will do the real work. We only
      // SUSPEND if we need to keep the backchannel open for the response... we may as well ABORT
      // to let other cases end more quickly.
      if(backchannelFree && ackBackChannel) {
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

      log.debug("Enter: SandeshaUtil::startWorkersForSequence, sequence " + sequence);
   
    StorageManager mgr = getSandeshaStorageManager(context, context.getAxisConfiguration());
    boolean polling = sequence.isPollingMode();
   
    SandeshaThread sender = mgr.getSender();
    SandeshaThread invoker = mgr.getInvoker();
    SandeshaThread pollMgr = mgr.getPollingManager();
   
    // Only start the polling manager if we are configured to use MakeConnection
    if(polling && pollMgr == null) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.makeConnectionDisabled);
      throw new SandeshaException(message);
    }

    if(sequence instanceof RMSBean) {
      // We pass in the internal sequence id for internal sequences.
      String sequenceId = ((RMSBean)sequence).getInternalSequenceID();
      sender.runThreadForSequence(context, sequenceId, true);
      if(polling) pollMgr.runThreadForSequence(context, sequenceId, true);
    } else {
      String sequenceId = sequence.getSequenceID();
      sender.runThreadForSequence(context, sequenceId, false);
      if(invoker != null) invoker.runThreadForSequence(context, sequenceId, false);
      if(polling) pollMgr.runThreadForSequence(context, sequenceId, false);
    }
   
    if (log.isDebugEnabled()) log.debug("Exit: SandeshaUtil::startWorkersForSequence");
  }
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

 
  public void commit() {
    releaseLocks();
    if(sentMessages) manager.getSender().wakeThread();
    if(receivedMessages) {
      SandeshaThread invoker = manager.getInvoker();
      if(invoker != null) invoker.wakeThread();
    }
    active = false;
  }
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

    if(log.isDebugEnabled()) log.debug("Entry: SandeshaModule::shutdown, " + configurationContext);
    StorageManager storageManager = SandeshaUtil.
      getSandeshaStorageManager(configurationContext, configurationContext.getAxisConfiguration());

    if (storageManager!=null) {
      SandeshaThread sender = storageManager.getSender();
      SandeshaThread invoker = storageManager.getInvoker();
      SandeshaThread pollingManager = storageManager.getPollingManager();
     
      //stopping threads.
      if (sender!=null)
        sender.stopRunning();
      if (invoker!=null)
        invoker.stopRunning();
      if (pollingManager!=null)
        pollingManager.stopRunning();
     
      //shutting down the storage manager.
      storageManager.shutdown();
    }
   
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

    if(log.isDebugEnabled()) log.debug("Entry: SandeshaModule::shutdown, " + configurationContext);
    StorageManager storageManager = SandeshaUtil.
      getSandeshaStorageManager(configurationContext, configurationContext.getAxisConfiguration());

    if (storageManager!=null) {
      SandeshaThread sender = storageManager.getSender();
      SandeshaThread invoker = storageManager.getInvoker();
      SandeshaThread pollingManager = storageManager.getPollingManager();
     
      //stopping threads.
      if (sender!=null)
        sender.stopRunning();
      if (invoker!=null)
        invoker.stopRunning();
      if (pollingManager!=null)
        pollingManager.stopRunning();
     
      //shutting down the storage manager.
      storageManager.shutdown();
    }
   
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

 
  public void shutdown(){
    //shutdown the running threads
    getSender().stopRunning();
   
    SandeshaThread thread = getInvoker();
    if(thread != null) thread.stopRunning();
   
    thread = getPollingManager();
    if(thread != null) thread.stopRunning();
   
    //removing the reference to the configuration context
    context=null;
  }
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

 
  public void commit() {
    releaseLocks();
    if(sentMessages) manager.getSender().wakeThread();
    if(receivedMessages) {
      SandeshaThread invoker = manager.getInvoker();
      if(invoker != null) invoker.wakeThread();
    }
    active = false;
  }
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

      }
    }
   
    // If the storage manager has an invoker, then they may be implementing inOrder, or
    // transactional delivery. Either way, if they have one we should use it.
    SandeshaThread invoker = storageManager.getInvoker();
    if (invoker != null) {
      // Whatever the MEP, we stop processing here and the invoker will do the real work. We only
      // SUSPEND if we need to keep the backchannel open for the response... we may as well ABORT
      // to let other cases end more quickly.
      if(backchannelFree && ackBackChannel) {
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

      log.debug("Enter: SandeshaUtil::startWorkersForSequence, sequence " + sequence);
   
    StorageManager mgr = getSandeshaStorageManager(context, context.getAxisConfiguration());
    boolean polling = sequence.isPollingMode();
   
    SandeshaThread sender = mgr.getSender();
    SandeshaThread invoker = mgr.getInvoker();
    SandeshaThread pollMgr = mgr.getPollingManager();
   
    // Only start the polling manager if we are configured to use MakeConnection
    if(polling && pollMgr == null) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.makeConnectionDisabled);
      throw new SandeshaException(message);
    }

    if(sequence instanceof RMSBean) {
      // We pass in the internal sequence id for internal sequences.
      String sequenceId = ((RMSBean)sequence).getInternalSequenceID();
      sender.runThreadForSequence(context, sequenceId, true);
      if(polling) pollMgr.runThreadForSequence(context, sequenceId, true);
    } else {
      String sequenceId = sequence.getSequenceID();
      sender.runThreadForSequence(context, sequenceId, false);
      if(invoker != null) invoker.runThreadForSequence(context, sequenceId, false);
      if(polling) pollMgr.runThreadForSequence(context, sequenceId, false);
    }
   
    if (log.isDebugEnabled()) log.debug("Exit: SandeshaUtil::startWorkersForSequence");
  }
View Full Code Here

Examples of org.apache.sandesha2.workers.SandeshaThread

      log.debug("Enter: SandeshaUtil::startWorkersForSequence, sequence " + sequence);
   
    StorageManager mgr = getSandeshaStorageManager(context, context.getAxisConfiguration());
    boolean polling = sequence.isPollingMode();
   
    SandeshaThread sender = mgr.getSender();
    SandeshaThread invoker = mgr.getInvoker();
    SandeshaThread pollMgr = mgr.getPollingManager();
   
    // Only start the polling manager if we are configured to use MakeConnection
    if(polling && pollMgr == null) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.makeConnectionDisabled);
      throw new SandeshaException(message);
    }

    if(sequence instanceof RMSBean) {
      // We pass in the internal sequence id for internal sequences.
      String sequenceId = ((RMSBean)sequence).getInternalSequenceID();
      sender.runThreadForSequence(context, sequenceId, true);
      if(polling) pollMgr.runThreadForSequence(context, sequenceId, true);
    } else {
      String sequenceId = sequence.getSequenceID();
      sender.runThreadForSequence(context, sequenceId, false);
      if(invoker != null) invoker.runThreadForSequence(context, sequenceId, false);
      if(polling) pollMgr.runThreadForSequence(context, sequenceId, false);
    }
   
    if (LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Exit: SandeshaUtil::startWorkersForSequence");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.