Hi,
Without understanding the intricacies, just on general sw engineering
principles:
Is the number of possible package combinations too high to cache a rulebase
instance for each combination, or at least the ones anybody used recently?
If you have n toggle buttons on the GUI to include different packages or
not, then in the worst case you may end up with 2^n rulebase instances.
Or there could be a way to exclude packages from processing in individual
workspaces.
(other than adding a condition like UsePackageX() to each rule in a
package...)
Gabor
2011/1/19 Nikhil S. Kulkarni <Nikhil.Kulkarni(a)mastek.com>
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users