jBPM 4.x on Glassfish
pa3k Dec 14, 2009 7:37 PMHello,
I've been trying to use jBPM in my Netbeans project based on Glasfish for several days without luck. Looked for info everywhere, but (which is suprising for me) there is not a lot of docs out there.
So my question is:
1) Is it possible to include jBPM in an JEE 5 application in any other JEE server than jBoss or Tomcat?
2) If it is (which I suppose should be - this is Java for god's sake ) what are the steps to get it working?
I did these:
1) included jbpm.jar in my project,
2) put all configuration files (jbpm.cfg.xml, jbpm.hibernate.cfg.xml, jbpm.mail.properties, logging.properties) in my class path
3) created database, schema and user for jbpm
4) wrote a code like this:
import org.apache.log4j.Logger;
import org.jbpm.api.Configuration;
import org.jbpm.api.ProcessEngine;
import org.jbpm.api.RepositoryService;
public class Test {
private static Logger log = Logger.getLogger(Test.class.getName());
private static ProcessEngine processEngine = null;
private static RepositoryService repositoryService = null;
public Test()
{
}
public void testuj()
{
log.trace("Entering tests!!!");
if(processEngine==null)
{
log.trace("processEngine to be initialized");
processEngine = new Configuration().buildProcessEngine();
log.trace("processEngine initialized");
repositoryService = processEngine.getRepositoryService();
log.trace("repositoryService retrieved");
}
else
{
log.trace("processEngine already initialized");
}
log.trace("Got processEngine "+processEngine);
log.trace("Got repositoryService "+repositoryService);
log.trace("finished");
}
}