Skip to content

Instantly share code, notes, and snippets.

@maxant
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxant/2857346572d4b0a2b7db to your computer and use it in GitHub Desktop.
Save maxant/2857346572d4b0a2b7db to your computer and use it in GitHub Desktop.
@Stateless
public class Service2 {
@Asynchronous
public Future<String> foo(String s) {
// simulate some long running process
Thread.sleep(5000);
s += "<br>Service2: threadId=" + Thread.currentThread().getId();
return new AsyncResult<String>(s);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment