[rules-users] Debug drools 4 application launched from a Servlet Container ?

Mark Proctor mproctor at codehaus.org
Sun Nov 16 06:35:21 EST 2008


Maxim Veksler wrote:
> Hello Andrew
>
> On Sat, Nov 15, 2008 at 11:50 PM, Andrew Waterman
> <andrew.waterman at gmail.com> wrote:
>   
>> Hi Maxim,
>> We too use drools from within a web container.  The way that I've debugged
>> my runtime issues (and this may not be the most efficient way at all) is
>> simply through jUnit tests that replicate error conditions during build
>> time.  Depending on what you're up to, you can often insert the same data
>> into working memory that you are explicitly inserting on the server-side.
>>  Of course, this is a pretty obvious solution, but I've found it to be a
>> help with debugging my rules.  If you upgrade to the new Drools 5.0 plugin
>> for eclipse, stepping through the rules code is pretty easy, and, I believe,
>> also possible with 4.0.7 setups.  Of course, this may not help with an error
>> condition triggered on large groups of data, or something specific to the
>> container.  With regards to the container, we also run a set of integration
>> tests that manipulate our rules through local handles to the EJBs that I use
>> to work with Drools.  Both approaches have helped us out a great deal, but
>> we are activating Drools statelessly.
>> best wishes,
>> Andrew
>>
>>     
>
> Thank you for the details answer Andres.
>
> Trouble is this is not enough, I want to be able to debug runtime
> data. I don't mind this "runtime" will be running from my Eclipse
> instance but I need to be running from within the Servlet.
>
> Does someone knows, perhaps one of the devs? How the drools plugin
> speaks with the WM?
>   
Remote debugging is not possible. What you can do is turn on the audit 
log, or even add your own set of listeners, to create an execution trace 
of the engine and it's actions.

Mark
> Maybe we could write some interface that would allow to poll it "from
> outside" - That is from something that is running in a different
> project.
>
>
>   
>> On Sat, Nov 15, 2008 at 12:57 PM, Maxim Veksler <maxim.veksler at gmail.com>
>> wrote:
>>     
>>> Hello
>>>
>>> We are using MyEclipse extension to launch a webapp that contains Drools.
>>> I would like to debug the WorkingMemory state of this webapp.
>>>
>>> From reading the user guide I see that suggested method of debugging a
>>> drools application is launching the Main class, as my application is a
>>> webapp the concept of a Main class does not exists.
>>>
>>> How should I debug Drools from in this case?
>>> Can I maybe remote connect or instruct Drools to simply treat the running
>>> JVM as a "Drools Application" when in fact it was launched by Apache Tomcat
>>> servlet ?
>>>
>>>
>>> Thank you,
>>> Maxim.
>>>
>>> --
>>> Cheers,
>>> Maxim Veksler
>>>
>>> "Free as in Freedom" - Do u GNU ?
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>       
>>
>> --
>> +1 510 342 5693
>>
>> PO Box 7775 #8750
>> San Francisco, California   94120-7775
>>
>> "Warning:  following standard input indefinitely is ineffective"
>> - /bin/tail error message
>>
>> "Against logic there is no armor like ignorance."
>>  - Laurence J. Pete
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>     
>
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081116/539fb5ca/attachment.html 


More information about the rules-users mailing list