<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Integrating jBPM3 with Spring (Part 1)</title>
	<atom:link href="http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/</link>
	<description>Small steps with big feet</description>
	<lastBuildDate>Fri, 05 Mar 2010 09:16:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: zam0th</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3933</link>
		<dc:creator>zam0th</dc:creator>
		<pubDate>Tue, 15 Dec 2009 18:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3933</guid>
		<description>i&#039;ve also run into the same problem with transactions using jBPM 4.2 with weblogic 10.3...

we want to use weblogic&#039;s JTA transaction manager (but managed by Spring), so we declare


jbpm.cfg.xml:

&lt;spring-transaction-interceptor current=&quot;true&quot; /&gt;

and in spring context:

&lt;bean id=&quot;workflowTxManager&quot; class=&quot;org.springframework.transaction.jta.WebLogicJtaTransactionManager&quot;&gt;
&lt;property name=&quot;transactionManagerName&quot; value=&quot;javax.transaction.TransactionManager&quot;/&gt;
&lt;/bean&gt;

and when i try to deploy the workflow, it tries to run ProcessEngineImpl.checkDb(), which apparently fails with &quot;No existing transaction found for transaction marked with propagation &#039;mandatory&#039;&quot;...

@Unsavory: is there a way to _configure_ jBPM to use a custom transaction interceptor? so that instead of spring-managed one i&#039;d overwrite the existing JtaTransactionInterceptor to look for our specific transaction manager and then reference it somehow in jbpm.cfg.xml... that would be the least painful way to do it i guess...</description>
		<content:encoded><![CDATA[<p>i&#8217;ve also run into the same problem with transactions using jBPM 4.2 with weblogic 10.3&#8230;</p>
<p>we want to use weblogic&#8217;s JTA transaction manager (but managed by Spring), so we declare</p>
<p>jbpm.cfg.xml:</p>
<p>&lt;spring-transaction-interceptor current=&#8221;true&#8221; /&gt;</p>
<p>and in spring context:</p>
<p>&lt;bean id=&#8221;workflowTxManager&#8221; class=&#8221;org.springframework.transaction.jta.WebLogicJtaTransactionManager&#8221;&gt;<br />
&lt;property name=&#8221;transactionManagerName&#8221; value=&#8221;javax.transaction.TransactionManager&#8221;/&gt;<br />
&lt;/bean&gt;</p>
<p>and when i try to deploy the workflow, it tries to run ProcessEngineImpl.checkDb(), which apparently fails with &#8220;No existing transaction found for transaction marked with propagation &#8216;mandatory&#8217;&#8221;&#8230;</p>
<p>@Unsavory: is there a way to _configure_ jBPM to use a custom transaction interceptor? so that instead of spring-managed one i&#8217;d overwrite the existing JtaTransactionInterceptor to look for our specific transaction manager and then reference it somehow in jbpm.cfg.xml&#8230; that would be the least painful way to do it i guess&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walter Seymore</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3914</link>
		<dc:creator>Walter Seymore</dc:creator>
		<pubDate>Tue, 17 Nov 2009 15:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3914</guid>
		<description>I had the same issue as you guys (Mr. Magoo and Unsavory). I&#039;m running completely standalone (no JBoss or Tomcat). Specifically, this is the error I got:

org.springframework.transaction.IllegalTransactionStateException: No existing transaction found for transaction marked with propagation &#039;mandatory&#039;
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:339)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:124)
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.acquireJobs(DispatcherThread.java:126)
at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.run(DispatcherThread.java:67)

I fixed it by adding the following to my config:

&lt;command-service name=&quot;txRequiredCommandService&quot;&gt;
      &lt;retry-interceptor /&gt;
      &lt;environment-interceptor /&gt;
      &lt;spring-transaction-interceptor /&gt;
&lt;/command-service&gt;

