Examples of KeepAlive


Examples of org.activemq.message.KeepAlive

        assertTrue("Exceptions were thrown: " + exceptions, exceptions.size() == 0);
    }

    public void testAsyncSendWithReceipt() throws Exception {
        sendReceipts = true;
        Packet packet = new KeepAlive();
        packet.setId((short) 1);
        ReceiptHolder rh = sender.asyncSendWithReceipt(packet);
        Receipt result = rh.getReceipt(5000);
        if (result == null) {
            fail("Should have gotten receipt");
        }
View Full Code Here

Examples of org.ajax4jsf.model.KeepAlive

      Map<String, Object> requestMap = context.getExternalContext()
          .getRequestMap();
      for (Object key : beansMap.keySet()) {
        Object bean = beansMap.get(key);
        if (bean != null) {
          KeepAlive annotation = bean.getClass().getAnnotation(KeepAlive.class);
          if (annotation != null) {
            if (!isAjax && annotation.ajaxOnly()) {

              //skip ajax-only beans for non-ajax requests
              continue;
            }
          }
View Full Code Here

Examples of org.ajax4jsf.model.KeepAlive

      Map<String, Object> requestMap = context.getExternalContext()
          .getRequestMap();
      for (Object key : beansMap.keySet()) {
        Object bean = beansMap.get(key);
        if (bean != null) {
          KeepAlive annotation = bean.getClass().getAnnotation(KeepAlive.class);
          if (annotation != null) {
            if (!isAjax && annotation.ajaxOnly()) {

              //skip ajax-only beans for non-ajax requests
              continue;
            }
          }
View Full Code Here

Examples of org.ajax4jsf.model.KeepAlive

      Map<String, Object> requestMap = context.getExternalContext()
      .getRequestMap();
      for (Object key : beansMap.keySet()) {
        Object bean = beansMap.get(key);
        if (bean != null) {
          KeepAlive annotation = bean.getClass().getAnnotation(KeepAlive.class);
          if (annotation != null) {
            if (!isAjax && annotation.ajaxOnly()) {

              //skip ajax-only beans for non-ajax requests
              continue;
            }
          }
View Full Code Here

Examples of org.ajax4jsf.model.KeepAlive

      Map<String, Object> requestMap = context.getExternalContext()
          .getRequestMap();
      for (Object key : beansMap.keySet()) {
        Object bean = beansMap.get(key);
        if (bean != null) {
          KeepAlive annotation = bean.getClass().getAnnotation(KeepAlive.class);
          if (annotation != null) {
            if (!isAjax && annotation.ajaxOnly()) {

              //skip ajax-only beans for non-ajax requests
              continue;
            }
          }
View Full Code Here

Examples of org.codehaus.activemq.message.KeepAlive

  private void examineChannel(ReliableTransportChannel channel) {
    if (channel.getLastReceiptTimestamp() < (System.currentTimeMillis() - channel.getKeepAliveTimeout()))
      if (channel.isTransportConnected() && !channel.isPendingStop()) {
        log.info("Sending keep-alive on channel " + channel.toString());
        KeepAlive packet = new KeepAlive();
        packet.setId(packetIdGenerator.generateId());
        try {
          channel.asyncSend(packet);
          zombieChannelSuspects.add(channel);
        } catch (JMSException e) {
          log.error("Error sending keep-alive to channel " + channel.toString()
View Full Code Here

Examples of org.codehaus.activemq.message.KeepAlive

  private void examineChannel(ReliableTransportChannel channel) {
    if (channel.getLastReceiptTimestamp() < (System.currentTimeMillis() - channel.getKeepAliveTimeout()))
      if (channel.isTransportConnected() && !channel.isPendingStop()) {
        log.debug("Sending keep-alive on channel " + channel.toString());
        KeepAlive packet = new KeepAlive();
        packet.setId(packetIdGenerator.generateId());
        try {
          channel.asyncSendWithReceipt(packet);
          zombieChannelSuspects.add(channel);
        } catch (JMSException e) {
          log.error("Error sending keep-alive to channel " + channel.toString()
View Full Code Here

Examples of org.codehaus.activemq.message.KeepAlive

     * validate the connection
     * @param timeout
     * @throws JMSException
     */
  public void validateConnection(int timeout) throws JMSException {
    KeepAlive packet = new KeepAlive();
    packet.setReceiptRequired(true);
    packet.setId(this.packetIdGenerator.getNextShortSequence());
    // In most cases, if the transport is dead due to network errors
    // the network error will be recognised immediately and an exception
    // thrown. If the duplicate client ids are due to misconfiguration,
    // we make sure that we do not terminate the "right" connection
    // prematurely by using a long timeout here. If the existing client
View Full Code Here

Examples of org.codehaus.activemq.message.KeepAlive

    assertTrue("Exceptions were thrown: " + exceptions, exceptions.size() == 0);
  }
 
  public void testAsyncSendWithReceipt() throws Exception {
    sendReceipts = true;
    Packet packet = new KeepAlive();
    packet.setId((short)1);
        ReceiptHolder rh = sender.asyncSendWithReceipt(packet);
        Receipt result = rh.getReceipt(5000);
        if (result == null) fail("Should have gotten receipt");
  }
View Full Code Here

Examples of org.codehaus.activemq.message.KeepAlive

  private void examineChannel(ReliableTransportChannel channel) {
    if ((channel.getLastReceiptTimestamp() + channel.getKeepAliveTimeout()) < System.currentTimeMillis())
      if (channel.isTransportConnected() && !channel.isPendingStop()) {
        log.debug("Sending keep-alive on channel " + channel.toString());
        KeepAlive packet = new KeepAlive();
        packet.setReceiptRequired(true);
        try {
          channel.asyncSendWithReceipt(packet);
          zombieChannelSuspects.add(channel);
        } catch (JMSException e) {
          log.error("Error sending keep-alive to channel " + channel.toString()
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.