Bug 1036647 - Improve RuntimeManager for Spring usage
Summary: Improve RuntimeManager for Spring usage
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: CR1
: 6.0.1
Assignee: Maciej Swiderski
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 12:30 UTC by Maciej Swiderski
Modified: 2014-08-06 20:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:04:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPM-4125 0 Major Resolved Support for Human Task Spring Transactions in RuntimeManager 2014-08-06 08:18:35 UTC

Description Maciej Swiderski 2013-12-02 12:30:04 UTC
Description of problem:
this is a mirror BZ for jira https://issues.jboss.org/browse/JBPM-4125

in general the BZ should provide following scenarios covered for spring:
- jta with shared entity manager factory
- jta with shared entity manager
- local tx with shared entity manager factory
- local tx with shared entity manager

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Kris Verlaenen 2013-12-12 22:59:34 UTC
Requesting blocker flag as this is work that was already in progress and almost finished.

Comment 5 Maciej Swiderski 2013-12-17 14:39:54 UTC
done as part of persistence and transaction refactoring

following commits are in relation to that:
droolsjbpm-build-bootstrap
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/7f365310318e7e77fbf8cc299890b7cbe911a49e
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/88d614ec7d4a6e6d93ade0c237a2cb4c89a8fd4a
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/2eb32d3c0fa4604fc91bf7ef99836ab114e4f18b

droolsjbpm-knowledge
https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/96cb2ea5901d8b33501060b5f12cfe1c05007b79
https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/5d279b56cb8260ea3b8e95513f81b0c4829a73b5

drools
https://github.com/droolsjbpm/drools/commit/ef447c571a5b8852e9d0660e23f18a6ff1a9983b

jbpm
https://github.com/droolsjbpm/jbpm/commit/cc430e3ccdf0bcb6fb0224950c1611c2c62aa351
https://github.com/droolsjbpm/jbpm/commit/00c938a5f9a150f7198c94ac34f4972ce6dfb373
https://github.com/droolsjbpm/jbpm/commit/eb69219fc0bf834c6a899d98aaef97cc441bd3ec
https://github.com/droolsjbpm/jbpm/commit/3343fc92a731bdb811629421065715858653f074
https://github.com/droolsjbpm/jbpm/commit/75ce9b9a603bcb5b7ee3db046d4598ffacf96797

droolsjbpm-integration
https://github.com/droolsjbpm/droolsjbpm-integration/commit/d9cd9b1046351f80b7ed9bbd4dfbca6b048158e5
https://github.com/droolsjbpm/droolsjbpm-integration/commit/e52f366bf9c186c48e5f4541d7992bd0a6835f66

jbpm-console-ng
https://github.com/droolsjbpm/jbpm-console-ng/commit/6b8e0904b499657fc61987f057a4d41831f3eae9
https://github.com/droolsjbpm/jbpm-console-ng/commit/0f5d497aa7545ce63d627a077505f47fc800b2b5
https://github.com/droolsjbpm/jbpm-console-ng/commit/1c39b1cd9cd8f2a1a625ad03c3029cf4313cb7a9
https://github.com/droolsjbpm/jbpm-console-ng/commit/e3bd80e8c6deb907b27b4767e8d375b36facb420

kie-wb
https://github.com/droolsjbpm/kie-wb-distributions/commit/76177b80238a73260415169cb331d50293d64631
https://github.com/droolsjbpm/kie-wb-distributions/commit/3a14ae382b2bc10737514b29bf966aab2abdea05

Comment 6 Rajesh Rajasekaran 2013-12-17 15:01:05 UTC
We need to document that this feature has limited testing for 6.0.0 and will undergo thorough QE for 6.0.1
The commits have already made into 6.0.0 though the release flags for 6.0.0 have been nack'd
Prakash will provide the release notes text

Comment 7 Ivo Bek 2014-03-05 15:22:06 UTC
Hi Maciej,

I have to return this BZ because it is not possible to use shared entity manager in BPMS 6.0.1.ER2. When I start a process, I get:

IllegalStateException: Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead
	at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:198)
	at com.sun.proxy.$Proxy36.getTransaction(Unknown Source)
	at org.jbpm.process.audit.JPAWorkingMemoryDbLogger.joinTransaction(JPAWorkingMemoryDbLogger.java:265)
	at org.jbpm.process.audit.JPAWorkingMemoryDbLogger.persist(JPAWorkingMemoryDbLogger.java:190)
	at org.jbpm.process.audit.JPAWorkingMemoryDbLogger.beforeProcessStarted(JPAWorkingMemoryDbLogger.java:130)
	at org.drools.core.event.ProcessEventSupport.fireBeforeProcessStarted(ProcessEventSupport.java:40)
	at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:193)

I will attach the updated jta-em test you provided. It was enough to change the libraries for ER2 and run it. jta-emf and local-emf work well and local-em will have probably the same problem as jta-em.

Comment 9 Maciej Swiderski 2014-03-11 13:26:10 UTC
it was caused by future support of local transactions for jpa logger which should not the enabled yet

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/f5640becb0d41ef5853458193d46d01ae43d5fcb

6.0.x:
https://github.com/droolsjbpm/jbpm/commit/52e922ca65b6c86bfee9021f511e6dfff9debffe

Comment 10 Michael 2014-03-17 11:58:55 UTC
Ticket cherry-picked into 6.0.1.CR1. 
Commit: 98aa0cae3e5056849dfe4d21f60bf4a6db65afe7

Comment 11 Ivo Bek 2014-03-27 17:27:21 UTC
Verified in BPMS 6.0.1.CR2

Comment 12 JBoss JIRA Server 2014-05-26 15:20:11 UTC
Maciej Swiderski <swiderski.maciej> updated the status of jira JBPM-4125 to Resolved


Note You need to log in before you can comment on or make changes to this bug.