[jBPM] - Is SessionID & ProcessID required to complete WorkItem ?
by vikas jadon
vikas jadon [http://community.jboss.org/people/vikasjadon] created the discussion
"Is SessionID & ProcessID required to complete WorkItem ?"
To view the discussion, visit: http://community.jboss.org/message/602740#602740
--------------------------------------------------------------
I have question about ProcessID and SessionID and there usage. I will continue to ask after explaining the confusion areas. This is with respect to webapplication, used by multiple users and deployed in clustered env.
EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.drools.persistence.jpa" );
env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );
// create a new knowledge session that uses JPA to store the runtime state. Is this session for the server or I can create per user ? What is best?
// i understand creation session per user will be costly
ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kBase, null, env );
sessionID = ksession.getId(); // i can persist this,
ksession.getWorkItemManager().registerWorkItemHandler("handle",my_handler_obj);
ksession.getWorkItemManager().registerWorkItemHandler("handle2",my_handler2_obj);
//starting the process, I think this is for each user
pi1 =(WorkflowProcessInstance) ksession.startProcess("com.sample.bpmn.wfPOC",parameterMap);
// i can get process id of the process started, so i am in the first workItem now.
processID = pi1.getId(); // i can persist this too.
// i have a method in my handler for getting the workItemId. i persisted this workItemId
workItemId = my_handler_obj.getWorkItemId();
At some time later I would like to complete the workItem, understanding the server is restarted
// I can use JPAKnowledgeService.loadStatefulKnowledgeSession(persisted_sessionID, kBase, null, env); but following also works
ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kBase, null, env );
sessionID = ksession.getId(); // it is different session
ksession.getWorkItemManager().registerWorkItemHandler("handle",my_handler_obj);
ksession.getWorkItemManager().registerWorkItemHandler("handle2",my_handler2_obj);
// I can complete workItem which was left earlier,
ksession.getWorkItemManager().completeWorkItem(workItemId, null);
*My questions:*
**
1. What is the use of sessionID, since i can complete workItem without sessionID? is if useful in this scenerio ? (I can load the session)
2. What is the use of processID since i can complete workItem without processID?? is it useful in this scenerio ? (i can start the process with process id)
3. Is only workItemID sufficient to complete a workItem in realtime? or am i missing something
4. How the knowledge session will work in case of clustered env across the JVM's using the load balancer.
Any help is highly appreciated.
thanks
Vikas
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602740#602740]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[JBoss Tools] - JPA Tools & generate tables from entities
by Eric J. Van der Velden
Eric J. Van der Velden [http://community.jboss.org/people/ericjvandervelden] created the discussion
"JPA Tools & generate tables from entities"
To view the discussion, visit: http://community.jboss.org/message/602600#602600
--------------------------------------------------------------
Hello
I create a JPA project and do
New-> Entity
It is a class type M with a @Entity and one field, id with a @Id.
There is a error message: table "M" cannot be resolved. I understand that, because this table is not there yet.
I do
JPA Tools-> Generate Tables from Entities...
I check "Export to database". The result is that schema.ddl is generated but no table M in the database appears (Q1).
So I decided to do it by hand. But in the editor I see that the 'Connection profile' just above schema.ddl is not filled in (Q2). I fill it in by chosing my database connection's name and select the ddl in schema.ddl and execute it. Now my table M is there, which I see by selecting my schema in the 'Data Source Explorer' view, and refresh it. I have to do this anyway because now I can clean my JPA project and the error message: table "M" cannot be resolved, will disappear.
So my questions are: (Q1) why is table M not created? and (Q2) why is 'Connection profile' not filled in. Or is it the intention of JBoss Tools that I create the table by hand by right clicking in schema.ddl?
Thanks,
Eric J.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602600#602600]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[EJB3] - Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
by legae
legae [http://community.jboss.org/people/legae] created the discussion
"Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT"
To view the discussion, visit: http://community.jboss.org/message/602640#602640
--------------------------------------------------------------
I see that nobody has a idea how to solve my problem.
I checked once again the code and I saw that I have cycles in EJB dependencies.
@Stateless
public class ABean implements ABeanLocal{
@EJB
BBeanLocal bBean;
....
}
@Stateless
public class BBean implements BBeanLocal{
@EJB
ABeanLocal aBean;
....
}
I was trying to add @org.jboss.ejb3.annotation.IgnoreDependency but the exception still occurs. I also checked finding a bean by lookup and the effect is the same. in STDOUT looks like bean was initialized but when trying to use it (in my situation - call a method findById) exception is thrown
[STDOUT] myBeanLocal: Proxy to jboss.j2ee:ear=my.ear,jar=my.jar,name=MyDependBean,service=EJB3 implementing [interface com.app.ifaces.MyDependBeanLocal]
ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.app.MyDependBean not bound
I remember that in jboss 4.2.3 when ejb was not bound was treated as a null. Maybe there is some property that I could check to be sure that bean is bound? Or is there any annotation to force jboss to load beans?
Application is quite big and we used jboss 4.2.3 before so maybe I have still some 4.2.3jboss annotation but I assume that when 6.1 jboss does not use it so the old annotations should not be a problem
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602640#602640]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[jBPM] - ProcessInstanceInfo
by LOGANATHAN KRISHNAN
LOGANATHAN KRISHNAN [http://community.jboss.org/people/loga07] created the discussion
"ProcessInstanceInfo"
To view the discussion, visit: http://community.jboss.org/message/602657#602657
--------------------------------------------------------------
Hello All,
I have the follwoing questions about JBPM5.
1. Why the entry in the ProcessInstanceInfo table is getting removed after the completion of the Process?
2. How to have our own pluggable variable persistence mechanism in JBPM 5 ?
3. Why there is no NodeInstance table ? (If I need to get the information about the particular Node information (after the process completed - for auditng purpose) , how will I get it ? (Because NodeInstanceLog doesnot contain the node name,type and other informations).
Please help me in getting the answers for the above questions.
Thanks in advance for all your help!!!
Thanks & Regards,
Loga
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602657#602657]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[jBPM] - Re: jbpmContext.getSessionFactory().openSession() and jbpmConte
by Harry P.
Harry P. [http://community.jboss.org/people/harishpandya] created the discussion
"Re: jbpmContext.getSessionFactory().openSession() and jbpmConte"
To view the discussion, visit: http://community.jboss.org/message/602637#602637
--------------------------------------------------------------
Hi Anurag,
I was facing "Unable to Locate current JTA transaction" error.
So i changed the
<field name="isCurrentSessionEnabled"><*true* /></field>
property of jbpm.cfg.xml to *false.*
**
Now my jbpm transactions are not getting commited.
I tried following thing
* Saved process Instance
* Inserted session manually through hibernate SessionFactory
* Explicitally commited jbpm transaction
But nothing helped me out.
I am using JTA transaction.
So can you help me.
My jbpm.cfg.xml file is as follow
<jbpm-configuration>
<!--
The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
Those configurations can be overwritten by putting this file called
jbpm.cfg.xml on the root of the classpath and put in the customized values.
-->
<jbpm-context>
<service name="persistence">
<factory>
<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
<field name="isTransactionEnabled"><false /></field>
<field name="isCurrentSessionEnabled"><false /></field>
</bean>
</factory>
</service>
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
<service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
</jbpm-context>
<!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
<string name="resource.hibernate.cfg.xml" value="/hibernate.cfg.xml" />
<string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
<string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
<string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
<string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
<string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
<string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
<string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
<bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
<bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
<bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
<field name="jbpmConfiguration"> <ref bean="jbpmConfiguration"/> </field>
<field name="name"> <string value="JbpmJobExector"/> </field>
<field name="nbrOfThreads"> <int value="1"/> </field>
<field name="idleInterval"> <int value="5000"/> </field>
<field name="maxIdleInterval"> <int value="3600000"/> </field> <!-- 1 hour -->
<field name="historyMaxSize"> <int value="20"/> </field>
<field name="maxLockTime"> <int value="600000"/> </field> <!-- 10 minutes -->
<field name="lockMonitorInterval"> <int value="60000"/> </field> <!-- 1 minute -->
<field name="lockBufferTime"> <int value="5000"/> </field> <!-- 5 seconds -->
</bean>
<long name="jbpm.msg.wait.timout" value="5000" singleton="true" />
</jbpm-configuration>
HIbernate.cfg.xml is::>
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
" http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.driver_class">oracle.jdbc.xa.client.OracleXADataSource</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.connection.datasource">java:datasource</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.current_session_context_class">managed</property>
<mapping resource="hibernate.extra.hbm.xml" />
<mapping resource="hibernate.identity.hbm.xml" />
<mapping resource="org/jbpm/db/hibernate.types.hbm.xml" />
<mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
<mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
<mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
<mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
<!-- bytes mapping files -->
<mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
<!-- module.def mapping files -->
<mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
<!-- file.def mapping files -->
<mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
<mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
<mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
<mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
<mapping resource="org/jbpm/job/Job.hbm.xml"/>
<mapping resource="org/jbpm/job/Timer.hbm.xml"/>
<mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
<mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
<class-cache class="org.jbpm.bytes.ByteArray" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.bytes.ByteArray.byteBlocks" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
</session-factory>
</hibernate-configuration>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602637#602637]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[jBPM] - Re: jbpm 3.2.2 in Jboss AS 4.2.2 - Transaction Problems
by Harry P.
Harry P. [http://community.jboss.org/people/harishpandya] created the discussion
"Re: jbpm 3.2.2 in Jboss AS 4.2.2 - Transaction Problems"
To view the discussion, visit: http://community.jboss.org/message/602635#602635
--------------------------------------------------------------
Hi Markus,
I was facing "Unable to Locate current JTA transaction" error.
So i changed the
<field name="isCurrentSessionEnabled"><*true* /></field>
property of jbpm.cfg.sml to *false.*
**
Now my jbpm transactions are not getting commited.
I tried following thing
* Saved process Instance
* Inserted session manually through hibernate SessionFactory
* Explicitally commited jbpm transaction
But nothing helped me out.
I am using JTA transaction.
So can you help me.
My jbpm.cfg.xml file is as follow
<jbpm-configuration>
<!--
The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
Those configurations can be overwritten by putting this file called
jbpm.cfg.xml on the root of the classpath and put in the customized values.
-->
<jbpm-context>
<service name="persistence">
<factory>
<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
<field name="isTransactionEnabled"><false /></field>
<field name="isCurrentSessionEnabled"><false /></field>
</bean>
</factory>
</service>
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
<service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
</jbpm-context>
<!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
<string name="resource.hibernate.cfg.xml" value="/hibernate.cfg.xml" />
<string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
<string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
<string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
<string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
<string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
<string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
<string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
<bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
<bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
<bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
<field name="jbpmConfiguration"> <ref bean="jbpmConfiguration"/> </field>
<field name="name"> <string value="JbpmJobExector"/> </field>
<field name="nbrOfThreads"> <int value="1"/> </field>
<field name="idleInterval"> <int value="5000"/> </field>
<field name="maxIdleInterval"> <int value="3600000"/> </field> <!-- 1 hour -->
<field name="historyMaxSize"> <int value="20"/> </field>
<field name="maxLockTime"> <int value="600000"/> </field> <!-- 10 minutes -->
<field name="lockMonitorInterval"> <int value="60000"/> </field> <!-- 1 minute -->
<field name="lockBufferTime"> <int value="5000"/> </field> <!-- 5 seconds -->
</bean>
<long name="jbpm.msg.wait.timout" value="5000" singleton="true" />
</jbpm-configuration>
HIbernate.cfg.xml is::>
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
" http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.driver_class">oracle.jdbc.xa.client.OracleXADataSource</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.connection.datasource">java:datasource</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.current_session_context_class">managed</property>
<mapping resource="hibernate.extra.hbm.xml" />
<mapping resource="hibernate.identity.hbm.xml" />
<mapping resource="org/jbpm/db/hibernate.types.hbm.xml" />
<mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
<mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
<mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
<mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
<!-- bytes mapping files -->
<mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
<!-- module.def mapping files -->
<mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
<!-- file.def mapping files -->
<mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
<mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
<mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
<mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
<mapping resource="org/jbpm/job/Job.hbm.xml"/>
<mapping resource="org/jbpm/job/Timer.hbm.xml"/>
<mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
<mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
<class-cache class="org.jbpm.bytes.ByteArray" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.bytes.ByteArray.byteBlocks" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.context.def.VariableAccess" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.file.def.FileDefinition.processFiles" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.action.Script.variableAccesses" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Action" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Event" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Event.actions" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.ExceptionHandler" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ExceptionHandler.actions" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Node" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.leavingTransitions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Node.arrivingTransitions" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.ProcessDefinition" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.nodes" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.actions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.ProcessDefinition.definitions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.SuperState.nodes" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.graph.def.Transition" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Transition.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.def.Transition.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.node.Decision.decisionConditions" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.node.ProcessState.variableAccesses" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.graph.node.TaskNode.tasks" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.instantiation.Delegation" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.module.def.ModuleDefinition" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.Swimlane.tasks" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.taskmgmt.def.TaskController" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.TaskController.variableAccesses" usage="nonstrict-read-write" />
<class-cache class="org.jbpm.taskmgmt.def.Task" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.Task.events" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.Task.exceptionHandlers" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.swimlanes" usage="nonstrict-read-write" />
<collection-cache collection="org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks" usage="nonstrict-read-write" />
</session-factory>
</hibernate-configuration>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602635#602635]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months