<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 01/11/2010 15:31, tizo wrote:
<blockquote
cite="mid:AANLkTin1ke8u0899q6UHGPP9TCapuLNp-Scnfb_=rOMG@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div>
<div class="h5">
<div class="gmail_quote">On Wed, Oct 27, 2010 at 5:21 PM,
tizo <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:tizone@gmail.com" target="_blank">tizone@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi there,<br>
<br>
I have seen in chapter 6 of the documentation, that
Drools Flow can be configured to use JPA and
transactions to persist the running states. However, I
am in a EJB where I obtain entity managers with a
@PersistenceContext annotation, and the transactions are
managed by the container, whereas in the example an
EntityManagerFactory and a TransactionManager are used.
<br>
<br>
Could I configure Flow in a direct way to be used by my
EJB?<br>
<br>
Thanks very much,<br>
<font color="#888888"><br>
tizo<br>
<br>
</font></blockquote>
</div>
<br>
</div>
</div>
Ok, looking at the code, I guess that Drools flow is not ready
to work with standards EJBs. The reasons are the following:<br>
<br>
* The JPA annotations are not standard JPA annotations, but
hibernate ones. For example "CollectionOfElements" in
ProcessInstanceInfo class.<br>
</div>
</blockquote>
That was the one element we couldn't find a replacement for in JPA1,
JPA2 fixes this, but we haven't updated to JPA2 yet. I don't believe
we use any other hibernate specific annotations.<br>
<blockquote
cite="mid:AANLkTin1ke8u0899q6UHGPP9TCapuLNp-Scnfb_=rOMG@mail.gmail.com"
type="cite">
<div class="gmail_quote">
* Transactions are managed by Drools, as opposed to some EJBs
where transactions are managed by the container.<br>
</div>
</blockquote>
You can use both JTA transactions and local entity transactions. So
transactions can be drools maintained or container/external
maintained.<br>
<blockquote
cite="mid:AANLkTin1ke8u0899q6UHGPP9TCapuLNp-Scnfb_=rOMG@mail.gmail.com"
type="cite">
<div class="gmail_quote"><br>
As for that, I will probably modify the codes, so Flow could be
used in our EJBs. I would like to know if someone could guide me
on what should I modify. <br>
<br>
I will post the modifications in case they are of interest to
someone.<br>
<br>
Thanks very much,<br>
<font color="#888888"><br>
tizo<br>
<br>
<code></code>
</font></div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>