title: How can I return a Future object with Spring without writing concurrency logic?
body: <p>How can I return a <code>java.util.concurrent.Future</code> object with a Receipt object and only use the <code>@javax.ejb.Asynchronous</code> annotation?</p>
  
  <p>And do I need any extra configuration to let Spring handle ejb annotations?</p>
  
  <p>I don't want to write any concurrency logic myself.</p>
  
  <p>Here's my attempt that doesn't work:</p>
  
  <pre><code>@Asynchronous
  public Future&lt;Receipt&gt; execute(Job job) {
      Receipt receipt = timeConsumingWork(job);
      return receipt;
  }
  </code></pre>