I think that long running tasks (java or anything else, like shell tasks, with run times from few minutes to even hours) are better modeled by a task executed by an external actor. Following this line of thinking, what I prefer to do is to model those tasks as a "Human Task", assigned to a particular group or user - a job runner group, for instance.
You can choose a polling strategy (eg, using the REST api) or a task listener in order to kick off your tasks. This approach _will_ add extra complexity to your environment, but OTOH your jobs will be completely decoupled from the process, something that can be handy if you are reusing existing stuff link bash scripts or the like.