Good luck!</description>
		<content:encoded><![CDATA[<p>I had the same issue as you guys (Mr. Magoo and Unsavory). I&#8217;m running completely standalone (no JBoss or Tomcat). Specifically, this is the error I got:</p>
<p>org.springframework.transaction.IllegalTransactionStateException: No existing transaction found for transaction marked with propagation &#8216;mandatory&#8217;<br />
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:339)<br />
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:124)<br />
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)<br />
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)<br />
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)<br />
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)<br />
at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.acquireJobs(DispatcherThread.java:126)<br />
at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.run(DispatcherThread.java:67)</p>
<p>I fixed it by adding the following to my config:</p>
<p>&lt;command-service name=&#8221;txRequiredCommandService&#8221;&gt;<br />
      &lt;retry-interceptor /&gt;<br />
      &lt;environment-interceptor /&gt;<br />
      &lt;spring-transaction-interceptor /&gt;<br />
&lt;/command-service&gt;</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unsavory</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3856</link>
		<dc:creator>Unsavory</dc:creator>
		<pubDate>Fri, 28 Aug 2009 20:40:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3856</guid>
		<description>@Joram:  Mr Magoo is correct.  jBPM 4 will NOT work with Spring if a JTA transaction manager is used without modifying the way jBPM retrieves the transaction manager.

IE:  Injecting the spring transaction manager into jBPM as I&#039;ve posted above.

