[jBPM] - Re: JBPM5, Spring, BTM and Tomcat
by snyperboss
snyperboss [http://community.jboss.org/people/snyperboss] created the discussion
"Re: JBPM5, Spring, BTM and Tomcat"
To view the discussion, visit: http://community.jboss.org/message/638630#638630
--------------------------------------------------------------
Hi All,
I could Integrate this using spring in a single bean defenition file.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="basicdataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/test</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value>qaz@12345</value>
</property>
</bean>
<bean id="xadataSource" class="bitronix.tm.resource.jdbc.PoolingDataSource"
init-method="init" destroy-method="close">
<property name="className"
value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" />
<property name="uniqueName" value="jdbc/testDS1" />
<property name="minPoolSize" value="1" />
<property name="maxPoolSize" value="5" />
<property name="allowLocalTransactions" value="true" />
<property name="driverProperties">
<props>
<prop key="URL">jdbc:mysql://localhost:3306/test</prop>
<prop key="user">root</prop>
<prop key="password">qaz@12345</prop>
</props>
</property>
</bean>
<bean id="txManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager" ref="bitronixTransactionManager" />
<property name="userTransaction" ref="bitronixTransactionManager" />
</bean>
<bean id="bitronixTransactionManager" factory-method="getTransactionManager"
class="bitronix.tm.TransactionManagerServices" depends-on="xadataSource,txManager"
destroy-method="shutdown" />
<bean id="entityManagerFactoryJbpmPersistanceJpa"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="xadataSource" />
<property name="persistenceUnitName" value="org.jbpm.persistence.jpa" />
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<!--
<property name="databasePlatform"
value="org.hibernate.dialect.MySQLDialect" />
-->
<property name="databasePlatform" value="org.hibernate.dialect.SybaseDialect" />
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
</bean>
<bean id="entityManagerFactoryJbpmTask"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="basicdataSource" />
<property name="persistenceUnitName" value="org.jbpm.task" />
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<!--
<property name="databasePlatform"
value="org.hibernate.dialect.MySQLDialect" />
-->
<property name="databasePlatform" value="org.hibernate.dialect.SybaseDialect" />
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
</bean>
</property>
</bean>
<bean id="testInsertDAO" class="com.sample.TestInsertDAO">
<property name="dataSource" ref="basicdataSource" />
</bean>
</beans>
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/638630#638630]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[jBPM] - hibernate in jbpm4.4
by wiwengweng wen
wiwengweng wen [http://community.jboss.org/people/wiwengweng] created the discussion
"hibernate in jbpm4.4"
To view the discussion, visit: http://community.jboss.org/message/637461#637461
--------------------------------------------------------------
hi,all
I am currently using jbpm4.4 to build my own project, but meet with some problems. please help~many many appriciates~ :)
I don't know much about hibernate, but when the processInstance is started. I want to insert a "key" into a record of the "execution" table.(since this "key" is unused by now. :) someone may tell me how insert this data? I check some of the source code, and know something about PVM, but not understand this totally~ :((
another problem, and I see someone used to posted in the forum, but not yet solved~how can we abtain all the task node of one processInstance??
I check the method createTaskQuery.processInstanceId().list, but this is only to query the active node of task, so the count of the method always is 1.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637461#637461]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[jBPM] - Serious performance issue 5.1
by olddave
olddave [http://community.jboss.org/people/olddave] created the discussion
"Serious performance issue 5.1"
To view the discussion, visit: http://community.jboss.org/message/638114#638114
--------------------------------------------------------------
Hi,
My use of jBPM 5.1 is a little unusual. I have very simple workflows that take a record, carry out some simple manipulation and return the result at the end of that manipulation as a Parameter Mapping. In rare circumstances a Human Task might be required in the workflow logic to present the errant record for attention by a human. So I might have 1 million records, with maybe 12 that need attention. The remainder are all dealt with by the mvel logic in the workflow and a custom workflow item.
I simply create the StatefulKnowledgeSession and call startProcess for each record. This is killing performance, profiling the method that has the startProcess call is using 99.5% of all CPU time, the rest is mostly outside the workflow and is persisting the altered record to the Db. Is there a better way?
Here is theh basic call code
|
| params.put("transformData", tData); |
|
| params.put("namedCaches", cacheQueries); |
|
|
| ksession.startProcess( "_" + com.example.edm.core.utils.Utils.getRefId(transformationWorkflow.getUuid()), params); |
|
|
| transform = tData.getValues(); |
Thx.
David
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/638114#638114]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month