Don't forget about HornetQ!
When you use the LocalTaskService you are adding to your application or the process engine thread the responsability of handling tasks as well.
If you choose to use an external server like Mina or HornetQ you are decoupling the responsability and then is easy to share that component with other components in your infrastructure.
So its up to you and the architecture that you choose for your apps. This is flexible enough to give you freedom in that decision. Of course that if you add a remote and external server you will
add the overhead of the transports.
TaskService service = new TaskService(jbpmTaskEntityManagerFactoryJbpmTask, null);
The constructor of TaskService like: TaskService(EntityManagerFactory emf,SystemEventListener systemEventListener)
how i to set the SystemEventListener?
TaskServiceSession session = new TaskServiceSession(service, jbpmTaskEntityManagerFactoryJbpmTask.createEntityManager());
LocalTaskService taskService = new LocalTaskService(session);