Search in sources :

Example 1 with DeleteTask

use of org.jboss.as.quickstarts.managedexecutorservice.concurrency.DeleteTask in project quickstart by wildfly.

the class ProductResourceRESTService method deleteAllProducts.

@DELETE
public Response deleteAllProducts() {
    DeleteTask dt = deleteTaskInstance.get();
    // Delete all Products on a separated Thread
    log.info("Will delete all Products on other Thread");
    managedExecutorService.execute(dt);
    log.info("Returning response");
    return Response.ok().build();
}
Also used : DeleteTask(org.jboss.as.quickstarts.managedexecutorservice.concurrency.DeleteTask) DELETE(javax.ws.rs.DELETE)

Aggregations

DELETE (javax.ws.rs.DELETE)1 DeleteTask (org.jboss.as.quickstarts.managedexecutorservice.concurrency.DeleteTask)1