a long-running background-process would be a task that would be executed in a separate thread. Threads are in J2EE bad karma, so you could:
1. Use a Message Queue to trigger a Message-Driven Bean (write your state to a database or keep it somewhere in memory)
2. Use a Timer (via EJB Timerservice) to launch a background process
In startProcess you would start the background job and check, whether it lives.
Example for Timer see http://www.java2s.com/Code/Java/EJB3/EJBTutorialfromJBosstimer.htm