1 Reply Latest reply on Aug 28, 2009 1:26 AM by Stuart Douglas

    How does Seam know when to apply bijection on which components

    Arbi Sookazian Master

      So apparently Seam does not biject any instances in entity classes, even if they are marked using @Name.  Which class/method(s) in the Seam core codebase is responsible for the bijection and determining what type of class/component it is so it knows whether bijection is legal or not?

      I guessed org.jboss.seam.core.BijectionInterceptor but not sure if that's the right one...

      Also, in the API for that class, there's this public method: isInterceptorEnabled().

      How exactly would you use this in a Seam component?

      You can't inject BijectionInterceptor, b/c it doesn't have @Name (i.e. it's not a Seam component).

      So would you just do:

      BijectionInterceptor bijectionInterceptor = new BijectionInterceptor();
      boolean myVal = bijectionInterceptor.isInterceptorEnabled();


      that doesn't seem right...

      that method is from OptimizedInterceptor interface which is implemented by BijectionInterceptor:

      Returns true if this interceptor should be enabled. The component and the annotation will be injected into the interceptor instance before this method is called, and can be used to decide whether the interceptor should be enabled

      So should we expect the return value to be true for session beans and JavaBeans, and false if invoked from an entity class method?