Davide, The session is created only one time. I am creating the session in prepare method. It will be called only once. Of course 6.0 is giving good performance.
Thanks a lot for help Regards, Raj On 15 March 2014 15:26, Davide Sottara <dso...@gmail.com> wrote: > Raj, > I'd like to see how you used to create the KieSessions before. > > If you just did: > KieContainer.newKieSession() > that might not work > > You should instead be able to do: > KieBase.newKieSession(), > but create the KieBase only once, not every time you need a > KieSession (assuming that all sessions will essentially use > the same rules) > > The way you do it now works, but has a heavy impact > on performance, since you recreate the KieBase every time. > > Davide > > > On 03/15/2014 08:04 AM, Raja Sekhar wrote: > > Hi Davide/Wolfgang > The problem is resolved by establishing the session from Kiebase > KieContainer kc = KieServices.Factory.get().getKieClasspathContainer(); > KieBaseConfiguration conf > =KieServices.Factory.get().newKieBaseConfiguration(); > KieBase kieBase = kc.newKieBase(kBaseName, conf); > ksession=kieBase.newKieSession(); > No more errors are seen in the log. Kiebase is thread safe. > > Regards, > Raj > > > > > On 14 March 2014 23:38, Raja Sekhar <raja.amir...@gmail.com> wrote: > >> Hi >> Thanks a lot Wolfgang >> >> 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 >> 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. >> >> Regards, >> Raj >> >> >> On 14 March 2014 19:59, Davide Sottara <dso...@gmail.com> wrote: >> >>> +1 Wolfgang :) >>> >>> Raj, >>> we'd need to know things like: how many bolts, how many knowledge bases >>> (I guess one), >>> how many kiesession - a singleton, one per bolt, one per batch of >>> facts...? >>> Also, "losing the session since it's running in a multi-threaded >>> environment" - what does >>> it mean exactly? >>> Thanks >>> >>> On 03/14/2014 12:42 PM, Wolfgang Laun wrote: >>> > The clarity and precision of your descriptions is unsurpassed. >>> > -W >>> > >>> > On 14/03/2014, Raja Sekhar <raja.amir...@gmail.com> wrote: >>> >> We are using storm in big data stack, we are reading data from >>> database and >>> >> apply rules on them. >>> >> This is how storm works we have a topology and a spout(input) and >>> >> bolts(processing and output). spouts will be reading from DB and >>> sending >>> >> them to the bolt. The bolt will initiate a kiesession and fire the >>> rules >>> >> after a threshold is reached. the threshold will be decided by spout >>> Here >>> >> what is happening , suppose we are processing a set of 500 records, >>> 250 are >>> >> getting processed and 250 are getting failed >>> >> Please suggest >>> >> >>> >> >>> >> >>> >> On 14 March 2014 15:53, Davide Sottara <dso...@gmail.com> wrote: >>> >> >>> >>> Major bugs are usually backported.. are you sure that this fix >>> addresses >>> >>> your problem? >>> >>> In general, if you don't provide a detailed description of your >>> >>> environment and your >>> >>> problem, it will be extremely difficult to help you >>> >>> >>> >>> >>> >>> On 03/14/2014 10:03 AM, Raja Sekhar wrote: >>> >>> >>> >>> Hi Davide, >>> >>> I see that i am loosing the session since i am running is >>> multi-threaded >>> >>> environment >>> >>> I see the following URL >>> >>> https://github.com/droolsjbpm/drools/pull/256/files >>> >>> >>> >>> Are these changed to main branch for version 6.0.1 >>> >>> >>> >>> Regards, >>> >>> Raj >>> >>> >>> >>> >>> >>> >>> >>> On 13 March 2014 23:46, Davide Sottara <dso...@gmail.com> wrote: >>> >>> >>> >>>> Do you call session.dispose() after you fire your rules? >>> >>>> That exception means that your stateful session was disposed, >>> >>>> and you can no longer call methods to insert facts or fire rules >>> >>>> (or anything if that matters) on a session that has been disposed. >>> >>>> If so, you'll need to create a new one. >>> >>>> Davide >>> >>>> >>> >>>> >>> >>>> On 03/13/2014 07:06 PM, Raja Sekhar wrote: >>> >>>> >>> >>>> Iam using Stateful sessions . >>> >>>> On Mar 13, 2014 11:27 PM, "Davide Sottara" <dso...@gmail.com> >>> wrote: >>> >>>> >>> >>>>> Are you using stateful or stateless sessions? >>> >>>>> Davide >>> >>>>> >>> >>>>> On 03/13/2014 05:01 PM, Raja Sekhar wrote: >>> >>>>> >>> >>>>> Hi >>> >>>>> Can someone help me with this. >>> >>>>> >>> >>>>> Regards >>> >>>>> Raj >>> >>>>> >>> >>>>> >>> >>>>> On 13 March 2014 14:05, Raja Sekhar <raja.amir...@gmail.com> >>> wrote: >>> >>>>> >>> >>>>>> Hi >>> >>>>>> Iam processing dataset stream with storm. After receiving the >>> first >>> >>>>>> set >>> >>>>>> of records the rule is firing. For next set of records i getinet >>> this >>> >>>>>> exception >>> >>>>>> Illegal method call. This session was previously disposed >>> >>>>>> I after firing the rules the session is get disposed. I am not >>> getting >>> >>>>>> where to reeslish the session. Also how i do i know if the >>> session >>> >>>>>> is >>> >>>>>> alive or not? >>> >>>>>> >>> >>>>>> -- >>> >>>>>> Raja Sekhar Amirapu >>> >>>>>> ------------------------------------------------------ >>> >>>>>> "If any anyone can do it, i can do it. If no one else can do it, i >>> >>>>>> must >>> >>>>>> do it" >>> >>>>>> >>> >>>>> >>> >>>>> >>> >>>>> -- >>> >>>>> Raja Sekhar Amirapu >>> >>>>> ------------------------------------------------------ >>> >>>>> "If any anyone can do it, i can do it. If no one else can do it, i >>> must >>> >>>>> do it" >>> >>>>> >>> >>>>> >>> >>>>> _______________________________________________ >>> >>>>> rules-users mailing >>> >>>>> listrules-users@lists.jboss.orghttps:// >>> lists.jboss.org/mailman/listinfo/rules-users >>> >>>>> >>> >>>>> >>> >>>>> >>> >>>>> _______________________________________________ >>> >>>>> rules-users mailing list >>> >>>>> rules-users@lists.jboss.org >>> >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>>>> >>> >>>> >>> >>>> _______________________________________________ >>> >>>> rules-users mailing >>> >>>> listrules-users@lists.jboss.orghttps:// >>> lists.jboss.org/mailman/listinfo/rules-users >>> >>>> >>> >>>> >>> >>>> >>> >>>> _______________________________________________ >>> >>>> rules-users mailing list >>> >>>> rules-users@lists.jboss.org >>> >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>>> >>> >>> >>> >>> >>> >>> -- >>> >>> Raja Sekhar Amirapu >>> >>> ------------------------------------------------------ >>> >>> "If any anyone can do it, i can do it. If no one else can do it, i >>> must >>> >>> do >>> >>> it" >>> >>> >>> >>> >>> >>> _______________________________________________ >>> >>> rules-users mailing >>> >>> listrules-users@lists.jboss.orghttps:// >>> lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> >>> rules-users mailing list >>> >>> rules-users@lists.jboss.org >>> >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> >> >>> >> >>> >> -- >>> >> Raja Sekhar Amirapu >>> >> ------------------------------------------------------ >>> >> "If any anyone can do it, i can do it. If no one else can do it, i >>> must do >>> >> it" >>> >> >>> > _______________________________________________ >>> > rules-users mailing list >>> > rules-users@lists.jboss.org >>> > https://lists.jboss.org/mailman/listinfo/rules-users >>> > >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> -- >> Raja Sekhar Amirapu >> ------------------------------------------------------ >> "If any anyone can do it, i can do it. If no one else can do it, i must >> do it" >> > > > > -- > Raja Sekhar Amirapu > ------------------------------------------------------ > "If any anyone can do it, i can do it. If no one else can do it, i must do > it" > > > _______________________________________________ > rules-users mailing > listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Raja Sekhar Amirapu ------------------------------------------------------ "If any anyone can do it, i can do it. If no one else can do it, i must do it"
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users