Examples of KeepAlive


Examples of com.sun.enterprise.config.serverbeans.KeepAlive

       
        try {
            instanceConfig =
                    ServerBeansFactory.getConfigBean(instanceConfigContext);
            if (instanceConfig.getHttpService().getKeepAlive() != null) {
                KeepAlive keepAlive =
                        instanceConfig.getHttpService().getKeepAlive();
                keepAliveConnections =
                        Long.parseLong(keepAlive.getMaxConnections());
                keepAliveIdleTime =
                        Integer.parseInt(keepAlive.getTimeoutInSeconds());
            }
        } catch (Exception ex) {
            _logger.log(Level.WARNING, "clb.proxy.config_default");
            return;
        }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.KeepAlive

            ConfigContext configContext = arg0.getConfigContext();
            Config config = ServerBeansFactory.getConfigBean(configContext);
            if (config == null) {
                return;
            }
            KeepAlive keepAlive = config.getHttpService().getKeepAlive();
            connectionManager.setKeepAliveMaxConnections(
                    Long.parseLong(keepAlive.getMaxConnections()));  
            connectionManager.setKeepAliveTimeout(Integer.parseInt(
                    keepAlive.getTimeoutInSeconds()));
        } catch (Exception e) {
           throw new AdminEventListenerException(e);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.KeepAlive

            }
        }, httpService);
    }

    private void migrateKeepAlive(NetworkConfig config, HttpService httpService) throws TransactionFailure {
        final KeepAlive keepAlive = httpService.getKeepAlive();
        if (keepAlive == null) {
            return;
        }
        for (Protocol protocol : config.getProtocols().getProtocol()) {
            final Http http = protocol.getHttp();
            if(http != null) {
                ConfigSupport.apply(new SingleConfigCode<Http>() {
                    @Override
                    public Object run(Http param) {
                        param.setMaxConnections(keepAlive.getMaxConnections());
                        param.setTimeoutSeconds(keepAlive.getTimeoutInSeconds());
                        return null;
                    }
                }, http);
            }
        }
View Full Code Here

Examples of org.activemq.message.KeepAlive

        Properties headers = parser.parse(in);
        while (in.readByte() != 0) {}

        if (format.isInTransaction())
        {
            return new PacketEnvelope(new KeepAlive(), headers);
        }
        TransactionInfo tx = new TransactionInfo();
        String tx_id = StompWireFormat.clientIds.generateId();
        format.setTransactionId(tx_id);
        tx.setTransactionId(tx_id);
View Full Code Here

Examples of org.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.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.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.activemq.message.KeepAlive

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

    public Packet createPacket() {
        return new KeepAlive();
    }
View Full Code Here

Examples of org.activemq.message.KeepAlive

        } else {
            // Then it should be active
            // Keep pinging the channel periodically
            if ((channel.getLastReceiptTimestamp() + channel.getKeepAliveTimeout()) < System.currentTimeMillis()) {
                log.debug("Sending keep-alive on channel " + channel.toString());
                KeepAlive packet = new KeepAlive();
                packet.setReceiptRequired(true);
                boolean wasConnected = channel.isTransportConnected();
                try {
                    channel.asyncSendWithReceipt(packet);
                    zombieChannelSuspects.add(channel);
                } catch (JMSException e) {
View Full Code Here

Examples of org.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
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.