[rules-users] Doubts in Using RulesBase object

Nikhil S. Kulkarni Nikhil.Kulkarni at mastek.com
Wed Jan 19 08:15:58 EST 2011


Hi All,

                I am using JBOSS Rules 5.0.0, in which I am creating multiple RuleBase object based on package passed to it.

e.g.
public RuleBase (Package pkg)
{
                RuleBase rb = RuleBaseFactory.newRuleBase();
rb.addPackage(pkg);
return rb;
}

Though I know that creating RuleBase object every time will have huge performance impact but it is required because when Multiple requests will
Come on the application server based on functionality that need to be triggered based on click of different buttons which internally call Rules.

So I am trying another option by declaring RuleBase as Static Object so that it will be shared across application, but I am facing two  issues in that

Suppose I am using single RuleBase object then all the packages will be there that will be added using the above method on click of buttons which internally
Call rules by multiple users.

1)      Now my problem is I cannot remove package after finish of my task as user because if Suppose two users A and B are performing the same task using different
Login. Now as User A, if he removes the package after its processing of rules completed then User B will not find that package for doing its task because if they both pass the above method at same time then both fill find package present in RuleBase.

2)      If I keep all the packages as it is in RuleBase then Rules Engine will be triggered for all Rules present in all packages satisfying when condition.



So I am not able to understand what I exactly should do because currently I am facing performance issues in application and I think the Reason

is multiple RuleBase objects.



I have to change this So can anyone suggest me what I should do ??



Waiting for Reply.

Thanks & Regards,
Nikhil S. Kulkarni


MASTEK LTD.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110119/2e2901f5/attachment.html 


More information about the rules-users mailing list