<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:PMingLiU;
        panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
@font-face
        {font-family:"\@PMingLiU";}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EstiloCorreo18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EstiloCorreo19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EstiloCorreo20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EstiloCorreo21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ES link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Greg, <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>First of all, thank
you very much for you test example.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Answering your
question:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>&#8220;My question is why when I change the
code from running without persistence to running with persistence does it
become &#8220;single threaded&#8221;? You can see by toggling the persistence
variable in the top of the test file that when persistence is enabled each flow
will complete before the next one begins yet without persistence they run in
parallel.&#8221;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>We think the problem
is that all the threads are waiting for getting the connection, because of
there is only one connection it becomes a shared resource.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>What do you thing
about?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Thanks,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>David.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:gray'>David Puigdomènech Blancas</span><span style='color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:5.0pt;margin-right:0cm;margin-bottom:
5.0pt;margin-left:0cm'><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:gray'>Dpto. I+D Desarrollo<br>
</span><b><span style='font-size:10.0pt;color:gray'>Logister, S.A. - GRIFOLS<br>
</span></b><span style='font-size:7.5pt;color:#9992A3'>Polígon Llevant<br>
C/Palou, 6<br>
08150 Parets del Vallès<br>
</span><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:gray'>Tel: + 34 93 571&nbsp;02 78 <br>
Fax: + 34 93 571 02 94 <o:p></o:p></span></p>

<p class=MsoNormal><span lang=FR style='font-size:14.0pt;font-family:Webdings;
color:#339966'>P</span><span lang=FR style='font-size:7.5pt;color:#339966'> </span><span
lang=EN-US style='font-size:7.5pt;font-family:"Tahoma","sans-serif";color:#339966'>Do
you need to print this message? </span><span lang=ES-TRAD style='font-size:
7.5pt;font-family:"Tahoma","sans-serif";color:#339966'>Let's protect the
environment.</span><span style='color:#1F497D'><o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rules-dev-bounces@lists.jboss.org
[mailto:rules-dev-bounces@lists.jboss.org] <b>En nombre de </b>Chrystall, Greg<br>
<b>Enviado el:</b> viernes, 27 de agosto de 2010 18:14<br>
<b>Para:</b> Rules Dev List<br>
<b>Asunto:</b> Re: [rules-dev] A drools flow persistence example thatbehaves
strangely<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>You can download it
here:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><a
href="http://dl.dropbox.com/u/2634115/drools-test.zip">http://dl.dropbox.com/u/2634115/drools-test.zip</a><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>You can just import
that project into an eclipse workspace and run the unit test, the database
should start when you do.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>I am away until
Tuesday next week, if you have any questions I will answer them then.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'>Thanks,<br>
<br>
Greg<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> rules-dev-bounces@lists.jboss.org
[mailto:rules-dev-bounces@lists.jboss.org] <b>On Behalf Of </b>Puigdomenech,
David<br>
<b>Sent:</b> 27 August 2010 16:20<br>
<b>To:</b> Rules Dev List<br>
<b>Subject:</b> Re: [rules-dev] A drools flow persistence example that behaves
strangely<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Please, could you be
so kind to put the whole test project on an http server.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I was trying to
persist the flow in a PostgreSQL database but I was receiving some Bitronix
errors. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Have ever of you
persist a flow in a database different from h2?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thank at all.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:#1F497D'>David Puigdomenech<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
rules-dev-bounces@lists.jboss.org [mailto:rules-dev-bounces@lists.jboss.org] <b>En
nombre de </b>Chrystall, Greg<br>
<b>Enviado el:</b> viernes, 27 de agosto de 2010 16:45<br>
<b>Para:</b> Rules Dev List<br>
<b>Asunto:</b> [rules-dev] A drools flow persistence example that behaves
strangely<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span lang=EN-GB>I have written a test based as much as
possible on the Drools Flow 5.1 Persistence Documentation. You can see the code
here:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><a href="http://pastebin.com/33QXK4iU">http://pastebin.com/33QXK4iU</a><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>And I have attached my eclipse project but
without the jars as its too big, if anyone wants a zip of the whole project
ready to run, I can put it on an http server for you.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>My question is why when I change the code
from running without persistence to running with persistence does it become
&#8220;single threaded&#8221;? You can see by toggling the persistence variable
in the top of the test file that when persistence is enabled each flow will
complete before the next one begins yet without persistence they run in parallel.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Any advice on what I am doing wrong or
whether persistence simply does not support what I want to do is much
appreciated.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Greg<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p>&nbsp;</o:p></span></p>

<div class=MsoNormal align=center style='text-align:center'><span lang=EN-GB
style='font-size:12.0pt;font-family:"Times New Roman","serif"'>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal><span lang=EN-GB style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:gray'><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have
received this message in error, please immediately notify the
postmaster@nds.com and delete it from your system as well as any copies. The
content of e-mails as well as traffic data may be monitored by NDS for
employment and security purposes. To protect the environment please do not
print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX,
United Kingdom. A company registered in England and Wales. Registered no.
3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************</span><span
lang=EN-GB style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>

<p><span style='font-size:7.5pt'>La informacion contenida en el presente e-mail
es confidencial y esta reservada para el uso exclusivo de su destinatario. Se
prohibe estrictamente la distribucion, copia o utilizacion de esta informacion
sin el previo permiso de su destinatario. Si usted no fuera el destinatario,
por favor notifiquelo inmediatamente al remitente y elimine el presente mensaje
de su sistema informatico.<br>
<br>
Information contained in this e-mail is confidential and is intended for the
use of the addressee only. Any dissemination, distribution, copying or use of
this communication without prior permission of the addressee is strictly
prohibited. If you are not the intended addressee, please notify the sender
immediately by reply and then delete this message from your computer system.</span><o:p></o:p></p>

<p class=MsoNormal><span lang=EN-GB style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p>&nbsp;</o:p></span></p>

<div class=MsoNormal align=center style='text-align:center'><span lang=EN-GB
style='font-size:12.0pt;font-family:"Times New Roman","serif"'>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal><span lang=EN-GB style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:gray'><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have
received this message in error, please immediately notify the
postmaster@nds.com and delete it from your system as well as any copies. The
content of e-mails as well as traffic data may be monitored by NDS for
employment and security purposes. To protect the environment please do not
print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX,
United Kingdom. A company registered in England and Wales. Registered no.
3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************</span><span
lang=EN-GB style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p>

</div>

<p></p><p><FONT SIZE=1>La información contenida en el presente e-mail es confidencial y está reservada para el uso exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario, por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema informático.<br><br>Information contained in this e-mail is confidential and is intended for the use of the addressee only. Any dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you are not the intended addressee, please notify the sender immediately by reply and then delete this message from your computer system.</body>

</html>