3 Replies Latest reply on Jul 18, 2011 3:53 PM by csa

    Location of CDI Service beans

    craiggreenhalgh

      I've found a problem (possible bug ?)

       

      When I have an @Application scoped @Service bean

       

      my.app.gwt.server.service.TestService.class

       

      The service is registered and is useable.

       

      However, if I move the same bean to

       

      my.app.gwt.server.service.subpack.TestService.class

       

      Then the bean is not useable anymore, lookupCallbackBean in Util returns null

       

       

      Do I need to specify the packages / subpackages to use CDI beans?

       

      Thanks

       

      Craig

        • 1. Re: Location of CDI Service beans
          csa

          I just tried this and it worked fine using Errai 1.2.3-SNAPSHOT and dev mode (mvn clean gwt:run). Where are you deploying your app to? Also, can you confirm that your class is in war/WEB-INF/classes and in the corresponding directory?

          • 2. Re: Location of CDI Service beans
            craiggreenhalgh

            I'm using 1.2.3-SNAP also,

             

            Yep classes are deployed in into WEB-INF/classes

             

            I'm using jboss6 Final.

             

            It must initially register the beans as the typename is the fully qualified name, just cannot get reference to an actual bean

             

            Thanks for your help

             

            Craig

            • 3. Re: Location of CDI Service beans
              csa

              Works fine in JBoss 6 too. Anything in your boot or server.log? Weld's BeanManager doesn't seem to be able to resolve your Service.