Dude, you would have to use two different technologies to get this to work as you described it.
For you to achieve asynchronous processing you can follow one of two approaches:
1st - Use a scheduler. A "scheduler" is a service that is fired at regular intervals inside a java server and ee. You can program it to thirty to thirty seconds to perform a certain task. An example of this would be a scheduler that every thirty seconds searches the webserver for a certain stock quote or the exchange for a particular currency (if you were to use it to make stock purchases, obviously the time interval to get the quote should be much smaller). Using this strategy you should queue the action that must be performed so that the scheduler goes in that queue and seeing that there is something to do, trigger the processing.
Take a look at this reference for more information on using scheduler: link
I do not recommend this strategy.
2º - Use a servlet with asynchronous processing. It is this strategy that I recommend to you. In this case you will fire the action but the servlet will not return anything as a response to your page, and you also can not guarantee how long it will take for the task to be terminated. Within the action of the servlet you should queue some type of message, so that it is triggered to the user afterwards, indicating the end of the processing. Take a look at link for further clarification.
On strategies to inform the user that the processing is over I would recommend that you use something like "push" technology, which allows the server, on its own, to trigger some message to a web client. I recommend you take a look at the documentation of the primefaces.