code: private void createListener(final SibRaMessagingEngineConnection connection)
              throws ResourceException {
  
          final String methodName = "createListener";
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, methodName, connection);
          }
  
          final SIDestinationAddress destination = _endpointConfiguration
                  .getDestination();
  
          try {
  
              connection.createListener(destination, _messageEndpointFactory);
  
          } catch (final IllegalStateException exception) {
  
              // No FFDC code needed
              throw exception;
  
          } catch (final ResourceException exception) {
  
              // No FFDC code needed
  
              if (_remoteDestination) {
  
                  SibTr.warning(TRACE, SibTr.Suppressor.ALL_FOR_A_WHILE_SIMILAR_INSERTS, "ATTACH_FAILED_CWSIV0769", new Object[] {
                          destination.getDestinationName(),
                          _endpointConfiguration.getBusName(), this, exception });
  
                  /*
                   * Try again 30 seconds later
                   */
  
                  _timer.schedule(new TimerTask() {
  
                      public void run() {
  
                          try {
  
                              createListener(connection);
  
                          } catch (final ResourceException retryException) {
                              // No FFDC code needed
                          }
  
                      }
                  }, RETRY_INTERVAL);
  
              } else {
  
                  throw exception;
  
              }
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, methodName);
          }
  
      }
docs: Creates a listener to the configured destination using the given
  connection.
  
  @param connection
  the connection to the messaging engine
  @throws ResourceException
  if the creation of the listener fails