1 Reply Latest reply on Dec 13, 2006 11:49 AM by norman.richards

    Debuggers can cause early bijection

      Found an interesting and vaguely irritating problem when debugging my Seam application.

      My debugger (IDEA) in certain modes will execute toString() on all local/class variables that are visible at a breakpoint for display information. For a Seam component that has interception enabled this results in all the interceptors being fired including bijection. If this happens too early in the JSF lifecycle (e.g. restore view phase) then the bijection can try and inject other components that are not present yet (e.g. conversation scope) and you get an unknown error.

      I have no great solution for this. The only possiblility I can think of would be to exclude toString() from the interception which may have other side effects for implementations relying on this.

      Cheers.

      Mike.

        • 1. Re: Debuggers can cause early bijection

          You can use @Intercept to set a different interception policy. @Intercept(InterceptType.INVOKE_APPLICATION) should limit interception to only occur during invoke application phase, for example. I'm not sure what makes sense in your application, but that would be one avenue to explore in the short term.

          Perhaps in the long term @Intercept(InterceptType.NEVER) should be applicable to individual methods? I guess we'll have to see what Gavin thinks about this.