2 Replies Latest reply on Jul 19, 2012 2:36 AM by suikast42

    CDI Proxy problem

    suikast42

      Recently I migrated some EJB Stateful session beans to CDI beans with dependent scope.

       

      I was surprised that I get for some beans a proxy and for some not.

       

      The problem was that I leave the @Prepassivate and @PostActivate annotations. If I comment this out then I get the real instances instead of the proxies.

       

      Is that a bug or a feature ??

        • 1. Re: CDI Proxy problem
          alesj

          Imo, a feature - so you can properly serialize the bean info, etc.

          Why do you think it's a bug?

          • 2. Re: CDI Proxy problem
            suikast42

            Ales Justin schrieb:

            Why do you think it's a bug?

            Beacause, @PrePassivate and @PostActivate are annaotations of the EJB stack. I can't understand why I get a proxy if I use this annotations for @Dependent Scope. ( I know it makes no sense to use this annotations in CDI or I'm worng ?? ).