<div dir="ltr"><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:12.727272033691406px">Davide,</span><br><div><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:12.727272033691406px">The session is created only one time. I am creating the session in prepare method. It will be called only once. </span></div>
<div><font color="#888888" face="arial, sans-serif">Of course 6.0 is giving good performance.</font></div><div><font color="#888888" face="arial, sans-serif"><br></font></div><div><font color="#888888" face="arial, sans-serif">Thanks a lot for help</font></div>
<div><font color="#888888" face="arial, sans-serif">Regards,</font></div><div><font color="#888888" face="arial, sans-serif">Raj</font></div><div><font color="#888888" face="arial, sans-serif"><br></font></div><div><font color="#888888" face="arial, sans-serif"><br>
</font></div><div><font color="#888888" face="arial, sans-serif"><br></font></div><div><font color="#888888" face="arial, sans-serif"><br></font></div><div><font color="#888888" face="arial, sans-serif"><br></font></div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 15 March 2014 15:26, Davide Sottara <span dir="ltr"><<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Raj,<br>
I'd like to see how you used to create the KieSessions before.<br>
<br>
If you just did:<br>
KieContainer.newKieSession()<br>
that might not work<br>
<br>
You should instead be able to do:<br>
KieBase.newKieSession(),<br>
but create the KieBase only once, not every time you need a <br>
KieSession (assuming that all sessions will essentially use<br>
the same rules)<br>
<br>
The way you do it now works, but has a heavy impact<br>
on performance, since you recreate the KieBase every time.<span class="HOEnZb"><font color="#888888"><br>
<br>
Davide</font></span><div><div class="h5"><br>
<br>
On 03/15/2014 08:04 AM, Raja Sekhar wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">Hi Davide/Wolfgang
<div>The problem is resolved by establishing the session from
Kiebase</div>
<div>
<div>KieContainer kc =
KieServices.Factory.get().getKieClasspathContainer();</div>
<div>KieBaseConfiguration conf
=KieServices.Factory.get().newKieBaseConfiguration();</div>
<div>KieBase kieBase = kc.newKieBase(kBaseName, conf);</div>
<div>ksession=kieBase.newKieSession();</div>
<table style="font-family:arial,sans-serif;font-size:13px" cellpadding="0">
<tbody>
<tr>
<td style="width:605px">
No more errors are seen in the log. <span style="font-family:arial;font-size:small">Kiebase is
thread safe.<br>
</span><br>
Regards,<br>
Raj<br>
<br>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
On 14 March 2014 23:38, Raja Sekhar <span dir="ltr"><<a href="mailto:raja.amirapu@gmail.com" target="_blank">raja.amirapu@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi
<div>Thanks a lot <span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Wolfgang</span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"> </span></div>
<div><br>
</div>
<div><font face="arial, sans-serif">Actually i have 2
bolts 1 bolt gets inserts the facts emitted by
sprout and other bolt inserts data into the database.
yes 1 bot per fact </font></div>
<div><font face="arial, sans-serif">regarding losing
session i mean that does the KieSession(6.0) works in
a current technology stack which i am using
currently using strom - drools- saving back to
database.</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif">Regards,</font></div>
<div><font face="arial, sans-serif">Raj</font></div>
</div>
<div>
<div>
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">
On 14 March 2014 19:59, Davide Sottara <span dir="ltr"><<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+1 Wolfgang :)<br>
<br>
Raj,<br>
we'd need to know things like: how many bolts, how
many knowledge bases<br>
(I guess one),<br>
how many kiesession - a singleton, one per bolt,
one per batch of facts...?<br>
Also, "losing the session since it's running in a
multi-threaded<br>
environment" - what does<br>
it mean exactly?<br>
Thanks<br>
<div>
<div><br>
On 03/14/2014 12:42 PM, Wolfgang Laun wrote:<br>
> The clarity and precision of your
descriptions is unsurpassed.<br>
> -W<br>
><br>
> On 14/03/2014, Raja Sekhar <<a href="mailto:raja.amirapu@gmail.com" target="_blank">raja.amirapu@gmail.com</a>>
wrote:<br>
>> We are using storm in big data stack,
we are reading data from database and<br>
>> apply rules on them.<br>
>> This is how storm works we have a
topology and a spout(input) and<br>
>> bolts(processing and output). spouts
will be reading from DB and sending<br>
>> them to the bolt. The bolt will
initiate a kiesession and fire the rules<br>
>> after a threshold is reached. the
threshold will be decided by spout Here<br>
>> what is happening , suppose we are
processing a set of 500 records, 250 are<br>
>> getting processed and 250 are getting
failed<br>
>> Please suggest<br>
>><br>
>><br>
>><br>
>> On 14 March 2014 15:53, Davide
Sottara <<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>>
wrote:<br>
>><br>
>>> Major bugs are usually
backported.. are you sure that this fix
addresses<br>
>>> your problem?<br>
>>> In general, if you don't provide
a detailed description of your<br>
>>> environment and your<br>
>>> problem, it will be extremely
difficult to help you<br>
>>><br>
>>><br>
>>> On 03/14/2014 10:03 AM, Raja
Sekhar wrote:<br>
>>><br>
>>> Hi Davide,<br>
>>> I see that i am loosing the
session since i am running is multi-threaded<br>
>>> environment<br>
>>> I see the following URL<br>
>>> <a href="https://github.com/droolsjbpm/drools/pull/256/files" target="_blank">https://github.com/droolsjbpm/drools/pull/256/files</a><br>
>>><br>
>>> Are these changed to main branch
for version 6.0.1<br>
>>><br>
>>> Regards,<br>
>>> Raj<br>
>>><br>
>>><br>
>>><br>
>>> On 13 March 2014 23:46, Davide
Sottara <<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>>
wrote:<br>
>>><br>
>>>> Do you call
session.dispose() after you fire your rules?<br>
>>>> That exception means that
your stateful session was disposed,<br>
>>>> and you can no longer call
methods to insert facts or fire rules<br>
>>>> (or anything if that matters)
on a session that has been disposed.<br>
>>>> If so, you'll need to create
a new one.<br>
>>>> Davide<br>
>>>><br>
>>>><br>
>>>> On 03/13/2014 07:06 PM, Raja
Sekhar wrote:<br>
>>>><br>
>>>> Iam using Stateful sessions .<br>
>>>> On Mar 13, 2014 11:27 PM,
"Davide Sottara" <<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>>
wrote:<br>
>>>><br>
>>>>> Are you using stateful
or stateless sessions?<br>
>>>>> Davide<br>
>>>>><br>
>>>>> On 03/13/2014 05:01 PM,
Raja Sekhar wrote:<br>
>>>>><br>
>>>>> Hi<br>
>>>>> Can someone help me with
this.<br>
>>>>><br>
>>>>> Regards<br>
>>>>> Raj<br>
>>>>><br>
>>>>><br>
>>>>> On 13 March 2014 14:05,
Raja Sekhar <<a href="mailto:raja.amirapu@gmail.com" target="_blank">raja.amirapu@gmail.com</a>>
wrote:<br>
>>>>><br>
>>>>>> Hi<br>
>>>>>> Iam processing
dataset stream with storm. After receiving the
first<br>
>>>>>> set<br>
>>>>>> of records the rule
is firing. For next set of records i getinet
this<br>
>>>>>> exception<br>
>>>>>> Illegal method call.
This session was previously disposed<br>
>>>>>> I after firing the
rules the session is get disposed. I am not
getting<br>
>>>>>> where to reeslish the
session. Also how i do i know if the session<br>
>>>>>> is<br>
>>>>>> alive or not?<br>
>>>>>><br>
>>>>>> --<br>
>>>>>> Raja Sekhar Amirapu<br>
>>>>>>
------------------------------------------------------<br>
>>>>>> "If any anyone can do
it, i can do it. If no one else can do it, i<br>
>>>>>> must<br>
>>>>>> do it"<br>
>>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> Raja Sekhar Amirapu<br>
>>>>>
------------------------------------------------------<br>
>>>>> "If any anyone can do it,
i can do it. If no one else can do it, i must<br>
>>>>> do it"<br>
>>>>><br>
>>>>><br>
>>>>>
_______________________________________________<br>
>>>>> rules-users mailing<br>
>>>>>
<a href="mailto:listrules-users@lists.jboss.orghttps://" target="_blank">listrules-users@lists.jboss.orghttps://</a><a href="http://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>>
_______________________________________________<br>
>>>>> rules-users mailing list<br>
>>>>> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
>>>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>>><br>
>>>><br>
>>>>
_______________________________________________<br>
>>>> rules-users mailing<br>
>>>>
<a href="mailto:listrules-users@lists.jboss.orghttps://" target="_blank">listrules-users@lists.jboss.orghttps://</a><a href="http://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>>
_______________________________________________<br>
>>>> rules-users mailing list<br>
>>>> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
>>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Raja Sekhar Amirapu<br>
>>>
------------------------------------------------------<br>
>>> "If any anyone can do it, i can
do it. If no one else can do it, i must<br>
>>> do<br>
>>> it"<br>
>>><br>
>>><br>
>>>
_______________________________________________<br>
>>> rules-users mailing<br>
>>>
<a href="mailto:listrules-users@lists.jboss.orghttps://" target="_blank">listrules-users@lists.jboss.orghttps://</a><a href="http://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>><br>
>>><br>
>>><br>
>>>
_______________________________________________<br>
>>> rules-users mailing list<br>
>>> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>>><br>
>><br>
>><br>
>> --<br>
>> Raja Sekhar Amirapu<br>
>>
------------------------------------------------------<br>
>> "If any anyone can do it, i can do
it. If no one else can do it, i must do<br>
>> it"<br>
>><br>
>
_______________________________________________<br>
> rules-users mailing list<br>
> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">Raja Sekhar Amirapu<br>
------------------------------------------------------
<div>"If any anyone can do it, i can do it. If no
one else can do it, i must do it"<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">Raja Sekhar Amirapu<br>
------------------------------------------------------
<div>"If any anyone can do it, i can do it. If no one else can
do it, i must do it"<br>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Raja Sekhar Amirapu<br>
------------------------------------------------------<div>"If any anyone can do it, i can do it. If no one else can do it, i must do it"<br></div></div>
</div>