[jboss-user] [jBPM] - Re: persistence JBPM5.3 on tomcat with mysql

Ted Pan do-not-reply at jboss.com
Mon Nov 19 21:20:33 EST 2012

Ted Pan [https://community.jboss.org/people/ted.pan] created the discussion

"Re: persistence JBPM5.3 on tomcat with mysql"

To view the discussion, visit: https://community.jboss.org/message/777283#777283

hi Kehua,

there are some issues with your code

1. since you have declared the datasource in web.xm, in persistence.xml, you can use java:comp/env/jdbc/jbpm-ds, instead of jdbc/jbpm-ds, and you don't need to define the connection parameters( driver_class, username and so on) in the persistence.xml, since you are using data source from container.
   please see the attached persistence.xml for detailed information.

2. you can pre-create the database with schema for the persistence unit, org.jbpm.persistence.jpa. But if you want to create it or update it when the persistence unit is created at the first time( see persistence.xml for <property name="hibernate.hbm2ddl.auto" value="update" />), you need to disable the transaction in your TaskProcessServlet's init(), please see the attached TaskProcessServlet.java file.

3. you do not need to manually initial the dateasource, please see the TaskProcessServlet.java from line 71 to 86. those lines could be commentted out.

4. the default's port for Mina server is 9123, you use MinaTaskServer server = new MinaTaskServer(taskService); to create the mina server, then you should use the port 9123 in your JbpmAPIUtil.java. please see the attached JbpmAPIUtil.java

in case if I did not list all the issues, I attached the whole server1 with libraries for you. you can do a comparison with your server1.


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121119/2f04d02f/attachment.html 

More information about the jboss-user mailing list