EntityManagerFactory emfTask = Persistence.createEntityManagerFactory( "org.jbpm.task" );
TaskService taskService = new TaskService(emfTask, SystemEventListenerFactory.getSystemEventListener());
/* Start Mina server for HT*/
MinaTaskServer server = new MinaTaskServer(taskService);
Thread thread = new Thread(server);
How do I replace the first line?
So once again, what's the technical reason why you wont to use JPA, jbpm is heavely based on that to be able to support another ORM's like Toplink as well, not just hibernate. If you don't want to use JPA just because you don't want to, you will need to do a lot of changes in the classes inside jBPM in order to make it work. Those changes aren't hard, it's just changing the internal classes annotated with JPA annotations for Hibernate annotations, but I still don't see any valid reason to do that.