[
http://jira.jboss.com/jira/browse/JBSEAM-1020?page=comments#action_12355681 ]
Christian Bauer commented on JBSEAM-1020:
-----------------------------------------
Now I get an exception in the logging... also found this in the Drools docs:
new WorkingMemoryLogger( ((RuleBasedIdentity)identity).getSecurityContext() ) {
public void logEventCreated(LogEvent logEvent) {
System.out.println("### DROOLS: " + logEvent.toString());
}
};
1. We need to tell the Drools guys that implementing a sensible toString() method on their
logEvent is a good thing.
2. The logger wants to convert stuff to cast objects in my working memory (a model.User
instance in this case) to org.jboss.seam.security.Role:
Caused by: java.lang.ClassCastException: org.jboss.seam.security.Role
at org.drools.base.org.jboss.seam.wiki.core.model.User$getId.getValue(Unknown
Source)
at org.drools.base.ClassFieldExtractor.getValue(Unknown Source)
at org.drools.rule.Declaration.getValue(Unknown Source)
at org.drools.audit.WorkingMemoryLogger.extractDeclarations(Unknown Source)
at org.drools.audit.WorkingMemoryLogger.activationCreated(Unknown Source)
at org.drools.event.AgendaEventSupport.fireActivationCreated(Unknown Source)
at org.drools.reteoo.TerminalNode.assertTuple(Unknown Source)
at org.drools.reteoo.TerminalNode.assertTuple(Unknown Source)
at org.drools.reteoo.TupleSource.propagateAssertTuple(Unknown Source)
at org.drools.reteoo.JoinNode.assertTuple(Unknown Source)
at org.drools.reteoo.TupleSource.propagateAssertTuple(Unknown Source)
at org.drools.reteoo.JoinNode.assertObject(Unknown Source)
at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
at org.drools.reteoo.ObjectTypeNode.assertObject(Unknown Source)
at org.drools.reteoo.Rete.assertObject(Unknown Source)
at org.drools.reteoo.ReteooRuleBase.assertObject(Unknown Source)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
at
org.jboss.seam.security.RuleBasedIdentity.hasPermission(RuleBasedIdentity.java:131)
at
org.jboss.seam.security.SecurityFunctions.hasPermission(SecurityFunctions.java:19)
Configurable Drools event listeners (primarily for debug logging)
-----------------------------------------------------------------
Key: JBSEAM-1020
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1020
Project: JBoss Seam
Issue Type: Feature Request
Components: Security
Reporter: Christian Bauer
Assigned To: Shane Bryzak
Priority: Minor
I want to see what is going on when my rules are evaluated, according to the Drools docs
this is how:
workingMemory.addEventListener( new DebugWorkingMemoryEventListener() );
I have to do that in code right now, would be nice to be able to configure the identity
component externally in config file. It also doesn't work, at least not in JBoss with
a WAR deployment. I don't see any debug printed on System.out. Task: Ask the drools
guys how we get logging for Seam users.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira