Once asynchronous processing is enabled, then the methods that are annotated with the @Async annotation will execute asynchronously.
xxxxxxxxxx
public class AsyncTask {
private static final Logger LOGGER =
Logger.getLogger(AsyncTask.class);
@Async
public void doAsyncTask() {
try {
LOGGER.info("Running Async task thread : " +
Thread.currentThread().getName());
} catch (Exception e) {
}
}
}