[jboss-user] [JBoss Seam] - Clean way to attach debugger for drools

zaya do-not-reply at jboss.com
Tue Aug 7 21:48:57 EDT 2007


I'm trying to debug drools by attaching the debugger.

This is my code:

  | 
  | @Name("workingMemoryControl")
  | @Scope(ScopeType.EVENT)
  | public class WorkingMemoryControl {
  | 	
  | 	@In
  | 	WorkingMemory workingMemory;
  | 	
  | 	@Observer("org.jboss.seam.postCreate.workingMemory")
  | 	public void attachDebugger() {
  | 		workingMemory.addEventListener(new DebugWorkingMemoryEventListener());
  | 		List listeners = workingMemory.getWorkingMemoryEventListeners();
  | 		for (Object listener: listeners) {
  | 			System.out.println("[listener] Added in working memeory:" + listener);
  | 		}
  | 	}
  | }
  | 

And this is the security method:

  | 	@Restrict("#{s:hasPermission('register','register',user)}")
  | 	public String secured() {//some code }
  | 

The problem is the postCreate event is always after authorization, which is not what I want.


  | 09:40:23,014 INFO  [STDOUT] Drools rule triggered!
  | 09:40:23,027 INFO  [STDOUT] [listener] Added in working memeory:org.drools.event.DebugWorkingMemoryEventListener at 7c9c8a7b
  | 

Can anyone provide some suggestions?
Thanks in advance.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071798#4071798

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071798



More information about the jboss-user mailing list