<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Huge thanks!<div><br></div><div>best,</div><div><br></div><div>A</div><div><br><div><div>On Aug 25, 2010, at 12:55 PM, ljnelson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
Have a look at <a href="http://code.google.com/p/drools-jca/" target="_top" rel="nofollow" link="external">http://code.google.com/p/drools-jca/</a>.<br><br>This is not (clearly) released yet; have a look at the source and see what you think.<br><br>To build it: check it out, then, with Maven 2.2.1, run mvn clean install from the root.<br>
<br>If you have all the right repositories set up in your settings.xml, everything should complete normally.&nbsp; If you don't, Maven will tell you what artifacts are missing, and a quick Google search will unveil the repositories they're hosted in.<br>
<br>Best,<br>Laird<br><br><div class="gmail_quote">On Wed, Aug 25, 2010 at 1:39 PM, Andrew Waterman-2 [via Drools - Java Rules Engine] <span dir="ltr">&lt;<a href="x-msg://60/user/SendEmail.jtp?type=node&amp;node=1336777&amp;i=0" target="_top" rel="nofollow">[hidden email]</a>&gt;</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;">

Very useful to the JEE community Laird. &nbsp;I just recently started working with the KnowledgeAgent and Drools Guvnor; so I really feel the need. &nbsp;Please do let us all know when your implementation is available in the trunk and/or a standalone version. :)
<br><br>best wishes,
<br><br>Andrew
<br><div><div></div><div class="h5"><br><br>On Aug 24, 2010, at 9:50 PM, ljnelson wrote:
<br></div></div><div><div><div></div><div class="h5"><div class="shrinkable-quote"><br>&gt; 
<br>&gt; Hello; I've made a JCA resource adapter for Drools.
<br>&gt; 
<br>&gt; I've had to hack quite a bit to get it so that the KnowledgeAgent- and
<br>&gt; resource-scanning-related parts don't use Threads, but, instead, use the
<br>&gt; JCA-supplied WorkManager and BootstrapContext#createTimer() for asynchronous
<br>&gt; operations (like resource scanning and notifying). &nbsp;
<br>&gt; 
<br>&gt; Here are some changes it would sure be nice to see, that I needed to hack
<br>&gt; around in order to make it so that a KnowledgeAgent-produced KnowledgeBase
<br>&gt; could be shared by Java EE components in a specification compliant manner:
<br>&gt; 
<br>&gt; 1. ResourceChangeNotifierImpl#ProcessChangetSet is an inner class that is
<br>&gt; marked as public static, but which has a package-protected constructor. &nbsp;I
<br>&gt; have to create a new instance of this in order to create a
<br>&gt; ResourceChangeNotifierImpl subclass that doesn't use threads. &nbsp;I hope this
<br>&gt; constructor could be made public instead. &nbsp;Right now I'm calling
<br>&gt; setAccessible(true). &nbsp;Yecch.
<br>&gt; 
<br>&gt; 2. ResourceFactory#setFactoryService(): sure do wish this were public, or
<br>&gt; that there were another way to install a ResourceFactoryService. &nbsp;I need to
<br>&gt; do this so that the scanner and notifier are under my control (and don't use
<br>&gt; Threads, but instead use Timers as provided by the JCA BootstrapContext
<br>&gt; class). &nbsp;It appears that I do have some control here in Drools 5.1 with the
<br>&gt; (undocumented) ServiceRegistry interface (how do I get an instance of it?
<br>&gt; what does it do? is it used pervasively?), but I don't know, since it's
<br>&gt; undocumented, whether it's the preferred way to do this sort of thing or
<br>&gt; not.
<br>&gt; 
<br>&gt; 3. All this indirection is really quite clunky, especially given the
<br>&gt; META-INF/services facility. &nbsp;Was there a good reason this was not used? &nbsp;I'm
<br>&gt; sure there was something, because having to consult a factory for a service
<br>&gt; to get a provider to produce an instance of something is a bit much.
<br>&gt; 
<br>&gt; Hacking around those limitations, I was able to produce a Drools resource
<br>&gt; adapter that vends KnowledgeBase instances as its user connection factories. 
<br>&gt; This means to use it in a spec-compliant manner, you do this in your
<br>&gt; stateless (or stateful) session bean:
<br>&gt; 
<br>&gt; @Resource
<br>&gt; private KnowledgeBase kb;
<br>&gt; 
<br>&gt; ...and you get injected a wrapper KnowledgeBase that uses the Java EE
<br>&gt; container's JCA machinery to invoke operations on the shared KnowledgeBase.
<br>&gt; 
<br>&gt; Is this something that would be interesting to other people? &nbsp;If so I am
<br>&gt; happy to open source it.
<br>&gt; 
<br>&gt; Thanks for a great toolkit.
<br>&gt; 
<br>&gt; Best,
</div></div></div>&gt; Laird
<br>&gt; -- 
<br>&gt; View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-and-Java-EE-tp1323225p1323225.html?by-user=t&amp;by-user=t" rel="nofollow" link="external" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Drools-and-Java-EE-tp1323225p1323225.html</a><div class="im">
<br>&gt; Sent from the Drools - User mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.
<br>&gt; _______________________________________________
<br>&gt; rules-users mailing list
<br>&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=1336588&amp;i=0" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></div></div><div class="im"><br><br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=1336588&amp;i=1" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br><br>
<hr color="#cccccc" noshade="" size="1">
</div><div style="color: rgb(102, 102, 102); font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
View message @ <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-and-Java-EE-tp1323225p1336588.html?by-user=t" target="_blank" rel="nofollow" link="external">http://drools-java-rules-engine.46999.n3.nabble.com/Drools-and-Java-EE-tp1323225p1336588.html</a>

<br><div class="im">To unsubscribe from Drools and Java EE, <a href="http://drools-java-rules-engine.46999.n3.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&amp;node=1323225&amp;code=bGpuZWxzb25AZ21haWwuY29tfDEzMjMyMjV8ODk5ODM2NTky&amp;by-user=t" target="_blank" rel="nofollow" link="external">click here</a>.
</div></div>
<br>
</blockquote></div><br>

<br><hr align="left" width="300">
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-and-Java-EE-tp1323225p1336777.html">Re: Drools and Java EE</a><br>
Sent from the <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-User-f47000.html">Drools - User mailing list archive</a> at <a href="http://Nabble.com">Nabble.com</a>.<br>
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></body></html>