1 Reply Latest reply on Nov 16, 2007 12:47 PM by mgrouch

    Best Practice Question - Avoid Excessive Bijection

    jfrankman Novice

      In Michael Yuan's book "JBoss Seam" section 2.4.5 he recommends that you avoid using Bijection (@Out annotation) excessivly. He cites the reasons of readability and performance. Unfortunately he does not elaborate much more on this.

      Has anyone found this to be true? Is there any "rule of thumb" you can go by? When is using the @Out annotation helpful and when is it too much?

        • 1. Re: Best Practice Question - Avoid Excessive Bijection
          mgrouch Expert

          @Out outjection into event scope should be used for better EL performance.

          If you have a lot of

          #{bean.subBean.subSubBean.prop1}
          #{bean.subBean.subSubBean.prop2}
          #{bean.subBean.subSubBean.prop3}
          #{bean.subBean.subSubBean.prop4}

          you should outject bean.subBean.subSubBean as subSubBean
          and use

          #{subSubBean.prop1}
          #{subSubBean.prop2}
          #{subSubBean.prop3}

          This will perform better.
          Remember with current EL implementation each dot '.'
          is a reflection call when it is evaluated.