title: Spring @Async ignored
body: <p>I am having troubles invoking a method asynchronously in Spring, when the invoker is an embedded library receiving notifications from an external system. The code looks as below:</p>
  
  <pre><code>@Service
  public class DefaultNotificationProcessor implements NotificationProcessor {
  
      private NotificationClient client;
  
  
      @Override
      public void process(Notification notification) {
          processAsync(notification);
      }
  
      @PostConstruct
      public void startClient() {
          client = new NotificationClient(this, clientPort);
          client.start(); 
      }
  
      @PreDestroy
      public void stopClient() {
          client.stop();
      }
  
      @Async
      private void processAsync(Notification notification) {
          // Heavy processing
      }
  }
  </code></pre>
  
  <p>The <code>NotificationClient</code> internally has a thread in which it receives notifications from another system. It accepts a <code>NotificationProcessor</code> in its constructor which is basically the object that will do the actual processing of notifications.</p>
  
  <p>In the above code, I have given the Spring bean as the processor and attempted to process the notification asynchronously by using <code>@Async</code> annotation. However, it appears the notification is processed in the same thread as the one used by <code>NotificationClient</code>. Effectively, <code>@Async</code> is ignored.</p>
  
  <p>What am I missing here? </p>