s.Result.html#getFuture()"><code>Asynchronous.Result.getFuture</code></a> and
 <a href="Asynchronous.Result.html#complete(T)"><code>Asynchronous.Result.complete</code></a> methods.
 <p>
 For example,

 <pre>
 @Asynchronous
 public CompletableFuture&lt;Double&gt; hoursWorked(LocalDate from, LocalDate to) {
     // Application component's context is made available to the async method,
     try (Connection con = ((DataSource) InitialContext.doLookup(
         "java:comp/env/jdbc/timesheetDB")).getConnection())