Hi...
Write the following code in to click event Ex : .xhtml file..
//jboss-seam.jar 2.1.1
/*
* Sreshtaya Softech India Pvt Ltd.
*
*/
/*Getting Security.drl from context which is mentioned in Component.xml Ex :
<drools:rule-base name="securityRules">
<drools:rule-files>
security.drl
</drools:rule-files>
</drools:rule-base>*/
org.jboss.seam.drools.RuleBase ruleBase= (org.jboss.seam.drools.RuleBase)
Contexts.getApplicationContext().get("securityRules");
//Getting RuleBasedPermissionResolver from context
RuleBasedPermissionResolver ruleBasedPermissionResolver=
(RuleBasedPermissionResolver)
Contexts.getSessionContext().get("org.jboss.seam.security.ruleBasedPermissionResolver");
try {
//Applying new rules to context
ruleBase.compileRuleBase();
//Loading all rules to Context
ruleBasedPermissionResolver.setSecurityContext(ruleBase.getRuleBase().newStatefulSession());
} catch (Exception e) {
e.printStackTrace();
}
Thats it without restatring the Jboss server all rules can apply at runtime..
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206788#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...