I thought about that but I didn't want my entire app running within the JVM.
You probably wouldn't have to do that. Check into something like resque: http://github.com/defunkt/resque
(depends upon your needs, of course)
(depends upon your needs, of course)
https://xhtmlrenderer.dev.java.net/