How to enable heartbeat on EJB connections in JBoss EAP 7.2 wildfly-config.xml

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7.2

Issue

  • How to enable heartbeat on EJB connections in JBoss EAP 7.2 wildfly-config.xml

Resolution

In EAP 7.2 CP2+ , there is a default heartbeat-interval of 60000 ms (60 s) and default read-timeout of 120000 ms (120 s).

Configuring default for all connections (EAP 7.2 CP3+)

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <endpoint xmlns="urn:jboss-remoting:5.1" heartbeat-interval="30000" read-timeout="60000">
        <connections>
        </connections>
    </endpoint>
</configuration> 

Note: To be able to configure the default the xmlns must be urn:jboss-remoting:5.1

Configuring specific connections

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <endpoint xmlns="urn:jboss-remoting:5.0">
        <connections>
            <connection destination="remote+http://host1:8080" read-timeout="60000" write-timeout="60000" heartbeat-interval="30000"/>
            <connection destination="remote+http://host2:8080" read-timeout="60000" write-timeout="60000" heartbeat-interval="30000"/>
        </connections>
    </endpoint>
</configuration>
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.