AnsweredAssumed Answered

Heartbeat thread restarts custom Transport on RunningState.ERROR or RunningState.STOPPED

Question asked by on Oct 26, 2015
Latest reply on Jul 11, 2018 by JStafurikesriaustralia-com-au-esridist

I have a custom GeoEvent transport that is getting automatically restarted when the transport code sets the RunningState to ERROR or STOPPED.  This results in the transport making successive passes through the code, when ideally the transport (and associated connector) should cease execution so the end user can resolve the error condition.


I have not been able to find any documentation related to "Heartbeat Thread".  The only place I see mention of "Heartbeat Thread" is in the karaf.log file, which in turn is calling the Start() method of my transport.  I'm wondering how to prevent that heartbeat from restarting the transport.


The following example illustrates the problem, here I have intentionally fed in bad authentication parameters (the transport interacts with a SOAP web service).  RunningState is set to ERROR, where it should stay through the rest of execution, however it is restarted by that Heartbeat Thread.  I have also tried stopping the transport after this example error, in that case the the stop() method is executed, but the transport is still restarted by the heartbeat.



Windows Server 2012

ArcGIS Server 10.3.0  (10.3.4322)

GeoEvent Extension 10.3.0  (10.3.4322)



2015-10-26 11:06:13,541 | ERROR | ansport Listener | TestInboundTransport             | ort.inbound.TestInboundTransport  357 | 370 - com.test.arcgis.geoevent.transport.inbound.TestInboundTransport - 10.3.0 | Authentication to Test web services failed!  Error: Access Denied.

2015-10-26 11:06:18,460 | INFO  | Heartbeat Thread | TestInboundTransport             | ort.inbound.TestInboundTransport  409 | 370 - com.test.arcgis.geoevent.transport.inbound.TestInboundTransport - 10.3.0 | Test Inbound Transport Service Starting


Code Snippets

.. The error entry…

if( ((AuthSoapHeader)holder.value).getError() != null)


            log.error("Authentication to Test web services failed!  Error: " + ((AuthSoapHeader)holder.value).getError());

            //TODO: clean up and stop service



            return null;




public synchronized void start() throws RunningException

{"Test Inbound Transport Service Starting");

     switch (getRunningState())


            case STARTING:

            case STARTED:

                  return;  //added to prevent multiple thread starts

            case STOPPING:



     //this.serviceStopping = false;


     this.thread = new Thread(null, this, "Test Inbound Transport Listener");




public synchronized void stop()    


      this.setRunningState(RunningState.STOPPING);"Test Inbound Transport Service Stopping");






private void cleanup()


      if( this.byteBuffer != null)