title: Perform Asynchronus db tasks in java servlet application
body: <p>I have a jsp/servlet based web app.</p>
  
  <p>I have a button <strong>"Clean Up"</strong> which calls a servlet and the request goes till DAO class.DAO class performs different DB activities like, moving data from Master table to backup table, then deleting data from master table etc.</p>
  
  <p>As of now this activity is Synchronous and user needs to wait until a response is sent.</p>
  
  <p>I want to implement the same scenario as an Asynch task with user just getting a message as 
  " Clean Up Activities Triggered" </p>
  
  <p>What could be the best/easiest way to perform this task.  I cannot use scheduler.</p>
  
  <p>My Container is TomCat. </p>