Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

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

scott.stark@jboss.org

2007-08-07


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@(protected)
|

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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.