It&#039;s right there in the source. Just by looking at the JtaTransaction class you can see why.  =)</description>
		<content:encoded><![CDATA[<p>@Joram:  Mr Magoo is correct.  jBPM 4 will NOT work with Spring if a JTA transaction manager is used without modifying the way jBPM retrieves the transaction manager.</p>
<p>IE:  Injecting the spring transaction manager into jBPM as I&#8217;ve posted above.</p>
<p>It&#8217;s right there in the source. Just by looking at the JtaTransaction class you can see why.  =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Magoo</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3854</link>
		<dc:creator>Mr Magoo</dc:creator>
		<pubDate>Wed, 26 Aug 2009 04:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3854</guid>
		<description>I was actually running on Jboss 5. :)

This is strictly a middleware issue though. As long as you are using spring JTA transactions (J2EE container or 3rd party provided) you will be in the same boat as me.

I really think the crux of the problem is the different transaction requirements between the executor and the core.

That is most likely why your solution (a good one BTW) works in that you can inject the correct transaction boundary (propagation=REQUIRE most likely?) and override the default one for JBPM. 

I honestly cannot see how his solution works as I tried that variant and got the same problem I described. He just uses the default executor, but that simply did not work for me.
Maybe because he uses HSQL? Maybe his test workflows are simpler?

Cannot say.</description>
		<content:encoded><![CDATA[<p>I was actually running on Jboss 5. <img src='http://www.jorambarrez.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is strictly a middleware issue though. As long as you are using spring JTA transactions (J2EE container or 3rd party provided) you will be in the same boat as me.</p>
<p>I really think the crux of the problem is the different transaction requirements between the executor and the core.</p>
<p>That is most likely why your solution (a good one BTW) works in that you can inject the correct transaction boundary (propagation=REQUIRE most likely?) and override the default one for JBPM. </p>
<p>I honestly cannot see how his solution works as I tried that variant and got the same problem I described. He just uses the default executor, but that simply did not work for me.<br />
Maybe because he uses HSQL? Maybe his test workflows are simpler?</p>
<p>Cannot say.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joram Barrez</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3853</link>
		<dc:creator>Joram Barrez</dc:creator>
		<pubDate>Tue, 25 Aug 2009 17:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3853</guid>
		<description>@Sam: My config was tested standalone and on JBoss.

Do note that jBPM4 is not designed to run on a J2EE container! It is designed as a standalone library, which is embeddable in any application, including a J2EE application.

Take for example a look at the demo of Andries Inzé: http://www.inze.be/andries/2009/05/16/demo-on-spring-integration-with-jbpm4/
Here is nowhere a JTA TM used that is bound to JNDI. 

The only place where there is a dependency on JNDI is when using the jBPM console built using the demo.setup task.</description>
		<content:encoded><![CDATA[<p>@Sam: My config was tested standalone and on JBoss.</p>
<p>Do note that jBPM4 is not designed to run on a J2EE container! It is designed as a standalone library, which is embeddable in any application, including a J2EE application.</p>
<p>Take for example a look at the demo of Andries Inzé: <a href="http://www.inze.be/andries/2009/05/16/demo-on-spring-integration-with-jbpm4/" rel="nofollow">http://www.inze.be/andries/2009/05/16/demo-on-spring-integration-with-jbpm4/</a><br />
Here is nowhere a JTA TM used that is bound to JNDI. </p>
<p>The only place where there is a dependency on JNDI is when using the jBPM console built using the demo.setup task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unsavory</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3852</link>
		<dc:creator>Unsavory</dc:creator>
		<pubDate>Tue, 25 Aug 2009 17:12:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3852</guid>
		<description>I&#039;ve had the exact same problems as Mr Magoo.  You don&#039;t mention what application server you were using, but I&#039;m guessing it was Tomcat, as am I.

The problem is with the way the JTA transaction manager is retrieved.  jBPM 4 assumes you are running in a J2EE environment such as JBoss and that the transaction manager is bound to a certain jndi name.

In Tomcat/Spring the transaction manager is looked up via Spring&#039;s transaction manager.  NOT via JNDI.  

The solution I came up with was to modify the jBPM source code&#039;s JtaTransaction class.  I make the class @Configurable and inject the spring transaction manager into it.  

And then in the 2 methods inside the JtaTransaction class that attempt to retrieve the transaction manager and user transaction from jndi, I use Spring&#039;s transaction manager to do so instead of jndi.

It works, but I wish there was another way.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had the exact same problems as Mr Magoo.  You don&#8217;t mention what application server you were using, but I&#8217;m guessing it was Tomcat, as am I.</p>
<p>The problem is with the way the JTA transaction manager is retrieved.  jBPM 4 assumes you are running in a J2EE environment such as JBoss and that the transaction manager is bound to a certain jndi name.</p>
<p>In Tomcat/Spring the transaction manager is looked up via Spring&#8217;s transaction manager.  NOT via JNDI.  </p>
<p>The solution I came up with was to modify the jBPM source code&#8217;s JtaTransaction class.  I make the class @Configurable and inject the spring transaction manager into it.  </p>
<p>And then in the 2 methods inside the JtaTransaction class that attempt to retrieve the transaction manager and user transaction from jndi, I use Spring&#8217;s transaction manager to do so instead of jndi.</p>
<p>It works, but I wish there was another way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Magoo</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3848</link>
		<dc:creator>Mr Magoo</dc:creator>
		<pubDate>Thu, 20 Aug 2009 21:30:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3848</guid>
		<description>Hi there.

Yes I did. It always failed when processing timers and other asynchronous jobs. I also tried many variations on it also. (e.g. specifying a separate set of interceptors for the executor)
Basically the closest I came was having processes start up successfully, but the executor fail to start a JTA transaction on jobs. 
I even debugged the code and followed the execution. It had the spring interceptor and was entering the transaction code, but of course failed to start a new transaction. I think it was around the concept of REQUIRED vs MANDATORY. 
What I wanted was REQUIRED, so it would start one when there was not one but not start a new one otherwise. At one stage I even wrote my own interceptor and injected it manually, but that did not work either.
After about a week I just had to call it and move on.</description>
		<content:encoded><![CDATA[<p>Hi there.</p>
<p>Yes I did. It always failed when processing timers and other asynchronous jobs. I also tried many variations on it also. (e.g. specifying a separate set of interceptors for the executor)<br />
Basically the closest I came was having processes start up successfully, but the executor fail to start a JTA transaction on jobs.<br />
I even debugged the code and followed the execution. It had the spring interceptor and was entering the transaction code, but of course failed to start a new transaction. I think it was around the concept of REQUIRED vs MANDATORY.<br />
What I wanted was REQUIRED, so it would start one when there was not one but not start a new one otherwise. At one stage I even wrote my own interceptor and injected it manually, but that did not work either.<br />
After about a week I just had to call it and move on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joram Barrez</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3847</link>
		<dc:creator>Joram Barrez</dc:creator>
		<pubDate>Thu, 20 Aug 2009 06:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3847</guid>
		<description>@Mr Magoo: Great to hear that you love the new architecture :-)

But I&#039;m sad to hear it doesn&#039;t work for you. Am I right that you are using jBPM4 witg Spring?
Did you take a look at the example project of Andries Inzé?  He has a complete application built with the spring integration:

see http://code.google.com/p/jbpm4-spring-demo/</description>
		<content:encoded><![CDATA[<p>@Mr Magoo: Great to hear that you love the new architecture <img src='http://www.jorambarrez.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>But I&#8217;m sad to hear it doesn&#8217;t work for you. Am I right that you are using jBPM4 witg Spring?<br />
Did you take a look at the example project of Andries Inzé?  He has a complete application built with the spring integration:</p>
<p>see <a href="http://code.google.com/p/jbpm4-spring-demo/" rel="nofollow">http://code.google.com/p/jbpm4-spring-demo/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Magoo</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3846</link>
		<dc:creator>Mr Magoo</dc:creator>
		<pubDate>Thu, 20 Aug 2009 00:14:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3846</guid>
		<description>PS: I tied jbpm4. I loved the new architecture and method. Awesome.

Unfortunately it did not work. Transaction problems up the waazoo no matter what I tried in the config. (and I tried EVERYTHING) So disappointed because I was always so close.

From memory it was a case of the job executor requiring one type of transaction config and the core jbpm system requiring another. 

I really think the whole !!MUST HAVE OUR XML FILE OR YOU FAIL!! mentality is letting the project down. The config in general is not that well explained, hard to penetrate and what caused me to waste my time trying to integrate it all.

I could not penetrate the config to manually set the &quot;command-service&quot;(sp?) config for the executor. It just kept getting its config from the core. Also the docs on spring integration are very brief and not nearly enough. 
Similar to jbpm3 to be honest. Project = awesome. Config = pain. :)</description>
		<content:encoded><![CDATA[<p>PS: I tied jbpm4. I loved the new architecture and method. Awesome.</p>
<p>Unfortunately it did not work. Transaction problems up the waazoo no matter what I tried in the config. (and I tried EVERYTHING) So disappointed because I was always so close.</p>
<p>From memory it was a case of the job executor requiring one type of transaction config and the core jbpm system requiring another. </p>
<p>I really think the whole !!MUST HAVE OUR XML FILE OR YOU FAIL!! mentality is letting the project down. The config in general is not that well explained, hard to penetrate and what caused me to waste my time trying to integrate it all.</p>
<p>I could not penetrate the config to manually set the &#8220;command-service&#8221;(sp?) config for the executor. It just kept getting its config from the core. Also the docs on spring integration are very brief and not nearly enough.<br />
Similar to jbpm3 to be honest. Project = awesome. Config = pain. <img src='http://www.jorambarrez.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Magoo</title>
		<link>http://www.jorambarrez.be/blog/2009/04/17/integrating-jbpm3-with-spring-part1/comment-page-1/#comment-3845</link>
		<dc:creator>Mr Magoo</dc:creator>
		<pubDate>Thu, 20 Aug 2009 00:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jorambarrez.be/blog/?p=33#comment-3845</guid>
		<description>I have used this as a base in my own project. It was exceptionally helpful, thanks! :)
However I found a few bugs and improved things a bit. (IMO anyway!) Also made the spring config explicit because there are some subtle issues that need to be made explicit to implement this properly.
http://www.jboss.org/index.html?module=bb&amp;op=viewtopic&amp;p=4250517#4250517</description>
		<content:encoded><![CDATA[<p>I have used this as a base in my own project. It was exceptionally helpful, thanks! <img src='http://www.jorambarrez.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
However I found a few bugs and improved things a bit. (IMO anyway!) Also made the spring config explicit because there are some subtle issues that need to be made explicit to implement this properly.<br />
<a href="http://www.jboss.org/index.html?module=bb&amp;op=viewtopic&amp;p=4250517#4250517" rel="nofollow">http://www.jboss.org/index.html?module=bb&amp;op=viewtopic&amp;p=4250517#4250517</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.454 seconds -->
