[jboss-user] [JBoss jBPM] - Re: How to deploy a BPEL process using the APIs?

alex.guizar@jboss.com do-not-reply at jboss.com
Fri Jul 11 09:05:32 EDT 2008


The hibernate configuration in jbpm-bpel-1.1.GA/config is set to acquire JDBC connections from a data source registered in the app server JNDI service.

    <!-- DataSource properties (begin) -->
  |     <property name="hibernate.connection.datasource">java:/DefaultDS</property>
  |     <!-- DataSource properties (end) -->
If you want to deploy processes outside the app server, you need to configure hibernate to acquire connections from the driver manager, because data sources are not available outside the app server.
    <!-- JDBC connection properties (begin) -->
  |     <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
  |     <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm;sql.enforce_strict_size=true</property>
  |     <property name="hibernate.connection.username">sa</property>
  |     <property name="hibernate.connection.password"/>
  |     <property name="hibernate.hbm2ddl.auto">create</property>
  |     <!-- JDBC connection properties (end) -->
You can deploy processes outside the app server like this, but in my  opinion it is easier to post your process archive to the deployment servlet through the ProcessDeployer class, like the DeployProcessTask does.
  public void execute() throws BuildException {
  |     ProcessDeployer processDeployer = new ProcessDeployer();
  | 
  |     if (host != null)
  |       processDeployer.setHost(host);
  |     if (port != null)
  |       processDeployer.setPort(port.intValue());
  |     if (context != null)
  |       processDeployer.setContext(context);
  | 
  |     processDeployer.deployProcess(processfile);
  | 
  |     int problemCount = processDeployer.getProblemHandler().getProblemCount();
  |     if (problemCount > 0)
  |       throw new BuildException("Problems (" + problemCount + " item[s])");
  |   }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163856#4163856

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163856



More information about the jboss-user mailing list