0

I'm trying to resolve a weird behavior in my application, and to help me I would like to debug the JSF phases (i.e display the sequence)

I use Seam 3 with the SeamFaces Module.

I've trying to use the @Observes annotation as explained in the documentation, without success,

My class :

// @Named ? With or without, it doesn't work.
public class PhaseListener {

    public void observeBefore(@Observes @Before PhaseEvent e)
    {
        System.out.println("Before phase :"+e.getPhaseId().toString());
    }

    public void observeAfter(@Observes @After PhaseEvent e)
    {
        System.out.println("After phase :"+e.getPhaseId().toString());
    } 

}

Problem : I've set a breakpoint inside the functions, but this code is never executed.

Anybody could help me to achieve this objective? Thank you.

Julien Lafont
  • 7,869
  • 2
  • 32
  • 52

1 Answers1

0

Do you have a beans.xml in your WEB-INF? My guess is your WAR isn't being considered a bean archive so CDI isn't picking up your observers.

LightGuard
  • 5,298
  • 19
  • 19