Examples of KeepAlive


Examples of org.codehaus.activemq.message.KeepAlive

            }
        }
    }
   
  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() < (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.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

    /**
     * @return a new Packet instance
     */

    public Packet createPacket() {
        return new KeepAlive();
    }
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("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.glassfish.grizzly.http.KeepAlive

                String msg = "pewebcontainer.invalidKeepAliveMaxConnections";
                msg = MessageFormat.format(msg, http.getMaxConnections(), Integer.toString(maxConnections));
                LOGGER.log(Level.WARNING, msg, ex);
            }
        }
        final KeepAlive keepAlive = new KeepAlive();
        keepAlive.setIdleTimeoutInSeconds(timeoutInSeconds);
        keepAlive.setMaxRequestsCount(maxConnections);
        return keepAlive;
    }
View Full Code Here

Examples of org.glassfish.grizzly.http.KeepAlive

        return httpAdapter.getMapper();
    }

    @Override
    protected KeepAlive configureKeepAlive(Http http) {
        final KeepAlive keepAlive = super.configureKeepAlive(http);
        keepAlive.getMonitoringConfig().addProbes(new KeepAliveMonitor(
                grizzlyService.getMonitoring(), name, keepAlive));
        return keepAlive;
    }
View Full Code Here

Examples of org.glassfish.grizzly.http.KeepAlive

                String msg = "pewebcontainer.invalidKeepAliveMaxConnections";
                msg = MessageFormat.format(msg, http.getMaxConnections(), Integer.toString(maxConnections));
                LOGGER.log(Level.WARNING, msg, ex);
            }
        }
        final KeepAlive keepAlive = new KeepAlive();
        keepAlive.setIdleTimeoutInSeconds(timeoutInSeconds);
        keepAlive.setMaxRequestsCount(maxConnections);
        return keepAlive;
    }
View Full Code Here

Examples of org.glassfish.grizzly.http.KeepAlive

        return httpAdapter.getMapper();
    }

    @Override
    protected KeepAlive configureKeepAlive(Http http) {
        final KeepAlive keepAlive = super.configureKeepAlive(http);
        keepAlive.getMonitoringConfig().addProbes(new KeepAliveMonitor(
                grizzlyService.getMonitoring(), name, keepAlive));
        return keepAlive;
    }
View Full Code Here

Examples of org.glassfish.grizzly.http.KeepAlive

        return httpAdapter.getMapper();
    }

    @Override
    protected KeepAlive configureKeepAlive(Http http) {
        final KeepAlive keepAlive = super.configureKeepAlive(http);
        keepAlive.getMonitoringConfig().addProbes(new KeepAliveMonitor(
                grizzlyService.getMonitoring(), name, keepAlive));
        return keepAlive;
    }
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.