 {
         ...
         return Asynchronous.Result.complete(total);
     } catch (NamingException | SQLException x) {
         throw new CompletionException(x);
     }
 }
 </pre>

 with usage,

 <pre>
 hoursWorked(mon, fri).thenAccept(total -&gt; {
     // Application component's context is made available to dependent stage actions,
     DataSource ds = InitialContext.doLookup(
         "java:comp/env/jdbc/payrollDB");
     ...
 });
 </pre>

 When the asynchronous method implementation returns a different
